-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
142 lines (142 loc) · 4.45 KB
/
Copy pathindex.html
File metadata and controls
142 lines (142 loc) · 4.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Dongju Lim's personal technical blog. Study · Think · Logging."
/>
<meta property="og:title" content="tui_blog — Dongju Lim" />
<meta
property="og:description"
content="Dongju Lim's personal technical blog. Study · Think · Logging."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://docraid.github.io/" />
<meta name="theme-color" content="#121212" />
<link rel="icon" href="favicon.svg" type="image/svg+xml" />
<title>Dongju Lim — tui_blog</title>
<base href="/" />
<link data-trunk rel="rust" href="Cargo.toml" data-bin="tui_blog" data-wasm-opt="z" />
<link data-trunk rel="copy-file" href="notion.json" />
<link data-trunk rel="copy-file" href="favicon.svg" />
<link data-trunk rel="copy-dir" href="assets/fonts" data-target-path="fonts" />
<style>
@font-face {
font-family: "Fira Code";
src: url("/fonts/FiraCode-Regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: "D2Coding";
src: url("/fonts/D2Coding-Hangul.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
/* Hangul advance is 1em; Fira Code 2ch is ~1.23em at 16px. */
size-adjust: 123%;
unicode-range: U+1100-11FF, U+3000-303F, U+3130-318F, U+A960-A97F, U+AC00-D7A3,
U+D7B0-D7FF;
}
html,
body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #121212;
cursor: default;
}
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
}
pre,
pre span {
font-family: "Fira Code", "D2Coding", ui-monospace, "Cascadia Code", Menlo, Consolas,
monospace;
font-size: 16px !important;
font-weight: 400 !important;
font-synthesis: none;
line-height: 20px;
margin: 0px;
vertical-align: top;
}
pre {
height: 20px;
overflow: hidden;
white-space: pre;
}
#post-images {
position: fixed;
overflow: hidden;
pointer-events: none;
z-index: 5;
}
#post-images a {
position: absolute;
display: block;
pointer-events: auto;
cursor: pointer;
}
#post-images img {
width: 100%;
height: 100%;
object-fit: contain;
object-position: center;
display: block;
background-color: #1c1916;
}
</style>
</head>
<body>
<script>
(() => {
const WIDE =
/[\u1100-\u11FF\u2E80-\uA4CF\uA960-\uA97F\uAC00-\uD7A3\uD7B0-\uD7FF\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE6F\uFF00-\uFF60\uFFE0-\uFFE6]/;
const fix = () => {
const grid = document.getElementById("grid");
if (!grid) return;
for (const pre of grid.querySelectorAll("pre")) {
let hideNext = false;
for (const span of pre.querySelectorAll("span")) {
const text = span.textContent || "";
if (hideNext) {
if (span.style.display !== "none") span.style.display = "none";
hideNext = false;
continue;
}
if (WIDE.test(text)) {
if (span.style.width !== "2ch") {
span.style.display = "inline-block";
span.style.width = "2ch";
span.style.overflow = "hidden";
span.style.boxSizing = "content-box";
span.style.textAlign = "center";
}
hideNext = true;
} else if (span.style.display === "none") {
span.style.display = "";
}
}
}
};
const start = () => {
new MutationObserver(fix).observe(document.body, {
subtree: true,
childList: true,
});
fix();
};
if (document.body) start();
else document.addEventListener("DOMContentLoaded", start);
})();
</script>
</body>
</html>