blog.grace.moe

Source for the blog blog.grace.moe
git clone https://git.grace.moe/blog.grace.moe
Log | Files | Refs

commit b47050441301c5cbabfb7efaf274f8204e4e9ece
parent 5207e98c16c5ba44be1586a000dbb36eb990f5b8
Author: gracefu <81774659+gracefuu@users.noreply.github.com>
Date:   Sat, 12 Apr 2025 20:49:44 +0800

Spacing

Diffstat:
Mcontent/bio.smd | 4+++-
Mcontent/index.smd | 4+++-
Mcontent/posts/2025-01-14-popl-src.smd | 4+++-
Mcontent/posts/a.smd | 4+++-
Mcontent/posts/b.smd | 4+++-
Mcontent/posts/c.smd | 4+++-
Mcontent/posts/index.smd | 4+++-
Mcontent/teaching.smd | 17++++++++---------
Mlayouts/index.shtml | 7+------
Mlayouts/page.shtml | 22++++++++--------------
Mlayouts/post.shtml | 19++++++++-----------
Mlayouts/posts.shtml | 3+--
Mlayouts/templates/base.shtml | 99++++++++++++++++++++++++++++++++++++++-----------------------------------------
13 files changed, 94 insertions(+), 101 deletions(-)

diff --git a/content/bio.smd b/content/bio.smd @@ -5,7 +5,9 @@ .description = "Grace Tan's Bio", .layout = "page.shtml", .draft = false, ---- +--- + +# Bio Grace Tan is a PhD student at the National University of Singapore (School of Computing), and is advised by Prof. [Umang Mathur](https://www.comp.nus.edu.sg/~umathur/). diff --git a/content/index.smd b/content/index.smd @@ -5,7 +5,9 @@ .layout = "index.shtml", .description = "Hello! I am a PhD student studying weak memory models.", .draft = false, ---- +--- + +# Grace Tan's Site Hello! I am a PhD student at the National University of Singapore (School of Computing), advised by Prof. [Umang Mathur](https://www.comp.nus.edu.sg/~umathur/). diff --git a/content/posts/2025-01-14-popl-src.smd b/content/posts/2025-01-14-popl-src.smd @@ -6,7 +6,9 @@ .aliases = ["/posts/popl-2025-src/index.html"], .layout = "post.shtml", .draft = false, ---- +--- + +# POPL 2025 Student Research Competition I submitted an extended abstract to the POPL 2025 Student Research competition, which has been accepted into the poster presentation stage. See you at POPL 2025! diff --git a/content/posts/a.smd b/content/posts/a.smd @@ -5,7 +5,9 @@ .description = "What happened at POPL SRC", .layout = "post.shtml", .draft = true, ---- +--- + +# A POPL 2025 Student Research Competition I submitted an extended abstract to the POPL 2025 Student Research competition, which has been accepted into the poster presentation stage. See you at POPL 2025! diff --git a/content/posts/b.smd b/content/posts/b.smd @@ -5,7 +5,9 @@ .description = "What happened at POPL SRC", .layout = "post.shtml", .draft = true, ---- +--- + +# B POPL 2025 Student Research Competition I submitted an extended abstract to the POPL 2025 Student Research competition, which has been accepted into the poster presentation stage. See you at POPL 2025! diff --git a/content/posts/c.smd b/content/posts/c.smd @@ -5,7 +5,9 @@ .description = "What happened at POPL SRC", .layout = "post.shtml", .draft = true, ---- +--- + +# C POPL 2025 Student Research Competition I submitted an extended abstract to the POPL 2025 Student Research competition, which has been accepted into the poster presentation stage. See you at POPL 2025! diff --git a/content/posts/index.smd b/content/posts/index.smd @@ -10,4 +10,6 @@ .output = "index.xml", }], .draft = false, ---- +--- + +# Posts diff --git a/content/teaching.smd b/content/teaching.smd @@ -2,10 +2,14 @@ .title = "Teaching", .date = @date("2025-04-09T21:13:53+08:00"), .author = "Grace Tan", -.description = "Grace Tan's Teaching Experience", +.description = "My teaching experience", .layout = "page.shtml", .draft = false, ---- +--- + +# Teaching + +---- ## Current @@ -17,13 +21,14 @@ I am currently assisting with the following modules: - As Head Teaching Assistant, I am also helping with the C++ and memory model portions of the course syllabus. - AY2024/25 Semester 2, Head Teaching Assistant **(Tutorial)** +---- + ## Past ### Awards - **CS3211 Parallel and Concurrent Programming** - NUS Annual Teaching Excellence Award (Team category) 2024 - - **CS1101S Programming Methodology** - [NUS Outstanding Undergraduate Researcher Prize 2022 (Group)](https://www.comp.nus.edu.sg/news/2022-ourp-ocp-2122/) - [NUS Annual Digital Education Award (ADEA) 2021](https://ctlt.nus.edu.sg/teaching-and-learning-quality/teaching-awards/past-teaching-award-winners/past-annual-teaching-excellence-award-atea-annual-digital-education-award-adea-winners/) @@ -34,17 +39,14 @@ I am currently assisting with the following modules: - As Head Teaching Assistant, I also helped with the design of the C++ portion of the course syllabus. - AY2023/24 Semester 2, Head Teaching Assistant **(Tutorial)** - AY2021/22 Semester 2, Head Teaching Assistant **(Tutorial)** - - **CS1101S Programming Methodology** - AY2024/25 Semester 1, Reflection Tutor **(Recitation)** - AY2020/21 Semester 1, Studio Avenger **(Tutorial)** - AY2019/20 Semester 1, Studio Avenger **(Tutorial)** - AY2018/19 Semester 1, Studio Avenger **(Tutorial)** - *(Informal) Best Tutor Award* - - **CS3230 Design and Analysis of Algorithms** - AY2019/20 Semester 1, Teaching Assistant **(Tutorial)** - - **CS2030 Programming Methodology II** - AY2018/19 Semester 2, Teaching Assistant **(Tutorial)** @@ -58,14 +60,11 @@ I have also organised the following teaching and mentoring events: - Organiser: Grace Tan - Syllabus design: Grace Tan, Bernard Teo, Ng Zhia Yang - Instructors: Grace Tan, Bernard Teo, Ng Zhia Yang, Georgie Lee - - **Introduction to Type Theory** - AY2019/20 Semester 1, **Organiser and instructor** - Introduction to Simply Typed Lambda Calculus, System F, and Calculus of Construction, with a larger focus on proof systems. - - **Programming Helpdesk @ PGP** - AY2019/20 Semester 1, **Organiser and mentor** - AY2018/19 Semester 1, **Organiser and mentor** - Aimed at first year undergraduates struggling with programming modules. - I advertised to both seniors who were willing to lend their help as well as first years struggling with programming, and set up a common time and place for seniors to help groups of first years with similar struggles. - diff --git a/layouts/index.shtml b/layouts/index.shtml @@ -6,11 +6,6 @@ } </style> <main> - <article class="hierarchical"> - <header id="post-header" class="non-hierarchical limit-children"> - <h1 :text="$page.title"></h1> - </header> - <div class="limit-children" :html="$page.content()"></div> - </article> + <article class="hierarchical limit-children" :html="$page.content()"></article> </main> </div> diff --git a/layouts/page.shtml b/layouts/page.shtml @@ -8,26 +8,20 @@ margin-top: 40px; } -#post-header { - margin-block-end: 1.2em; -} #post-header>p>time, #post-header>p>span { font-size: 0.8em; } </style> <main> - <article class="hierarchical"> - <header id="post-header" class="non-hierarchical limit-children"> - <h1 :text="$page.title"></h1> - <p> - <time class="date" datetime="$page.date.format('2006-01-02 15:04:05MST')" :text="$page.date.format('2006-01-02')"></time> - · - <span rel="author" :text="$page.author"></span> - </p> - </header> - <div class="post-content limit-children" :html="$page.content()"></div> - </article> + <header id="post-header" class="non-hierarchical limit-children"> + <p> + <time class="date" datetime="$page.date.format('2006-01-02 15:04:05MST')" :text="$page.date.format('2006-01-02')"></time> + · + <span rel="author" :text="$page.author"></span> + </p> + </header> + <article id="post" class="hierarchical limit-children" :html="$page.content()"></article> </main> </div> diff --git a/layouts/post.shtml b/layouts/post.shtml @@ -18,17 +18,14 @@ } </style> <main> - <article class="hierarchical"> - <header id="post-header" class="non-hierarchical limit-children"> - <h1 :text="$page.title"></h1> - <p> - <time class="date" datetime="$page.date.format('2006-01-02 15:04:05MST')" :text="$page.date.format('2006-01-02')"></time> - · - <span rel="author" :text="$page.author"></span> - </p> - </header> - <div class="post-content limit-children" :html="$page.content()"></div> - </article> + <header id="post-header" class="non-hierarchical limit-children"> + <p> + <time class="date" datetime="$page.date.format('2006-01-02 15:04:05MST')" :text="$page.date.format('2006-01-02')"></time> + · + <span rel="author" :text="$page.author"></span> + </p> + </header> + <article id="post" class="hierarchical limit-children" :html="$page.content()"></article> </main> <footer id="prev-next"> <div :if="$page.prevPage?()"> diff --git a/layouts/posts.shtml b/layouts/posts.shtml @@ -10,8 +10,7 @@ } </style> <main> - <h1 class="limit-self" :text="$page.title"></h1> - <div class="limit-children" :html="$page.content()"></div> + <div class="hierarchical limit-children" :html="$page.content()"></div> <div class="limit-children" :loop="$page.subpages()"> <section class="post"> <a class="post-title" href="$loop.it.link()"> diff --git a/layouts/templates/base.shtml b/layouts/templates/base.shtml @@ -49,7 +49,6 @@ h1, h2, h3, h4, h5, h6 { text-wrap: balance; } } </style> - <!-- <link rel="stylesheet" href="/css/AtkinsonHyperlegibleNext.css"> --> <style> /* Font face */ @font-face { font-family: 'Atkinson Hyperlegible Next'; font-display: swap; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; -webkit-font-smoothing: antialiased; src: url(/fonts/AtkinsonHyperlegibleNextVF-Variable.woff2) format('woff2'); } @@ -86,67 +85,58 @@ p, ul, ol, menu, dl, pre { /* Blocky texts */ /* Headings: h1, h2, h3, h4, h5, h6 */ -/* Biglets: blockquote, aside, details, pre, dl */ -/* Lists: ul, ol, menu */ -/* Paras: p */ -/* Rules: hr */ - -/* There are 3 kinds of spacing: */ -/* - no spacing */ -/* - belongs together spacing */ -/* - separated spacing */ -/* All kinds of spacing are implemented as BOTH margin-block-start and margin-block-end, */ -/* abusing margin collapse to achieve the desired result. */ - -:is( -* + p, -:is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6, p), -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-start: .4lh; +/* Biglets: blockquote, figure, img, video, figcaption, details, pre, dl, ul, ol, menu */ +/* Paras: p, li, dt, dd */ + +/* Lists have special rules: They remove spacing from their children. */ +/* Lists: ul, ol, dl, menu */ + +/* Everything gets some start and end margin. */ +/* Biglets additionally get some padding. */ + +:root { + --paras-start: .5lh; + --paras-end: .25lh; + --biglets-padding: .2lh; + --hr-start: 1em; + --hr-end: 1em; } -:is( -p, +:is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self):not(:is(ol, ul, dl, menu).tight > li > *):not(:first-child +):is( h1, h2, h3, h4, h5, h6, -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-end: .2lh; +blockquote, figure, img, video, figcaption, details, pre, dl, ul, ol, menu, +p, :is(ol, ul, dl, menu).loose > :is(li, dt, dd) +) { + margin-block-start: var(--paras-start); } -:is( -* + :is(h1, h2, h3, h4, h5, h6) -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-start: 1.2lh; +:is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self):not(:is(ol, ul, dl, menu).tight > li > *):not(:last-child +):is( +h1, h2, h3, h4, h5, h6, +blockquote, figure, img, video, figcaption, details, pre, dl, ul, ol, menu, +p, :is(ol, ul, dl, menu).loose > :is(li, dt, dd) +) { + margin-block-end: var(--paras-end); } -:is( -blockquote, aside, details, -ul, ol, menu, pre, dl, -hr -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-start: 0.4lh; - margin-block-end: 0.4lh; +:is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self):not(:is(ol, ul, dl, menu).tight > li > *):not(:first-child +):is( +blockquote, figure, img, video, figcaption, details, pre, dl, ul, ol, menu +) { + padding-block-start: var(--biglets-padding); } -:is( -* + :is(blockquote, aside, details, -ul, ol, menu, pre, dl, -hr) -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-start: 0.6lh; +:is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self):not(:is(ol, ul, dl, menu).tight > li > *):not(:last-child +):is( +blockquote, figure, img, video, figcaption, details, pre, dl, ul, ol, menu +) { + padding-block-end: var(--biglets-padding); } -:is( -blockquote, aside, details, -ul, ol, menu, pre, dl, -hr -):not(:last-child -):not(li > * -):is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self) { - margin-block-start: 0.6lh; + +hr:is(.hierarchical *:not(.non-hierarchical *), .hierarchical-self):not(:is(ol, ul, dl, menu).tight > li > *) { + margin-block-start: var(--hr-start); + margin-block-end: var(--hr-end); } </style> @@ -186,6 +176,10 @@ blockquote { padding-inline-start: 15px; border-inline-start: 3px solid gray; } + +ul, ol, dl, menu { + padding-inline-start: 1.5em; +} </style> <style> @@ -235,6 +229,7 @@ blockquote { #base-footer-rule { max-width: 25ch; + margin-block-start: 20px; margin-inline: auto; border-block-start: 1.5px dotted brown; }