From 2e8881ec8b8ec72761c92f433bf2183ecf4e4d94 Mon Sep 17 00:00:00 2001 From: slashformotion Date: Fri, 6 Aug 2021 21:46:35 +0200 Subject: [PATCH] Feature added: ID driven socials - bump fontawesome from 4.5.0 to 5.14.0 - documented in README.md fix #10 --- .gitignore | 4 +- README.md | 18 +++++++++ assets/scss/hugo-tufte.scss | 3 +- exampleSite/config.toml | 51 ++++++++++++++++-------- layouts/partials/footer.html | 56 +++++++++++++++++++++++++-- layouts/partials/header.includes.html | 4 +- 6 files changed, 112 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 049bf30..6149cbc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ exampleSite/public/* -*.patch -exampleSite/resources/_gen/ +*.patch +exampleSite/resources/_gen/ diff --git a/README.md b/README.md index d2d2efc..8aff803 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,24 @@ The site specific parameters that this theme recognizes are: - `katex` boolean: if "katex" is set to true katex will be used to render LaTex, if not MathJax will be used instead - `codeBlocksDark` boolean: if true, code blocks will use a dark theme. +***Socials*** + +You can add links to your social media profile by using thoses parameters: +- `github`: string +- `gitlab`: string +- `twitter`: string +- `patreon`: string +- `youtube`: string +- `medium`: string +- `reddit`: string +- `stackoverflow`: string +- `instagram`: string +- `mastodon`: string +- `orcid`: string +- `google_scholar`: string + +Please see [`exampleSite/config.toml`](https://github.com/slashformotion/hugo-tufte/blob/master/exampleSite/config.toml#L30) to see the full implementation with exemples. + ### Page Parameters - `hideDate` boolean: if true, do not display a page date. When `meta` is set to diff --git a/assets/scss/hugo-tufte.scss b/assets/scss/hugo-tufte.scss index c566066..d31dd42 100644 --- a/assets/scss/hugo-tufte.scss +++ b/assets/scss/hugo-tufte.scss @@ -293,12 +293,13 @@ footer.page-footer ul.page-footer-menu { /*text-align:center;*/ margin: 0; padding: 0; + width: unset; } footer.page-footer ul.page-footer-menu li { display: inline-block; margin-right: 0.5rem; - font-size: 55%; + // font-size: 55%; } .copyright { diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 00a69a7..8454def 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -25,6 +25,22 @@ katex = false # Uncomment for dark code blocks # codeBlocksDark = true + # Common social website links, please comment the unused ones. + ## (if your favorite one is not in the list, please head to the footer menu below and add an entry) + ### Please note that some of the value below are only provided as an exemple, perhaps the computed isn't valid + github = "slashformotion" + gitlab = "slashformotion" + twitter = "slashformotion" + patreon = "" + youtube = "user/ChromeDevelopers" # check the end of your youtube url https://www.youtube.com/ + medium = "slashformotion" + reddit = "Slashformotion" + stackoverflow = "16609732/slashformotion" + instagram = "google" + mastodon = "instance.url/@username" + orcid = "0000-0003-0634-3275" + google_scholar = "jm5QaHkAAAAJ" + [taxonomies] category = "categories" series = "series" @@ -34,44 +50,47 @@ katex = false # ----------------------------------------------------------------------- [[menu.nav]] name = "Home" - pre = " " + pre = "" weight = -110 identifier = "home" url = "/" [[menu.nav]] name = "Posts" - pre = " " + pre = " " weight = -100 identifier = "posts" url = "/post" [[menu.nav]] name = "Categories" - pre = " " + pre = " " weight = -90 identifier = "categories" url = "/categories" [[menu.nav]] name = "About" - pre = " " + pre = " " weight = -80 identifier = "about" url = "/about" - -# ----------------------------------------------------------------------- -# Footer menu -# ----------------------------------------------------------------------- -[[menu.footer]] - name = "" - pre = " " - weight = -100 +[[menu.nav]] + name = "Source Code" + pre = " " + weight = -70 identifier = "github" url = "https://github.com/slashformotion/hugo-tufte" + +# ----------------------------------------------------------------------- +# FOOTER MENU +# If you need to add custom links to you footer: put them here. Be aware that this theme is using fontawesome. +# Please head to https://fontawesome.com/v4.7/icons/ to pick icons +# ----------------------------------------------------------------------- + [[menu.footer]] - name = "" - pre = " " + name = "Custom footer link" + pre = " " weight = -90 - identifier = "twitter" - url = "https://twitter.com" + identifier = "custom_link" + url = "https://google.com" # Don't change the settings below diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cedeb7f..bd85dc6 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,9 +1,59 @@