ul.social-links {
margin: 0;
padding: 0;
+ li {
+ display: inline-block;
+ }
}
}
}
padding: 1em 3em;
div#secondary {
div#home-social-links {
- margin: 1em auto;
ul.social-links-list {
list-style: none;
li {
display: inline-block;
float: none;
- font-size: 4em;
- width: 2em;
text-align: center;
a {
color: $dark-orange;
}
}
}
+ul {
+ list-style: none;
+}
.screen-reader-text,
.hidden {
@include hide-visually;
border: none;
cursor: pointer;
display: block;
- width: 2em;
- height: 2em;
+ width: 3em;
+ height: 3em;
color: $dark-grey;
- & i {
- color: inherit;
- }
}
}
.inline-svg {
display: inline-block;
- height: 1.15rem;
- width: 1.15rem;
- top: 0.15rem;
+ height: 3em;
+ width: 3em;
+ margin-right: 1em;
+ top: 0.15em;
position: relative;
}
"user": "danixland"
},
{
- "name": "reddit",
- "url": "https://reddit.com/u",
+ "name": "github",
+ "url": "https://github.com",
"user": "danixland"
},
{
"user": "danixland"
},
{
- "name": "facebook",
- "url": "https://www.facebook.com",
+ "name": "spotify",
+ "url": "https://www.spotify.com",
"user": "danixland"
}
]
<!-- here will appear eventual js code and other additions to the footer -->
<div id="backtotop">
- <a href="#top"><i class="fa-brands fa-caret-up"></i><span class="screen-reader-text">back to top</span></a>
+ {{$name := "arrow-up"}}
+ <a href="#top">{{ partial "funcs/svg.html" (dict "context" . "username" $name) }}<span class="screen-reader-text">back to top</span></a>
</div>
{{ with .Site.Social }}
<div id="social-menu">
<ul class="social-links">
- <li class="social-link social-facebook">
- <a href="https://facebook.com/{{ .facebook }}" target="_blank">facebook</a>
+ <li class="social-link social-spotify">
+ {{$spotify := "spotify"}}
+ <a href="https://spotify.com/{{ .spotify }}" target="_blank">{{ partial "funcs/svg.html" (dict "context" . "username" $spotify) }}</a>
</li>
<li class="social-link social-twitter">
- <a href="https://twitter.com/{{ .twitter }}" target="_blank">twitter</a>
+ {{$twitter := "twitter"}}
+ <a href="https://twitter.com/{{ .twitter }}" target="_blank">{{ partial "funcs/svg.html" (dict "context" . "username" $twitter) }}</a>
</li>
<li class="social-link social-instagram">
- <a href="https://instagram.com/{{ .instagram }}" target="_blank">instagram</a>
+ {{$instagram := "instagram"}}
+ <a href="https://instagram.com/{{ .instagram }}" target="_blank">{{ partial "funcs/svg.html" (dict "context" . "username" $instagram) }}</a>
</li>
<li class="social-link social-github">
- <a href="https://github.com/{{ .github }}" target="_blank">github</a>
+ {{$github := "github"}}
+ <a href="https://github.com/{{ .github }}" target="_blank">{{ partial "funcs/svg.html" (dict "context" . "username" $github) }}</a>
</li>
</ul>
</div>
<span class="inline-svg">
-{{- $fname:=print "SVGs/" . ".svg" -}}
-{{- $path:="<path" -}}
-{{- $fill:="<path fill=\"currentColor\"" -}}
-{{ replace (readFile $fname) $path $fill | safeHTML }}
+{{- $fname:=print "SVGs/" .username ".svg" -}}
+{{ $icon := resources.Get $fname }}
+{{ $icon.Content | safeHTML }}
</span>
<ul class="social-links-list">
{{ range site.Data.socials.sites | shuffle }}
<li>
- <a href="{{ .url }}/{{ .user }}">{{ partial "funcs/svg.html" ".name" }}</a>
+ {{$name := .name}}
+ <a href="{{ .url }}/{{ .user }}">{{ partial "funcs/svg.html" (dict "context" . "username" $name) }}</a>
</li>
{{ end }}
- <li class="linux">{{ partial "funcs/svg.html" "linux" }}</li>
</ul>
</div>
-<pre class="inline-vg">
-{{ $favicon := resources.Get "SVGs/linux.svg" }}
-{{ $favicon | absURL | readFile | safeHTML }}
-</pre>
+<span class="inline-svg">
+{{- $fname := print "SVGs/" ( .Get 0 ) ".svg" -}}
+{{ $icon := resources.Get $fname }}
+{{ $icon.Content | safeHTML }}
+</span>