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

github.com/4ever9/less.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden X <caichao.xu@gmail.com>2020-08-13 17:18:49 +0300
committerAiden X <caichao.xu@gmail.com>2020-08-13 17:18:49 +0300
commit3a223545b912db31bd2cf46f2921e303edc296f5 (patch)
treeab108fae8f9b138d3cb8b428695c02e9d1c81356 /layouts
parentb0b26a9eb4e687c3fe37c050fe45a87fe63ac3f7 (diff)
feat(single): add new page
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/single.html1
-rw-r--r--layouts/index.html40
-rw-r--r--layouts/partials/footer.html9
-rw-r--r--layouts/partials/header.html14
4 files changed, 37 insertions, 27 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index edeecda..cf0926a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -8,7 +8,6 @@
{{.Title}}
</div>
{{.Content}}
-
</div>
</div>
</div>
diff --git a/layouts/index.html b/layouts/index.html
index 9655e8e..04da3f9 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -3,23 +3,31 @@
<div class="container">
<div class="row">
<div class="column is-md-8 is-offset-2 main">
- {{ $paginator := .Paginate (where .Site.RegularPages "Section" "posts") }}
- {{ range $paginator.Pages }}
- <div class="post">
- <div class="post-left">
- <span class="post-date">
- {{ .Date.Format "01-02" }}
- </span>
+ {{ range (.Site.RegularPages.GroupByDate "2006") }}
+ <div class="posts">
+ <div class="year">{{ .Key }}</div>
+ {{ range .Pages }}
+ <div class="post">
+ <div class="post-left">
+ <span class="post-date">
+ {{ .Date.Format "01-02" }}
+ </span>
+ </div>
+ <div class="post-right">
+ <a class="post-title" href="{{.Permalink}}">
+ {{.Title}}
+ </a>
+ <div class="post-summary">
+ {{ $length := (len .Summary) }}
+ {{ if gt (len .Summary) 100 }}
+ {{ $length = 100 }}
+ {{ end }}
+ {{ slicestr .Summary 0 $length | plainify | htmlUnescape }}
+ </div>
+ </div>
+ </div>
+ {{ end }}
</div>
- <div class="post-right">
- <a class="post-title" href="{{.Permalink}}">
- {{.Title}}
- </a>
- <div class="post-summary">
- {{.Summary}}
- </div>
- </div>
- </div>
{{ end }}
</div>
</div>
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 9492c2b..74164f0 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,10 @@
-<footer>
-</footer>
+<div class="container">
+ <footer>
+ <div>Less is More</div>
+ <span class="copyright">©2018-{{now.Year}}</span>
+ <a href="">粤ICP备120011798号</a>
+ </footer>
+</div>
</body>
</html> \ No newline at end of file
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 35b5cf7..b330262 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -5,23 +5,21 @@
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
- {{ $sass := resources.Get "scss/less.scss" }}
- {{ $style := $sass | resources.ToCSS }}
+ {{ $options := (dict "targetPath" "less.css" "outputStyle" "compressed" "enableSourceMap" true) }}
+ {{ $style := resources.Get "scss/less.scss" | resources.ToCSS $options }}
+ <link href="/images/logo.png" rel="icon" type="image/ico">
<link rel="stylesheet" href="{{ $style.Permalink }}">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1995642_svj67i6zduq.css">
- <title>常·九</title>
+ <title>面向自由编程</title>
</head>
<body>
<div class="container">
<div class="nav">
- <figure class="logo">
+ <a class="logo" href="/">
<img src="/images/logo.png" alt="">
- </figure>
+ </a>
<ul class="nav-menu">
<li>
- <a href="">首页</a>
- </li>
- <li>
<a href="">系列</a>
</li>
<li>