Skip to content

Commit 0490134

Browse files
committed
update layout for mobile
1 parent 688cd44 commit 0490134

File tree

2 files changed

+50
-51
lines changed

2 files changed

+50
-51
lines changed

src/content/blog/rust-sqlx-join.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tags: ["rust", "sqlx", "join", "database"]
1515

1616
<br/>
1717

18-
https://stackoverflow.com/questions/76257309/properly-dealing-with-hierarchies-in-rust-sqlx
18+
[https://stackoverflow.com/questions/76257309/properly-dealing-with-hierarchies-in-rust-sqlx](https://stackoverflow.com/questions/76257309/properly-dealing-with-hierarchies-in-rust-sqlx)
1919

2020
<br/>
2121

@@ -45,7 +45,7 @@ GROUP BY id, email
4545

4646
### Example Code
4747

48-
ลองมาทำบ้างดีกว่า
48+
ลองทำบ้างดีกว่า Example ของเราจะใช้ Relationship กับ Post และ Comments
4949

5050
Setup project
5151

src/styles/global.css

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ body {
3838
padding: 3em 1em;
3939
} */
4040

41+
.prose {
42+
word-wrap: break-word;
43+
overflow-wrap: break-word;
44+
}
45+
4146
.prose h1,
4247
h2,
4348
h3,
@@ -49,48 +54,44 @@ h6 {
4954
line-height: 1.2;
5055
}
5156

52-
/* h1 {
53-
font-size: 3.052em;
57+
.prose h1 {
58+
font-size: 2em;
5459
}
5560

56-
h2 {
57-
font-size: 2.441em;
61+
.prose h2 {
62+
font-size: 1.8em;
5863
}
5964

60-
h3 {
61-
font-size: 1.953em;
65+
.prose h3 {
66+
font-size: 1.5em;
6267
}
6368

64-
h4 {
65-
font-size: 1.563em;
69+
.prose h4 {
70+
font-size: 1.2em;
6671
}
6772

68-
h5 {
69-
font-size: 1.25em;
70-
} */
73+
.prose h5 {
74+
font-size: 1.0em;
75+
}
7176

72-
strong,
73-
b {
77+
.prose strong, b {
7478
font-weight: 700;
7579
}
7680

77-
a {
78-
color: var(--accent);
79-
81+
.prose a {
82+
margin-bottom: 1em;
83+
color: blue;
8084
}
8185

82-
a:hover {
83-
color: var(--accent);
86+
.prose a:hover {
87+
color: blue;
8488
}
8589

86-
/* p {
90+
.prose p {
91+
margin-top: 1em;
8792
margin-bottom: 1em;
8893
}
8994

90-
.prose p {
91-
margin-bottom: 2em;
92-
} */
93-
9495
/*
9596
textarea {
9697
width: 100%;
@@ -111,58 +112,56 @@ textarea {
111112
border-radius: 8px;
112113
} */
113114

114-
code {
115+
.prose code {
115116
padding: 2px 5px;
116117
background-color: rgb(var(--gray-light));
117118
border-radius: 2px;
118119
}
119120

120-
pre {
121-
padding: 1.5em;
121+
.prose pre {
122+
margin: 0 0 0 0;
123+
padding: 1em;
122124
border-radius: 8px;
123-
max-width: 80vw;
125+
/* scrollbar-width: none; */
126+
/* width: 80vw; */
127+
/* max-width: 85vw; */
124128
}
125129

126-
/* pre>code {
130+
.prose pre > code {
127131
all: unset;
128-
} */
132+
}
129133

130-
/* blockquote {
134+
.prose blockquote {
131135
border-left: 4px solid var(--accent);
132136
padding: 0 0 0 20px;
133137
margin: 0px;
134138
font-size: 1.333em;
135-
} */
139+
}
136140

137141
/* hr {
138142
border: none;
139143
border-top: 1px solid rgb(var(--gray-light));
140144
} */
141145

142-
/* @media (max-width: 720px) {
146+
@media (max-width: 720px) {
143147
body {
144148
font-size: 18px;
145149
}
146150

147151
main {
148152
padding: 1em;
149153
}
150-
} */
151154

152-
.sr-only {
153-
border: 0;
154-
padding: 0;
155-
margin: 0;
156-
position: absolute !important;
157-
height: 1px;
158-
width: 1px;
159-
overflow: hidden;
160-
/* IE6, IE7 - a 0 height clip, off to the bottom right of the visible 1px box */
161-
clip: rect(1px 1px 1px 1px);
162-
/* maybe deprecated but we need to support legacy browsers */
163-
clip: rect(1px, 1px, 1px, 1px);
164-
/* modern browsers, clip-path works inwards from each corner */
165-
clip-path: inset(50%);
166-
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
167-
white-space: nowrap;
155+
.prose pre {
156+
margin: 0 0 0 0;
157+
padding: 1em;
158+
border-radius: 8px;
159+
width: 90vw;
160+
max-width: 90vw;
161+
}
162+
163+
.prose p{
164+
width: 90vw;
165+
max-width: 90vw;
166+
}
168167
}

0 commit comments

Comments
 (0)