index: remove preview list
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
@@ -161,7 +161,10 @@ a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
nav {
|
nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
margin: 0 auto 3rem;
|
margin: 0 auto 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,16 +197,6 @@ h2 {
|
|||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-preview-item {
|
|
||||||
list-style-type: none;
|
|
||||||
padding: 2rem;
|
|
||||||
border: 0.2rem ridge var(--fg5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-preview-item:not(:last-child) {
|
|
||||||
margin-bottom: 3rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.post-title {
|
.post-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fg5) !important;
|
color: var(--fg5) !important;
|
||||||
@@ -286,13 +279,20 @@ img, video {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 5%;
|
padding: 0 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
nav a {
|
nav a {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc {
|
.toc {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
@@ -304,31 +304,43 @@ img, video {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 5%;
|
padding: 0 5%;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a {
|
nav a {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: 0 0.6rem;
|
margin: 0 0.6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc {
|
.toc {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 639px) {
|
||||||
|
nav {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 640px) {
|
@media (min-width: 640px) {
|
||||||
body {
|
body {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav a {
|
nav a {
|
||||||
margin: 0 0 0 1.2rem;
|
margin: 0 0 0 1.2rem;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toc {
|
.toc {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
|
@@ -112,10 +112,7 @@ main = hakyllWith config $ do
|
|||||||
match "index.html" $ do
|
match "index.html" $ do
|
||||||
route idRoute
|
route idRoute
|
||||||
compile $ do
|
compile $ do
|
||||||
posts <- fmap (take 10) . recentFirst =<< loadAllSnapshots "posts/*" "content"
|
let indexCtx = defaultCtx
|
||||||
let indexCtx =
|
|
||||||
listField "posts" (postCtx tags) (return posts)
|
|
||||||
<> defaultCtx
|
|
||||||
|
|
||||||
getResourceBody
|
getResourceBody
|
||||||
>>= applyAsTemplate indexCtx
|
>>= applyAsTemplate indexCtx
|
||||||
|
@@ -1,27 +0,0 @@
|
|||||||
<ul class="post-preview-item-list">
|
|
||||||
$for(posts)$
|
|
||||||
<li class="post-preview-item" >
|
|
||||||
<article>
|
|
||||||
<h1 class="post-title">$title$</h1>
|
|
||||||
<div class="post-header">
|
|
||||||
<div class="post-date" >
|
|
||||||
Posted $date$
|
|
||||||
</div>
|
|
||||||
<div class="tags" >
|
|
||||||
$if(tags)$
|
|
||||||
Tags: $tags$
|
|
||||||
$endif$
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="post-teaser">
|
|
||||||
$if(teaser)$
|
|
||||||
$teaser$
|
|
||||||
$else$
|
|
||||||
$body$
|
|
||||||
$endif$
|
|
||||||
</div>
|
|
||||||
<a href="$url$">Read more</a>
|
|
||||||
</article>
|
|
||||||
</li>
|
|
||||||
$endfor$
|
|
||||||
</ul>
|
|
Reference in New Issue
Block a user