mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [LeaveIt Theme](https://github.com/liuzc/LeaveIt) and [KeepIt Theme](https://github.com/Fastbyte01/KeepIt).
|
||||
|
||||
It is mainly based on [LoveIt Theme](https://github.com/dillonzq/LoveIt) that's repository has stopped maintenance, so i just wanna fix it.
|
||||
**It is mainly based on [LoveIt Theme](https://github.com/dillonzq/LoveIt) that's repository has stopped maintenance, so i just wanna fix it.**
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @Description: Style of layout named 'Friend links'.
|
||||
* @Author: lruihao.cn
|
||||
* @Updated: 2021/9/20 19:26
|
||||
*/
|
||||
|
||||
.friend-links {
|
||||
margin-top: 1rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@media (max-width: 576px) {
|
||||
.friend-links {
|
||||
justify-content: space-around;
|
||||
}
|
||||
}
|
||||
.friend-link {
|
||||
width: 150px;
|
||||
height: 200px;
|
||||
font-size: 1rem;
|
||||
text-align: center;
|
||||
background: rgba(255,255,255,0.3);
|
||||
box-sizing: border-box;
|
||||
box-shadow: 3px 3px 5px #aaa;
|
||||
border-radius: 5px;
|
||||
border:none;
|
||||
transition-duration: 0.3s;
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.friend-link:hover {
|
||||
background: #fff;
|
||||
transform: scale(1.03);
|
||||
box-shadow: 0 0 3px #aaa;
|
||||
}
|
||||
.friend-avatar {
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
width: 100%!important;
|
||||
height: 150px!important;
|
||||
border-radius: 5px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.friend-nickname{
|
||||
display: block;
|
||||
position: relative;
|
||||
color: #2bbc8a;
|
||||
font-weight: bold;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
line-height: 18px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.friend-nickname:hover {
|
||||
color: #d480aa;
|
||||
}
|
||||
@@ -20,3 +20,4 @@
|
||||
@import "_archive";
|
||||
@import "_home";
|
||||
@import "_404";
|
||||
@import "_friends";
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
> h2 {
|
||||
> h1, > h2 {
|
||||
font-size: 1.5rem;
|
||||
|
||||
& code {
|
||||
@@ -273,6 +273,7 @@
|
||||
@import "../_partial/_single/mapbox";
|
||||
@import "../_partial/_single/music";
|
||||
@import "../_partial/_single/bilibili";
|
||||
@import "../_partial/_single/cardlink";
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
width: 4em;
|
||||
text-align: right;
|
||||
color: $global-font-secondary-color;
|
||||
white-space: nowrap;
|
||||
|
||||
[theme=dark] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
|
||||
@@ -14,6 +14,10 @@ footer {
|
||||
.icp-br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fa-ban {
|
||||
color: Tomato;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
//卡片式链接样式 cardlink
|
||||
|
||||
.card-link,.card-link:hover {
|
||||
text-decoration: none;
|
||||
border: none!important;
|
||||
color: inherit!important
|
||||
}
|
||||
|
||||
.card-link {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 1em auto;
|
||||
width: 390px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 12px;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.ztext {
|
||||
word-break: break-word;
|
||||
line-height: 1.6
|
||||
}
|
||||
|
||||
.card-link-backdrop {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-image: url(/lib/img/card-link-bg.jpg);
|
||||
background-repeat: no-repeat;
|
||||
-webkit-filter: blur(20px);
|
||||
filter: blur(20px);
|
||||
background-size: cover;
|
||||
background-position: center
|
||||
}
|
||||
|
||||
.card-link,.card-link:hover {
|
||||
text-decoration: none;
|
||||
border: none!important;
|
||||
color: inherit!important
|
||||
}
|
||||
|
||||
.card-link-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px;
|
||||
border-radius: inherit;
|
||||
background-color: rgba(246,246,246,0.88)
|
||||
}
|
||||
|
||||
.card-link-text {
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.card-link-title {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-height: calc(16px * 1.25 * 2);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 1.25;
|
||||
color: #1a1a1a
|
||||
}
|
||||
|
||||
.card-link-meta {
|
||||
display: flex;
|
||||
margin-top: 4px;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
color: #999;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.card-link-url {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.card-link-imageCell {
|
||||
margin-left: 8px;
|
||||
border-radius: 6px
|
||||
}
|
||||
|
||||
.card-link-image {
|
||||
display: block;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: inherit
|
||||
}
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
# Translations for Traditional Chinese
|
||||
# 簡體中文的翻譯
|
||||
# https://gohugo.io/content-management/multilingual/#translation-of-strings
|
||||
|
||||
# === baseof ==
|
||||
[backToTop]
|
||||
other = "回到頂部"
|
||||
|
||||
[viewComments]
|
||||
other = "查看評論"
|
||||
# === baseof ==
|
||||
|
||||
# === Post ===
|
||||
[posts]
|
||||
other = "文章"
|
||||
# === Post ===
|
||||
|
||||
# === Taxonomy ===
|
||||
[allSome]
|
||||
other = "所有{{ .Some }}"
|
||||
|
||||
[tag]
|
||||
other = "標籤"
|
||||
|
||||
[tags]
|
||||
other = "標籤"
|
||||
|
||||
[category]
|
||||
other = "分類"
|
||||
|
||||
[categories]
|
||||
other = "分類"
|
||||
|
||||
[years]
|
||||
other = "年度總結"
|
||||
# === Taxonomy ===
|
||||
|
||||
# === Pagination ===
|
||||
[more]
|
||||
other = "更多"
|
||||
# === Pagination ===
|
||||
|
||||
# === partials/header.html ===
|
||||
[selectLanguage]
|
||||
other = "選擇語言"
|
||||
|
||||
[switchTheme]
|
||||
other = "切換主題"
|
||||
# === partials/header.html ===
|
||||
|
||||
# === partials/footer.html ===
|
||||
[poweredBySome]
|
||||
other = "由 {{ .Hugo }} 強力驅動 | 主題 - {{ .Theme }}"
|
||||
# === partials/footer.html ===
|
||||
|
||||
# === partials/comment.html ===
|
||||
[valineLang]
|
||||
other = "zh-TW"
|
||||
|
||||
[valinePlaceholder]
|
||||
other = "你的評論 ..."
|
||||
|
||||
[facebookLanguageCode]
|
||||
other = "zh-TW"
|
||||
# === partials/comment.html ===
|
||||
|
||||
# === partials/assets.html ===
|
||||
[search]
|
||||
other = "搜尋"
|
||||
|
||||
[searchPlaceholder]
|
||||
other = "搜尋文章標題或內容..."
|
||||
|
||||
[clear]
|
||||
other = "清空"
|
||||
|
||||
[cancel]
|
||||
other = "取消"
|
||||
|
||||
[noResultsFound]
|
||||
other = "沒有找到結果"
|
||||
|
||||
[lunrLanguageCode]
|
||||
other = "zh"
|
||||
|
||||
[lunrLanguageLib]
|
||||
other = "lib/lunr/lunr.zh.js"
|
||||
|
||||
[lunrSegmentitLib]
|
||||
other = "lib/lunr/lunr.segmentit.js"
|
||||
|
||||
[copyToClipboard]
|
||||
other = "複製到剪貼板"
|
||||
|
||||
[cookieconsentMessage]
|
||||
other = "本網站使用 Cookies 來改善您的流覽體驗."
|
||||
|
||||
[cookieconsentDismiss]
|
||||
other = "同意"
|
||||
|
||||
[cookieconsentLink]
|
||||
other = "瞭解更多"
|
||||
# === partials/assets.html ===
|
||||
|
||||
# === partials/plugin/share.html ===
|
||||
[shareOn]
|
||||
other = "分享到"
|
||||
# === partials/plugin/share.html ===
|
||||
|
||||
# === posts/single.html ===
|
||||
[contents]
|
||||
other = "目錄"
|
||||
|
||||
[publishedOnDate]
|
||||
other = "發佈於 {{ .Date }}"
|
||||
|
||||
[includedInCategories]
|
||||
other = "收錄於 {{ .Categories }}"
|
||||
|
||||
[wordCount]
|
||||
other = "約 {{ .Count }} 字"
|
||||
|
||||
[readingTime]
|
||||
other = "預計閱讀 {{ .Count }} 分鐘"
|
||||
|
||||
[views]
|
||||
other = "次閱讀"
|
||||
|
||||
[author]
|
||||
other = "作者"
|
||||
|
||||
[updatedOnDate]
|
||||
other = "更新於 {{ .Date }}"
|
||||
|
||||
[readMarkdown]
|
||||
other = "閱讀原始文檔"
|
||||
|
||||
[back]
|
||||
other = "返回"
|
||||
|
||||
[home]
|
||||
other = "主頁"
|
||||
|
||||
[readMore]
|
||||
other = "閱讀全文"
|
||||
# === posts/single.html ===
|
||||
|
||||
# === 404.html ===
|
||||
[pageNotFound]
|
||||
other = "找不到網頁"
|
||||
|
||||
[pageNotFoundText]
|
||||
other = "抱歉,您要查找的頁面不存在。"
|
||||
# === 404.html ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[note]
|
||||
other = "注意"
|
||||
|
||||
[abstract]
|
||||
other = "摘要"
|
||||
|
||||
[info]
|
||||
other = "信息"
|
||||
|
||||
[tip]
|
||||
other = "技巧"
|
||||
|
||||
[success]
|
||||
other = "成功"
|
||||
|
||||
[question]
|
||||
other = "問題"
|
||||
|
||||
[warning]
|
||||
other = "警告"
|
||||
|
||||
[failure]
|
||||
other = "失敗"
|
||||
|
||||
[danger]
|
||||
other = "危險"
|
||||
|
||||
[bug]
|
||||
other = "Bug"
|
||||
|
||||
[example]
|
||||
other = "示例"
|
||||
|
||||
[quote]
|
||||
other = "引用"
|
||||
# === shortcodes/admonition.html ===
|
||||
|
||||
# === shortcodes/version.html ===
|
||||
[new]
|
||||
other = "新增"
|
||||
|
||||
[changed]
|
||||
other = "更改"
|
||||
|
||||
[deleted]
|
||||
other = "刪除"
|
||||
# === shortcodes/version.html ===
|
||||
@@ -0,0 +1,42 @@
|
||||
{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
<div class="page single special friends">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animated pulse faster">
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
|
||||
{{- /* Subtitle */ -}}
|
||||
{{- with $params.subtitle -}}
|
||||
<h2 class="single-subtitle">{{ . }}</h2>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Friend links */ -}}
|
||||
{{- $loading := resources.Get "svg/loading.svg" | minify -}}
|
||||
<script src="//at.alicdn.com/t/font_578712_g26jo2kbzd5qm2t9.js"></script>
|
||||
<div class="friend-links">
|
||||
{{ range $index, $friend := .Site.Data.friends }}
|
||||
<a class="friend-link" title="{{ $friend.discription }}" href="{{ $friend.url | safeURL }}" rel="external nofollow noopener noreferrer" target="_blank">
|
||||
{{ if $friend.avatar }}
|
||||
<img class="friend-avatar lazyload" src="{{ $loading.RelPermalink }}" data-src="{{ $friend.avatar }}" alt="{{ $friend.nickname }}" />
|
||||
{{ else }}
|
||||
<svg class="friend-avatar" aria-hidden="true">
|
||||
<use xlink:href="#icon-{{ add 1 $index }}"></use>
|
||||
</svg>
|
||||
{{ end }}
|
||||
<span class="friend-nickname" title="{{ $friend.nickname }}">@{{ $friend.nickname }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{- /* Content */ -}}
|
||||
<div class="content" id="content">
|
||||
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
</div>
|
||||
|
||||
{{- /* Comment */ -}}
|
||||
{{- partial "comment.html" . -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -7,12 +7,19 @@
|
||||
{{- safeHTML . -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Hugo and LoveIt */ -}}
|
||||
<!-- <i class="fas fa-bug fa-fw"></i> -->
|
||||
{{- /* Hugo and FixIt */ -}}
|
||||
{{- if ne .Site.Params.footer.hugo false -}}
|
||||
<div class="footer-line">
|
||||
{{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %v">Hugo</a>` hugo.Version -}}
|
||||
{{- $theme := .Scratch.Get "version" | printf `<a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt %v"><i class="far fa-kiss-wink-heart fa-fw"></i> LoveIt</a>` -}}
|
||||
{{- $theme := .Scratch.Get "version" | printf
|
||||
`<a href="https://github.com/Lruihao/FixIt" target="_blank" rel="noopener noreffer" title="FixIt %v">
|
||||
<i class="fa-stack fa-xs">
|
||||
<i class="fas fa-bug fa-stack-1x"></i>
|
||||
<i class="fas fa-ban fa-stack-2x"></i>
|
||||
</i>
|
||||
FixIt
|
||||
</a>` -}}
|
||||
{{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{- .Scratch.Set "version" "0.2.10" -}}
|
||||
{{- .Scratch.Set "version" "0.2.11" -}}
|
||||
|
||||
{{- /* LoveIt theme version detection */ -}}
|
||||
{{- /* FixIt theme version detection */ -}}
|
||||
{{- $VERSION := "0.2.X" -}}
|
||||
{{- if eq .Site .Sites.First -}}
|
||||
{{- if not .Site.Params.version -}}
|
||||
{{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the LoveIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 LoveIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
|
||||
{{- errorf "Configuration Error 配置文件错误\n\nYou haven't configured the FixIt version param correctly yet. See https://hugoloveit.com/theme-documentation-basics/#basic-configuration\n你还没有正确配置 FixIt 的版本参数. 参考 https://hugoloveit.com/zh-cn/theme-documentation-basics/#basic-configuration\n" -}}
|
||||
{{- else if ne .Site.Params.version $VERSION -}}
|
||||
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/dillonzq/LoveIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/dillonzq/LoveIt/releases\n" .Site.Params.version $VERSION) -}}
|
||||
{{- errorf (printf "Compatibility Error 兼容性错误\n\n%v -> %v:\nYou have an incompatible update. See https://github.com/Lruihao/FixIt/releases\n你进行了一次不兼容的更新. 参考 https://github.com/Lruihao/FixIt/releases\n" .Site.Params.version $VERSION) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{{- $rel := "" -}}
|
||||
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .Destination).Host | or .Newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"{{ with .Class }} class="{{ . }} card-link"{{ end }} class="card-link">
|
||||
<span class="card-link-backdrop"></span>
|
||||
<span class="card-link-content">
|
||||
<span class="card-link-text">
|
||||
<span class="card-link-title">
|
||||
{{- with .Content -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
<span class="card-link-meta">
|
||||
<span class="card-link-url">
|
||||
<svg class="Zi Zi--InsertLink" fill="currentColor" viewbox="0 0 24 24" width="17" height="17">
|
||||
<path d="M6.77 17.23c-.905-.904-.94-2.333-.08-3.193l3.059-3.06-1.192-1.19-3.059 3.058c-1.489 1.489-1.427 3.954.138 5.519s4.03 1.627 5.519.138l3.059-3.059-1.192-1.192-3.059 3.06c-.86.86-2.289.824-3.193-.08zm3.016-8.673l1.192 1.192 3.059-3.06c.86-.86 2.289-.824 3.193.08.905.905.94 2.334.08 3.194l-3.059 3.06 1.192 1.19 3.059-3.058c1.489-1.489 1.427-3.954-.138-5.519s-4.03-1.627-5.519-.138L9.786 8.557zm-1.023 6.68c.33.33.863.343 1.177.029l5.34-5.34c.314-.314.3-.846-.03-1.176-.33-.33-.862-.344-1.176-.03l-5.34 5.34c-.314.314-.3.846.03 1.177z" fill-rule="evenodd"></path>
|
||||
</svg>
|
||||
</span>
|
||||
{{ .Destination | safeURL }}
|
||||
</span>
|
||||
</span>
|
||||
<span class="card-link-imageCell">
|
||||
<img class="card-link-image" alt="card-link icon" src="/lib/img/linkicon.png" />
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
@@ -10,7 +10,7 @@
|
||||
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||
</pubDate>
|
||||
<author>
|
||||
{{- .params.author | default (T "author") -}}
|
||||
{{- $params.author | default (T "author") -}}
|
||||
</author>
|
||||
<guid>
|
||||
{{- .Page.Permalink -}}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- $destination := cond .IsNamedParams (.Get "href") (.Get 0) -}}
|
||||
{{- with dict "Path" $destination "Resources" .Page.Resources | partial "function/resource.html" -}}
|
||||
{{- $destination = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- $options := dict "Destination" $destination -}}
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $options = dict "Content" (.Get "content") | merge $options -}}
|
||||
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
||||
{{- $options = dict "Class" (.Get "class") | merge $options -}}
|
||||
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
|
||||
{{- else -}}
|
||||
{{- $options = dict "Content" (.Get 1 | default (.Get 0)) | merge $options -}}
|
||||
{{- $options = dict "Title" (.Get 2) | merge $options -}}
|
||||
{{- end -}}
|
||||
{{- partial "plugin/cardlink.html" $options -}}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 694 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user