Skip to content

Commit f5f72af

Browse files
committed
feat: adding subtitle4 type
1 parent b7dd4fa commit f5f72af

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

scripts/learning-unit.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ function buildBlock(block) {
8787
case "subtitle3":
8888
el.innerHTML = `<h4>${block.text}</h4>`;
8989
break;
90+
91+
case "subtitle4":
92+
el.innerHTML = `<h5>${block.text}</h5>`;
93+
break;
9094

9195
case "paragraph":
9296
el.innerHTML = `<p>${block.text}</p>`;

styles/learning-unit.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@
5555
font-weight: 500;
5656
}
5757

58+
.block.subtitle4 h5 {
59+
font-size: 1rem;
60+
margin-top: 0.7rem;
61+
margin-bottom: 0.4rem;
62+
color: rgb(185, 146, 255);
63+
font-weight: 500;
64+
}
65+
5866
.block.paragraph p {
5967
font-size: 1.15rem;
6068
margin-bottom: 1rem;
@@ -260,7 +268,6 @@ code[class*="language-"] {
260268
}
261269

262270
@media (max-width: 768px) {
263-
264271
.unit-container {
265272
width: 95%;
266273
padding: 1rem;
@@ -288,6 +295,10 @@ code[class*="language-"] {
288295
font-size: 1.05rem;
289296
}
290297

298+
.block.subtitle4 h5 {
299+
font-size: 0.95rem;
300+
}
301+
291302
.block.paragraph p,
292303
.block.list ul li {
293304
font-size: 1rem;
@@ -308,4 +319,4 @@ code[class*="language-"] {
308319
.language-btn {
309320
padding: 6px 10px;
310321
}
311-
}
322+
}

0 commit comments

Comments
 (0)