Skip to content

Commit ba272e1

Browse files
authored
Merge pull request #48 from tsugumi-sys/chore/hide-posts-when-search
chore: hide posts when search
2 parents e6540ad + bb6c984 commit ba272e1

File tree

3 files changed

+34
-35
lines changed

3 files changed

+34
-35
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mejiro-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mejiro-cli"
3-
version = "0.1.19"
3+
version = "0.1.20"
44
edition = "2024"
55
description = "A CLI tool for Mejiro"
66
license = "MIT OR Apache-2.0"

mejiro-cli/assets/style.css

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ body {
77
line-height: 1.7;
88
font-size: 1rem;
99
}
10-
1110
/* Layout */
1211
.container {
1312
display: flex;
1413
min-height: 100vh;
1514
}
16-
1715
/* Sidebar */
1816
aside {
1917
width: 220px;
@@ -27,92 +25,76 @@ aside {
2725
top: 0;
2826
bottom: 0;
2927
}
30-
3128
aside .logo {
3229
display: flex;
3330
align-items: center;
3431
gap: 0.5rem;
3532
margin-bottom: 2rem;
3633
}
37-
3834
aside .logo img {
3935
width: 40px;
4036
height: 40px;
4137
border-radius: 50%;
4238
}
43-
4439
aside .logo span {
4540
font-weight: 600;
4641
font-size: 1rem;
4742
color: #0f172a;
4843
}
49-
5044
aside .links {
5145
display: flex;
5246
flex-direction: column;
5347
gap: 0.75rem;
5448
}
55-
5649
aside .links a {
5750
color: #334155;
5851
text-decoration: none;
5952
font-size: 0.95rem;
6053
}
61-
6254
aside .links a:hover {
6355
color: #ef4444;
6456
text-decoration: underline;
6557
}
66-
6758
/* Main content */
6859
main {
6960
flex: 1;
7061
margin-left: 240px;
7162
padding: 4rem 2rem;
7263
max-width: 720px;
7364
}
74-
7565
main h1 {
7666
font-size: 2rem;
7767
font-weight: 600;
7868
margin-bottom: 1.5rem;
7969
color: #b91c1c;
8070
}
81-
8271
main h2, main h3 {
8372
margin-top: 2.5rem;
8473
font-weight: 500;
8574
}
86-
8775
main p {
8876
margin-top: 1.5rem;
8977
}
90-
9178
main a {
9279
color: #dc2626;
9380
text-decoration: none;
9481
}
95-
9682
main a:hover {
9783
text-decoration: underline;
9884
}
99-
10085
main ul {
10186
padding-left: 1.5rem;
10287
}
103-
10488
main li {
10589
margin-bottom: 0.75rem;
10690
}
107-
10891
main blockquote {
10992
margin: 2rem 0;
11093
padding-left: 1rem;
11194
border-left: 4px solid #e2e8f0;
11295
color: #64748b;
11396
font-style: italic;
11497
}
115-
11698
/* Code styling */
11799
main pre {
118100
background-color: #1e1e1e;
@@ -125,16 +107,13 @@ main pre {
125107
margin-top: 2rem;
126108
font-family: 'Source Code Pro', monospace;
127109
}
128-
129110
main code {
130111
font-family: 'Source Code Pro', monospace;
131112
}
132-
133113
/* Search bar */
134114
.search-bar-wrapper {
135115
margin-bottom: 2rem;
136116
}
137-
138117
#search-wrapper {
139118
display: flex;
140119
align-items: center;
@@ -144,7 +123,6 @@ main code {
144123
padding: 0.4rem 0.6rem;
145124
background-color: #f1f5f9;
146125
}
147-
148126
#search-input {
149127
flex: 1;
150128
background: transparent;
@@ -153,12 +131,14 @@ main code {
153131
color: #0f172a;
154132
font-size: 0.9rem;
155133
}
156-
157134
#search-input::placeholder {
158135
color: #94a3b8;
159136
opacity: 0.8;
160137
}
161-
138+
/* Search functionality - Hide/Show elements */
139+
.hidden {
140+
display: none !important;
141+
}
162142
/* Footer */
163143
footer {
164144
text-align: center;
@@ -168,13 +148,11 @@ footer {
168148
margin-left: 220px;
169149
border-top: 1px solid #e2e8f0;
170150
}
171-
172151
/* Responsive layout */
173152
@media (max-width: 768px) {
174153
.container {
175154
flex-direction: column;
176155
}
177-
178156
aside {
179157
width: 100%;
180158
position: static;
@@ -183,41 +161,62 @@ footer {
183161
border-right: none;
184162
border-bottom: 1px solid #e2e8f0;
185163
}
186-
187164
main {
188165
margin-left: 0;
189166
padding: 2rem 1rem;
190167
}
191-
192168
footer {
193169
margin-left: 0;
194170
}
195171
}
196-
172+
/* Post list styling */
197173
#post-list li {
198174
margin-bottom: 2rem;
199175
}
200-
201176
#post-list li a {
202177
color: #dc2626;
203178
text-decoration: none;
204179
display: inline-block;
205180
margin-bottom: 0.25rem; /* tighter space below the title */
206181
}
207-
208182
#post-list li a:hover {
209183
color: #38bdf8;
210184
}
211-
212185
#post-list li .summary,
213186
#post-list li .topics,
214187
#post-list li .published-at {
215188
margin: 0.25rem 0; /* reduce top & bottom margin */
216189
font-size: 0.85rem;
217190
color: #94a3b8;
218191
}
219-
220192
#post-list li p:first-of-type {
221193
margin-top: 0; /* remove top margin for first paragraph (summary) */
222194
}
195+
/* Search results styling */
196+
#search-results {
197+
padding-left: 0; /* Remove default ul padding for search results */
198+
}
199+
#search-results li {
200+
margin-bottom: 2rem;
201+
list-style: none; /* Remove bullet points for search results */
202+
}
203+
#search-results li a {
204+
color: #dc2626;
205+
text-decoration: none;
206+
display: inline-block;
207+
margin-bottom: 0.25rem;
208+
}
209+
#search-results li a:hover {
210+
color: #38bdf8;
211+
}
212+
#search-results li .summary,
213+
#search-results li .topics,
214+
#search-results li .published-at {
215+
margin: 0.25rem 0;
216+
font-size: 0.85rem;
217+
color: #94a3b8;
218+
}
219+
#search-results li p:first-of-type {
220+
margin-top: 0;
221+
}
223222

0 commit comments

Comments
 (0)