Skip to content

Commit 3e8733d

Browse files
committed
Improve markdown styling of images and tables
- Limit image max-width to 100%. - Show collapsed border boxes for tables.
1 parent 1935a9e commit 3e8733d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

markdown/index.html

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,36 @@
99
<script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
1010
<script src="https://cdn.jsdelivr.net/npm/marked-gfm-heading-id/lib/index.umd.js"></script>
1111
<script src="../project.js"></script>
12+
<style>
13+
/* <![CDATA[*/
14+
15+
img {
16+
max-width: 100%;
17+
}
18+
19+
th,
20+
td {
21+
border: 1px solid black;
22+
padding: 0.2ex 1em;
23+
}
24+
25+
th {
26+
text-align: center;
27+
}
28+
29+
td {
30+
text-align: left;
31+
}
32+
33+
table {
34+
border: 1px solid black;
35+
border-collapse: collapse;
36+
margin-bottom: 2ex;
37+
white-space: nowrap;
38+
}
39+
40+
/*]]>*/
41+
</style>
1242
</head>
1343

1444
<body>
@@ -24,6 +54,8 @@
2454
</main>
2555

2656
<script>
57+
//<![CDATA[
58+
2759
generate();
2860

2961
const targetElement = document.getElementById('markdown-target');
@@ -147,6 +179,8 @@
147179
});
148180
}
149181
}
182+
183+
//]]>
150184
</script>
151185

152186
</body>

0 commit comments

Comments
 (0)