diff options
author | parsiya <parsiya@users.noreply.github.com> | 2022-12-18 23:27:13 +0300 |
---|---|---|
committer | parsiya <parsiya@users.noreply.github.com> | 2022-12-18 23:27:13 +0300 |
commit | bdbfaa5ecbe46db6e812dc18884242052bddf79f (patch) | |
tree | 3b7c09f8ac0ec4b143ec96ef8eb40bbeb1432e6a | |
parent | f24ac80aea5c85bd8d219f866d2521b9a4625b60 (diff) |
move social media icons to social.html and update the readme.
Makes it easier to update the order of the social media icons.
-rwxr-xr-x | README.md | 6 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 28 | ||||
-rw-r--r-- | layouts/partials/social.html | 39 |
3 files changed, 44 insertions, 29 deletions
@@ -358,9 +358,9 @@ Sidebar social network icons are configured as follows: ``` Icon sequence is unfortunately hardcoded. To modify, copy -`your-website/themes/Hugo-Octopress/layouts/partials/sidebar.html` to -`your-website/layouts/partials/sidebar.html` and modify the sequence. Look for -`<li class="sidebar-nav-item">` tags. Use `</br>` to create a new line. +`your-website/themes/Hugo-Octopress/layouts/partials/social.html` to +`your-website/layouts/partials/social.html` and modify the sequence. Use `</br>` +to create a new line. Code to display links (and the idea to use these icons) is from [Hyde-x][hyde-x-theme]. diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 91bf139..8582d9c 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -14,32 +14,8 @@ </p> </section> -<!-- Font awesome icons - code taken from the Hyde-x theme - "Font Awesome by Dave Gandy - http://fontawesome.io" - Icons: https://fortawesome.github.io/Font-Awesome/icons/ - to give icons square dark backgrounds use them like this: fa fa-key-square - size is fa-3x, sizes are 1-5 - --> - - <!-- Sidebar social network icons --> - <ul class="sidebar-nav"> - <li class="sidebar-nav-item"> - {{ with .Site.Params.github }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }} - {{ with .Site.Params.bitbucket }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }} - {{ with .Site.Params.gitlab }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-gitlab fa-3x"></i></a>{{ end }} - {{ with .Site.Params.twitter }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }} - {{ with .Site.Params.mastodon }}<a target="_blank" rel="me noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-mastodon fa-3x"></i></a>{{ end }} - {{ with .Site.Params.keybase }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-keybase fa-3x"></i></a>{{ end }} - {{ with .Site.Params.linkedin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }} - {{ with .Site.Params.stackOverflow }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }} - {{ with .Site.Params.facebook }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }} - {{ with .Site.Params.youtube }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }} - {{ with .Site.Params.instagram }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-instagram fa-3x"></i></a>{{ end }} - {{ with .Site.Params.bitcoin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitcoin fa-3x"></i></a>{{ end }} - - <!-- Uncomment to add the RSS icon --> - <!-- {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-3x"></i></a>{{ end }} --> - </li> - </ul> + <!-- Social media icons are moved to social.html --> + {{ partial "social.html" . }} <!-- Sidebar menu - items are read from the config file first we check if it is enabled in config file and then start adding items. diff --git a/layouts/partials/social.html b/layouts/partials/social.html new file mode 100644 index 0000000..5c91f93 --- /dev/null +++ b/layouts/partials/social.html @@ -0,0 +1,39 @@ +<!-- Sidebar social network icons + To override the order, copy this file to your theme at + your-website/layouts/partials/social.html + and modify the order. +--> + +<!-- Font awesome icons - code taken from the Hyde-x theme - + "Font Awesome by Dave Gandy - http://fontawesome.io" + Icons: https://fontawesome.com/icons. + + Fork Awesome is A fork of Font Awesome, originally created by Dave Gandy, now + maintained by a community. Fork Awesome is licensed under SIL OFL 1.1 · Code + is licensed under MIT License · Documentation is licensed under CC BY 3.0 + + Fork awesome Icons are at https://forkaweso.me/Fork-Awesome/icons/. + + Give the icons square dark backgrounds like this: fa fa-key-square + Size in this theme is fa-3x, size options are 1-5. + --> + +<ul class="sidebar-nav"> + <li class="sidebar-nav-item"> + {{ with .Site.Params.github }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-github fa-3x"></i></a>{{ end }} + {{ with .Site.Params.bitbucket }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitbucket fa-3x"></i></a>{{ end }} + {{ with .Site.Params.gitlab }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-gitlab fa-3x"></i></a>{{ end }} + {{ with .Site.Params.twitter }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-twitter fa-3x"></i></a>{{ end }} + {{ with .Site.Params.mastodon }}<a target="_blank" rel="me noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-mastodon fa-3x"></i></a>{{ end }} + {{ with .Site.Params.keybase }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-keybase fa-3x"></i></a>{{ end }} + {{ with .Site.Params.linkedin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-linkedin fa-3x"></i></a>{{ end }} + {{ with .Site.Params.stackOverflow }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-stack-overflow fa-3x"></i></a>{{ end }} + {{ with .Site.Params.facebook }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-facebook fa-3x"></i></a>{{ end }} + {{ with .Site.Params.youtube }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-youtube fa-3x"></i></a>{{ end }} + {{ with .Site.Params.instagram }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-instagram fa-3x"></i></a>{{ end }} + {{ with .Site.Params.bitcoin }}<a target="_blank" rel="noopener noreferrer" href="{{ . }}" title="{{ . }}"><i class="fa fa-bitcoin fa-3x"></i></a>{{ end }} + + <!-- Uncomment to add the RSS icon --> + <!-- {{ if .Site.Params.rss }}<a href="{{ "/index.xml" | absURL }}" type="application/rss+xml" title="RSS"><i class="fa fa-rss-square fa-3x"></i></a>{{ end }} --> + </li> +</ul>
\ No newline at end of file |