diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-08-28 18:27:26 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-08-28 18:47:00 +0530 |
| commit | df457f751477fb44f0737e33fea29130eec32c9f (patch) | |
| tree | 77ca77f031d6eeea08787cf11b6780eddf2fc1d2 | |
| parent | 47126e37d5196a2133a716f8f35dcc8311e75b1b (diff) | |
profile-mode : add buttons
ex.
params:
profileMode:
buttons:
- name: Archive
url: "/archive"
- name: Github
url: "https://github.com/"
| -rw-r--r-- | assets/css/profileMode.css | 22 | ||||
| -rw-r--r-- | layouts/partials/indexProfile.html | 5 | ||||
| -rw-r--r-- | layouts/partials/indexProfileButtons.html | 7 |
3 files changed, 33 insertions, 1 deletions
diff --git a/assets/css/profileMode.css b/assets/css/profileMode.css index c3a95bc..456438a 100644 --- a/assets/css/profileMode.css +++ b/assets/css/profileMode.css @@ -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; +}
\ No newline at end of file diff --git a/layouts/partials/indexProfile.html b/layouts/partials/indexProfile.html index 284829b..7757d51 100644 --- a/layouts/partials/indexProfile.html +++ b/layouts/partials/indexProfile.html @@ -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>
\ No newline at end of file diff --git a/layouts/partials/indexProfileButtons.html b/layouts/partials/indexProfileButtons.html new file mode 100644 index 0000000..43ff716 --- /dev/null +++ b/layouts/partials/indexProfileButtons.html @@ -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 -}}
\ No newline at end of file |
