Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/improve layout #87

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* This makes text in code blocks smaller than body text */
.highlight, code {
font-size: 0.85rem;
}

/* This makes text in TOC smaller than body text */
#TableOfContents li {
font-size: 0.85rem;
}

/* This reduces font in article summaries */
.py-1 {
font-size: 0.85rem;
font-weight: 400;
}

/* For bullet points to stand out in a list, the line heights inside and
between bullet points should differ. This reduces the inside height */
li {
line-height: 1.65;
}
2 changes: 1 addition & 1 deletion config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaultContentLanguage = "en"

enableRobotsTXT = true
paginate = 100
summaryLength = 30
summaryLength = 15

buildDrafts = false
buildFuture = false
Expand Down
2 changes: 1 addition & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ smartTOCHideUnfocusedChildren = false
layoutBackgroundBlur = true # only used when heroStyle equals background
layoutBackgroundHeaderSpace = false
showBreadcrumbs = false
showSummary = false
showSummary = true
showViews = true
showLikes = true
showTableOfContents = true
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
lg:top-[140px]{{ else }}lg:top-10{{ end }}">

{{ if and (.Params.showTableOfContents | default (.Site.Params.article.showTableOfContents | default false)) (in
.TableOfContents "<ul") }} {{ partial "back-to-parent.html" . }} {{ partial "toc.html" . }} {{ end }} {{ if .Site.Params.article.showRelatedPosts |
.TableOfContents "<ul") }} {{ partial "toc.html" . }} {{ end }} {{ if .Site.Params.article.showRelatedPosts |
default false }} sd {{ end }} </div>
</div>
{{ end }}
Expand Down
6 changes: 0 additions & 6 deletions layouts/partials/back-to-parent.html

This file was deleted.

2 changes: 2 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
{{ end }}
{{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint
"sha512" }}
{{ $cssCustom := resources.Get "css/custom.css" }}

<link type="text/css" rel="stylesheet" href="{{ $bundleCSS.RelPermalink }}"
integrity="{{ $bundleCSS.Data.Integrity }}" />
{{ $jsAppearance := resources.Get "js/appearance.js" }}
Expand Down