mirror of
https://github.com/theNewDynamic/gohugo-theme-ananke.git
synced 2025-04-28 11:52:44 +00:00
feat: add scrolling share buttons
This commit is contained in:
parent
9eab2e631d
commit
64c3c2cb16
@ -23,3 +23,37 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.5);
|
box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.share-buttons {
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-btn {
|
||||||
|
background-color: #333;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 5px 0;
|
||||||
|
text-decoration: none;
|
||||||
|
transition: background-color 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.share-btn:hover {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon svg {
|
||||||
|
height: 50px;
|
||||||
|
width: 50px
|
||||||
|
}
|
||||||
|
|
||||||
|
.facebook-share { background-color: #3b5998; }
|
||||||
|
.pinterest-share { background-color: #bd081c; }
|
||||||
|
.x-share { background-color: #333; }
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
{{ $services := where (partialCached "func/socials/Get" "socials/Get") "share" true }}
|
{{ $services := where (partialCached "func/socials/Get" "socials/Get") "share" true }}
|
||||||
{{ if not ($.Param "disable_share") }}
|
{{ if not ($.Param "disable_share") }}
|
||||||
<div id="sharing" class="mt3 ananke-socials">
|
{{/* <div id="sharing" class="mt3 ananke-socials">
|
||||||
{{ range $service := $services }}
|
{{ range $service := $services }}
|
||||||
{{ $href := index $hrefs .name }}
|
{{ $href := index $hrefs .name }}
|
||||||
<a href="{{ $href }}" class="ananke-social-link {{ .name }} no-underline" aria-label="share on {{ .label }}">
|
<a href="{{ $href }}" class="ananke-social-link {{ .name }} no-underline" aria-label="share on {{ .label }}">
|
||||||
@ -23,5 +23,17 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</div> */}}
|
||||||
|
<div id="sharing" class="share-buttons" class="mt3 ananke-socials">
|
||||||
|
{{ range $service := $services }}
|
||||||
|
{{ $href := index $hrefs .name }}
|
||||||
|
<a href="{{ $href }}" class="share-btn ananke-social-link {{ .name }}-share no-underline" aria-label="share on {{ .label }}">
|
||||||
|
{{ with .icon }}
|
||||||
|
<span class="icon"> {{ . }}</span>
|
||||||
|
{{ end }}
|
||||||
|
</a>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user