From 19a1901a7ac7b756aa6d106f44e575ecd2c810ac Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Thu, 16 Apr 2020 20:47:57 +0800 Subject: Progress button adjustment --- assets/sass/_sidebar.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'assets/sass') diff --git a/assets/sass/_sidebar.scss b/assets/sass/_sidebar.scss index 88a39d8..640494d 100644 --- a/assets/sass/_sidebar.scss +++ b/assets/sass/_sidebar.scss @@ -40,12 +40,16 @@ } #container-progress { + cursor: pointer; position: fixed; width: 3em; right: 1em; bottom: 1em; + color: $color-primary; - @include link-primary(); + &:hover { + color: $color-secondary; + } .progressbar-text { svg { -- cgit v1.2.3 From b8a0c1dacdbffbb8f9d3f9fdb92bebf2655d59df Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 18 Apr 2020 11:25:08 +0800 Subject: Fix summary style not working in tags page --- assets/sass/main.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'assets/sass') diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 13c1fdf..c00e6de 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -1,3 +1,5 @@ +@import "_var"; + // Cover @import "_primer.scss"; @@ -15,8 +17,6 @@ // Utilities always go last so that they can override components @import "@primer/css/utilities/index.scss"; -@import "_var"; - @import "_header"; @import "_list"; -- cgit v1.2.3 From d53b6ab5ec8d5648201efc6308306e0c222b65fd Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 18 Apr 2020 18:08:13 +0800 Subject: Smart pagination --- assets/sass/_pagination.scss | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'assets/sass') diff --git a/assets/sass/_pagination.scss b/assets/sass/_pagination.scss index 8e5d248..6c5200b 100644 --- a/assets/sass/_pagination.scss +++ b/assets/sass/_pagination.scss @@ -1,28 +1,26 @@ #pagination { - font-size: $font-size-l3; text-align: center; // spliter between pagination and last post block border-top: $spliter; padding: 1em 0 1em 0; - ul li { + li { display: inline; @include link-primary(); - // darker number when active - &.active a { - color: $color-primary-dark; + &.pag-item a { + vertical-align: middle; } - // remove prev page at first page, next page at last page - &.disabled { - display: none; + // darker number when active + &.pag-current a { + color: $color-secondary; } + } - // remove first page link and last page link - &:first-child, - &:last-child { - display: none; - } + svg { + height: 1em; + width: 1em; + vertical-align: middle; } } \ No newline at end of file -- cgit v1.2.3 From 7065842267087378712074f370fabf15b62d49da Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Sat, 18 Apr 2020 18:21:09 +0800 Subject: Additional comment notes --- assets/sass/_content.scss | 132 ++++++++++++++++++++++++++++++++++++++++++++++ assets/sass/_list.scss | 124 ------------------------------------------- assets/sass/main.scss | 13 +++-- 3 files changed, 141 insertions(+), 128 deletions(-) create mode 100644 assets/sass/_content.scss delete mode 100644 assets/sass/_list.scss (limited to 'assets/sass') diff --git a/assets/sass/_content.scss b/assets/sass/_content.scss new file mode 100644 index 0000000..c92a3d4 --- /dev/null +++ b/assets/sass/_content.scss @@ -0,0 +1,132 @@ +#content { + padding: 0 1em 0 1em; + + // different padding when screen size below width-md(768px) + @media screen and (max-width: $width-md) { + padding: 0 1.5em 0 1.5em; + } +} + +#post { + padding: 1.5em 0 1.5em 0; +} + +// different padding of first & last child in archives page +#post-archive { + &:not(:first-child):not(:last-child) { + padding: 0.5em 0 0.5em 0; + } + + &:first-child { + padding: 1.5em 0 0.5em 0; + } + + &:last-child { + padding: 0.5em 0 1.5em 0; + } +} + +// spliter between two posts +#post+#post, +#post-archive+#post-archive { + border-top: $spliter; +} + +// post title font & color +#post-title { + font-size: $font-size-l1; + + @include link-primary(); +} + +#post-title-archive { + font-size: $font-size-l2; + + @include link-primary(); +} + +// post meta data style +#post-meta { + color: $color-mute; + padding: 0.5em 0 1em 0; + white-space: nowrap; + overflow-x: scroll; + + &::-webkit-scrollbar { + display: none; // WebKit + } + + scrollbar-width: none; // Firefox + -ms-overflow-style: none; // Microsoft + + @include link-secondary(); +} + +#post-meta-archive { + color: $color-mute; + padding: 0; + white-space: nowrap; + overflow-x: scroll; + + &::-webkit-scrollbar { + display: none; // WebKit + } + + scrollbar-width: none; // Firefox + -ms-overflow-style: none; // Microsoft + + @include link-secondary(); +} + +// read more link style +#post-exlink { + margin: 0.5em 0 0 0; + + @include link-secondary(); +} + +// current tag indicator style in tags page +#page-tag { + padding: 1.5em 0 1.5em 0; + font-size: $font-size-l3; + border-bottom: $spliter; +} + +// markdown article style +article { + padding-top: 1.5em; + padding-bottom: 1.5em; +} + +// in-post license style +#license { + @include link-primary(); + + margin-bottom: 1.5em; +} + +// comment loading indicator style +#post-loading { + border-top: $spliter; + margin: 0 0 1.5em 0; + padding-top: 1.5em; + + #container-loading-bar { + width: 2em; + margin: 0 auto; + } + + p { + text-align: center; + margin: 0.5em 0 0 0; + } +} + +// spliter between comment & post will not show while iframe not loaded +#post-comment .utterances-frame { + border-top: $spliter; +} + +#post-comment #disqus_thread { + border-top: $spliter; +} \ No newline at end of file diff --git a/assets/sass/_list.scss b/assets/sass/_list.scss deleted file mode 100644 index 30e94da..0000000 --- a/assets/sass/_list.scss +++ /dev/null @@ -1,124 +0,0 @@ -#content { - padding: 0 1em 0 1em; - - // different padding when screen size below width-md(768px) - @media screen and (max-width: $width-md) { - padding: 0 1.5em 0 1.5em; - } -} - -#post { - padding: 1.5em 0 1.5em 0; -} - -#post-archive { - &:not(:first-child):not(:last-child) { - padding: 0.5em 0 0.5em 0; - } - - &:first-child { - padding: 1.5em 0 0.5em 0; - } - - &:last-child { - padding: 0.5em 0 1.5em 0; - } -} - -// spliter between two posts -#post+#post, -#post-archive+#post-archive { - border-top: $spliter; -} - -#post-title { - font-size: $font-size-l1; - - @include link-primary(); -} - -#post-title-archive { - font-size: $font-size-l2; - - @include link-primary(); -} - -#post-meta { - color: $color-mute; - padding: 0.5em 0 1em 0; - white-space: nowrap; - overflow-x: scroll; - - &::-webkit-scrollbar { - display: none; // WebKit - } - - scrollbar-width: none; // Firefox - -ms-overflow-style: none; // Microsoft - - @include link-secondary(); -} - -#post-meta-archive { - color: $color-mute; - padding: 0; - white-space: nowrap; - overflow-x: scroll; - - &::-webkit-scrollbar { - display: none; // WebKit - } - - scrollbar-width: none; // Firefox - -ms-overflow-style: none; // Microsoft - - @include link-secondary(); -} - -#post-exlink { - margin: 0.5em 0 0 0; - - @include link-secondary(); -} - -#page-tag { - padding: 1.5em 0 1.5em 0; - font-size: $font-size-l3; - border-bottom: $spliter; -} - -article { - padding-top: 1.5em; - padding-bottom: 1.5em; -} - -#license { - @include link-primary(); - - margin-bottom: 1.5em; -} - -#post-loading { - border-top: $spliter; - margin: 0 0 1.5em 0; - padding-top: 1.5em; - - #container-loading-bar { - width: 2em; - margin: 0 auto; - } - - p { - text-align: center; - margin: 0.5em 0 0 0; - } -} - -// not show while iframe not loaded -#post-comment .utterances-frame { - border-top: $spliter; -} - -#post-comment #disqus_thread { - border-top: $spliter; -} \ No newline at end of file diff --git a/assets/sass/main.scss b/assets/sass/main.scss index c00e6de..6356cb5 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -1,9 +1,10 @@ +//variables @import "_var"; -// Cover +// cover primer variables @import "_primer.scss"; -// Only used part of @primer/css/core +// include only used part of @primer/css/core // Include .octicon base styles @import "@primer/octicons/index.scss"; // Global requirements @@ -19,17 +20,21 @@ @import "_header"; -@import "_list"; +// list page & single page content part style +@import "_content"; +// sidebar & progress indicator style @import "_sidebar"; +// markdown style cover in summary & in-post content @import "_markdown"; @import "_pagination"; @import "_footer"; +// for 404 page #not-found { @include pdsans-title(); padding-top: 1em; -} +} \ No newline at end of file -- cgit v1.2.3