Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/yanlinlin82/simple-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinlin Yan <yanlinlin82@gmail.com>2019-12-05 06:37:01 +0300
committerLinlin Yan <yanlinlin82@gmail.com>2019-12-05 06:37:01 +0300
commit626a4a221344169e1b25b9eb96072076b1d76dbe (patch)
treea13dd30ca5b47cea04fe3d7d7562325566f282c7
parent146d66ca8f0038e8c9568e4479cd97854b52a88c (diff)
Add basic implementation
-rw-r--r--layouts/404.html0
-rw-r--r--layouts/_default/baseof.html32
-rw-r--r--layouts/_default/list.html29
-rw-r--r--layouts/_default/single.html24
-rw-r--r--layouts/index.html9
-rw-r--r--static/css/main.css33
-rw-r--r--theme.toml12
7 files changed, 139 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/404.html
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
new file mode 100644
index 0000000..86b3144
--- /dev/null
+++ b/layouts/_default/baseof.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
+<html lang="{{ .Site.LanguageCode | default "en-us" }}">
+<head xmlns="http://www.w3.org/1999/xhtml">
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
+ <link rel="stylesheet" href="/css/main.css">
+ <link rel="icon" href="{{ .Site.Params.favicon }}" type="image/x-icon">
+</head>
+<body>
+ <div class="wrapper">
+ <header class="site-header">
+ <div class="site-title">
+ <h1><a href="{{ "" | relLangURL }}">{{ .Site.Title }}</a></h1>
+ <h2><a href="{{ "" | relLangURL }}">{{ .Site.Params.subtitle }}</a></h2>
+ </div>
+ <nav class="site-nav">
+ {{- range .Site.Menus.main -}}
+ <a class="nav-item" href="{{ .URL }}">{{ .Name }}</a>
+ {{- end -}}
+ </nav>
+ </header>
+ <div id="content">
+ {{ block "main" . }}{{- end }}
+ </div>
+ <footer class="site-footer">
+ <div class="copy">&copy; 2019 Linlin Yan. <a href="https://creativecommons.org/licenses/by/4.0/deed.zh">CC-BY-4.0</a></div>
+ </footer>
+ </div>
+</body>
+</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644
index 0000000..de06811
--- /dev/null
+++ b/layouts/_default/list.html
@@ -0,0 +1,29 @@
+{{ define "main" }}
+<main class="page-content">
+ {{- with .Title }}
+ <header class="main__header">
+ <h1 class="main__title">{{ . }}</h1>
+ </header>
+ {{- end }}
+ {{- with .Content }}
+ <div class="content main__content clearfix">
+ {{ . }}
+ </div>
+ {{- end }}
+ {{- range .Paginator.Pages }}
+ {{- .Render "summary" }}
+ {{- end }}
+ <article class="content">
+ <div class="post-header">
+ <h1 class="post-title">{{ .Title }}</h1>
+ </div>
+ <div class="post-content">
+ {{ .Content }}
+ </div>
+ </article>
+ <div class="post-nav">
+ <div class="post-nav-prev"><a href="/">&lt; ABC</a></div>
+ <div class="post-nav-next"><a href="/">XYZ &gt;</a></div>
+ </div>
+</main>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644
index 0000000..935a64e
--- /dev/null
+++ b/layouts/_default/single.html
@@ -0,0 +1,24 @@
+{{ define "main" }}
+<main class="page-content">
+ <article class="content">
+ <div class="post-header">
+ <h1 class="post-title">{{ .Title }}</h1>
+ </div>
+ <div class="post-meta">
+ <div><span class="post-time">2019-12-03 11:02:03</span></div>
+ <div>
+ <span class="post-tag"><a href="/tag-1">#Tag-1</a></span>
+ <span class="post-tag"><a href="/tag-2">#Tag-2</a></span>
+ <span class="post-tag"><a href="/tag-3">#Tag-3</a></span>
+ </div>
+ </div>
+ <div class="post-content">
+ {{ .Content }}
+ </div>
+ </article>
+ <div class="post-nav">
+ <div class="post-nav-prev"><a href="/">&lt; ABC</a></div>
+ <div class="post-nav-next"><a href="/">XYZ &gt;</a></div>
+ </div>
+</main>
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
new file mode 100644
index 0000000..7142020
--- /dev/null
+++ b/layouts/index.html
@@ -0,0 +1,9 @@
+{{ define "main" }}
+<main class="page-content">
+ <ul>
+ {{- range .Site.RegularPages }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{- end }}
+ </ul>
+</main>
+{{ end }}
diff --git a/static/css/main.css b/static/css/main.css
new file mode 100644
index 0000000..fb3d1ee
--- /dev/null
+++ b/static/css/main.css
@@ -0,0 +1,33 @@
+body{margin:0;padding:.5em}
+h1,h2,h3,h4,h5,h6,hr,p,th,td,a,pre,pre code,ul,ol,li{margin:0;padding:0}
+body,div,p,table,ul,ol{font:16px "SimSun","宋体","Arial Narrow",HELVETICA}
+h1,h2,h3,h4,h5,h6{font-family:"Microsoft YaHei","微软雅黑","SimHei","黑体";padding:.3em 0}
+p{padding:.3em 0}
+ul{list-style:circle inside}
+ol{list-style-position:inside}
+table{border-collapse: collapse}
+table,th,tr,td{border:1px solid gray}
+th,td{padding:1px 3px}
+a{text-decoration:none;color:#2a7ae2}
+a:visited{color:#1756a9}
+a:hover{text-decoration:underline;color:black}
+code{padding:1px 2px}
+pre{border:1px solid #ccc;background-color:#f0f0f0;padding:5px}
+.site-header{border-bottom:1px solid #ddd;margin-bottom:5px;padding-bottom:5px}
+.site-footer{border-top:1px solid #ddd;margin-top:5px;padding-top:5px;padding-bottom:10px}
+.wrapper{width:100%;max-width:960px;margin:0 auto}
+.site-title h1{font-size:160%;padding:0}
+.site-title h2{font-size:100%;padding:0}
+.site-title a{text-decoration:none;color:#666;margin:0;padding:0}
+.site-nav a{color:gray}
+.site-nav a:hover{color:red}
+.site-nav{text-align:right}
+.nav-item{padding-right:10px}
+.post-time{color:gray}
+.post-tag{padding-right:6px}
+.post-tag a{color:gray;font-weight:700;padding:0;margin:0}
+.post-tag a:hover{color:red}
+.post-nav{width:100%;overflow:auto;margin-top:15px}
+.post-nav-prev{display:block;width:50%;float:left;text-align:left}
+.post-nav-next{display:block;width:50%;float:right;text-align:right}
+.copy{text-align:center}
diff --git a/theme.toml b/theme.toml
new file mode 100644
index 0000000..2387650
--- /dev/null
+++ b/theme.toml
@@ -0,0 +1,12 @@
+name = "Simple Style"
+license = "MIT"
+licenselink = "https://github.com/yanlinlin82/simple-style/blob/master/LICENSE"
+description = ""
+homepage = "https://yanlinlin82.github.io/webpage-templates/simple-style/"
+tags = [ simple ]
+features = []
+min_version = "0.41"
+
+[author]
+name = "Linlin Yan"
+homepage = "http://yanlinlin.cn/"