diff --git a/README.ko.md b/README.ko.md index b5d2e4b..22cec9f 100644 --- a/README.ko.md +++ b/README.ko.md @@ -270,6 +270,7 @@ enableHomeSidebarTitles = true enableListSidebarTitles = true enableToc = true # single page table of contents, you can replace this param to toc(toc = true) hideToc = false # Hide or Show toc +tocPosition = "inner" # inner, outer enableTocSwitch = true # single page table of contents visibility switch itemsPerCategory = 5 # maximum number of posts shown in the sidebar. sidebarPosition = "right" # bio, profile component layout position diff --git a/README.md b/README.md index e19ea76..d2a16db 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,7 @@ enableHomeSidebarTitles = true enableListSidebarTitles = true enableToc = true # single page table of contents, you can replace this param to toc(toc = true) hideToc = false # Hide or Show toc +tocPosition = "inner" # inner, outer enableTocSwitch = true # single page table of contents visibility switch itemsPerCategory = 5 # maximum number of posts shown in the sidebar. sidebarPosition = "right" # bio, profile component layout position diff --git a/archetypes/default.md b/archetypes/default.md index 36d267e..c260c35 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -6,6 +6,7 @@ draft: false hideToc: false enableToc: true enableTocContent: false +tocPosition: inner tags: - series: diff --git a/assets/sass/components/_summary.scss b/assets/sass/components/_summary.scss index d111110..6a2cc14 100644 --- a/assets/sass/components/_summary.scss +++ b/assets/sass/components/_summary.scss @@ -138,6 +138,8 @@ min-width: 130px; overflow: hidden; border-radius: 0.25rem; + padding: 0.25rem; + margin-right: .5rem; @include transition(all, 0.25s, ease-in); @include align-self(center); diff --git a/assets/sass/components/_toc.scss b/assets/sass/components/_toc.scss index 1401925..6738937 100644 --- a/assets/sass/components/_toc.scss +++ b/assets/sass/components/_toc.scss @@ -80,6 +80,16 @@ } } } + + &__outer { + padding-right: 1rem; + padding-left: 2.5rem; + max-width: calc((100vw - 980px) / 2); + + @media only screen and (max-width: 1300px) { + display: none; + } + } } .expand__content { diff --git a/assets/sass/layout/_body.scss b/assets/sass/layout/_body.scss index 71c826c..9aae057 100644 --- a/assets/sass/layout/_body.scss +++ b/assets/sass/layout/_body.scss @@ -1,12 +1,15 @@ #container { position: relative; + + @include flexbox(); + @include themify($themes) { color: themed('body-color'); background-color: themed('backdrop-background-color'); hr { border-color: themed('hr-color'); } - } + } } html { diff --git a/assets/sass/layout/_grid.scss b/assets/sass/layout/_grid.scss index 57245f2..7b17b43 100644 --- a/assets/sass/layout/_grid.scss +++ b/assets/sass/layout/_grid.scss @@ -12,17 +12,6 @@ $grid_column_gap: $grid_column_gap_width + $grid_column_gap_unit; grid-template-rows: $grid_navbar_height auto 1fr auto; grid-column-gap: $grid_column_gap; grid-row-gap: $grid_row_gap; - - margin: 0 auto; - position: relative; - - @include justify-content(center); - @include themify($themes) { - background-color: themed('body-background-color'); - } - @media only screen and (max-width: 769px) { - grid-template-columns: minmax(0, $grid_main_main) minmax(0, $grid_main_side); - } } .header-main { diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 3a3a4cd..e8e5d40 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -80,4 +80,5 @@ $cursive-font: {{ .Site.Data.font.cursive_font }}; @import 'pages/terms'; @import 'pages/contact'; @import 'pages/talk'; -@import 'pages/showcase'; \ No newline at end of file +@import 'pages/showcase'; +@import 'pages/wrapper'; \ No newline at end of file diff --git a/assets/sass/pages/_showcase.scss b/assets/sass/pages/_showcase.scss index 0818302..e82e8fd 100644 --- a/assets/sass/pages/_showcase.scss +++ b/assets/sass/pages/_showcase.scss @@ -6,7 +6,7 @@ position: sticky; top: $grid_navbar_height * 1.25; display: block; - margin-top: 1rem; + margin-top: 0.5rem; @media only screen and (max-width: 600px) { display: none; @@ -64,14 +64,9 @@ } } - &__title { - margin: 2rem 0.5rem 0.25rem 0; - font-size: 1.125rem; - } - &__box { width: 100%; - max-width: 48.2%; + max-width: 48%; height: auto; border-radius: 0.2rem; padding: 1rem; @@ -101,7 +96,7 @@ } @media only screen and (max-width: 1180px) { - max-width: 48.2%; + max-width: 48%; } @media only screen and (max-width: 769px) { diff --git a/assets/sass/pages/_wrapper.scss b/assets/sass/pages/_wrapper.scss new file mode 100644 index 0000000..28bdc67 --- /dev/null +++ b/assets/sass/pages/_wrapper.scss @@ -0,0 +1,30 @@ +$grid_max: $grid_max_width + $grid_max_unit; + +.wrapper { + margin: 0 auto; + position: relative; + + @include justify-content(center); + @include themify($themes) { + background-color: themed('body-background-color'); + } + @media only screen and (max-width: 769px) { + grid-template-columns: minmax(0, $grid_main_main) minmax(0, $grid_main_side); + } + + &__left { + position: fixed; + top: 0; + left: 0; + height: 100vh; + width: calc((100vw - 980px) / 2); + } + + &__right { + position: fixed; + top: 0; + right: 0; + height: 100vh; + width: calc((100vw - 980px) / 2); + } +} \ No newline at end of file diff --git a/data/grid.toml b/data/grid.toml index d8a2f17..beb766b 100644 --- a/data/grid.toml +++ b/data/grid.toml @@ -7,4 +7,4 @@ grid_main_side_unit = "fr" # "fr", "px" grid_column_gap_width = "32" grid_column_gap_unit = "px" # "px" grid_navbar_height = "50px" # "px" -grid_row_gap = "0" \ No newline at end of file +grid_row_gap = "0" diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index f59cfd8..b525c7a 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -46,6 +46,7 @@ enableHomeSidebarTitles = true enableListSidebarTitles = true enableToc = true hideToc = false +tocPosition = "inner" # inner, outer enableTocSwitch = true itemsPerCategory = 5 sidebarPosition = "right" diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 042148c..377ca6c 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -22,14 +22,15 @@