Skip to content

Commit

Permalink
Feat: 调整内容适配器副标题显示的内容
Browse files Browse the repository at this point in the history
  • Loading branch information
Lruihao committed Oct 3, 2024
1 parent 0267864 commit c0c89e4
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 9 deletions.
9 changes: 9 additions & 0 deletions assets/css/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,15 @@
}
}

// Content adapter generated posts style
.single {
&[data-adapters='projects'] {
.single-subtitle {
font-size: 1rem;
}
}
}

// ==============================
// Mobile style
// ==============================
Expand Down
2 changes: 1 addition & 1 deletion config/development/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# Content adapters config for component projects
# https://github.com/hugo-fixit/component-projects
[projectsAdapters]
# enable = false
enable = false
7 changes: 6 additions & 1 deletion content/en/components/_content.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
-}}
{{- $categories := $group.categories | default $projectsAdapters.categories -}}
{{- $collections := $group.collections | default $projectsAdapters.collections -}}
{{- $subtitle := T "projects.source" (dict
"Name" $repoInfo.full_name
"Link" $repoInfo.html_url
"Website" $repoInfo.homepage
) -}}
{{- $params := dict
"fromAdapters" "projects"
"author" $author
Expand All @@ -68,7 +73,7 @@
"lightgallery" true
"capitalizeTitles" false
"toc" (dict "ordered" false)
"subtitle" ($repoInfo.homepage | default $repoInfo.html_url)
"subtitle" $subtitle
"sourceURL" (add $readme.html_url "?plain=1")
"editURL" (replace $readme.html_url "/blob/" "/edit/" )
"LinkToReport" false
Expand Down
7 changes: 6 additions & 1 deletion content/zh-cn/components/_content.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
-}}
{{- $categories := $group.categories | default $projectsAdapters.categories -}}
{{- $collections := $group.collections | default $projectsAdapters.collections -}}
{{- $subtitle := T "projects.source" (dict
"Name" $repoInfo.full_name
"Link" $repoInfo.html_url
"Website" $repoInfo.homepage
) -}}
{{- $params := dict
"fromAdapters" "projects"
"author" $author
Expand All @@ -68,7 +73,7 @@
"lightgallery" true
"capitalizeTitles" false
"toc" (dict "ordered" false)
"subtitle" ($repoInfo.homepage | default $repoInfo.html_url)
"subtitle" $subtitle
"sourceURL" (add $readme.html_url "?plain=1")
"editURL" (replace $readme.html_url "/blob/" "/edit/" )
"LinkToReport" false
Expand Down
1 change: 1 addition & 0 deletions data/projects.en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- title: ❤️‍🔥 Core & Docs
totalStars: true
repos:
- hugo-fixit/FixIt
- hugo-fixit/docs
Expand Down
1 change: 1 addition & 0 deletions data/projects.zh-cn.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- title: ❤️‍🔥 核心主题 & 文档
totalStars: true
repos:
- hugo-fixit/FixIt
- hugo-fixit/docs
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/hugo-fixit/docs
go 1.20

require (
github.com/hugo-fixit/FixIt v0.3.13-0.20241002050721-b66fd37057b0 // indirect
github.com/hugo-fixit/component-projects v1.2.3 // indirect
github.com/hugo-fixit/FixIt v0.3.13-0.20241003174054-95436c11ac09 // indirect
github.com/hugo-fixit/component-projects v1.2.4 // indirect
github.com/hugo-fixit/shortcode-caniuse v1.1.3 // indirect
github.com/hugo-fixit/shortcode-rewards v1.0.4 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/hugo-fixit/FixIt v0.3.13-0.20241002050721-b66fd37057b0 h1:uCuobPoHymt89+jPxE5XKuINMebjeegjGHnW0MzFbmw=
github.com/hugo-fixit/FixIt v0.3.13-0.20241002050721-b66fd37057b0/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU=
github.com/hugo-fixit/component-projects v1.2.3 h1:HUf25WKyP2ORruOwiuvmMD9Z098LVQOqm9OGszYOTGo=
github.com/hugo-fixit/component-projects v1.2.3/go.mod h1:nXW0R37REwpfwUD1I4RtB5QW71vw66nRyB9uEpYxr+c=
github.com/hugo-fixit/FixIt v0.3.13-0.20241003174054-95436c11ac09 h1:0IUNqDwVI8TCw0LIfewxT4hbWFetqkLQJYVz39AMBUk=
github.com/hugo-fixit/FixIt v0.3.13-0.20241003174054-95436c11ac09/go.mod h1:3XIRedrqakO7/a4ZnhE46haMRF8HgsT0N0B5j5D2iRU=
github.com/hugo-fixit/component-projects v1.2.4 h1:3LLTOYGHqhgAosPwbnNZbePFW/YCbXhMS4QN/F8ukXs=
github.com/hugo-fixit/component-projects v1.2.4/go.mod h1:nXW0R37REwpfwUD1I4RtB5QW71vw66nRyB9uEpYxr+c=
github.com/hugo-fixit/shortcode-caniuse v1.1.3 h1:U1YBJz5SI/d1BBQhHcD0eVgJdCcpzK2usSizPiu+a4w=
github.com/hugo-fixit/shortcode-caniuse v1.1.3/go.mod h1:RoPLFt+7uLui5rjvkC/qFGeo4nly5AzzwIID9SoDKNc=
github.com/hugo-fixit/shortcode-rewards v1.0.4 h1:62qCmcGvAJf+qa+8ofRX6jwMUXo6Q4+PQvlOtu0ZGBA=
Expand Down

0 comments on commit c0c89e4

Please sign in to comment.