diff --git a/docSite/assets/docs/scss/custom/pages/_custom.scss b/docSite/assets/docs/scss/custom/pages/_custom.scss index 5bf33ae17..36b10f66a 100644 --- a/docSite/assets/docs/scss/custom/pages/_custom.scss +++ b/docSite/assets/docs/scss/custom/pages/_custom.scss @@ -1,4 +1,4 @@ -.docs-content .main-content img, .docs-content .main-content svg { +.docs-content .main-content img, .docs-content .main-content svg:not(.gitinfo svg) { max-width: 80% !important; height: auto; display: block !important; diff --git a/docSite/hugo.toml b/docSite/hugo.toml index 5ded07951..d3670f804 100644 --- a/docSite/hugo.toml +++ b/docSite/hugo.toml @@ -79,7 +79,8 @@ defaultContentLanguage = 'zh-cn' prism = true # enable syntax highlighting via Prism # gitinfo - ghrepo = "https://github.com/labring/FastGPT" # Git repository URL for your site + repoURL = "https://github.com/labring/FastGPT" # Git repository URL for your site + repoBranch = "main" # Name of your Git repository branch editPage = true # enable 'Edit this page' feature - default false lastMod = false # enable 'Last modified' date on pages - default false lastModRelative = true # format 'Last modified' time as relative - default true diff --git a/docSite/i18n/zh-cn.toml b/docSite/i18n/zh-cn.toml index c63bfdd9d..553987f98 100644 --- a/docSite/i18n/zh-cn.toml +++ b/docSite/i18n/zh-cn.toml @@ -29,4 +29,7 @@ other = "Was this page helpful?" [feedback_submit] - other = "提交" \ No newline at end of file + other = "提交" + +[edit_page] + other = "编辑此页面" \ No newline at end of file diff --git a/docSite/layouts/docs/single.html b/docSite/layouts/docs/single.html new file mode 100644 index 000000000..54cbf81da --- /dev/null +++ b/docSite/layouts/docs/single.html @@ -0,0 +1,34 @@ +{{ define "main" }} + +
+ {{ .Content }} +
+ + + {{ if .Site.Params.docs.repoURL -}} + {{ partial (printf "%s/%s" ($.Scratch.Get "pathName") "gitinfo") . }} + {{ end -}} + + {{ if .Page.Store.Get "hasMermaid" }} + + {{ end }} + + {{ if .Site.Params.feedback.enabled | default false -}} + {{ if or (.Site.Params.plausible.dataDomain) (.Site.GoogleAnalytics) }} + {{- partial (printf "%s/%s" ($.Scratch.Get "pathName") "footer/feedback.html") . -}} + {{ else }} + {{ errorf "Either Google Analytics or Plausible Analytics must be configured before enabling the Feedback Widget." }} + {{ end }} + {{ end -}} + +{{ end }} \ No newline at end of file diff --git a/docSite/layouts/partials/docs/gitinfo.html b/docSite/layouts/partials/docs/gitinfo.html new file mode 100644 index 000000000..380560274 --- /dev/null +++ b/docSite/layouts/partials/docs/gitinfo.html @@ -0,0 +1,47 @@ +{{ $repoURL := slice .Site.Params.docs.repoURL }} +{{ $repoHostname := (urls.Parse (.Site.Params.docs.repoURL)).Hostname }} +{{ $filePath := replace .File.Path "\\" "/" }} +{{ $iconPath := "" }} + +{{ if strings.Contains ($repoHostname | lower) "github" }} + {{ $repoURL = $repoURL | append "blob" (.Site.Params.docs.repoBranch | default "main") }} + {{ $iconPath = "images/social/github_icon.svg" }} +{{ else if strings.Contains ($repoHostname | lower) "gitlab" }} + {{ $repoURL = $repoURL | append "-/blob" (.Site.Params.docs.repoBranch | default "main") }} + {{ $iconPath = "images/social/gitlab_icon.svg" }} +{{ else if strings.Contains ($repoHostname | lower) "bitbucket" }} + {{ $repoURL = $repoURL | append "src" (.Site.Params.docs.repoBranch | default "master") }} + {{ $iconPath = "images/social/bitbucket_icon.svg" }} +{{ end }} + +{{ $repoURL = $repoURL | append "docSite/content" .Site.LanguagePrefix $filePath }} +{{ $repoURL = delimit $repoURL "/" }} +{{ $editPageURL := replaceRE "(https?://)|(/)+" "$1$2" $repoURL }} + +
+ {{ if .Site.Params.docs.editPage | default false -}} +
+ + + + {{ with resources.Get $iconPath }} + {{ .Content | safeHTML }} + {{ end }} + + {{ i18n "edit_page" }} + + +
+ {{ end }} + {{ if .Site.Params.docs.lastMod | default false -}} +
+

Last updated + {{ dateFormat "02 Jan 2006, 15:04 MST" .GitInfo.AuthorDate }} + . history +

+
+ {{ end }} +
\ No newline at end of file diff --git a/docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content b/docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content index 8e28bbff5..6955a5db7 100644 --- a/docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content +++ b/docSite/resources/_gen/assets/scss/docs/scss/style.scss_b97bf3f19a5ec64d7a7c5d60f7e31818.content @@ -9638,11 +9638,14 @@ img { order: 1; } .docs-content .main-content a { + font-weight: 600; color: var(--content-link-color); } .docs-content .main-content a:hover { text-decoration: underline 2px var(--primary-200); text-underline-offset: 2.5px !important; transition: 0s !important; } + .docs-content .main-content a code { + color: var(--content-link-color); } .docs-content .main-content #edit-this-page a:hover, .docs-content .main-content #list-item a:hover { @@ -9663,22 +9666,24 @@ img { font-weight: 700; color: var(--body-color); } -.docs-content .main-content a { - font-weight: 600; } - .docs-content .content-title { - font-weight: 700; } - .docs-content .content-title i { - width: 44px; - height: 44px; - color: var(--content-icon-color); - background-color: var(--content-icon-bg); - display: inline-flex !important; - align-items: center; - justify-content: center; - font-size: 24px; - border-radius: 5px; } + font-weight: 700; + align-self: center; } +i.title-icon { + width: 44px; + height: 44px; + color: var(--content-icon-color); + background-color: var(--content-icon-bg); + display: inline-flex !important; + align-self: center; + align-items: center; + justify-content: center; + font-size: 24px; + border-radius: 5px; } + @media (max-width: 768px) { + i.title-icon { + align-self: auto; } } .docs-content p.lead { color: var(--text-muted); font-weight: 400; } @@ -9692,17 +9697,17 @@ img { .docs-content p.lead { font-size: 1rem; } } -.docs-content .main-content img { - max-width: 100%; } +.docs-content .main-content img, +.docs-content .main-content svg { + max-width: 100%; + height: auto; } .docs-content .main-content ul { - list-style: none; - line-height: 26px; padding-left: 0; } - .docs-content .main-content ul li { + .docs-content .main-content ul > li { position: relative; padding-left: 32px; } - .docs-content .main-content ul li::before { + .docs-content .main-content ul > li::before { content: ""; position: absolute; width: 6px; @@ -9713,13 +9718,12 @@ img { background: var(--gray-500); } .docs-content .main-content ol { - list-style: none; - line-height: 26px; } - .docs-content .main-content ol li { + counter-reset: listitem; } + .docs-content .main-content ol > li { counter-increment: listitem; position: relative; padding-left: 32px; } - .docs-content .main-content ol li::before { + .docs-content .main-content ol > li::before { content: counter(listitem); background: var(--ordered-list-bg); color: var(--ordered-list-color); @@ -9735,6 +9739,11 @@ img { left: 0; top: 3px; } +.docs-content .main-content ol, +.docs-content .main-content ul { + list-style: none; + line-height: 26px; } + .docs-content .main-content blockquote { margin-bottom: 1rem; font-size: 1.25rem; @@ -9752,7 +9761,7 @@ img { .docs-content .main-content code { font-size: inherit; color: var(--text-default); - font-weight: 500; + font-weight: 400; padding: 1px 2px; background: var(--inline-code-bg); border: var(--inline-code-border); @@ -9822,11 +9831,20 @@ img { overflow-y: overlay; position: relative; border-right: 1px solid var(--sidebar-border-color); - scrollbar-width: none; } + scrollbar-width: thin; + scrollbar-color: var(--sidebar-bg) var(--sidebar-bg); } .page-wrapper .sidebar-wrapper .sidebar-content.desktop { overflow-y: hidden; } - .page-wrapper .sidebar-wrapper .sidebar-content::-webkit-scrollbar { - display: none; } + .page-wrapper .sidebar-wrapper .sidebar-content:hover { + scrollbar-color: var(--sidebar-scrollbar-thumb-color) var(--sidebar-bg); } + .page-wrapper .sidebar-wrapper .sidebar-content::-webkit-scrollbar { + width: 5px; + height: 8px; } + .page-wrapper .sidebar-wrapper .sidebar-content::-webkit-scrollbar-track { + background: var(--sidebar-bg); + display: none; } + .page-wrapper .sidebar-wrapper .sidebar-content:hover::-webkit-scrollbar-thumb { + background: var(--sidebar-scrollbar-thumb-color); } .page-wrapper .sidebar-wrapper .sidebar-brand { background: var(--sidebar-bg); padding: 10px 20px; @@ -9837,6 +9855,7 @@ img { .page-wrapper .sidebar-wrapper .sidebar-brand > a { text-transform: uppercase; font-weight: bold; + flex-grow: 1; transition: all 0.3s ease; } .page-wrapper .sidebar-wrapper .sidebar-brand > a:focus { outline: none; } @@ -10580,25 +10599,16 @@ button:not(:disabled) { background-size: 1.5rem; filter: invert(1) grayscale(100%) brightness(200%); } -@media (min-width: 768px) { - .alert-dismissible .btn-close { - background-size: 1.25rem; } } - [data-global-alert="closed"] #announcement { display: none; } -.alert code { - background: #e7e8e9; - color: #000; - padding: 0.25rem 0.5rem; } - :root { --card-title-color: var(--text-default); --card-text-color: var(--text-muted); } [data-dark-mode] { --card-title-color: var(--text-default); - --card-text-color: #6c757d; } + --card-text-color: var(--gray-500); } .card { background: var(--card-bg); @@ -10617,7 +10627,8 @@ button:not(:disabled) { color: var(--card-title-color); } .card-text { - color: var(--card-text-color); } + color: var(--card-text-color); + font-weight: 500; } :root { --form-border-color: var(--gray-200); @@ -10655,12 +10666,12 @@ button:not(:disabled) { background-color: var(--body-bg); text-align: left; } .form-control:focus { - border-color: #2f55d4; + border-color: var(--primary); box-shadow: none; } .form-control[readonly] { - background-color: #fff; } + background-color: var(--white); } .form-control:disabled { - background-color: #dee2e6; } + background-color: var(--gray-300); } .form-control::placeholder { color: var(--form-control-placeholder-color); } @@ -10673,7 +10684,7 @@ button:not(:disabled) { border: 1px solid var(--form-check-input-border-color); background-color: var(--body-bg); } .form-check-input:focus { - border-color: #2f55d4; + border-color: var(--primary); box-shadow: none; } .form-check-input.form-check-input:checked { background-color: var(--form-check-input-background-color); @@ -10699,7 +10710,6 @@ table td:last-child, table th:last-child { .table { --bs-table-color: var(--text-default); --bs-table-bg: transparent; - --bs-table-border-color: var(--bs-border-color); --bs-table-accent-bg: none; --bs-table-striped-color: var(--text-default); --bs-table-striped-bg: var(--alert-primary-bg); @@ -10807,10 +10817,12 @@ table td:last-child, table th:last-child { :root { --feature-icon-color: var(--primary); + --feature-icon-faint: var(--gray-200); --feature-link-hover-bg-color: var(--primary); } [data-dark-mode] { --feature-icon-color: var(--primary-300); + --feature-icon-faint: var(--gray-900); --feature-link-hover-bg-color: var(--gray-900); } .features .icon { @@ -10834,6 +10846,10 @@ table td:last-child, table th:last-child { .features.feature-full-bg .icon-color { color: var(--feature-icon-color) !important; } +.features.feature-full-bg .icon-faint { + color: var(--feature-icon-faint) !important; + transition: all 0.5s ease; } + .features.feature-full-bg:hover { background-color: var(--feature-link-hover-bg-color) !important; } @@ -11128,30 +11144,6 @@ table td:last-child, table th:last-child { .rounded-lg { border-radius: 30px !important; } -.border-primary { - border-color: #2f55d4 !important; } - -.border-secondary { - border-color: #6c757d !important; } - -.border-success { - border-color: #2eca8b !important; } - -.border-info { - border-color: #17a2b8 !important; } - -.border-warning { - border-color: #f17425 !important; } - -.border-danger { - border-color: #e43f52 !important; } - -.border-light { - border-color: #f8f9fa !important; } - -.border-dark { - border-color: #0e1420 !important; } - .bg-white-color { background: var(--bg-white-color); } @@ -11921,7 +11913,7 @@ div.code-toolbar > .toolbar > .toolbar-item > span:focus { width: 20.1rem; padding-left: 1rem; } } -.docs-content .main-content img, .docs-content .main-content svg { +.docs-content .main-content img, .docs-content .main-content svg:not(.gitinfo svg) { max-width: 80% !important; height: auto; display: block !important; diff --git a/docSite/resources/_gen/assets/scss/scss/style.scss_6d90bf46f7cdc038e33af2850006d4ba.content b/docSite/resources/_gen/assets/scss/scss/style.scss_6d90bf46f7cdc038e33af2850006d4ba.content index e2214ae1b..fc958c3dc 100644 --- a/docSite/resources/_gen/assets/scss/scss/style.scss_6d90bf46f7cdc038e33af2850006d4ba.content +++ b/docSite/resources/_gen/assets/scss/scss/style.scss_6d90bf46f7cdc038e33af2850006d4ba.content @@ -9465,139 +9465,134 @@ p { @media (max-width: 767px) { .four-oh-four { min-height: calc(100vh - 241px); } } -#topnav .logo { - float: left; - color: #3c4858 !important; } - #topnav .logo .l-dark, - #topnav .logo .logo-dark-mode { - display: none; } - #topnav .logo .l-light, - #topnav .logo .logo-light-mode { - display: inline-block; } - #topnav .logo:focus { - outline: none; } - -#topnav #navigation.toggle-menu { - position: relative; - display: block; +#topnav { + position: fixed; + right: 0; + left: 0; top: 0; - border: none; } - #topnav #navigation.toggle-menu .toggle-menu-item { - display: block; } - #topnav #navigation.toggle-menu .toggle-menu-item > li { - float: none; - margin: 0 16px !important; - text-align: center; } - #topnav #navigation.toggle-menu .toggle-menu-item > li > a { - padding: 16px 0; - min-height: auto; - font-size: 18px; } - -#topnav .navbar-toggle { + background-color: transparent; + z-index: 999; border: 0; - position: relative; - padding: 0; - margin: 0; - cursor: pointer; } - #topnav .navbar-toggle .lines { - width: 20px; - display: block; - position: relative; - margin: 4px 0 0 0; - height: 18px; } - #topnav .navbar-toggle span { - height: 2px; - width: 100%; - background-color: #0066ff; - display: block; - margin-bottom: 5px; - transition: transform .5s ease; } - #topnav .navbar-toggle span:last-child { - margin-bottom: 0; } - -#topnav .navbar-toggle.open span { - position: absolute; } - #topnav .navbar-toggle.open span:first-child { - top: 6px; - transform: rotate(45deg); } - #topnav .navbar-toggle.open span:nth-child(2) { - visibility: hidden; } - #topnav .navbar-toggle.open span:last-child { - width: 100%; - top: 6px; - transform: rotate(-45deg); } - #topnav .navbar-toggle.open span:hover { - background-color: #0066ff; } - -#topnav .navbar-toggle:hover, #topnav .navbar-toggle:focus, -#topnav .navbar-toggle .navigation-menu > li > a:hover, #topnav .navbar-toggle:focus { - background-color: transparent; } - -#topnav .navigation-menu { - list-style: none; - margin: 0; - padding: 0; } - #topnav .navigation-menu > li { + -webkit-transition: all .5s ease; + transition: all .5s ease; } + #topnav .logo { float: left; - display: block; + color: #3c4858 !important; } + #topnav .logo .l-dark, + #topnav .logo .logo-dark-mode { + display: none; } + #topnav .logo .l-light, + #topnav .logo .logo-light-mode { + display: inline-block; } + #topnav .logo:focus { + outline: none; } + #topnav #navigation.toggle-menu { position: relative; - margin: 0 10px; } - #topnav .navigation-menu > li:hover > a, #topnav .navigation-menu > li.active > a { + display: block; + top: 0; + border: none; } + #topnav #navigation.toggle-menu .toggle-menu-item { + display: block; } + #topnav #navigation.toggle-menu .toggle-menu-item > li { + float: none; + margin: 0 16px !important; + text-align: center; } + #topnav #navigation.toggle-menu .toggle-menu-item > li > a { + padding: 16px 0; + min-height: auto; + font-size: 18px; } + #topnav .navbar-toggle { + border: 0; + position: relative; + padding: 0; + margin: 0; + cursor: pointer; } + #topnav .navbar-toggle .lines { + width: 20px; + display: block; + position: relative; + margin: 4px 0 0 0; + height: 18px; } + #topnav .navbar-toggle span { + height: 2px; + width: 100%; + background-color: #0066ff; + display: block; + margin-bottom: 5px; + transition: transform .5s ease; } + #topnav .navbar-toggle span:last-child { + margin-bottom: 0; } + #topnav .navbar-toggle.open span { + position: absolute; } + #topnav .navbar-toggle.open span:first-child { + top: 6px; + transform: rotate(45deg); } + #topnav .navbar-toggle.open span:nth-child(2) { + visibility: hidden; } + #topnav .navbar-toggle.open span:last-child { + width: 100%; + top: 6px; + transform: rotate(-45deg); } + #topnav .navbar-toggle.open span:hover { + background-color: #0066ff; } + #topnav .navbar-toggle:hover, #topnav .navbar-toggle:focus, + #topnav .navbar-toggle .navigation-menu > li > a:hover, #topnav .navbar-toggle:focus { + background-color: transparent; } + #topnav .navigation-menu { + list-style: none; + margin: 0; + padding: 0; } + #topnav .navigation-menu > li { + float: left; + display: block; + position: relative; + margin: 0 10px; } + #topnav .navigation-menu > li:hover > a, #topnav .navigation-menu > li.active > a { + color: #0066ff !important; } + #topnav .navigation-menu > li > a { + display: flex; + color: #3c4858; + font-size: 15px; + background-color: transparent !important; + font-weight: 700; + letter-spacing: 1px; + line-height: 24px; + font-family: var(--bs-font-sans-serif); + padding-left: 15px; + padding-right: 15px; + align-items: center; } + #topnav .navigation-menu > li > a:hover, #topnav .navigation-menu > li > a:active { + color: #0066ff; } + #topnav.scroll { + background-color: #ffffff; + border: none; + box-shadow: 0 0 3px rgba(60, 72, 88, 0.15); } + #topnav.scroll .navigation-menu > li > a { + color: #3c4858; } + #topnav.scroll .navigation-menu > li > .menu-arrow { + border-color: #3c4858; } + #topnav.scroll .navigation-menu > li:hover > a, #topnav.scroll .navigation-menu > li.active > a { + color: #0066ff; } + #topnav.scroll .navigation-menu > li:hover > .menu-arrow, #topnav.scroll .navigation-menu > li.active > .menu-arrow { + border-color: #0066ff; } + #topnav.nav-sticky { + background: #fff; + -webkit-box-shadow: 0 0 3px rgba(60, 72, 88, 0.15); + box-shadow: 0 0 3px rgba(60, 72, 88, 0.15); } + #topnav.nav-sticky .navigation-menu.nav-light > li > a { + color: #3c4858; } + #topnav.nav-sticky .navigation-menu.nav-light > li.active > a { color: #0066ff !important; } - #topnav .navigation-menu > li > a { - display: flex; - color: #3c4858; - font-size: 15px; - background-color: transparent !important; - font-weight: 700; - letter-spacing: 1px; - line-height: 24px; - font-family: var(--bs-font-sans-serif); - padding-left: 15px; - padding-right: 15px; - align-items: center; } - #topnav .navigation-menu > li > a:hover, #topnav .navigation-menu > li > a:active { - color: #0066ff; } - -#topnav.scroll { - background-color: #ffffff; - border: none; - box-shadow: 0 0 3px rgba(60, 72, 88, 0.15); } - #topnav.scroll .navigation-menu > li > a { - color: #3c4858; } - #topnav.scroll .navigation-menu > li > .menu-arrow { - border-color: #3c4858; } - #topnav.scroll .navigation-menu > li:hover > a, #topnav.scroll .navigation-menu > li.active > a { - color: #0066ff; } - #topnav.scroll .navigation-menu > li:hover > .menu-arrow, #topnav.scroll .navigation-menu > li.active > .menu-arrow { - border-color: #0066ff; } - -#topnav.defaultscroll.dark-menubar .logo { - line-height: 70px; } - -#topnav.defaultscroll.scroll .logo { - line-height: 62px; } - -#topnav.defaultscroll.scroll.dark-menubar .logo { - line-height: 62px; } - -#topnav.nav-sticky { - background: #fff; - box-shadow: 0 0 3px rgba(60, 72, 88, 0.15); } - #topnav.nav-sticky .navigation-menu.nav-light > li > a { - color: #3c4858; } - #topnav.nav-sticky .navigation-menu.nav-light > li.active > a { - color: #0066ff !important; } - #topnav.nav-sticky .navigation-menu.nav-light > li:hover > .menu-arrow, #topnav.nav-sticky .navigation-menu.nav-light > li.active > .menu-arrow { - border-color: #0066ff !important; } - #topnav.nav-sticky .navigation-menu.nav-light > li:hover > a, #topnav.nav-sticky .navigation-menu.nav-light > li.active > a { - color: #0066ff !important; } - #topnav.nav-sticky.tagline-height { - top: 0 !important; } - #topnav.nav-sticky .logo .l-dark { - display: inline-block; } - #topnav.nav-sticky .logo .l-light { - display: none; } + #topnav.nav-sticky .navigation-menu.nav-light > li:hover > .menu-arrow, #topnav.nav-sticky .navigation-menu.nav-light > li.active > .menu-arrow { + border-color: #0066ff !important; } + #topnav.nav-sticky .navigation-menu.nav-light > li:hover > a, #topnav.nav-sticky .navigation-menu.nav-light > li.active > a { + color: #0066ff !important; } + #topnav.nav-sticky.tagline-height { + top: 0 !important; } + #topnav.nav-sticky .logo .l-dark { + display: inline-block; } + #topnav.nav-sticky .logo .l-light { + display: none; } .logo { font-weight: 700; @@ -11011,6 +11006,10 @@ span.menu-icon { max-width: 100%; height: auto; } } +.hero { + background-size: cover; + padding-top: 70px; } + .icv { position: relative; overflow: hidden;