diff options
author | Akshay <[email protected]> | 2024-08-30 07:54:12 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2024-08-30 07:54:12 +0100 |
commit | 0192cfe30677eb45981192db855685b624b76d39 (patch) | |
tree | dea078c987b940df2aea327354c5d7620f8a45ea /src | |
parent | c2326bc381923d91d8becc58fc52cd984c5014d1 (diff) |
move domain to title line, fix mobile styles
Diffstat (limited to 'src')
-rw-r--r-- | src/public/styles.css | 38 | ||||
-rw-r--r-- | src/views/post.pug | 5 |
2 files changed, 27 insertions, 16 deletions
diff --git a/src/public/styles.css b/src/public/styles.css index 1a541de..c366e46 100644 --- a/src/public/styles.css +++ b/src/public/styles.css | |||
@@ -7,9 +7,24 @@ main { | |||
7 | 7 | ||
8 | .post, .comments-container, .header { | 8 | .post, .comments-container, .header { |
9 | padding: 0.3rem; | 9 | padding: 0.3rem; |
10 | flex: 1 1 95%; | 10 | flex: 1 1 100%; |
11 | font-size: 1rem; | 11 | font-size: 1rem; |
12 | width: 95%; | 12 | width: 100%; |
13 | } | ||
14 | |||
15 | .info-container { | ||
16 | color: #777; | ||
17 | font-size: 0.7rem; | ||
18 | display: flex; | ||
19 | } | ||
20 | |||
21 | .domain { | ||
22 | color: #777; | ||
23 | font-size: 0.7rem; | ||
24 | } | ||
25 | |||
26 | .info-item { | ||
27 | margin-right: 10px; | ||
13 | } | 28 | } |
14 | 29 | ||
15 | @media (min-width: 768px) { | 30 | @media (min-width: 768px) { |
@@ -17,6 +32,9 @@ main { | |||
17 | flex: 1 1 65%; | 32 | flex: 1 1 65%; |
18 | width: 65%; | 33 | width: 65%; |
19 | } | 34 | } |
35 | .info-container { | ||
36 | font-size: 0.8rem; | ||
37 | } | ||
20 | } | 38 | } |
21 | 39 | ||
22 | @media (min-width: 1080px) { | 40 | @media (min-width: 1080px) { |
@@ -24,6 +42,9 @@ main { | |||
24 | flex: 1 1 50%; | 42 | flex: 1 1 50%; |
25 | width: 50%; | 43 | width: 50%; |
26 | } | 44 | } |
45 | .info-container { | ||
46 | font-size: 0.8rem; | ||
47 | } | ||
27 | } | 48 | } |
28 | 49 | ||
29 | .comments-container, .self-text { | 50 | .comments-container, .self-text { |
@@ -33,7 +54,7 @@ main { | |||
33 | .comment, .more { | 54 | .comment, .more { |
34 | width: 100%; | 55 | width: 100%; |
35 | border-left: 1px dashed; | 56 | border-left: 1px dashed; |
36 | padding: 10px 0px 10px 24px; | 57 | padding: 10px 0px 0px 24px; |
37 | box-sizing: border-box; | 58 | box-sizing: border-box; |
38 | } | 59 | } |
39 | 60 | ||
@@ -76,17 +97,6 @@ main { | |||
76 | margin-bottom: 10px; | 97 | margin-bottom: 10px; |
77 | } | 98 | } |
78 | 99 | ||
79 | .info-container { | ||
80 | color: #777; | ||
81 | font-size: 0.8rem; | ||
82 | display: flex; | ||
83 | align-items: center; | ||
84 | } | ||
85 | |||
86 | .info-item { | ||
87 | margin-right: 10px; | ||
88 | } | ||
89 | |||
90 | hr { | 100 | hr { |
91 | border 1px solid #000; | 101 | border 1px solid #000; |
92 | } | 102 | } |
diff --git a/src/views/post.pug b/src/views/post.pug index 77ef3f5..183f33f 100644 --- a/src/views/post.pug +++ b/src/views/post.pug | |||
@@ -3,11 +3,12 @@ mixin post(p) | |||
3 | article.post | 3 | article.post |
4 | div.post-container | 4 | div.post-container |
5 | div.post-text | 5 | div.post-text |
6 | div.title-container !{p.title} | 6 | div.title-container |
7 | != p.title | ||
8 | span.domain (#{p.domain}) | ||
7 | div.info-container | 9 | div.info-container |
8 | div.info-item by u/#{p.author} | 10 | div.info-item by u/#{p.author} |
9 | div.info-item ↑ #{fmtnum(p.ups)} | 11 | div.info-item ↑ #{fmtnum(p.ups)} |
10 | div.info-item #{p.domain} | ||
11 | div.info-item | 12 | div.info-item |
12 | a(href=`/r/${p.subreddit}`) r/#{p.subreddit} | 13 | a(href=`/r/${p.subreddit}`) r/#{p.subreddit} |
13 | div.info-item | 14 | div.info-item |