mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-21 21:58:28 +00:00
Add common class for buttons
This commit is contained in:
parent
6f847bd6d1
commit
6b3d4c831c
3 changed files with 19 additions and 11 deletions
|
@ -1,42 +1,42 @@
|
||||||
{{- if and .IsPage (.Param "share") }}
|
{{- if and .IsPage (.Param "share") }}
|
||||||
<div class="post__share share">
|
<div class="post__share share">
|
||||||
{{- if .Param "share.facebook" }}
|
{{- if .Param "share.facebook" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} Facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Facebook', 'width=800,height=600,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} Facebook" href="https://www.facebook.com/sharer/sharer.php?u={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Facebook', 'width=800,height=600,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/facebook.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/facebook.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.twitter" }}
|
{{- if .Param "share.twitter" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} Twitter" href="https://twitter.com/intent/tweet/?url={{ .Permalink }}&text={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Twitter', 'width=800,height=450,resizable=yes,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} Twitter" href="https://twitter.com/intent/tweet/?url={{ .Permalink }}&text={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Twitter', 'width=800,height=450,resizable=yes,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/twitter.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/twitter.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.reddit" }}
|
{{- if .Param "share.reddit" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} Reddit" href="https://www.reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Reddit', 'width=832,height=624,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} Reddit" href="https://www.reddit.com/submit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Reddit', 'width=832,height=624,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/reddit.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/reddit.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.telegram" }}
|
{{- if .Param "share.telegram" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} Telegram" href="https://t.me/share/url?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Telegram', 'width=800,height=600,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} Telegram" href="https://t.me/share/url?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Telegram', 'width=800,height=600,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/telegram.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/telegram.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.linkedin" }}
|
{{- if .Param "share.linkedin" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} LinkedIn" href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} LinkedIn', 'width=640,height=480,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} LinkedIn" href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} LinkedIn', 'width=640,height=480,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/linkedin.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/linkedin.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.googleplus" }}
|
{{- if .Param "share.googleplus" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} Google+" href="https://plus.google.com/share?url={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Google+', 'width=640,height=480,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} Google+" href="https://plus.google.com/share?url={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} Google+', 'width=640,height=480,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/googleplus.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/googleplus.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.vk" }}
|
{{- if .Param "share.vk" }}
|
||||||
<a class="share__link" title="{{ T "share-caption" }} VK" href="https://vk.com/share.php?url={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} VK', 'width=640,height=480,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "share-caption" }} VK" href="https://vk.com/share.php?url={{ .Permalink }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "share-caption" }} VK', 'width=640,height=480,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/vk.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/vk.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Param "share.pocket" }}
|
{{- if .Param "share.pocket" }}
|
||||||
<a class="share__link" title="{{ T "save-caption" }} Pocket" href="https://getpocket.com/edit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "save-caption" }} Pocket', 'width=480,height=320,toolbar=0,status=0'); return false">
|
<a class="share__link btn" title="{{ T "save-caption" }} Pocket" href="https://getpocket.com/edit?url={{ .Permalink }}&title={{ .Title }}" target="_blank" rel="noopener noreferrer" onclick="window.open(this.href, '{{ T "save-caption" }} Pocket', 'width=480,height=320,toolbar=0,status=0'); return false">
|
||||||
{{ partial "svg/pocket.svg" (dict "class" "share__icon" ) }}
|
{{ partial "svg/pocket.svg" (dict "class" "share__icon" ) }}
|
||||||
</a>
|
</a>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ $tagsLen := len $.Params.tags }}
|
{{ $tagsLen := len $.Params.tags }}
|
||||||
{{ if gt $tagsLen 0 }}
|
{{ if gt $tagsLen 0 }}
|
||||||
<div class="post__tags">
|
<div class="post__tags">
|
||||||
{{ range $k, $v := $.Params.tags }}<a class="post__tag" href="{{ "/tags/" | relLangURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
|
{{ range $k, $v := $.Params.tags }}<a class="post__tag btn" href="{{ "/tags/" | relLangURL }}{{ . | urlize | lower }}">{{ . }}</a>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
|
@ -407,6 +407,16 @@ mark {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: #111;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn:hover {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
/* Header */
|
/* Header */
|
||||||
.header {
|
.header {
|
||||||
margin: 0 0 .3125rem;
|
margin: 0 0 .3125rem;
|
||||||
|
@ -692,7 +702,6 @@ mark {
|
||||||
padding: .25rem .5rem;
|
padding: .25rem .5rem;
|
||||||
margin: .25rem;
|
margin: .25rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
background: #111;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc {
|
.toc {
|
||||||
|
@ -774,7 +783,6 @@ mark {
|
||||||
.share__link {
|
.share__link {
|
||||||
margin: .25rem;
|
margin: .25rem;
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
background-color: #111;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.share__link:hover {
|
.share__link:hover {
|
||||||
|
|
Loading…
Reference in a new issue