Skip to content

Commit e73f8d4

Browse files
committed
adjusted indentation to mimic original layout
1 parent 1c5d6ba commit e73f8d4

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

web/script.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,18 @@ function removeOrigToc() {
2525
}
2626

2727
function insertLinks() {
28-
$('h2').each(function() {
29-
aId = $(this).attr('id')
30-
text = $(this).text()
31-
$(this).html('<a href="#'+aId+'" name="'+aId+'">#</a>'+text)
32-
})
28+
$("h2").each(function() {
29+
aId = $(this).attr("id");
30+
text = $(this).text();
31+
$(this).html('<a href="#' + aId + '" name="' + aId + '">#</a>' + text);
32+
});
33+
}
34+
function addImgParentClass() {
35+
$("img").each(function() {
36+
$(this)
37+
.parent()
38+
.addClass("img_parent");
39+
});
3340
}
3441

3542
function addToc() {

web/style.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ blockquote q:before,
214214
blockquote q:after {
215215
content: "";
216216
}
217+
h3,h4,p, ul{
218+
padding-left: 2rem;
219+
}
220+
.img_parent{
221+
padding: 0;
222+
}
217223

218224
@media only screen
219225
and (max-device-width : 1024px){
@@ -224,7 +230,7 @@ and (max-device-width : 1024px){
224230
h1{
225231
font-size: 3rem;
226232
}
227-
p, h1, img{
233+
.img_parent, h1, img{
228234
max-width: calc(100vw - 2em);
229235
min-width: calc(100vw - 2em);
230236
}

0 commit comments

Comments
 (0)