mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-16 21:36:56 +01:00
Feature added: ID driven socials
- bump fontawesome from 4.5.0 to 5.14.0 - documented in README.md fix #10
This commit is contained in:
parent
ba23674640
commit
2e8881ec8b
6 changed files with 112 additions and 24 deletions
18
README.md
18
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
|
- `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.
|
- `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
|
### Page Parameters
|
||||||
|
|
||||||
- `hideDate` boolean: if true, do not display a page date. When `meta` is set to
|
- `hideDate` boolean: if true, do not display a page date. When `meta` is set to
|
||||||
|
|
|
@ -293,12 +293,13 @@ footer.page-footer ul.page-footer-menu {
|
||||||
/*text-align:center;*/
|
/*text-align:center;*/
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
width: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer.page-footer ul.page-footer-menu li {
|
footer.page-footer ul.page-footer-menu li {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: 0.5rem;
|
margin-right: 0.5rem;
|
||||||
font-size: 55%;
|
// font-size: 55%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copyright {
|
.copyright {
|
||||||
|
|
|
@ -25,6 +25,22 @@ katex = false
|
||||||
# Uncomment for dark code blocks
|
# Uncomment for dark code blocks
|
||||||
# codeBlocksDark = true
|
# 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/<copy_this>
|
||||||
|
medium = "slashformotion"
|
||||||
|
reddit = "Slashformotion"
|
||||||
|
stackoverflow = "16609732/slashformotion"
|
||||||
|
instagram = "google"
|
||||||
|
mastodon = "instance.url/@username"
|
||||||
|
orcid = "0000-0003-0634-3275"
|
||||||
|
google_scholar = "jm5QaHkAAAAJ"
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
category = "categories"
|
category = "categories"
|
||||||
series = "series"
|
series = "series"
|
||||||
|
@ -34,44 +50,47 @@ katex = false
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
[[menu.nav]]
|
[[menu.nav]]
|
||||||
name = "Home"
|
name = "Home"
|
||||||
pre = "<i class='fa fa-home fa-lg'></i> "
|
pre = "<i class='fas fa-home la-lg'></i>"
|
||||||
weight = -110
|
weight = -110
|
||||||
identifier = "home"
|
identifier = "home"
|
||||||
url = "/"
|
url = "/"
|
||||||
[[menu.nav]]
|
[[menu.nav]]
|
||||||
name = "Posts"
|
name = "Posts"
|
||||||
pre = "<i class='fa fa-book fa-lg'></i> "
|
pre = "<i class='fas fa-book fa-lg'></i> "
|
||||||
weight = -100
|
weight = -100
|
||||||
identifier = "posts"
|
identifier = "posts"
|
||||||
url = "/post"
|
url = "/post"
|
||||||
[[menu.nav]]
|
[[menu.nav]]
|
||||||
name = "Categories"
|
name = "Categories"
|
||||||
pre = "<i class='fa fa-tags fa-lg'></i> "
|
pre = "<i class='fas fa-tags fa-lg'></i> "
|
||||||
weight = -90
|
weight = -90
|
||||||
identifier = "categories"
|
identifier = "categories"
|
||||||
url = "/categories"
|
url = "/categories"
|
||||||
[[menu.nav]]
|
[[menu.nav]]
|
||||||
name = "About"
|
name = "About"
|
||||||
pre = "<i class='fa fa-info-circle fa-lg'></i> "
|
pre = "<i class='fas fa-info-circle fa-lg'></i> "
|
||||||
weight = -80
|
weight = -80
|
||||||
identifier = "about"
|
identifier = "about"
|
||||||
url = "/about"
|
url = "/about"
|
||||||
|
[[menu.nav]]
|
||||||
# -----------------------------------------------------------------------
|
name = "Source Code"
|
||||||
# Footer menu
|
pre = "<i class='fas fa-github fa-lg'></i> "
|
||||||
# -----------------------------------------------------------------------
|
weight = -70
|
||||||
[[menu.footer]]
|
|
||||||
name = ""
|
|
||||||
pre = "<i class='fa fa-github fa-2x'></i> "
|
|
||||||
weight = -100
|
|
||||||
identifier = "github"
|
identifier = "github"
|
||||||
url = "https://github.com/slashformotion/hugo-tufte"
|
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]]
|
[[menu.footer]]
|
||||||
name = ""
|
name = "Custom footer link"
|
||||||
pre = "<i class='fa fa-twitter fa-2x'></i> "
|
pre = "<i class='fab fa-google fa-lg'></i> "
|
||||||
weight = -90
|
weight = -90
|
||||||
identifier = "twitter"
|
identifier = "custom_link"
|
||||||
url = "https://twitter.com"
|
url = "https://google.com"
|
||||||
|
|
||||||
|
|
||||||
# Don't change the settings below
|
# Don't change the settings below
|
||||||
|
|
|
@ -1,6 +1,56 @@
|
||||||
<footer class="page-footer">
|
<footer class="page-footer">
|
||||||
<hr>
|
<hr>
|
||||||
<ul class="page-footer-menu">
|
<ul class="page-footer-menu">
|
||||||
|
|
||||||
|
{{/* SOCIALS */}}
|
||||||
|
{{ if isset .Site.Params "twitter" }}
|
||||||
|
<li><a href="https://twitter.com/{{.Site.Params.twitter}}"><i class='fab fa-twitter fa-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "github" }}
|
||||||
|
<li><a href="https://github.com/{{.Site.Params.github}}"><i class='fab fa-github fa-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "gitlab" }}
|
||||||
|
<li><a href="https://gitlab.com/{{.Site.Params.gitlab}}"><i class='fab fa-gitlab fa-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "patreon" }}
|
||||||
|
<li><a href="https://www.patreon.com/{{.Site.Params.patreon}}"><i class='fab fa-patreon la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "youtube" }}
|
||||||
|
<li><a href="https://www.youtube.com/{{.Site.Params.youtube}}"><i class='fab fa-youtube la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "medium" }}
|
||||||
|
<li><a href="https://medium.com/{{.Site.Params.medium}}"><i class='fab fa-medium la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "reddit" }}
|
||||||
|
<li><a href="https://www.reddit.com/user/{{.Site.Params.reddit}}"><i class='fab fa-reddit la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "stackoverflow" }}
|
||||||
|
<li><a href="https://stackoverflow.com/users/{{.Site.Params.stackoverflow}}?tab=profile"><i class='fab fa-stack-overflow la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "instagram" }}
|
||||||
|
<li><a href="https://www.instagram.com/{{.Site.Params.instagram}}"><i class='fab fa-instagram la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "mastodon" }}
|
||||||
|
<li><a href="https://{{.Site.Params.mastodon}}"><i class='fab fa-mastodon la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "orcid" }}
|
||||||
|
<li><a href="https://orcid.org/{{.Site.Params.orcid}}"><i class='fab fa-orcid la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "google_scholar" }}
|
||||||
|
<li><a href="https://scholar.google.com/citations?user={{.Site.Params.google_scholar}}"><i class='fas fa-graduation-cap la-lg'></i></a></li>
|
||||||
|
{{ end }}
|
||||||
|
{{/* END SOCIALS */}}
|
||||||
{{ range .Site.Menus.footer }}
|
{{ range .Site.Menus.footer }}
|
||||||
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
|
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -13,12 +13,12 @@
|
||||||
<!-- <link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> -->
|
<!-- <link href='//fonts.googleapis.com/css?family=Raleway:400,200,100,700,300,500,600,800' rel='stylesheet' type='text/css'> -->
|
||||||
|
|
||||||
<!-- Font Awesome -->
|
<!-- Font Awesome -->
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.css">
|
||||||
|
|
||||||
<script defer src="{{ "/js/main.js" | relURL }}"></script>
|
<script defer src="{{ "/js/main.js" | relURL }}"></script>
|
||||||
|
|
||||||
<!-- Main CSS file based on Pure blog layout -->
|
<!-- Main CSS file based on Pure blog layout -->
|
||||||
{{ if .Site.Params.codeBlocksDark }}
|
{{ if and (isset .Site.Params "codeblocksdark") .Site.Params.codeBlocksDark }}
|
||||||
{{ $codeoptions := (dict "targetPath" "/css/highlight-dark.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
{{ $codeoptions := (dict "targetPath" "/css/highlight-dark.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||||
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
|
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue