Merge branch 'main' of github.com:Mivinci/hugo-theme-minima

This commit is contained in:
Mivinci 2021-11-09 00:32:01 +08:00
commit f33403abe2
9 changed files with 37 additions and 9 deletions

View file

@ -4,7 +4,7 @@ themeDir=../..
.PHONY: dev, build, clean .PHONY: dev, build, clean
dev: dev:
rm -r exampleSite/resources -rm -r exampleSite/resources
hugo server -D -s $(source) --themesDir $(themeDir) --disableFastRender hugo server -D -s $(source) --themesDir $(themeDir) --disableFastRender
build: build:

View file

@ -1,6 +1,9 @@
// This file contains some codes to fix style of elements under `.md` // fix style of checkboxes in posts.
document.querySelectorAll('.md ul').forEach(v => { document.querySelectorAll('.md ul').forEach(v => {
if (/<li><input .+>.+<\/li>/.test(v.innerHTML)) { if (/<li><input .+>.+<\/li>/.test(v.innerHTML)) {
v.classList.add('ul-checkbox'); v.classList.add('ul-checkbox');
} }
}); });
// use custom font family
document.querySelector('body').style.setProperty('--global-font-family', '{{ .Site.Params.globalFontFamily }}');

View file

@ -4,6 +4,10 @@
outline: none; outline: none;
} }
header nav a {
line-height: 1.8;
}
$unit: 0.25rem; $unit: 0.25rem;
$scales: 0, 1, 2, 3, 4, 5, 6, 7, 8, 1.5; $scales: 0, 1, 2, 3, 4, 5, 6, 7, 8, 1.5;
$screens: ( $screens: (

View file

@ -10,6 +10,8 @@
--tag: #333; --tag: #333;
--w-mobile: 640px; --w-mobile: 640px;
--global-font-family: Verdana, Geneva, Tahoma, sans-serif;
} }
html.dark { html.dark {
@ -26,7 +28,7 @@ html.dark {
} }
body { body {
font-family: "Helvetica Neue", Helvetica, sans-serif; font-family: var(--global-font-family);
max-width: var(--w-mobile); max-width: var(--w-mobile);
margin: 3rem auto 0; margin: 3rem auto 0;
font-size: 16px; font-size: 16px;

View file

@ -1,8 +1,8 @@
baseURL = "http://h.xjj.pub" baseURL = "http://h.xjj.pub"
languageCode = "en-us" languageCode = "en-us"
title = "Hi Folks" title = "Hi Folks"
copyright = Copyright notice" copyright = XJJ 2021"
paginate = 5 paginate = 6
googleAnalytics = "" googleAnalytics = ""
disqusShortname = "hugo-minima" disqusShortname = "hugo-minima"
@ -25,8 +25,8 @@ iam = "I am"
# The subtitle will be shown after the title of your blog site. # The subtitle will be shown after the title of your blog site.
# e.g. "title - subtitle". # e.g. "title - subtitle".
subtitle = "" subtitle = ""
# Comment decides the comment plugin used on your blog site, # Comment decides the comment plugin to be used on your blog site,
# available plugins: disqus, ovo. # e.g. disqus, ovo.
comment = "disqus" comment = "disqus"
# timeformat # timeformat
timeformat = "Jan 2, 2006" timeformat = "Jan 2, 2006"
@ -35,7 +35,10 @@ switch = ["🌚", "🌝"]
# if true, date of posts will be displayed in the homepage. # if true, date of posts will be displayed in the homepage.
displayDate = true displayDate = true
# if true, users can select text from your post. # if true, users can select text from your post.
selectable = false selectable = true
# custom global font. notice: `globalFontFamily` won't be working
# on texts in some special positions. e.g. title
globalFontFamily = 'Helvatica, sans-serif'
# OvO is a comment plugin written by the author of Minima. # OvO is a comment plugin written by the author of Minima.

View file

@ -0,0 +1,16 @@
---
author: XJJ
title: 中文测试
date: 2021-07-17T10:52:59+08:00
description:
---
## 二级标题
这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文
### 三级标题
这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文这是测试正文
#### 四级标题

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 45 KiB