diff options
Diffstat (limited to 'sass')
| -rw-r--r-- | sass/_partial/_archive.scss | 24 | ||||
| -rw-r--r-- | sass/_partial/_archive_vertical.scss | 8 | ||||
| -rw-r--r-- | sass/_partial/_dark.scss | 57 | ||||
| -rw-r--r-- | sass/_partial/_darkmode_follow_system.scss | 3 | ||||
| -rw-r--r-- | sass/_partial/_header.scss | 45 | ||||
| -rw-r--r-- | sass/_partial/_header_vertical.scss | 12 | ||||
| -rw-r--r-- | sass/_partial/_normalize.scss | 354 | ||||
| -rw-r--r-- | sass/_partial/_post.scss | 182 | ||||
| -rw-r--r-- | sass/_partial/_post_vertical.scss | 45 | ||||
| -rw-r--r-- | sass/_partial/_style_vertical.scss | 5 | ||||
| -rw-r--r-- | sass/autodarkmode.scss | 1 | ||||
| -rw-r--r-- | sass/darkmode.scss | 1 | ||||
| -rw-r--r-- | sass/style.scss | 20 | ||||
| -rw-r--r-- | sass/vertical.scss | 4 | 
14 files changed, 761 insertions, 0 deletions
| diff --git a/sass/_partial/_archive.scss b/sass/_partial/_archive.scss new file mode 100644 index 0000000..49ac32e --- /dev/null +++ b/sass/_partial/_archive.scss @@ -0,0 +1,24 @@ +.archive { +    padding: 0 10%; +    border: 1px #ddd; +    border-style: solid none none none; +    .post-archive { +        list-style: none; +        padding: 0; +        .years { +            border: 1px #ddd; +            border-style: none none solid none; +            padding-bottom: 0.5em; +        } +        .post-item { +            .post-date { +                display: inline-block; +                margin-right: 10px; +            } +            .post-title { +                color: #000000; +                text-decoration: none; +            } +        } +    } +}
\ No newline at end of file diff --git a/sass/_partial/_archive_vertical.scss b/sass/_partial/_archive_vertical.scss new file mode 100644 index 0000000..9ba6996 --- /dev/null +++ b/sass/_partial/_archive_vertical.scss @@ -0,0 +1,8 @@ +.archive { +    padding: 10% 0; +    border-right-style: solid; +    .post-archive .years { +        border-style: unset; +        border-left-style: solid; +    } +}
\ No newline at end of file diff --git a/sass/_partial/_dark.scss b/sass/_partial/_dark.scss new file mode 100644 index 0000000..8789275 --- /dev/null +++ b/sass/_partial/_dark.scss @@ -0,0 +1,57 @@ +body { +    background-color: #2f2f2f; +    color: white; +} + +.header { +    .blog-title .logo { +        color: white; +    } +    .menu .current-menu-item-link { +        color: white; +    } +    .menu .menu-item-link { +        &:hover { +            color: white; +        } +    } +} + +.posts { +    .post-title .post-title-link { +        color: white; +    } +    .post-meta { +        color: white; +    } +    .post-content a { +        color: #e5e5e5; +    } +} + +.post { +    border-color: #616161; +    code, pre { +        background-color: black; +        color: white; +    } +    .highlight { +        background-color: black; +    } +    a { +        color: #e5e5e5; +    } +} + +#prev_next { +    a { +        color: #e5e5e5; +    } +    .article-nav-title { +        color: #e5e5e5; +    } +} + +.archive .post-archive .post-item .post-title { +    color: white; +}
\ No newline at end of file diff --git a/sass/_partial/_darkmode_follow_system.scss b/sass/_partial/_darkmode_follow_system.scss new file mode 100644 index 0000000..76e9f8d --- /dev/null +++ b/sass/_partial/_darkmode_follow_system.scss @@ -0,0 +1,3 @@ +@media (prefers-color-scheme: dark) { +    @import "dark"; +}
\ No newline at end of file diff --git a/sass/_partial/_header.scss b/sass/_partial/_header.scss new file mode 100644 index 0000000..8a94265 --- /dev/null +++ b/sass/_partial/_header.scss @@ -0,0 +1,45 @@ +.header { +    display: flex; +    margin: 0 auto; +    padding: 1em; +    padding-bottom: 0.5em; +    justify-content: center; +    flex-direction: column; +    align-items: center; +    .blog-title .logo { +        font-family: 'Source Serif Pro', 'Noto Serif SC', serif; +        color: #000; +        font-size: 1.2em; +        text-decoration: none; +    } +    .blog-title { +        height: 26.5; +    } +    .menu { +        margin: 0 auto; +        vertical-align: text-top; +        padding-left: 0; +        .menu-item { +            display: inline-block; +            padding: 0.25em; +        } +        .menu-item-link { +            color:  #818181; +            text-decoration: none; +            font-size: 1em; +            &:hover { +                color: #111; +            } +        } +        .current-menu-item-link { +            color: #111; +            text-decoration: none; +        } +    } + +    @media screen and (max-width: 320px) { +        .menu { +            display: inline-flex; +        } +    } +}
\ No newline at end of file diff --git a/sass/_partial/_header_vertical.scss b/sass/_partial/_header_vertical.scss new file mode 100644 index 0000000..453c2d8 --- /dev/null +++ b/sass/_partial/_header_vertical.scss @@ -0,0 +1,12 @@ +.header { +    margin: 4em auto; +    padding: 0 1em; +    justify-content: unset; +    flex-direction: unset; +    .blog-title .logo { +        font-family: 'Source Serif Pro', 'Noto Serif TC', serif; +        color: #000; +        font-size: 1.2em; +        text-decoration: none; +    } +}
\ No newline at end of file diff --git a/sass/_partial/_normalize.scss b/sass/_partial/_normalize.scss new file mode 100644 index 0000000..f69e226 --- /dev/null +++ b/sass/_partial/_normalize.scss @@ -0,0 +1,354 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document +   ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { +    line-height: 1.15; +    /* 1 */ +    -webkit-text-size-adjust: 100%; +    /* 2 */ +} + +/* Sections +   ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +/** + * Render the `main` element consistently in IE. + */ + +main { +    display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { +    //font-size: 2em; +    margin: 0.67em 0; +} + +/* Grouping content +   ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { +    box-sizing: content-box; +    /* 1 */ +    height: 0; +    /* 1 */ +    overflow: visible; +    /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { +    font-family: monospace, monospace; +    /* 1 */ +    font-size: 1em; +    /* 2 */ +} + +/* Text-level semantics +   ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { +    background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { +    border-bottom: none; +    /* 1 */ +    text-decoration: underline; +    /* 2 */ +    text-decoration: underline dotted; +    /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, strong { +    font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, kbd, samp { +    font-family: monospace, monospace; +    /* 1 */ +    font-size: 1em; +    /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { +    font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, sup { +    font-size: 75%; +    line-height: 0; +    position: relative; +    vertical-align: baseline; +} + +sub { +    bottom: -0.25em; +} + +sup { +    top: -0.5em; +} + +/* Embedded content +   ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { +    border-style: none; +} + +/* Forms +   ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, input, optgroup, select, textarea { +    font-family: inherit; +    /* 1 */ +    font-size: 100%; +    /* 1 */ +    line-height: 1.15; +    /* 1 */ +    margin: 0; +    /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, input { +    /* 1 */ +    overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, select { +    /* 1 */ +    text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, [type="button"], [type="reset"], [type="submit"] { +    -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, [type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner { +    border-style: none; +    padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, [type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring { +    outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { +    padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + *    `fieldset` elements in all browsers. + */ + +legend { +    box-sizing: border-box; +    /* 1 */ +    color: inherit; +    /* 2 */ +    display: table; +    /* 1 */ +    max-width: 100%; +    /* 1 */ +    padding: 0; +    /* 3 */ +    white-space: normal; +    /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { +    vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { +    overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type="checkbox"], [type="radio"] { +    box-sizing: border-box; +    /* 1 */ +    padding: 0; +    /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button { +    height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type="search"] { +    -webkit-appearance: textfield; +    /* 1 */ +    outline-offset: -2px; +    /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type="search"]::-webkit-search-decoration { +    -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { +    -webkit-appearance: button; +    /* 1 */ +    font: inherit; +    /* 2 */ +} + +/* Interactive +   ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { +    display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { +    display: list-item; +} + +/* Misc +   ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { +    display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { +    display: none; +}
\ No newline at end of file diff --git a/sass/_partial/_post.scss b/sass/_partial/_post.scss new file mode 100644 index 0000000..1f94701 --- /dev/null +++ b/sass/_partial/_post.scss @@ -0,0 +1,182 @@ +.post { +    padding: 1.3em 2em; +    border: 1px #ddd; +    border-style: solid none; +    h1.title { +        margin: 0; +        display: flex; +        justify-content: center; +        line-height: 1.2em; +        text-align: center; +    } +    h2, h3, h4, h5, h6  { +        font-size: 1.2em; +        line-height: 1.2em; +    } +    a { +        color: #616161; +        text-decoration: underline; +    } +    ul { +        padding-left: 30px; +    } +    ol { +        padding-left: 20px; +    } +    blockquote { +        border-left: 2px solid #616161; +        padding-left: 20px; +        margin: 1rem 0; +    } +    p code { +        padding: 0.2em; +    } +    code, pre { +        font-size: 16px; +        background-color: #f7f7f7; +        font-family: 'Fantasque Sans Mono', 'PT Mono', 'Source Code Pro', monospace; +    } +    .highlight { +        position: relative; +        margin: 1em 0; +        border-radius: 2px; +        line-height: 1.1em; +        background-color: #f8f8f8; +        overflow-x: auto; +    } +    .highlight table, .highlight tr, .highlight td { +        width: 100%; +        border-collapse: collapse; +        padding: 0; +        margin: 0 +    } +    .highlight .gutter { +        display: none; +    } +    .highlight .code pre { +        line-height: 1em; +        margin: 0; +    } +    .highlight .code pre .line { +        width: auto; +        height: 18px; +    } +    pre { +        padding: 0.3em; +        color: #525252; +    } +    img { +        height: auto; +        margin: auto; +        display: flex; +        justify-content: center; +        max-width: 100%; +        box-sizing: content-box; +        width: 100%; +    } +    .shk { +        margin: 1em 0; +    } +} + +@media screen and (max-width: 320px) { +    .post { +        padding: 30px 16px; +    } +} + +/*@media screen and (max-width: 500px) { +    .post { +        padding: 1.3em 1em; +    } +}*/ + +#prev_next { +    display: flex; +    flex-direction: row; +    margin-top: 15px; +    margin-bottom: 15px; +    margin-left: 2em; +    margin-right: 2em; +    font-size: 16px; +    a { +        color: #616161; +        transition: color linear 200ms; +    } +    .article-nav-title { +        display: inline-block; +        color: #616161; +        text-decoration: underline; +    } +    p { +        margin: 0; +    } +    .next { +        display: inline-block; +        text-align: right; +        margin-left: 5px; +        box-sizing: border-box; +        width: 50%; +    } +    .prev { +        display: inline-block; +        margin-right: 5px; +        box-sizing: border-box; +        width: 50%; +    } +    justify-content: space-between; +} + +@media screen and (max-width: 500px) { +    #prev_next { +        margin-left: 1em; +        margin-right: 1em; +    } +} + +.page-nav { +    display: flex; +    justify-content: center; +    border-style: solid none none none; +    border: 1px #ddd; +    .more { +        margin-top: 1em; +        text-decoration: none; +        color: gray; +    } +} + +.license { +    display: flex; +    justify-content: center; +    border-style: solid none none none; +    border: 1px #ddd; +} + +.posts { +    .post-title { +        font-size: 1.5em; +        line-height: 1.2em; +        justify-content: center; +        display: flex; +        text-align: center; +        .post-title-link { +            color: #000; +            font-weight: bold; +            text-decoration: none; +        } +    } +    .post-content { +        margin-bottom: 1em; +        a { +            color: #616161; +            text-decoration: underline; +        } +        .More { +            padding: 1em 0; +        } +    } +    .post-meta { +        color: black; +    } +}
\ No newline at end of file diff --git a/sass/_partial/_post_vertical.scss b/sass/_partial/_post_vertical.scss new file mode 100644 index 0000000..9210e3a --- /dev/null +++ b/sass/_partial/_post_vertical.scss @@ -0,0 +1,45 @@ +.post { +    padding: 4em; +    border: 1px #ddd; +    border-style: none solid; +    h1.title { +        margin: 0; +        display: flex; +        line-height: 1.2em; +        justify-content: unset; +    } +    blockquote { +        border-top: 2px solid #616161; +        border-left: unset; +        padding-left: unset; +        padding-top: 20px; +        margin: unset; +    } +} + +.posts .post-title { +    justify-content: unset; +} + +.page-nav { +    display: flex; +    justify-content: unset; +    border-style: solid none none none; +    border: 1px #ddd; +    margin: 4em 0; +    .more { +        margin-top: unset; +        margin-right: 1em; +        text-decoration: none; +        color: gray; +    } +} + + +.license { +    display: flex; +    justify-content: unset; +    border-style: solid none none none; +    border: 1px #ddd; +    margin: 4em 0 4em 1em; +}
\ No newline at end of file diff --git a/sass/_partial/_style_vertical.scss b/sass/_partial/_style_vertical.scss new file mode 100644 index 0000000..ad3a7a6 --- /dev/null +++ b/sass/_partial/_style_vertical.scss @@ -0,0 +1,5 @@ +body { +    writing-mode: vertical-rl; +    overflow-y: hidden; +    text-align: left; +}
\ No newline at end of file diff --git a/sass/autodarkmode.scss b/sass/autodarkmode.scss new file mode 100644 index 0000000..17346a7 --- /dev/null +++ b/sass/autodarkmode.scss @@ -0,0 +1 @@ +@import "_partial/_darkmode_follow_system"; diff --git a/sass/darkmode.scss b/sass/darkmode.scss new file mode 100644 index 0000000..a8fd7ae --- /dev/null +++ b/sass/darkmode.scss @@ -0,0 +1 @@ +@import "_partial/_dark"; diff --git a/sass/style.scss b/sass/style.scss new file mode 100644 index 0000000..1aa7bc4 --- /dev/null +++ b/sass/style.scss @@ -0,0 +1,20 @@ +body { +    background-color: #ffffff; +    font-size: 16px; +    line-height: 1.6em; +    padding: 0 1em; +    margin: 0 auto; +    max-width: 750px; +    word-break: break-word; +} + +@media screen and (min-width: 750px) { +    body { +        margin-left: calc((100vw - 3em - 750px) / 2); +    } +} + +@import "_partial/_header"; +@import "_partial/_post"; +@import "_partial/_archive"; +@import "_partial/_normalize"; diff --git a/sass/vertical.scss b/sass/vertical.scss new file mode 100644 index 0000000..c368c71 --- /dev/null +++ b/sass/vertical.scss @@ -0,0 +1,4 @@ +@import "_partial/_style_vertical"; +@import "_partial/_header_vertical"; +@import "_partial/_post_vertical"; +@import "_partial/_archive_vertical"; | 
