mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: add PWA i18n and add offline embedded tpl
This commit is contained in:
@@ -30,4 +30,5 @@
|
||||
@import "_archive";
|
||||
@import "_home";
|
||||
@import "_404";
|
||||
@import "_offline";
|
||||
@import "_friends";
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
#content-offline {
|
||||
@include transform(translateY(30vh));
|
||||
text-align: center;
|
||||
|
||||
.offline-title {
|
||||
font-size: 3.6rem;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
.offline-subtitle {
|
||||
margin: 0.4rem 0;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
line-height: 100%;
|
||||
color: #57606a;
|
||||
}
|
||||
.error-text {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
type: "offline"
|
||||
---
|
||||
@@ -1,35 +0,0 @@
|
||||
---
|
||||
title: "離線 (Offline)"
|
||||
comment: false
|
||||
---
|
||||
|
||||
> 您沒有連接到 Internet,只有緩存的頁面可用。
|
||||
> You are not connected to the Internet, only cached pages will be available.
|
||||
|
||||
```bash
|
||||
███████ ███████████ ███████████ █████ █████ ██████ █████ ██████████
|
||||
███░░░░░███ ░░███░░░░░░█░░███░░░░░░█░░███ ░░███ ░░██████ ░░███ ░░███░░░░░█
|
||||
███ ░░███ ░███ █ ░ ░███ █ ░ ░███ ░███ ░███░███ ░███ ░███ █ ░
|
||||
░███ ░███ ░███████ ░███████ ░███ ░███ ░███░░███░███ ░██████
|
||||
░███ ░███ ░███░░░█ ░███░░░█ ░███ ░███ ░███ ░░██████ ░███░░█
|
||||
░░███ ███ ░███ ░ ░███ ░ ░███ █ ░███ ░███ ░░█████ ░███ ░ █
|
||||
░░░███████░ █████ █████ ███████████ █████ █████ ░░█████ ██████████
|
||||
░░░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░░░░░░
|
||||
|
||||
▒█████ █████▒ █████▒██▓ ██▓ ███▄ █ ▓█████
|
||||
▒██▒ ██▒▓██ ▒▓██ ▒▓██▒ ▓██▒ ██ ▀█ █ ▓█ ▀
|
||||
▒██░ ██▒▒████ ░▒████ ░▒██░ ▒██▒▓██ ▀█ ██▒▒███
|
||||
▒██ ██░░▓█▒ ░░▓█▒ ░▒██░ ░██░▓██▒ ▐▌██▒▒▓█ ▄
|
||||
░ ████▓▒░░▒█░ ░▒█░ ░██████▒░██░▒██░ ▓██░░▒████▒
|
||||
░ ▒░▒░▒░ ▒ ░ ▒ ░ ░ ▒░▓ ░░▓ ░ ▒░ ▒ ▒ ░░ ▒░ ░
|
||||
░ ▒ ▒░ ░ ░ ░ ░ ▒ ░ ▒ ░░ ░░ ░ ▒░ ░ ░ ░
|
||||
░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░
|
||||
░ ░ ░ ░ ░ ░ ░ ░
|
||||
|
||||
████▄ ▄████ ▄████ █ ▄█ ▄ ▄███▄
|
||||
█ █ █▀ ▀ █▀ ▀ █ ██ █ █▀ ▀
|
||||
█ █ █▀▀ █▀▀ █ ██ ██ █ ██▄▄
|
||||
▀████ █ █ ███▄ ▐█ █ █ █ █▄ ▄▀
|
||||
█ █ ▀ ▐ █ █ █ ▀███▀
|
||||
▀ ▀ █ ██
|
||||
```
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
type: "offline"
|
||||
---
|
||||
@@ -1 +1 @@
|
||||
/zh-cn/* /zh-cn/404.html 404
|
||||
/zh-cn/* /zh-cn/404.html 404
|
||||
@@ -155,6 +155,14 @@ other = "Page not found"
|
||||
other = "The page you're looking for doesn't exist. Sorry."
|
||||
# === 404.html ===
|
||||
|
||||
# === offline ===
|
||||
[offlineTitle]
|
||||
other = "Offline"
|
||||
|
||||
[offlineText]
|
||||
other = "You are not connected to the Internet, only cached pages will be available."
|
||||
# === offline ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[note]
|
||||
other = "Note"
|
||||
|
||||
@@ -160,6 +160,14 @@ other = "页面没找到"
|
||||
other = "抱歉,您要查找的页面不存在。"
|
||||
# === 404.html ===
|
||||
|
||||
# === offline ===
|
||||
[offlineTitle]
|
||||
other = "离线"
|
||||
|
||||
[offlineText]
|
||||
other = "您没有连接到 Internet,只有缓存的页面可用。"
|
||||
# === offline ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[note]
|
||||
other = "注意"
|
||||
|
||||
@@ -160,6 +160,14 @@ other = "找不到網頁"
|
||||
other = "抱歉,您要查找的頁面不存在。"
|
||||
# === 404.html ===
|
||||
|
||||
# === offline ===
|
||||
[offlineTitle]
|
||||
other = "離線"
|
||||
|
||||
[offlineText]
|
||||
other = "您沒有連接到 Internet,只有緩存的頁面可用。"
|
||||
# === offline ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[note]
|
||||
other = "Note"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- define "title" }}
|
||||
{{- T "offlineTitle" }} - {{ .Site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
<div class="page" id="content-offline">
|
||||
<h1 class="offline-title animated pulse faster">{{- T "offlineTitle" -}}</h1>
|
||||
<h2 class="offline-subtitle">
|
||||
<i class="fa-stack fa-xs">
|
||||
<i class="fas fa-wifi fa-stack-1x"></i>
|
||||
<i class="fas fa-ban fa-stack-2x"></i>
|
||||
</i>
|
||||
<span>ERROR_INTERNET_DISCONNECTED</span>
|
||||
</h2>
|
||||
<p class="error-text">{{- T "offlineText" -}}</p>
|
||||
</div>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user