From 2a2c13738e35278782502b19c0f751f3443485aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avijit=20=F0=9F=9A=80?= <526avijit@gmail.com> Date: Thu, 27 May 2021 22:04:02 +0200 Subject: [PATCH 1/2] Basic post page --- themes/gokarna/layouts/_default/single.html | 34 +++++++++++++++++++++ themes/gokarna/static/css/main.css | 33 +++++++++++++++++--- 2 files changed, 63 insertions(+), 4 deletions(-) diff --git a/themes/gokarna/layouts/_default/single.html b/themes/gokarna/layouts/_default/single.html index e69de29..96e422a 100644 --- a/themes/gokarna/layouts/_default/single.html +++ b/themes/gokarna/layouts/_default/single.html @@ -0,0 +1,34 @@ + + +{{- partial "head.html" . -}} + + + {{- partial "header.html" . -}} +
+ +
+
+

Sample Title

+ + +
+
+

+ slkjdflks + lksdjflkdsj + lksdjflksjf slkdjfkljf lkjlkjlkj kljl kjljl jljl jl jlj lj lj jlslkdjflkss + sdkjflk jlkj lkj lkjl jl jl jklk jlkj lk jlkj lkjkljlkj lkjl kjhiwehqqn +

+
+
+ +
+ {{- partial "footer.html" . -}} + + + \ No newline at end of file diff --git a/themes/gokarna/static/css/main.css b/themes/gokarna/static/css/main.css index 7151b96..2035cc9 100644 --- a/themes/gokarna/static/css/main.css +++ b/themes/gokarna/static/css/main.css @@ -2,10 +2,6 @@ html { font-family: open sans, helvetica neue, Helvetica, Arial, sans-serif; } -.container { - height: 800px; -} - .header-light { background-color: #bbb; color: black; @@ -102,3 +98,32 @@ html { .fab { font-family: FontAwesome !important; } + +#content { + width: 810px; + margin: 180px auto 0; +} + +.post .post-date { + color: gray; +} + +.post .post-tags { + padding: 0; + list-style-type: none; +} + +.post-tags .post-tag { + display: inline-block; + background-color: #008c86; + padding: 4px 12px; + border-radius: 4px; + border: 1px solid #008c86; + color: white; + font-size: 14px; + font-weight: 700; +} + +.post .post-content { + margin-top: 50px; +} From 6fe69085cb7fdba06da9e9cfbb95a1f00ec14192 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Fri, 28 May 2021 17:17:49 +0530 Subject: [PATCH 2/2] Add templating to post page --- exampleSite/content/posts/first_post.md | 23 +++++++++++++++++++++ themes/gokarna/layouts/_default/single.html | 19 +++++++++-------- 2 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 exampleSite/content/posts/first_post.md diff --git a/exampleSite/content/posts/first_post.md b/exampleSite/content/posts/first_post.md new file mode 100644 index 0000000..7f806cf --- /dev/null +++ b/exampleSite/content/posts/first_post.md @@ -0,0 +1,23 @@ +--- +title: "First Post" +date: 2021-05-15T23:39:49+05:30 +tags: ["abc", "def"] +--- + +Yo yo yo + +# This is a heading + +- And +- this +- is +- a +- list + +```py +Codeblocks look like this + +def print(): + print('Hello world!') + +``` diff --git a/themes/gokarna/layouts/_default/single.html b/themes/gokarna/layouts/_default/single.html index 96e422a..44902ec 100644 --- a/themes/gokarna/layouts/_default/single.html +++ b/themes/gokarna/layouts/_default/single.html @@ -7,22 +7,23 @@
+
-

Sample Title

+

{{ .Title }}

+
+

- slkjdflks - lksdjflkdsj - lksdjflksjf slkdjfkljf lkjlkjlkj kljl kjljl jljl jl jlj lj lj jlslkdjflkss - sdkjflk jlkj lkj lkjl jl jl jklk jlkj lk jlkj lkjkljlkj lkjl kjhiwehqqn + {{ .Content }}

@@ -31,4 +32,4 @@ {{- partial "footer.html" . -}} - \ No newline at end of file +