Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/darshanbaral/kitab.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarshan Baral <darshanbaral@gmail.com>2019-06-05 07:49:43 +0300
committerDarshan Baral <darshanbaral@gmail.com>2019-06-05 07:49:43 +0300
commit8d3f569ec454f44a1491fb4d7e47be30f9b15c09 (patch)
treee7fbf2912cd7cfec2ff5f78eb07cd089889599da
parent282ac4c204113361988d10915e5e83a59aa804eb (diff)
Added book cover. Cosmetic changes
-rw-r--r--layouts/_default/section.html54
-rw-r--r--layouts/_default/single.html22
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/footer.html6
-rw-r--r--static/bookCovers/emma.jpgbin0 -> 88806 bytes
-rw-r--r--static/css/kitab.css16
6 files changed, 63 insertions, 37 deletions
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" }}
-<table class="table table-striped table-sm m-auto" style="max-width: 800px;">
- <thead>
- <tr>
- <th scope="col">
- <h3>
- {{ .Title | markdownify }}
- </h3>
- </th>
- </tr>
- </thead>
- <tbody>
- {{ range .Pages.ByWeight }}
- <tr>
- <td>
- <a href="{{ .Permalink }}">
- <h4>
- {{ .Title }}
- </h4>
- </a>
- </td>
- </tr>
- {{ end }}
- </tbody>
-</table>
+<div class="row mb-4">
+ <div class="col-md-6">
+ <div class="w-90 m-auto bg-warning">
+ {{ $path := (print "bookCovers/" (replace .Dir "\\" "") ".jpg") | relURL }}
+ <img class="rounded shadow-lg" style="width: 100%;" src="{{ $path }}" />
+ <div class="bookTitle p-0 rounded" style="width: 60%;">
+ <h2 class="book-cover m-0 pl-1 pr-1">{{ .Title | markdownify }}</h2>
+ <h4 class="book-cover pl-1 pr-1 w-auto">Sub-title</h4>
+ </div>
+ <div class="bookAuthor p-0 rounded">
+ <h4 class="book-cover m-0 pl-1 pr-1">{{ .Params.author }}</h4>
+ </div>
+ </div>
+ </div>
+
+ <div class="col-md-6 p-2 rounded shadow">
+ <h3>
+ Chapters
+ </h3>
+ <ul class="list-unstyled">
+ {{ range.Pages.ByWeight }}
+ <li>
+ <a href="{{ .Permalink }}">
+ {{ .Title }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ </div>
+</div>
{{ 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 @@
<h2>{{ .Title }}</h2>
<div class="ml-4 border-left border-primary pl-1">
{{ .Content }}
- <div class="d-flex flex-row justify-content-around border-top pt-2 border-primary">
+ <div
+ class="d-flex flex-row justify-content-around border-top pt-2 border-primary"
+ >
{{ partial "previousChapter" . }}
{{ partial "nextChapter" . }}
</div>
</div>
- <div class="toTop navMenu menuItem" onclick="scrollToTop()">
- <i class="fas fa-angle-up"></i>
+
+ <div class="toTop" style="width: 50px;">
+ <p class="navMenu menuItem mb-0">
+ <i class="fas fa-angle-up" onclick="scrollToTop()"></i>
+ </p>
+ <hr>
+ <p class="about text-right">
+ <small>
+ <a href="https://github.com/darshanbaral/kitab">
+ kitab<br>
+ </a>
+ <a href="https://www.darshanbaral.com/">
+ d.b
+ </a>
+ </small>
+ </p>
</div>
</div>
{{ 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 @@
</div>
<div class="d-flex flex-row justify-content-center row">
{{ range .Site.Sections.ByWeight }}
- <div class="m-2 p-2 border border-primary rounded" style="max-width: 350px;">
+ <div class="m-2 p-2 border border-primary rounded" style="min-width: 300px; width: 40%;">
<a href="{{ .Permalink }}">
<h3 class="mb-0 p-0">
{{ .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 @@
<small>
{{ .Site.Params.footer | markdownify }}
</small>
- <br />
- <small>
- <a href="https://github.com/darshanbaral/kitab">
- kitab</a>/<a href="https://www.darshanbaral.com/">d.b
- </a>
- </small>
</footer>
diff --git a/static/bookCovers/emma.jpg b/static/bookCovers/emma.jpg
new file mode 100644
index 0000000..007c90c
--- /dev/null
+++ b/static/bookCovers/emma.jpg
Binary files 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