_index.md's content is shown at list page

This commit is contained in:
leafee98 2022-05-18 19:45:04 +08:00
parent 23e6e10f43
commit 836128c866
5 changed files with 96 additions and 74 deletions

View file

@ -8,3 +8,5 @@ draft: false
--- ---
<!--more--> <!--more-->
*There are some short articles.*

View file

@ -1,6 +1,11 @@
{{ define "main" }} {{ define "main" }}
<section id="archive"> <div>
{{ if trim .Content " \n" }}
<div class="content archive-hint">{{ .Content }}</div>
{{ end }}
<section id="archive">
{{ range .Data.Pages.GroupByDate "2006" }} {{ range .Data.Pages.GroupByDate "2006" }}
<div class="group"> <div class="group">
<h3 class="key"> <h3 class="key">
@ -28,6 +33,7 @@
</div> </div>
{{ end }} {{ end }}
</section> </section>
</div>
{{ end }} {{ end }}

View file

@ -1,6 +1,11 @@
{{ define "main" }} {{ define "main" }}
<section id="archive"> <div>
{{ if trim .Content " \n" }}
<div class="content archive-hint">{{ .Content }}</div>
{{ end }}
<section id="archive">
{{ range .Data.Pages.GroupByDate "2006" }} {{ range .Data.Pages.GroupByDate "2006" }}
<div class="group"> <div class="group">
<h3 class="key"> <h3 class="key">
@ -28,6 +33,7 @@
</div> </div>
{{ end }} {{ end }}
</section> </section>
</div>
{{ end }} {{ end }}

View file

@ -1,5 +1,5 @@
<header class="header-wrapper"> <header class="header-wrapper">
<div class="header max-wrapper"> <div class="header">
<a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> <a class="site-title" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<ul class="menu"> <ul class="menu">

View file

@ -120,12 +120,6 @@ body {
margin-bottom: 0; margin-bottom: 0;
} }
.max-wrapper {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
/********** set up break point **********/ /********** set up break point **********/
@ -142,13 +136,13 @@ body {
.header-wrapper, .footer { width: 100vw;} .header-wrapper, .footer { width: 100vw;}
.main-wrapper { width: calc(100vw - 2 * var(--len-3));} .main-wrapper { width: calc(100vw - 2 * var(--len-3));}
/************************/ /************************/
/* set up header layout */ /* set up header layout */
/************************/ /************************/
.header { .header {
padding: var(--len-3); padding: var(--len-3);
width: 100%;
} }
/* place title and menus horizonally */ /* place title and menus horizonally */
@ -265,7 +259,6 @@ body {
color: var(--color-fav-2); color: var(--color-fav-2);
} }
/**********************************/ /**********************************/
/* set up home page's list layout */ /* set up home page's list layout */
/**********************************/ /**********************************/
@ -505,9 +498,9 @@ body {
overflow-x: auto; overflow-x: auto;
} }
/********************************/ /**************************/
/* setup taxonomies page layout */ /* setup list page layout */
/********************************/ /**************************/
#archive { #archive {
padding-left: var(--len-3); padding-left: var(--len-3);
@ -642,3 +635,18 @@ body {
color: var(--color-black-3) color: var(--color-black-3)
} }
/**********/
/** misc **/
/**********/
.archive-hint {
padding-left: var(--len-4);
color: var(--color-fav-1);
}
.max-wrapper {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}