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

github.com/lubang/hugo-hello-programmer-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD.G.BANG <lubang@lulab.net>2018-02-04 09:02:23 +0300
committerD.G.BANG <lubang@lulab.net>2018-02-04 09:02:23 +0300
commitfb10507e7eb47f1a1f6eac4ff385368a833906af (patch)
tree61116f2e67ebaf3ab5dc5e19fcbd3a470530f302
parent150f7937e3e25c6350173df3c5b297075d0ac445 (diff)
Add summary element
-rwxr-xr-xlayouts/_default/list.html13
-rw-r--r--layouts/_default/summary.html15
-rwxr-xr-xlayouts/index.html5
-rw-r--r--static/css/styles.css33
4 files changed, 45 insertions, 21 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 10e4d92..593db61 100755
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,17 +1,8 @@
{{ partial "header.html" . }}
{{ range .Data.Pages }}
-<div class="post-list-item">
- <a href="{{ .Permalink }}">
- <div class="post-title">
- <img src="{{ "/images/post-title-icon.png" | relURL }}" />
- <div class="post-meta">
- <time>{{ .Date.Format "02 Jan 2006, 15:04" }}</time>
- <h1>{{ .Title }}</h1>
- </div>
- </div>
- </a>
-</div>
+ {{ .Render "summary"}}
+ <hr class="summary-sep" />
{{ end }}
{{ partial "pagination.html" . }}
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
new file mode 100644
index 0000000..6152482
--- /dev/null
+++ b/layouts/_default/summary.html
@@ -0,0 +1,15 @@
+<a href="{{ .Permalink }}">
+ <div class="post-title">
+ <img src="{{ "/images/post-title-icon.png" | relURL }}" />
+ <div class="post-meta">
+ <time>{{ .Date.Format "02 Jan 2006, 15:04" }}</time>
+ <h1>{{ .Title }}</h1>
+ </div>
+ </div>
+</a>
+<div class="summary-content">
+ {{ .Summary }}
+ {{ if .Truncated }}
+ <a href="{{ .RelPermalink }}" class="summary-more">READ MORE</a>
+ {{ end }}
+</div> \ No newline at end of file
diff --git a/layouts/index.html b/layouts/index.html
index 9e4c755..248b948 100755
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,7 +1,8 @@
{{ partial "header.html" . }}
+
{{ range .Paginator.Pages }}
- {{ partial "post.html" . }}
- <div class="margin"></div>
+ {{ .Render "summary"}}
+ <hr class="summary-sep" />
{{ end }}
{{ partial "pagination.html" . }}
diff --git a/static/css/styles.css b/static/css/styles.css
index 11284f4..4267190 100644
--- a/static/css/styles.css
+++ b/static/css/styles.css
@@ -132,6 +132,31 @@ dt {
margin: 14px 0px 14px 0px;
}
+/*
+* summary
+*/
+
+.summary-sep {
+ border: 0;
+ height: 0;
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+ margin: 60px 0px 40px 0px;
+}
+
+.summary-content {
+ color: #717171;
+ font-size: 0.8em;
+ line-height: 1.6em;
+}
+
+.summary-more, .summary-more:visited {
+ padding: 1px 5px 1px 5px;
+ border-radius: 5px;
+ background-color: #00B2A0;
+ font-size: 0.75em;
+ color: white;
+}
/*
* Post
@@ -334,12 +359,4 @@ dt {
padding: 0px 10px 0px 10px;
float: right;
color: #717171;
-}
-
-/*
-* Util
-*/
-
-.margin {
- height: 80px;
} \ No newline at end of file