Skip to content

Commit

Permalink
modified something
Browse files Browse the repository at this point in the history
- added description of posts and tags to pinned items, posts and post pages
- added the site-title to header
- added OGP meta tags to head
  • Loading branch information
suihan74 committed Dec 17, 2019
1 parent f2abfbd commit f0be7ad
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 26 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul
class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">© 2019. Theme by <a href="https://github.com/MeiK2333/github-style"><span>github-style</span></a></li>
<li class="mr-3 mr-lg-0">© 2019. Theme by <a href="https://github.com/MeiK2333/github-style"><span>github-style</span></a> (<a href="https://github.com/suihan74/github-style"><span>customized</span></a>)</li>
</ul>

<a aria-label="Homepage" title="{{ .Site.Title }}" class="footer-octicon d-none d-lg-block mx-lg-4"
Expand All @@ -24,4 +24,4 @@
</div>
</div>

{{ partial "script.html" . }}
{{ partial "script.html" . }}
16 changes: 15 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@

<title>{{ if .IsHome }}{{ else }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>

<!-- OGP -->
<meta property="og:url" content="{{ .URL | absURL }}"/>
<meta property="og:site_name" content="{{ .Site.Title }}"/>
{{ if .IsHome }}
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ .Site.Title }}" />
<meta property="og:description" content="{{ .Site.Params.Description }}"/>
<meta property="og:image" content="{{ $.Site.Params.avatar }}"/>
{{ else }}
<meta property="og:type" content="article" />
<meta property="og:title" content="{{ .Title }}" />
<meta property="og:description" content="{{ .Params.Description }}"/>
{{ end }}

<link rel="icon" type="image/x-icon" class="js-site-favicon" href="{{ "images/favicon.ico" | absURL }}">
<meta name="theme-color" content="#1e2327">
{{ template "_internal/google_analytics_async.html" . }}
</head>
</head>
9 changes: 7 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
</span>
<header class="Header js-details-container Details flex-wrap flex-lg-nowrap p-responsive" role="banner">
<div class="Header-item d-none d-lg-flex">
<a class="Header-link" href="{{ .Site.BaseURL }}" aria-label="Homepage"
data-ga-click="Header, go to dashboard, icon:logo">
<a class="Header-link" href="{{ .Site.BaseURL }}" aria-label="Homepage" data-ga-click="Header, go to dashboard, icon:logo">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1"
width="32" aria-hidden="true">
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
</svg>
<span style="margin-left: 8px;">
{{ .Site.Title }}
</span>
</a>
</div>
<div
Expand All @@ -30,8 +32,10 @@
<path fill-rule="evenodd"
d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" />
</svg>
{{ .Site.Title }}
</a>
</div>
<!--
<div class="Header-item position-relative mr-0 d-none d-lg-flex">
<details class="details-overlay details-reset">
<summary class="Header-link" aria-label="View profile and more"
Expand All @@ -44,6 +48,7 @@
</summary>
</details>
</div>
-->
</header>
</div>

Expand Down
21 changes: 16 additions & 5 deletions layouts/partials/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,22 @@ <h2 class="f4 mb-2 text-normal">
<span class="repo js-pinnable-item" title="{{ .Title }}">{{ .Title }}</span>
</a>
</div>
{{ .Summary | safeHTML }}
<div class="f6 text-gray mt-2">
Updated <relative-time datetime="{{ .PublishDate.Format "2006-01-02 00:00 +09:00" }}"
class="no-wrap" title="Modify at {{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}">
{{ .PublishDate.Format "2006-01-02 00:00 +09:00" }}</relative-time>
<div class="text-gray text-small d-block mt-2 mb-3">
{{ .Description | safeHTML }}
</div>
<div class="mb-0 f6 text-gray">
{{ with .Params.tags }}
<span class="f6 text-gray mt-1">
<svg class="octicon octicon-tag" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M7.73 1.73C7.26 1.26 6.62 1 5.96 1H3.5C2.13 1 1 2.13 1 3.5v2.47c0 .66.27 1.3.73 1.77l6.06 6.06c.39.39 1.02.39 1.41 0l4.59-4.59a.996.996 0 000-1.41L7.73 1.73zM2.38 7.09c-.31-.3-.47-.7-.47-1.13V3.5c0-.88.72-1.59 1.59-1.59h2.47c.42 0 .83.16 1.13.47l6.14 6.13-4.73 4.73-6.13-6.15zM3.01 3h2v2H3V3h.01z" />
</svg>
{{ range . }} <a href="/tags/{{ . }}/">{{ . }}</a>{{ end }}
</span>
{{ end }}
<div class="mt-1">
Updated <relative-time datetime="{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap">
{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}</relative-time>
</div>
</div>
</div>
</div>
Expand Down
17 changes: 15 additions & 2 deletions layouts/partials/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,30 @@ <h1 class="public css-truncate float-none flex-auto width-fit pl-0">
{{ end }}
</a>
<span class="author"><a
href="{{ .Site.BaseURL }}">{{ .Site.Params.author }}</a></span>
href="{{ absURL "about/" }}">{{ .Site.Params.author }}</a></span>
<span class="path-divider">/</span>
<strong itemprop="name" class="css-truncate-target" style="max-width: 410px"><a
href="{{ .Permalink }}">{{ .Title }}</a></strong>

{{ with .Params.description }}<div class="text-small text-gray">{{ . }}</div>{{ end }}

<!-- display tags -->
<div class="text-small text-gray">
{{ with .Params.tags }}
<svg class="octicon octicon-tag" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M7.73 1.73C7.26 1.26 6.62 1 5.96 1H3.5C2.13 1 1 2.13 1 3.5v2.47c0 .66.27 1.3.73 1.77l6.06 6.06c.39.39 1.02.39 1.41 0l4.59-4.59a.996.996 0 000-1.41L7.73 1.73zM2.38 7.09c-.31-.3-.47-.7-.47-1.13V3.5c0-.88.72-1.59 1.59-1.59h2.47c.42 0 .83.16 1.13.47l6.14 6.13-4.73 4.73-6.13-6.15zM3.01 3h2v2H3V3h.01z" />
</svg>
{{ range . }} <a href="/tags/{{ . }}/">{{ . }}</a>{{ end }}
{{ end }}
</div>

<!-- display timestamp -->
<div class="d-block text-small text-gray">
Created <time-ago datetime="{{ .PublishDate.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap"
title="Created at {{ .PublishDate.Format "2006/01/02" }}">
{{ .PublishDate.Format "2006-01-02" }}</time-ago>
<span class="file-info-divider"></span>
Modified <time-ago datetime="{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap"
Updated <time-ago datetime="{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap"
title="Modified at {{ .Lastmod.Format "2006/01/02" }}">
{{ .Lastmod.Format "2006-01-02" }}</time-ago>
</div>
Expand Down
20 changes: 15 additions & 5 deletions layouts/partials/posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,23 @@ <h3>
</div>

<div name="posts-post">
{{ .Summary | safeHTML }}
{{ .Description | safeHTML }}
</div>

<div class="f6 text-gray mt-2">
Updated <relative-time datetime="{{ .PublishDate.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap"
title="Modified at {{ .Lastmod.Format "2006/01/02" }}">
{{ .PublishDate.Format "2006-01-02 00:00 +09:00" }}</relative-time>
<div class="mb-0 mt-2 f6 text-gray">
{{ with .Params.tags }}
<span class="f6 text-gray mt-1">
<svg class="octicon octicon-tag" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true">
<path fill-rule="evenodd" d="M7.73 1.73C7.26 1.26 6.62 1 5.96 1H3.5C2.13 1 1 2.13 1 3.5v2.47c0 .66.27 1.3.73 1.77l6.06 6.06c.39.39 1.02.39 1.41 0l4.59-4.59a.996.996 0 000-1.41L7.73 1.73zM2.38 7.09c-.31-.3-.47-.7-.47-1.13V3.5c0-.88.72-1.59 1.59-1.59h2.47c.42 0 .83.16 1.13.47l6.14 6.13-4.73 4.73-6.13-6.15zM3.01 3h2v2H3V3h.01z" />
</svg>
{{ range . }} <a href="/tags/{{ . }}/">{{ . }}</a>{{ end }}
</span>
{{ end }}
<div class="mt-1">
Updated <relative-time datetime="{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}" class="no-wrap">
{{ .Lastmod.Format "2006-01-02 00:00 +09:00" }}</relative-time>
</div>
</div>
</div>
</div>
</li>
Expand Down
11 changes: 4 additions & 7 deletions layouts/partials/user-profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@
<div class="clearfix mb-2">
<div class="float-left col-3 col-md-12 pr-3 pr-md-0">
{{ with $.Site.Params.avatar }}
<a itemprop="image" class="u-photo d-block position-relative" aria-hidden="true"
href="{{ $.Site.Params.avatar }}">
<span itemprop="image" class="u-photo d-block position-relative" aria-hidden="true">
<img alt="" width="260" height="260"
class="avatar width-full height-full rounded-2" src="{{ $.Site.Params.avatar }}" />
</a>
</span>
{{ else }}
<a itemprop="image" class="u-photo d-block position-relative" aria-hidden="true"
href="{{ "images/avatar.png" | absURL }}">

<span itemprop="image" class="u-photo d-block position-relative" aria-hidden="true">
<img alt="" width="260" height="260"
class="avatar width-full height-full rounded-2" src="{{ "images/avatar.png" | absURL }}" />
</a>
</span>
{{ end }}
</div>
<div class="float-left col-9 col-md-12 pl-2 pl-md-0">
Expand Down
4 changes: 2 additions & 2 deletions static/css/github.css

Large diffs are not rendered by default.

0 comments on commit f0be7ad

Please sign in to comment.