diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-11-09 12:14:01 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2020-11-09 12:14:45 +0530 |
| commit | 8574c385cdb16cd9950343df89710c89496dc988 (patch) | |
| tree | ce76c5d97776559a4d1a9d70ab197f94d91da18c | |
| parent | c960b8af0438796658ddbd0af66e2624a9cc45f6 (diff) | |
profile-mode: user set-able image size
- default 150
usage:
profileMode:
imageUrl: "/android-chrome-192x192.png"
imageWidth: 120
imageHeight: 120
| -rw-r--r-- | assets/css/profile-mode.css | 3 | ||||
| -rw-r--r-- | layouts/partials/index_profile.html | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/assets/css/profile-mode.css b/assets/css/profile-mode.css index 121163a..77108f7 100644 --- a/assets/css/profile-mode.css +++ b/assets/css/profile-mode.css @@ -20,14 +20,13 @@ .profile img { display: inline-table; - width: 150px; border-radius: 50%; pointer-events: none; } @media screen and (max-width: 600px) { .profile img { - width: 120px; + transform: scale(0.85); } } diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index 5de8057..bee94fb 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -1,7 +1,8 @@ <div class="profile"> {{- with .Site.Params.profileMode }} <div class="profile_inner"> - {{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" />{{- end}} + {{- if .imageUrl}}<img src="{{ .imageUrl}}" alt="{{ .imageTitle | default "profile image" }}" + height="{{- .imageHeight | default 150 -}}" width="{{- .imageWidth | default 150 -}}" />{{- end}} <h1>{{- .title | default $.Site.Title | markdownify -}}</h1> <span>{{- .subtitle | markdownify -}}</span> {{- partial "social_icons.html" $.Site.Params.socialIcons -}} |
