aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-08-29 22:31:12 +0100
committerAkshay <[email protected]>2024-08-29 22:31:12 +0100
commit5e765cc96b89862dd8091112b79c246ef6c0264e (patch)
tree96d4f022142eb1b574e347ce7bcb62a683570a14 /src
parent206ccebc9a152aaa94d302fa9bc2cf7fee546592 (diff)
bundle styles correctly
Diffstat (limited to 'src')
-rw-r--r--src/index.js2
-rw-r--r--src/public/styles.css92
2 files changed, 93 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index bfe31f4..a1b9967 100644
--- a/src/index.js
+++ b/src/index.js
@@ -8,7 +8,7 @@ const app = express();
8app.set('views', path.join(__dirname, 'views')); 8app.set('views', path.join(__dirname, 'views'));
9app.set('view engine', 'pug'); 9app.set('view engine', 'pug');
10 10
11app.use(express.static('public')); 11app.use(express.static(path.join(__dirname, 'public')));
12app.use('/', routes); 12app.use('/', routes);
13 13
14const server = app.listen(3000, () => { 14const server = app.listen(3000, () => {
diff --git a/src/public/styles.css b/src/public/styles.css
new file mode 100644
index 0000000..1a541de
--- /dev/null
+++ b/src/public/styles.css
@@ -0,0 +1,92 @@
1main {
2 display: flex;
3 flex-direction: column;
4 gap: 1rem;
5 align-items: center;
6}
7
8.post, .comments-container, .header {
9 padding: 0.3rem;
10 flex: 1 1 95%;
11 font-size: 1rem;
12 width: 95%;
13}
14
15@media (min-width: 768px) {
16 .post, .comments-container, .header {
17 flex: 1 1 65%;
18 width: 65%;
19 }
20}
21
22@media (min-width: 1080px) {
23 .post, .comments-container, .header {
24 flex: 1 1 50%;
25 width: 50%;
26 }
27}
28
29.comments-container, .self-text {
30 text-align: justify;
31}
32
33.comment, .more {
34 width: 100%;
35 border-left: 1px dashed;
36 padding: 10px 0px 10px 24px;
37 box-sizing: border-box;
38}
39
40.more {
41 margin-bottom: 0px;
42 font-size: 0.7rem;
43 color: #777;
44}
45
46.first {
47 border-left: none;
48 padding-left: 0;
49 margin: 0;
50 margin-top: 12px;
51}
52
53.post-container {
54 align-self: stretch;
55 display: flex;
56}
57
58.post-text {
59 flex-direction: column;
60 align-items: stretch;
61 justify-content: space-between;
62}
63
64.media-preview {
65 padding-left: 10px;
66 margin-left: auto;
67}
68
69.post-media {
70 max-width: 100%;
71}
72
73.title-container,.info-container {
74 flex: 1;
75 margin-top: 10px;
76 margin-bottom: 10px;
77}
78
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
90hr {
91 border 1px solid #000;
92}