diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..83a6857 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +hugo filter=lfs diff=lfs merge=lfs -text diff --git a/config.yml b/config.yml index b12cb5d..e6cb897 100644 --- a/config.yml +++ b/config.yml @@ -12,23 +12,19 @@ disableKinds: - taxonomy - term -params: - description: "security, systems, hardware" - author: Morgan - homeLinks: - - label: /blog - url: /blog - - label: /archive - url: /archive - - label: /github - url: https://github.com/morgan9e - - label: /mirror - url: https://mirror2.morgan.kr - - label: /key - url: /pub.asc - - markup: highlight: codeFences: true style: github + +params: + author: Morgan + homeLinks: + - label: blog/ + url: /blog + - label: github/ + url: https://github.com/morgan9e + - label: mirror/ + url: https://mirror2.morgan.kr + - label: pub.asc + url: /pub.asc diff --git a/hugo b/hugo index 1a9572f..30d9b40 100755 Binary files a/hugo and b/hugo differ diff --git a/static/css/main.css b/static/css/main.css index 314a4e5..a6ecfb6 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1,160 +1,172 @@ -/* Base */ -*, -*::before, -*::after { - box-sizing: border-box; -} +/* Reset */ +*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } +/* Base */ body { - font-family: "Source Sans 3", "Pretendard", sans-serif; - max-width: 720px; + font-family: "IBM Plex Sans", "Pretendard", system-ui, sans-serif; + max-width: 680px; margin: 0 auto; - padding: 32px 20px; - line-height: 1.6; - color: #222; - background-color: #fafafa; + padding: 48px 24px; + line-height: 1.7; + color: #111; + background: #fff; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } a { - text-decoration: none; - color: #0055aa; + color: #111; + text-decoration-color: #ccc; + text-underline-offset: 3px; + text-decoration-thickness: 1px; + transition: text-decoration-color 0.15s; } a:hover { - text-decoration: underline; + text-decoration-color: #111; } @media (max-width: 600px) { - body { - padding: 20px 16px; - } + body { padding: 32px 18px; } } -/* Nav (back link) */ +/* Nav */ nav.site-nav { - margin-bottom: 8px; - font-size: 14px; + margin-bottom: 24px; } nav.site-nav a { + font-size: 13px; color: #999; + text-decoration: none; + letter-spacing: 0.01em; } nav.site-nav a:hover { - color: #222; - text-decoration: none; + color: #111; } /* Homepage */ .home { - font-family: monospace; - font-size: 18px; - margin-top: 18vh; - color: #222; + font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace; + font-size: 17px; + margin-top: 28vh; + line-height: 1.9; } -.home h1 { - font-size: 24px; - font-weight: normal; - margin: 0 0 4px 0; +.home .prompt { + margin-bottom: 8px; + font-size: 19px; } -.home .desc { - color: #999; - font-size: 14px; - margin: 0; +.home .prompt .user { color: #22863a; font-weight: 500; } +.home .prompt .at { color: #444; } +.home .prompt .host { color: #22863a; font-weight: 500; } +.home .prompt .sep { color: #444; } +.home .prompt .path { color: #0366d6; } +.home .prompt .dollar { color: #444; margin-left: 2px; } + +.home-nav { + display: flex; + flex-direction: column; + gap: 0; + margin-left: 10px; } -.home ul { - margin-top: 36px; - list-style-type: none; - padding: 0; -} - -.home li { - padding: 5px 0; -} - -.home a { - color: #222; -} - -.home a:hover { - color: #0055aa; +.home-nav a { + color: #0366d6; text-decoration: none; + transition: color 0.15s; +} + +.home-nav a:hover { + color: #22863a; } /* Post list */ .post-list { - margin-top: 12px; + font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace; + font-size: 15px; + margin-top: 8px; + line-height: 1.8; } -.post-list h1 { - font-size: 24px; - font-weight: 400; - margin: 16px 0 24px 0; - color: #222; +.post-list .prompt { + margin-bottom: 4px; +} + +.post-list .prompt .user { color: #22863a; font-weight: 500; } +.post-list .prompt .at { color: #444; } +.post-list .prompt .host { color: #22863a; font-weight: 500; } +.post-list .prompt .sep { color: #444; } +.post-list .prompt .path { color: #0366d6; } +.post-list .prompt .dollar { color: #444; margin-left: 2px; } + +.post-list .ls-header { + color: #666; + margin-bottom: 4px; } .post-list ul { - list-style-type: none; - padding: 0; - margin: 0; + list-style: none; } .post-list li { display: flex; align-items: baseline; - gap: 12px; - padding: 6px 0; - font-size: 17px; -} - -.post-list li a { - color: #222; - flex: 1; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; + gap: 10px; + padding: 1px 0; white-space: nowrap; } -.post-list li a:hover { - color: #0055aa; - text-decoration: none; +.post-list .perms { + color: #666; + width: 11ch; + flex-shrink: 0; } .post-list time { - color: #bbb; - font-size: 13px; - font-variant-numeric: tabular-nums; - white-space: nowrap; + color: #666; + width: 12ch; flex-shrink: 0; + font-variant-numeric: tabular-nums; +} + +.post-list li a { + color: #0366d6; + text-decoration: none; + overflow: hidden; + text-overflow: ellipsis; +} + +.post-list li a:hover { + color: #22863a; } /* Single post */ article header { - margin: 20px 0 28px 0; + margin: 12px 0 40px 0; } article header h1 { - font-size: 22px; + font-size: 28px; font-weight: 600; - margin: 0 0 6px 0; - line-height: 1.35; + letter-spacing: -0.02em; + line-height: 1.3; color: #111; + margin-bottom: 8px; } article header time { color: #999; - font-size: 15px; + font-size: 14px; } /* Post content */ .post-content { font-size: 17px; - line-height: 2; - color: #333; + line-height: 1.9; + color: #111; overflow-wrap: break-word; word-break: break-word; } @@ -163,92 +175,99 @@ article header time { .post-content h2, .post-content h3, .post-content h4 { - color: #222; - margin: 1.6em 0 0.5em 0; + color: #111; + letter-spacing: -0.01em; line-height: 1.35; + margin: 2em 0 0.6em 0; } -.post-content h1 { font-size: 1.3em; } -.post-content h2 { font-size: 1.15em; } -.post-content h3 { font-size: 1.05em; } +.post-content h1 { font-size: 1.4em; font-weight: 600; } +.post-content h2 { font-size: 1.2em; font-weight: 600; } +.post-content h3 { font-size: 1.05em; font-weight: 600; } +.post-content h4 { font-size: 1em; font-weight: 600; } .post-content h1 code, .post-content h2 code, .post-content h3 code, .post-content h4 code { - font-size: 0.92em; + font-size: 0.9em; background: none; padding: 0; - margin: 0; } .post-content p { - margin: 0 0 1.15em 0; + margin: 0 0 1.2em 0; } .post-content a { - color: #0055aa; + color: #111; + text-decoration-color: #aaa; +} + +.post-content a:hover { + text-decoration-color: #111; } .post-content img { max-width: 100%; height: auto; + border-radius: 4px; } /* Inline code */ .post-content code { - font-family: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace; + font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace; padding: 2px 6px; - margin: 0 1px; - background-color: #e9e9e9; + background: #f4f4f4; font-size: 0.85em; border-radius: 3px; word-break: break-all; } -/* Code blocks — plain
 */
+/* Code blocks */
 .post-content pre {
-    margin: 1.4em 0;
+    margin: 1.6em 0;
     overflow-x: auto;
     -webkit-overflow-scrolling: touch;
 }
 
 .post-content pre code {
     display: block;
-    background-color: #f0f0f0;
-    padding: 16px 18px;
+    background: #f7f7f7;
+    padding: 18px 20px;
     white-space: pre;
-    font-size: 13.5px;
-    line-height: 1.6;
-    margin: 0;
-    border-radius: 4px;
+    font-size: 13px;
+    line-height: 1.65;
+    border-radius: 6px;
     word-break: normal;
     tab-size: 4;
+    border: 1px solid #eee;
 }
 
-/* Code blocks — Hugo syntax-highlighted .highlight wrapper */
+/* Hugo syntax highlight */
 .post-content .highlight {
-    margin: 1.4em 0;
+    margin: 1.6em 0;
     overflow-x: auto;
     -webkit-overflow-scrolling: touch;
 }
 
 .post-content .highlight pre {
     margin: 0;
-    border-radius: 4px;
-    background-color: #f0f0f0 !important;
+    border-radius: 6px;
+    background: #f7f7f7 !important;
+    border: 1px solid #eee;
 }
 
 .post-content .highlight code {
     display: block;
-    padding: 16px 18px;
-    font-size: 13.5px;
-    line-height: 1.6;
+    padding: 18px 20px;
+    font-size: 13px;
+    line-height: 1.65;
     background: none;
-    margin: 0;
     border-radius: 0;
     word-break: normal;
     tab-size: 4;
+    border: none;
 }
 
 .post-content .highlight span {
@@ -257,44 +276,47 @@ article header time {
 
 /* Blockquote */
 .post-content blockquote {
-    margin: 1.4em 0;
-    padding: 2px 0 2px 16px;
-    border-left: 2px solid #ddd;
-    color: #555;
+    margin: 1.6em 0;
+    padding: 0 0 0 20px;
+    border-left: 2px solid #e0e0e0;
+    color: #666;
 }
 
 .post-content blockquote p {
-    margin: 0.4em 0;
+    margin: 0.5em 0;
 }
 
 /* Tables */
 .post-content table {
     width: 100%;
     border-collapse: collapse;
-    margin: 1.4em 0;
-    font-size: 0.9em;
+    margin: 1.6em 0;
+    font-size: 14px;
     overflow-x: auto;
     display: block;
 }
 
 .post-content thead {
-    border-bottom: 2px solid #ddd;
+    border-bottom: 2px solid #eee;
 }
 
 .post-content th {
-    padding: 8px 12px;
+    padding: 10px 14px;
     text-align: left;
     font-weight: 600;
-    color: #222;
+    font-size: 12px;
+    text-transform: uppercase;
+    letter-spacing: 0.04em;
+    color: #999;
 }
 
 .post-content td {
-    padding: 7px 12px;
+    padding: 10px 14px;
     text-align: left;
 }
 
 .post-content tbody tr {
-    border-bottom: 1px solid #eee;
+    border-bottom: 1px solid #f0f0f0;
 }
 
 .post-content tbody tr:last-child {
@@ -304,19 +326,19 @@ article header time {
 /* Horizontal rule */
 .post-content hr {
     border: none;
-    border-top: 1px solid #e0e0e0;
-    margin: 2em 0;
+    border-top: 1px solid #eee;
+    margin: 2.5em 0;
 }
 
 /* Lists */
 .post-content ul,
 .post-content ol {
-    padding-left: 1.5em;
-    margin: 0.8em 0;
+    padding-left: 1.4em;
+    margin: 0.8em 0 1.2em 0;
 }
 
 .post-content li {
-    margin: 0.2em 0;
+    margin: 0.3em 0;
 }
 
 .post-content li p {
@@ -330,5 +352,23 @@ article header time {
 /* Strong/emphasis */
 .post-content strong {
     font-weight: 600;
-    color: #222;
+    color: #111;
+}
+
+/* 404 */
+.not-found {
+    margin-top: 20vh;
+    text-align: center;
+}
+
+.not-found h1 {
+    font-size: 48px;
+    font-weight: 300;
+    color: #ddd;
+    margin-bottom: 8px;
+}
+
+.not-found p {
+    color: #999;
+    font-size: 15px;
 }
diff --git a/themes/plain/layouts/404.html b/themes/plain/layouts/404.html
index ece4dff..7ea786c 100644
--- a/themes/plain/layouts/404.html
+++ b/themes/plain/layouts/404.html
@@ -1,6 +1,6 @@
 {{ define "main" }}
   {{- partial "nav.html" . -}}
-  
+

404

Page not found.

diff --git a/themes/plain/layouts/_default/list.html b/themes/plain/layouts/_default/list.html index d3cf605..721ff64 100644 --- a/themes/plain/layouts/_default/list.html +++ b/themes/plain/layouts/_default/list.html @@ -1,15 +1,21 @@ {{ define "main" }} {{- partial "nav.html" . -}} + {{ $section := .Section }} + {{ with .Title }}{{ $section = . }}{{ end }} {{ $pages := union .RegularPages .Sections }}
-

{{ with .Title }}{{ . }}{{ else }}{{ .Section }}{{ end }}

+
+ morgan@morgan.kr:~/{{ $section }}$ ls -l +
+
total {{ len $pages }}
    {{ range $pages }}
  • + -rw-r--r-- + {{ if gt .Date.Year 2000 }}{{ else }}{{ end }} {{ .Title }} - {{ if gt .Date.Year 2000 }}{{ end }}
  • {{ end }}
diff --git a/themes/plain/layouts/index.html b/themes/plain/layouts/index.html index d1fda38..e61a097 100644 --- a/themes/plain/layouts/index.html +++ b/themes/plain/layouts/index.html @@ -1,11 +1,12 @@ {{ define "main" }}
-

{{ .Site.Params.author }}

- {{ with .Site.Params.description }}

{{ . }}

{{ end }} -
    +
    + {{ .Site.Params.author | lower }}@{{ replace .Site.BaseURL "https://" "" }}:~$ ls +
    +
+
{{ end }} diff --git a/themes/plain/layouts/partials/head.html b/themes/plain/layouts/partials/head.html index 7428a6a..6c3ca3e 100644 --- a/themes/plain/layouts/partials/head.html +++ b/themes/plain/layouts/partials/head.html @@ -9,6 +9,9 @@ + + + {{ $title }}