๐Ÿ“ฆ jasonbanboa / jsonPosts

๐Ÿ“„ styles.css ยท 145 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145* { box-sizing: border-box; margin: 0; padding: 0; color: inherit; font-family: system-ui; }

:root {
  --text-primary: #212121; 
  --text-secondary: #313131;
  --text-sub: #616161;
  --line-height: 1.2;
}

#wrapper { position: relative; padding: 5rem 4rem 1rem; background: #f9f9f9; }
header { position: fixed; top: 0; left: 0; right: 0; color: #eee; background-color: rgba(0,0,0,0.8); padding: 0.5rem 4rem }

#app {  min-height: 100vh; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); grid-auto-rows: 1fr; gap: 1.5rem; }

#app > .post {
  gap: 5px;
  max-height: 300px;
  min-height: 250px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.image { 
  border-radius: 8px 8px 0 0;
  height: 45%; 
  background-color: #f1f1f1;
}

#app > .post > .title { 
  height: 10%; 
  padding: 0 10px;
  color: var(--text-primary);
  font-weight: 500; 
}

.content { 
  height: 60px;
  padding: 0 10px;
  font-size: 14.5px;
  font-weight: 200;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.post-details { 
  margin-top: auto;
  height: 15%;
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px; 
  color: var(--text-sub); 
  border-top: 1px solid rgba(0,0,0,0.2);
}

dialog {
  border: none;
  border-radius: 8px;
  left: 50%;
  width:600px;
}

dialog > div {
  height: 100%;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#filter-dialog {
  top: 30%;
  transform: translate(-50%, -50%);
}

#filter-dialog .category-output {
  border: 1px solid black;
  height: 32px;
}

#filter-dialog .controls {
  display: flex;
  justify-content: right;
  gap: 1rem
}

#filter-dialog button {
  cursor: pointer;
  padding: 0.5rem;
  background-color: transparent;
  border-radius: 5px;
}
/* #filter-dialog #filter {
  
}

#filter-dialog #cancel {
  
} */

#post-detail-dialog  {
  height: 350px;
  top: 35%;
  transform: translate(-50%, -50%);
}

#post-detail-dialog .content {
  padding: 0;
}

#post-detail-dialog .categories {
  height: 10%;
  display: flex;
  gap: 1rem;
  align-items: center;
}

#post-detail-dialog .categories > span {
  color: whitesmoke;
  border-radius: 25px;
  height: 25px;
  font-size: 12px;
  padding: 0 10px;
  line-height: 25px;
}

#post-detail-dialog .post-details {
  padding: 0;
  padding-top: 6px;
  height: 10%;
}


@media screen and (max-width: 375px) {
  header { padding: 0.5rem 2rem }
  #wrapper { padding: 4rem 2rem 1rem }
}