From b481a882fdfb55783618af0c1380faba959f6f11 Mon Sep 17 00:00:00 2001 From: Doge Date: Sun, 9 May 2021 23:50:37 +0800 Subject: Fix layout minor bugs --- layout/index.ejs | 4 +-- layout/post.ejs | 78 +++++++++++++++++++++++++--------------------------- source/css/style.css | 26 +++++++++++------- 3 files changed, 56 insertions(+), 52 deletions(-) diff --git a/layout/index.ejs b/layout/index.ejs index cfb032a..93f15af 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -1,7 +1,7 @@ <% page.posts.each(function (post) { %> -
+
-
+
<% if (post.thumbnail) { %>
diff --git a/layout/post.ejs b/layout/post.ejs index 9c04e82..4a9b2f1 100644 --- a/layout/post.ejs +++ b/layout/post.ejs @@ -13,48 +13,46 @@
<% } %>
-
-

- <%= page.title %> -

- <% if (page.podcast) { %> -
- - <% } %> -
- <%- page.content %> -
-
-
-
- <% if (page.tags) { %> -
- <% (page.tags).forEach(function(item) { %> - # <%= item.name %> - <% }); %> -
- <% } %> -
+

+ <%= page.title %> +

+ <% if (page.podcast) { %> +
+ + <% } %> +
+ <%- page.content %> +
+
+
+
+ <% if (page.tags) { %> +
+ <% (page.tags).forEach(function(item) { %> + # <%= item.name %> + <% }); %> +
+ <% } %>
-
+
diff --git a/source/css/style.css b/source/css/style.css index 009e27b..2c54268 100644 --- a/source/css/style.css +++ b/source/css/style.css @@ -15,26 +15,36 @@ pre { .navbar-menu { box-shadow: 0 8px 16px -8px rgb(10 10 10 / 10%) !important; } + .post-content { + padding-top: 0px !important; + } + .post-card { + padding: 0 0 0 0 !important; + } +} + +.post-content { + padding-top: 1.5rem; +} + +.post-card { + padding: 0 1rem 1rem 1rem; } .navbar-brand .navbar-item:hover { background-color: inherit !important; } -.post-entry { +.entry { margin-bottom: 1.5rem !important; margin-top: 1.5rem !important; transition: box-shadow 0.1s; } -.post-entry:hover { +.entry:hover { box-shadow: 0 1em 2em -0.125em rgb(10 10 10 / 10%), 0 0 0 1px rgb(10 10 10 / 2%); } -.post-card { - margin-top: 1.5rem !important; -} - .pagination-bar { padding-left: 0.25rem; padding-right: 0.25rem; @@ -43,8 +53,4 @@ pre { .footer { padding: 1rem 1rem 1rem; background-color: transparent; -} - -.post-content { - padding-top: 2rem; } \ No newline at end of file -- cgit v1.2.3