profile-mode : add buttons

ex.
params:
  profileMode:
    buttons:
      - name: Archive
        url: "/archive"
      - name: Github
        url: "https://github.com/"
This commit is contained in:
Aditya Telange 2020-08-28 18:27:26 +05:30
parent 47126e37d5
commit df457f7514
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
3 changed files with 33 additions and 1 deletions

View File

@ -10,7 +10,11 @@
} }
.main>.profile>.profile_inner { .main>.profile>.profile_inner {
transform: translate(0, -20%); transform: translate(0, -10%);
}
.profile_inner h1 {
padding: 8px;
} }
img { img {
@ -31,3 +35,19 @@ img {
.social-icons { .social-icons {
padding: 16px; padding: 16px;
} }
.buttons {
max-width: 300px;
line-height: 2.8;
}
.button {
background: var(--tertiary);
border-radius: var(--radius);
margin: 8px;
padding: 8px;
}
.button-inner {
padding: 10px;
}

View File

@ -12,5 +12,10 @@
{{ partial "social-icons.html" . }} {{ partial "social-icons.html" . }}
</div> </div>
{{- end }} {{- end }}
{{- with .Site.Params.profileMode.buttons }}
<div class="buttons">
{{ partial "indexProfileButtons.html" . }}
</div>
{{- end }}
</div> </div>
</div> </div>

View File

@ -0,0 +1,7 @@
{{ range . -}}
<span class="button">
<a href="{{ .url }}" rel="noopener" title="{{ .name | humanize }}">
<span class="button-inner">{{ .name }}</span>
</a>
</span>
{{- end -}}