profile-mode : add buttons
ex. params: profileMode: buttons: - name: Archive url: "/archive" - name: Github url: "https://github.com/"
This commit is contained in:
parent
47126e37d5
commit
df457f7514
@ -10,7 +10,11 @@
|
||||
}
|
||||
|
||||
.main>.profile>.profile_inner {
|
||||
transform: translate(0, -20%);
|
||||
transform: translate(0, -10%);
|
||||
}
|
||||
|
||||
.profile_inner h1 {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
img {
|
||||
@ -31,3 +35,19 @@ img {
|
||||
.social-icons {
|
||||
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;
|
||||
}
|
@ -12,5 +12,10 @@
|
||||
{{ partial "social-icons.html" . }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- with .Site.Params.profileMode.buttons }}
|
||||
<div class="buttons">
|
||||
{{ partial "indexProfileButtons.html" . }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
7
layouts/partials/indexProfileButtons.html
Normal file
7
layouts/partials/indexProfileButtons.html
Normal 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 -}}
|
Loading…
Reference in New Issue
Block a user