From 4fcea430cfbeaa40d8b5aa2a1886a344c8a609a2 Mon Sep 17 00:00:00 2001 From: 1bl4z3r Date: Wed, 5 Jul 2023 14:19:04 +0530 Subject: [PATCH] Added : homeSubtitlePrinter --- assets/scss/_predefined.scss | 1 + assets/scss/style.scss | 31 ++++++++ hugo.toml | 56 +++++++++++++-- hugo.toml.bak | 123 ++++++++++++++++++++++++++++++++ layouts/index.html | 4 +- layouts/partials/analytics.html | 3 +- layouts/partials/footer.html | 19 +++-- layouts/partials/svg.html | 2 + 8 files changed, 223 insertions(+), 16 deletions(-) create mode 100644 hugo.toml.bak diff --git a/assets/scss/_predefined.scss b/assets/scss/_predefined.scss index 7d87c02..ef6daeb 100644 --- a/assets/scss/_predefined.scss +++ b/assets/scss/_predefined.scss @@ -6,6 +6,7 @@ $light-grey: #494f5c; $dark-grey: #3B3E48; $highlight-grey: #7d828a; $midnightblue: #2c3e50; +$typewriter: hsl(172, 100%, 36%); // Fonts // diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 1a0f9a8..d00f5c2 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -903,4 +903,35 @@ a.footnote-ref { #mobile-menu { right: 1.2em; } + #home-subtitle { + font-size: 0.5em; + } } + +// If homeSubtitlePrinter is true +{{ if .Site.Params.homeSubtitlePrinter }} + #home-subtitle{ + overflow: hidden; /* Ensures the content is not revealed until the animation */ + border-right: .5em solid $typewriter; /* The typwriter cursor */ + white-space: nowrap; /* Keeps the content on a single line */ + margin: 0 auto; /* Gives that scrolling effect as the typing happens */ + // letter-spacing: .100em; /* Adjust as needed */ + + animation: + typing 5s steps({{ strings.RuneCount .Site.Params.homeSubtitle }}, end), + blink-caret .6s step-end infinite; + + } + + /* The typing effect */ + @keyframes typing { + from { width: 0 } + to { width: 100% } + } + + /* The typewriter cursor effect */ + @keyframes blink-caret { + from, to { border-color: transparent } + 50% { border-color: $typewriter} + } +{{ end }} \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 4e60475..b7e81d6 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,15 +1,53 @@ -baseURL = "https://example.com" +baseURL = "https://example.com" # baseURL - The absolute URL (protocol, host, path, and trailing slash) of your published site + + +#[languages] +# [languages.en] +# title = 'My blog' +# weight = 1 +# [languages.en.params] +# linkedin = 'https://linkedin.com/whoever' +# [languages.fr] +# title = 'Mon blogue' +# weight = 2 +# [languages.fr.params] +# linkedin = 'https://linkedin.com/fr/whoever' +# [languages.it] +# title = 'Il mio blog' +# weight = 3 +# [languages.fr.params] +# linkedin = 'https://linkedin.com/fr/whoever' + +# languageCode - A language tag as defined by RFC 5646. This value is used to populate: +# The element in the internal RSS template +# The lang attribute of the element in the internal alias template languageCode = "en-us" + +# defaultContentLanguage - Content without language indicator will default to this language. defaultContentLanguage = "en" + + +# title - Site title title = "Hugo Hermit" -theme = "hermit" -# enableGitInfo = true + +# enableGitInfo - Enable .GitInfo object for each page (if the Hugo site is versioned by Git). This will then update the Lastmod parameter for each page using the last git commit date for that content file. +#enableGitInfo = true + + pygmentsCodefences = true pygmentsUseClasses = true -# hasCJKLanguage = true # If Chinese/Japanese/Korean is your main content language, enable this to make wordCount works right. -rssLimit = 10 # Maximum number of items in the RSS feed. + +# If Chinese/Japanese/Korean is your main content language, enable this to make wordCount works right. +#hasCJKLanguage = true + +# Maximum number of items in the RSS feed. +rssLimit = 10 + copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # This message is only used by the RSS template. -enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/functions/emojify/ + +# Shorthand emojis in content files - https://gohugo.io/functions/emojify/ +enableEmoji = true + # googleAnalytics = "UA-123-45" # disqusShortname = "yourdiscussshortname" @@ -37,6 +75,10 @@ enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/func themeColor = "#494f5c" homeSubtitle = "A minimal and fast theme for Hugo." + + # Below Allows homeSubtitle to be shown with printer animation effect. Refer Line 911 in style.scss + #homeSubtitlePrinter = true + footerCopyright = ' · CC BY-NC 4.0' # bgImg = "" # Homepage background-image URL @@ -77,4 +119,4 @@ enableEmoji = true # Shorthand emojis in content files - https://gohugo.io/func [[menu.main]] name = "About" url = "about-hugo/" - weight = 20 + weight = 20 \ No newline at end of file diff --git a/hugo.toml.bak b/hugo.toml.bak new file mode 100644 index 0000000..2a11d32 --- /dev/null +++ b/hugo.toml.bak @@ -0,0 +1,123 @@ +baseURL = "https://example.com" # baseURL - The absolute URL (protocol, host, path, and trailing slash) of your published site + +# languageCode - A language tag as defined by RFC 5646. This value is used to populate: +# The element in the internal RSS template +# The lang attribute of the element in the internal alias template +languageCode = "en-us" + +# defaultContentLanguage - Content without language indicator will default to this language. +defaultContentLanguage = "en" + +# title - Site title +title = "Hugo Hermit" + +# enableGitInfo - Enable .GitInfo object for each page (if the Hugo site is versioned by Git). This will then update the Lastmod parameter for each page using the last git commit date for that content file. +#enableGitInfo = true + + +pygmentsCodefences = true +pygmentsUseClasses = true + +# If Chinese/Japanese/Korean is your main content language, enable this to make wordCount works right. +#hasCJKLanguage = true + +# Maximum number of items in the RSS feed. +rssLimit = 10 + +copyright = "This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License." # This message is only used by the RSS template. + +# Shorthand emojis in content files - https://gohugo.io/functions/emojify/ +enableEmoji = true + +# googleAnalytics = "UA-123-45" +# disqusShortname = "yourdiscussshortname" + +[author] + name = "John Doe" + +[blackfriday] + # hrefTargetBlank = true + # noreferrerLinks = true + # nofollowLinks = true + +[taxonomies] + tag = "tags" + # Categories are disabled by default. + +[params] + dateform = "Jan 2, 2006" + dateformShort = "Jan 2" + dateformNum = "2006-01-02" + dateformNumTime = "2006-01-02 15:04 -0700" + + # Metadata mostly used in document's head + # description = "" + # images = [""] + themeColor = "#494f5c" + + homeSubtitle = "A minimal and fast theme for Hugo." + + # Below Allows homeSubtitle to be shown with printer animation effect. Refer Line 911 in style.scss + homeSubtitlePrinter = true + + footerCopyright = ' · CC BY-NC 4.0' + # bgImg = "" # Homepage background-image URL + + # Prefix of link to the git commit detail page. GitInfo must be enabled. + # gitUrl = "https://github.com/username/repository/commit/" + + # Toggling this option needs to rebuild SCSS, requires Hugo extended version + justifyContent = false # Set "text-align: justify" to `.content`. + + relatedPosts = false # Add a related content section to all single posts page + + code_copy_button = true # Turn on/off the code-copy-button for code-fields + + # Add custom css + # customCSS = ["css/foo.css", "css/bar.css"] + + # Social Icons + # Check https://github.com/Track3/hermit#social-icons for more info. + [[params.social]] + name = "twitter" + url = "https://twitter.com/" + + [[params.social]] + name = "instagram" + url = "https://instagram.com/" + + [[params.social]] + name = "github" + url = "https://github.com/" + +[menu] + + [[menu.main]] + name = "Posts" + url = "posts/" + weight = 10 + + [[menu.main]] + name = "About" + url = "about-hugo/" + weight = 20 + +[languages] + [languages.en] + title = 'My blog' + weight = 1 + [languages.en.params] + linkedin = 'https://linkedin.com/whoever' + [languages.fr] + title = 'Mon blogue' + weight = 2 + [languages.fr.params] + linkedin = 'https://linkedin.com/fr/whoever' + [languages.fr.params.navigation] + help = 'Aide' + [languages.pt-pt] + title = 'O meu blog' + weight = 3 +[params] + [params.navigation] + help = 'Help' diff --git a/layouts/index.html b/layouts/index.html index 3f31d25..9620626 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -30,7 +30,9 @@ diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index b1f9af8..5fa97be 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1 +1,2 @@ -{{ template "_internal/google_analytics_async.html" . }} +{{/* Google Analytics 4, use UA-PROPERTY_ID */}} +{{ template "_internal/google_analytics.html" . }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 2aa24c2..66b6222 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,7 +1,12 @@ -
-

© {{ now.Format "2006" }} {{ .Site.Author.name }}{{ .Site.Params.footerCopyright | safeHTML }}

-

- Made with Hugo · Theme Hermit - {{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }} · {{ end }} -

-
+ \ No newline at end of file diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html index adc8f87..4f07d5a 100644 --- a/layouts/partials/svg.html +++ b/layouts/partials/svg.html @@ -42,6 +42,8 @@ {{- else if (eq .name "qq") -}} +{{- else if (eq .name "rss") -}} + {{- else -}} {{- end -}}