Browse Source

changed front page to display only latest post but in full

master
jk 5 years ago
parent
commit
b4da287955
  1. 13
      themes/anatole/layouts/index.html
  2. 21
      themes/anatole/static/css/style.css

13
themes/anatole/layouts/index.html

@ -1,20 +1,13 @@
{{ define "main" }}
<div class="about">
<h1>Recent posts</h1>
{{ range first 5 .Site.RegularPages }}
<h1>Latest post</h1>
{{ range first 1 .Site.RegularPages }}
{{ if eq .Type "post"}}
<article class="h-entry entry">
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<h4 class="decription"><a href="{{ .RelPermalink }}">{{ .Description }}</a></h4>
{{ .Summary }}
{{ if .Truncated }}
<!-- This <div> includes a read more link, but only if the summary is truncated... -->
<div class="readmore">
<br/><a href="{{ .RelPermalink }}">Read More…</a>
</div>
{{ end }}
{{ .Content }}
</article>
{{ end }}
{{ end }}

21
themes/anatole/static/css/style.css

@ -301,7 +301,7 @@ width:90%;
.sidebar .social-links a:hover {
color: var(--link-colour);
}
.post {
.post, .h-entry {
background: var(--bg-colour);
margin: 30px;
width:80%;
@ -336,34 +336,35 @@ width:90%;
font-size: 22px;
margin: 0;
}
.post .post-title a {
.post .post-title a, .h-entry .post-title a {
text-decoration: none;
letter-spacing: 1px;
color: var(--text-colour);
}
.post .post-title a:hover {
.post .post-title a:hover, .h-entry .post-title a:hover {
text-decoration: underline;
}
.post .post-content a {
.post .post-content a, .h-entry p a {
text-decoration: none;
color: var(--link-colour);
}
.post .post-content table {
.post .post-content table, .h-entry table {
border-collapse:collapse;
}
.post .post-content table,.post .post-content table td, .post .post-content table th{
.post .post-content table,.post .post-content table td, .post .post-content table th,
.h-entry table,.h-entry table td, .h-entry table th{
border: 1px dashed var(--text-colour);
}
.post .post-content table tr:nth-child(even) {
.post .post-content table tr:nth-child(even), .h-entry table tr:nth-child(even) {
background-color: #f2f2f2;
}
.post .post-content table td, .post .post-content table th{
.post .post-content table td, .post .post-content table th,.h-entry table td, .h-entry table th{
padding: 15px
}
.post .post-content a:hover {
.post .post-content a:hover, .h-entry a:hover {
color: var(--link-colour);
}
.post .post-content h3 {
@ -375,7 +376,7 @@ width:90%;
color: var(--text-colour);
font-size: 16px;
}
.post .post-content img {
.post .post-content img, .h-entry img {
max-width: 60%;
text-align: center;
margin: 0 auto;