diff options
author | Oscar Najera <hi@oscarnajera.com> | 2023-10-15 23:33:32 +0200 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2023-10-15 23:33:32 +0200 |
commit | c23c5f93cde9f98534f2d89e46739a3d35b6239a (patch) | |
tree | 692b456488f148b7e1b1f26e9b204947fefad79a /layouts | |
parent | 7624fe7007c75a4074b7a257a44cb58f44e03752 (diff) | |
download | hugo-minimalist-theme-c23c5f93cde9f98534f2d89e46739a3d35b6239a.tar.gz hugo-minimalist-theme-c23c5f93cde9f98534f2d89e46739a3d35b6239a.tar.bz2 hugo-minimalist-theme-c23c5f93cde9f98534f2d89e46739a3d35b6239a.zip |
Social links
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/about.html | 17 | ||||
-rw-r--r-- | layouts/partials/head.html | 1 | ||||
-rw-r--r-- | layouts/partials/social_links.html | 22 |
3 files changed, 38 insertions, 2 deletions
diff --git a/layouts/_default/about.html b/layouts/_default/about.html index 9c4ca2f..4a3a656 100644 --- a/layouts/_default/about.html +++ b/layouts/_default/about.html @@ -1,9 +1,22 @@ {{ define "hero" }} - {{ partial "hero.html" . }} + <div + style="background: linear-gradient( rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.15) ){{ with resources.Get (index .Params.images 0) }} + , url('{{ .RelPermalink }}') + {{ end }}; background-position: center;" + class="pv5" + > + <div id="hero" class="mw7 center ph2 near-white lh-copy tc"> + <img src="{{ .Site.Author.avatar }}" class="br-100" /> + <h1 class="f1 mv1">{{ .Site.Author.name }}</h1> + <h2 class="f3 fw3 pa0 ma0">{{ .Site.Author.role }}</h2> + <div class="f2"> + {{ partial "social_links" . }} + </div> + </div> + </div> {{ end }} {{ define "main" }} - <div class="stripe-dark"></div> {{ range .Paginator.Pages }} <div class="stripe-dark"> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3a569e7..fce859b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,6 +7,7 @@ <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous" type="text/css" media="screen" /> {{ end }} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-9usAa10IRO0HhonpyAIVpjrylPvoDwiPUiKdWk5t3PyolY1cOd4DSE0Ga+ri4AuTroPR5aQvXU9xC6qOPnzFeg==" crossorigin="anonymous" referrerpolicy="no-referrer" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css"> <link rel="icon" href="/images/favicon.png"> {{ range .AlternativeOutputFormats -}} {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} diff --git a/layouts/partials/social_links.html b/layouts/partials/social_links.html new file mode 100644 index 0000000..e06fade --- /dev/null +++ b/layouts/partials/social_links.html @@ -0,0 +1,22 @@ +{{ range .Params.social }} + {{ $pack := or .icon_pack "fas" }} + {{ $pack_prefix := $pack }} + {{ if in (slice "fab" "fas" "far" "fal") $pack }} + {{ $pack_prefix = "fa" }} + {{ end }} + {{ $link := .link }} + {{ $scheme := (urls.Parse $link).Scheme }} + {{ $target := "" }} + {{ if not $scheme }} + {{ $link = .link | relLangURL }} + {{ else if in (slice "http" "https") $scheme }} + {{ $target = "target=\"_blank\" rel=\"noopener\"" }} + {{ end }} + <a + href="{{ $link | safeURL }}" + {{ $target | safeHTMLAttr }} + class="link near-white" + > + <i class="{{ $pack }} {{ $pack_prefix }}-{{ .icon }} h2"></i> + </a> +{{ end }} |