From 8d3f569ec454f44a1491fb4d7e47be30f9b15c09 Mon Sep 17 00:00:00 2001 From: Darshan Baral Date: Tue, 4 Jun 2019 21:49:43 -0700 Subject: Added book cover. Cosmetic changes --- layouts/_default/section.html | 54 +++++++++++++++++++++++------------------- layouts/_default/single.html | 22 ++++++++++++++--- layouts/index.html | 2 +- layouts/partials/footer.html | 6 ----- static/bookCovers/emma.jpg | Bin 0 -> 88806 bytes static/css/kitab.css | 16 ++++++++++--- 6 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 static/bookCovers/emma.jpg diff --git a/layouts/_default/section.html b/layouts/_default/section.html index 789dec4..d954777 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,26 +1,32 @@ {{ define "main" }} - - - - - - - - {{ range .Pages.ByWeight }} - - - - {{ end }} - -
-

- {{ .Title | markdownify }} -

-
- -

- {{ .Title }} -

-
-
+
+
+
+ {{ $path := (print "bookCovers/" (replace .Dir "\\" "") ".jpg") | relURL }} + +
+

{{ .Title | markdownify }}

+

Sub-title

+
+
+

{{ .Params.author }}

+
+
+
+ +
+

+ Chapters +

+ +
+
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 43f55b4..8a26312 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -4,13 +4,29 @@

{{ .Title }}

{{ .Content }} -
+
{{ partial "previousChapter" . }} {{ partial "nextChapter" . }}
- {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 11a2a0f..94cb137 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -6,7 +6,7 @@
{{ range .Site.Sections.ByWeight }} -
+

{{ .Title | markdownify }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 3ee9a15..1686f30 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -2,10 +2,4 @@ {{ .Site.Params.footer | markdownify }} -
- -
- kitab/d.b - - diff --git a/static/bookCovers/emma.jpg b/static/bookCovers/emma.jpg new file mode 100644 index 0000000..007c90c Binary files /dev/null and b/static/bookCovers/emma.jpg differ diff --git a/static/css/kitab.css b/static/css/kitab.css index 164a404..e39a0f2 100644 --- a/static/css/kitab.css +++ b/static/css/kitab.css @@ -18,7 +18,17 @@ body { a:hover { text-decoration: none; } -.toTop { - position: fixed; - bottom: 0; +.book-cover { + color: white; + background-color: #24242499; } +.bookTitle { + position: absolute; + top: 2%; + left: 5%; +} +.bookAuthor { + position: absolute; + bottom: 2%; + right: 5%; +} \ No newline at end of file -- cgit v1.2.3