Compare commits

..

15 Commits

Author SHA1 Message Date
09b81b4c1e Change: image width to max 100
fix the problem when use a very small low quality pic
2022-05-03 02:37:34 +08:00
44604f2dc4 Personalize: page button style 2021-08-26 22:43:01 +08:00
2a36ad6fbc Merge branch 'patch-minify' into hmsy 2021-08-26 10:57:07 +08:00
45fc1a2d56 Make css and js resources minify 2021-08-26 10:56:49 +08:00
96a4c93c65 Adjust home header margin 2021-08-26 02:19:45 +08:00
40a5c9da9f Revert "Fix description not display on homepage"
This reverts commit 281a3bec39.

Because, description in `config.toml` will show in `<head>`,
the description in `/content/posts/_index.md` will show on the homepage,
below the title as a small text. So this is not a bug.
2021-08-26 01:53:43 +08:00
c691742260 Merge branch 'patch-height' into hmsy 2021-08-26 00:24:33 +08:00
3eca8c1fce Fix homepage on large screen 2021-08-26 00:22:23 +08:00
b69817378d Merge branch 'patch-height' into hmsy 2021-08-25 17:59:02 +08:00
92dcce0790 Merge branch 'patch-404' into hmsy 2021-08-25 17:58:51 +08:00
3ef80768b4 Fix height is not 100%, footer is not at bottom 2021-08-25 17:58:20 +08:00
7407765b42 Add 404 page 2021-08-25 17:56:06 +08:00
d33c84a200 change some words to chinese 2021-08-23 22:21:06 +08:00
05f1eaf95a hmsy personalize style 2021-08-23 19:58:09 +08:00
281a3bec39 Fix description not display on homepage 2021-08-23 17:08:21 +08:00
13 changed files with 70 additions and 24 deletions

View File

@@ -1,3 +1,6 @@
html {
height: 100%;
}
body {
font-family: Avenir, HelveticaNeue-Light, "Helvetica Neue Light",
"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
@@ -11,20 +14,26 @@ body {
width: 100%;
box-sizing: border-box;
word-break: break-word;
height: 100%;
}
body.single-body {
justify-content: space-between;
}
p {
margin: 1.5em 0;
}
.home-header {
min-height: 26rem;
max-width: 50rem;
margin: 0 -1.2rem -5rem -1.2rem;
margin: 3rem 0;
padding: 1.2rem;
display: flex;
flex-direction: column;
z-index: -1;
background-position: center;
background-size: cover;
background-color: pink;
border-radius: 2em;
box-shadow: 0 0 1em 0.039em;
}
.home-faceshot-card {
align-self: center;
@@ -293,13 +302,18 @@ p {
z-index: 2;
}
.pagination-nav {
margin: 2em 0;
padding: 2em 0;
width: 100%;
max-width: 47rem;
}
/* .pagination-text {
font-family: 'LatoLatinWebMedium';
} */
.pagination-text {
background-color: pink;
padding: 0.5rem;
border-radius: 0.5rem;
box-shadow: 0 0 0.5rem;
text-decoration: none;
color: darkred;
}
.pagination-newer {
float:left;
}
@@ -368,7 +382,7 @@ h1, h2, h3, h4, h5, h6 {
}
img {
display: block;
width: 100%;
max-width: 100%;
height: auto;
margin: 1.5em 0;
}
@@ -441,11 +455,10 @@ footer {
height: 17rem;
max-width: 50rem;
width: 100%;
margin-top: -10rem;
display: flex;
flex-flow: row wrap;
flex-flow: column;
justify-content: space-evenly;
align-items: flex-end;
align-items: center;
color: white;
background-position: 40% 0%;
background-size: 50rem;
@@ -453,6 +466,12 @@ footer {
.footer-link {
margin: 1rem 0;
}
.footer-home-icon {
max-width: 30rem;
border: 0.39rem solid pink;
border-radius: 4rem;
margin: 0;
}
.footer-icon {
max-width: 3rem;
margin: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
assets/img/aquarium.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
assets/img/negi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
assets/img/negi2.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View File

@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}" dir="ltr">
{{ partial "head.html" . }}
<body class="single-body">
{{ partial "nav-bar.html" . }}
<main class="content side-text-padding">
<article class="post {{ if ne .Params.dropcap false }}dropcase{{ end }}">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
</header>
<img src="https://http.cat/404.jpg" />
<h2 id="title"><a href="{{ "/" | relURL }}">Go Home</a></h2>
</article>
{{ template "_internal/disqus.html" . }}
</main>
<nav class="end-nav side-padding">
</nav>
{{ partial "footer.html" . }}
{{ partial "scripts.html" . }}
</body>
</html>

View File

@@ -5,7 +5,7 @@
{{ partial "nav-bar.html" . }}
<main class="card-container side-gutter">
{{ if or (not (eq .Description "")) (not (eq .Title "")) -}}
<header class="home-header" style="background-image: url('{{ "img/home-blob.svg" | absURL }}');">
<header class="home-header">
<div class="home-blob-text-container">
{{ with .Title }}<h1 class="home-blob-title">{{ . }}</h1>{{ end }}
{{ with .Description }}<p class="home-blob-text">{{ . }}</p>{{ end }}

View File

@@ -2,7 +2,7 @@
href="{{ .Permalink }}" class="card blog-card bc-next" rel="bookmark" >
{{ with .Resources.GetMatch "featuredImage" }}
<div class="card-img-container">
<p class="card-img-overlay">Next Article</p>
<p class="card-img-overlay">下一篇文章</p>
<picture>
{{ $thumbnail := .Resize "400x Lanczos" }}
{{ $thumbnail_2 := .Resize "800x Lanczos" }}
@@ -16,8 +16,8 @@
<h2 class="card-title">{{ .Title }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>Posted <time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "Jan 2, 2006" }}</time></p>
<p>发布于<time datetime="{{ .PublishDate.Format "2006-01-02 12:00" }}">{{ .PublishDate.Format "2006年1月2日" }}</time></p>
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . }} {{ end }}</p>{{ end }}
</div>
</article>
</a>
</a>

View File

@@ -15,8 +15,8 @@
<h2 class="card-title">{{ .Title }}</h2>
<p class="card-text">{{ if (isset .Params "description") }}{{ index .Params "description" | htmlUnescape }}{{ else }}{{ .Summary | plainify | htmlUnescape }}{{ end }}</p>
<div class="card-subtext muted-text">
<p>Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>
<p>发布于<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006年1月2日" }}</time></p>
{{ if (isset .Params "categories") }}<p>{{ range .Params.categories }}#{{ . | urlize | title }} {{ end }}</p>{{ end }}
</div>
</article>
</a>
</a>

View File

@@ -7,7 +7,7 @@
<article class="post {{ if ne .Params.dropcap false }}dropcase{{ end }}">
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
{{ if isset .Params "date" }}<p class="post-date">Posted <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "Jan 2, 2006" }}</time></p>{{ end }}
{{ if isset .Params "date" }}<p class="post-date">发布于<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006年1月2日" }}</time></p>{{ end }}
</header>
{{ with .Resources.GetMatch "featuredImage" -}}
<picture class="post-figure">
@@ -26,7 +26,7 @@
{{- end }}
{{- end }}
{{ if .Params.toc -}}
<h2>Contents</h2>
<h2>目录</h2>
{{ .TableOfContents }}
{{- end }}
{{ .Content }}

View File

@@ -1,9 +1,10 @@
<footer class="side-padding" style="background-image: url('{{ "img/home-blob-flip.svg" | absURL }}');">
<a href="{{ $.Site.BaseURL }}" class="footer-link">
{{ with resources.Get "icons/home-page.png" }}
<img class="footer-icon" src="{{ .Permalink }}" alt="Home">
{{ with resources.Get "icons/home_button.jpg" }}
<img class="footer-home-icon" src="{{ .Permalink }}" alt="Home">
{{ end }}
</a>
<div style="display: flex; flex-direction: row; justify-content: space-evenly; width: 100%;">
{{ if isset $.Site.Params "github"}}
<a href="{{ $.Site.Params.github }}" class="footer-link">
{{ with resources.Get "icons/github.png" }}
@@ -18,4 +19,5 @@
{{ end }}
</a>
{{ end }}
</footer>
</div>
</footer>

View File

@@ -23,7 +23,8 @@
{{ partial "meta-tags.html" . }}
{{ end -}}
{{ with resources.Get "css/katex.css" -}}
<link href="{{ .Permalink }}" rel="stylesheet">
{{ $katexcss := resources.Get "css/katex.css" | minify }}
<link href="{{ $katexcss.Permalink }}" rel="stylesheet">
{{ end -}}
{{ $normalizeStyle := resources.Get "css/normalize.css" }}
{{ $mainStyle := resources.Get "css/style.css" }}

View File

@@ -1,8 +1,10 @@
{{ with resources.Get "js/katex.js" }}
<script defer src="{{ .Permalink }}"></script>
{{ $katexjs := resources.Get "js/katex.js" | minify }}
<script defer src="{{ $katexjs.Permalink }}"></script>
{{ end }}
{{ with resources.Get "js/auto-render.js" }}
<script defer src="{{ .Permalink }}" onload="renderMathInElement(document.body);"></script>
{{ $autorenderjs := resources.Get "js/auto-render.js" | minify }}
<script defer src="{{ $autorenderjs.Permalink }}" onload="renderMathInElement(document.body);"></script>
{{ end }}
{{ $corejs := resources.Get "js/core.js" | minify }}
<script src="{{ $corejs.Permalink }}"></script>