forked from mirrors/hugo-tufte
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
|
||||
- `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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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/<copy_this>
|
||||
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 = "<i class='fa fa-home fa-lg'></i> "
|
||||
pre = "<i class='fas fa-home la-lg'></i>"
|
||||
weight = -110
|
||||
identifier = "home"
|
||||
url = "/"
|
||||
[[menu.nav]]
|
||||
name = "Posts"
|
||||
pre = "<i class='fa fa-book fa-lg'></i> "
|
||||
pre = "<i class='fas fa-book fa-lg'></i> "
|
||||
weight = -100
|
||||
identifier = "posts"
|
||||
url = "/post"
|
||||
[[menu.nav]]
|
||||
name = "Categories"
|
||||
pre = "<i class='fa fa-tags fa-lg'></i> "
|
||||
pre = "<i class='fas fa-tags fa-lg'></i> "
|
||||
weight = -90
|
||||
identifier = "categories"
|
||||
url = "/categories"
|
||||
[[menu.nav]]
|
||||
name = "About"
|
||||
pre = "<i class='fa fa-info-circle fa-lg'></i> "
|
||||
pre = "<i class='fas fa-info-circle fa-lg'></i> "
|
||||
weight = -80
|
||||
identifier = "about"
|
||||
url = "/about"
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# Footer menu
|
||||
# -----------------------------------------------------------------------
|
||||
[[menu.footer]]
|
||||
name = ""
|
||||
pre = "<i class='fa fa-github fa-2x'></i> "
|
||||
weight = -100
|
||||
[[menu.nav]]
|
||||
name = "Source Code"
|
||||
pre = "<i class='fas fa-github fa-lg'></i> "
|
||||
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 = "<i class='fa fa-twitter fa-2x'></i> "
|
||||
name = "Custom footer link"
|
||||
pre = "<i class='fab fa-google fa-lg'></i> "
|
||||
weight = -90
|
||||
identifier = "twitter"
|
||||
url = "https://twitter.com"
|
||||
identifier = "custom_link"
|
||||
url = "https://google.com"
|
||||
|
||||
|
||||
# Don't change the settings below
|
||||
|
|
|
@ -1,9 +1,59 @@
|
|||
<footer class="page-footer">
|
||||
<hr>
|
||||
<ul class="page-footer-menu">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li><a href="{{.URL}}">{{.Pre }}{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
|
||||
{{/* 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 }}
|
||||
<li><a href="{{.URL}}">{{.Pre }} {{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ if .Site.Params.showPoweredBy}}
|
||||
|
|
|
@ -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'> -->
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- 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) }}
|
||||
{{ $style := resources.Get "scss/highlight-dark.scss" | resources.ToCSS $codeoptions }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue