first commit
This commit is contained in:
commit
379b9d1a62
24 files changed
+3828
No files matched your search
@@ -0,0 +1,13 @@
|
||||
article.post
|
||||
header: h1 Write a post!
|
||||
.post-content
|
||||
p Go to <code>./src/pages/p</code> folder and create your first post, creating <code>first-post.md</code> file filled with the following content:
|
||||
pre.
|
||||
---
|
||||
title: First post
|
||||
tags:
|
||||
- news
|
||||
---
|
||||
# This is my first post!
|
||||
p Any questions? More info: <a href="https://github.com/codemotion/cogear-template-blog">https://github.com/codemotion/cogear-template-blog</a>
|
||||
a(href="https://cogearjs.org"): img(src="https://cogearjs.org/images/cogearjs.jpg")
|
||||
@@ -0,0 +1,13 @@
|
||||
head
|
||||
title=title
|
||||
link(rel="shortcut icon" href=`${cogear.config.baseUrl || "/"}favicon.ico` type="image/png")
|
||||
body
|
||||
.navbar
|
||||
.container
|
||||
.brand
|
||||
a(href="/") Blog
|
||||
if cogear.blog.tags
|
||||
ul
|
||||
each t in cogear.blog.tags
|
||||
- tName = t[0].toUpperCase() + t.slice(1)
|
||||
li: a(href=`/tags/${t}`)= tName
|
||||
@@ -0,0 +1,21 @@
|
||||
mixin post(post)
|
||||
.card.p-2.post(class=`${post.teaser ? 'teaser' : 'full'}`)
|
||||
.post-meta.mb-3
|
||||
.float-right
|
||||
+date(post.date)
|
||||
.post-meta--author
|
||||
a(href=`${post.author.link}`): img.mr-3(src=`${post.author.avatar}`)
|
||||
a(href=`${post.author.link}`)= post.author.login
|
||||
header
|
||||
if post.teaser
|
||||
h2: a(href=`/${post.uri}`)= post.title
|
||||
else
|
||||
h1= post.title
|
||||
.post-content!= post.teaser ? post.teaser : post.content
|
||||
if !post.teaser
|
||||
a(href="javascript: history.back()") ← Back
|
||||
mixin date(date)
|
||||
- let months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
|
||||
- let d = new Date(date)
|
||||
- month = months[d.getMonth()]
|
||||
time= `${month} ${d.getDate()}`
|
||||
Reference in new issue
Block a user