Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a partial for the header tag #90

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
<body>
<div id="profileContainer">
<div id="profile">
<header>
<!-- avator -->
<div class="avatar">
<img class="avatarMask" src="/img/{{ .Site.Params.avatar }}" alt="{{ .Site.Params.avatarDescription }}">
<img src="/img/avatar-border.svg" class="avatar-border" alt="">
</div>
<!-- author -->
<h1 class="author">{{ .Site.Params.Author }}</h1>
</header>
{{- partial "header.html" . -}}
<!-- description -->
<p>
{{ .Site.Params.description | safeHTML }}
Expand Down
1 change: 0 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

{{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/google_news.html" . -}}
{{- template "_internal/schema.html" . -}}
<!-- {{- template "_internal/twitter_cards.html" . -}} -->
{{- partial "twitter_cards.html" . -}}
Expand Down
8 changes: 4 additions & 4 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<header>
<!-- avator -->
<div class="avatar">
<img class="avatarMask" src="{{ .Site.BaseURL }}/img/{{ .Site.Params.avatar }}" alt="{{ .Site.Params.avatarDescription }}">
<a href="{{ .Site.BaseURL }}"><img class="avatar-border" src="{{ .Site.BaseURL }}/img/avatar-border.svg" alt=""></a>
<img class="avatarMask" src="/img/{{ .Site.Params.avatar }}" alt="{{ .Site.Params.avatarDescription }}">
<img src="/img/avatar-border.svg" class="avatar-border" alt="">
</div>
<!-- author -->
<h2><a class="author" href="{{ .Site.BaseURL }}">{{ .Site.Params.Author }}</a></h2>
</header>
<h1 class="author">{{ .Site.Params.Author }}</h1>
</header>