diff options
author | zzossig <zzossig@gmail.com> | 2020-10-17 04:43:58 +0300 |
---|---|---|
committer | zzossig <zzossig@gmail.com> | 2020-10-17 04:43:58 +0300 |
commit | 4e0ff9dba43882c8e24b6afe75d4811e5df09e90 (patch) | |
tree | 84b598b85859c3bc74c5755562bead07a43000c0 /assets | |
parent | 885938ae5617a255fb491286d36d2bc4d27f8cea (diff) |
search fixes, add more shortcodes, css edit, bug fixes, new param, blog ui update,
search fixes
- don't include fuse.js file when search disabled
- search indexing
- search url
shortcode
- codetab
- tab
css edit
- tab border
bug fixes
- toggle wide mode
new param
- enableWideBlogSwitch
- wideViewAsDefault
blog
- add tag cloud
- ui changed
- wide button added
- image header support
Diffstat (limited to 'assets')
-rw-r--r-- | assets/sass/components/_breadcrumb.scss | 2 | ||||
-rw-r--r-- | assets/sass/components/_button.scss | 2 | ||||
-rw-r--r-- | assets/sass/components/_codetab.scss | 59 | ||||
-rw-r--r-- | assets/sass/components/_summary.scss | 4 | ||||
-rw-r--r-- | assets/sass/components/_switch.scss | 77 | ||||
-rw-r--r-- | assets/sass/components/_tab.scss | 57 | ||||
-rw-r--r-- | assets/sass/components/_tag.scss | 34 | ||||
-rw-r--r-- | assets/sass/layout/_grid.scss | 18 | ||||
-rw-r--r-- | assets/sass/main.scss | 2 | ||||
-rw-r--r-- | assets/sass/pages/_list.scss | 12 | ||||
-rw-r--r-- | assets/sass/pages/_single.scss | 10 |
11 files changed, 203 insertions, 74 deletions
diff --git a/assets/sass/components/_breadcrumb.scss b/assets/sass/components/_breadcrumb.scss index 2905473..af01663 100644 --- a/assets/sass/components/_breadcrumb.scss +++ b/assets/sass/components/_breadcrumb.scss @@ -1,4 +1,6 @@ .breadcrumb { + position: relative; + &[data-is-blog="true"] { margin: 1.5rem 1rem 0 1rem; padding-bottom: 1.5rem; diff --git a/assets/sass/components/_button.scss b/assets/sass/components/_button.scss index d189e02..f7bd581 100644 --- a/assets/sass/components/_button.scss +++ b/assets/sass/components/_button.scss @@ -41,7 +41,7 @@ border: none; outline: none; padding: 0.75rem; - margin: 0 0.95rem; + margin: 0 0.5rem; text-decoration: none; cursor: pointer; font-family: $title-font; diff --git a/assets/sass/components/_codetab.scss b/assets/sass/components/_codetab.scss new file mode 100644 index 0000000..43c1ade --- /dev/null +++ b/assets/sass/components/_codetab.scss @@ -0,0 +1,59 @@ +.codetab { + position: relative; + + &__links { + position: absolute; + top: 0; + left: 0; + height: 27px; + z-index: z('clipboard'); + border-top-left-radius: 0.25rem; + + @include flexbox(); + @include align-items(center); + @include justify-content(flex-start); + @include themify($codeblock) { + background-color: themed('content-pre-header-background-color'); + } + } + + &__link { + height: 27px; + border: none; + outline: none; + cursor: pointer; + font-size: 13.8px; + font-family: $title-font; + text-transform: capitalize; + padding: 0.25rem 0.5rem; + + &:first-child { + border-top-left-radius: 0.25rem; + } + + @include transition(all, 0.2s, ease-in); + @include themify($themes) { + color: themed('navbar-title-color'); + border-top: 1px solid transparent; + &.active { + border-top: 1px solid themed('content-pre-header-background-color'); + } + } + + @include themify($codeblock) { + background-color: themed('content-pre-header-background-color'); + + &.active { + background-color: themed('content-pre-background-color'); + } + + @include on-event { + background-color: themed('content-pre-background-color'); + } + } + } + + &__content { + display: none; + } +}
\ No newline at end of file diff --git a/assets/sass/components/_summary.scss b/assets/sass/components/_summary.scss index 83100c4..1eb92fa 100644 --- a/assets/sass/components/_summary.scss +++ b/assets/sass/components/_summary.scss @@ -1,12 +1,11 @@ .summary-card { padding: 1rem; padding-bottom: 0; - margin: 1.5rem 0; + margin: 2.5rem 0 2rem 0; position: relative; @include themify($themes) { background-color: themed('body-background-color'); - border-bottom: 1px solid themed('hr-color'); } .title { @@ -43,6 +42,7 @@ @include flex-wrap(wrap); @include themify($themes) { background-color: themed('body-background-color'); + border-bottom: 1px solid themed('hr-color'); } } diff --git a/assets/sass/components/_switch.scss b/assets/sass/components/_switch.scss index c8e196a..8b1c806 100644 --- a/assets/sass/components/_switch.scss +++ b/assets/sass/components/_switch.scss @@ -1,12 +1,41 @@ /* The switch - the box around the slider */ .switch { - position: absolute; - right: -2rem; - top: 1.75rem; - display: inline-block; - width: 30px; - height: 16px; - z-index: z('gtt'); + cursor: pointer; + + @include flexbox(); + @include align-items(center); + @include justify-content(center); + + &__rel { + position: relative; + height: auto; + padding: 0 6px; + + @include themify($themes) { + color: themed('landing-button-default'); + @include on-event { + color: themed('body-color'); + background-color: themed('dropdown-hover-background-color'); + } + } + } + + &__abs { + position: absolute; + left: -75px; + top: -16px; + z-index: z('menu'); + width: 50px; + height: 50px; + margin: auto 0; + + @include themify($themes) { + color: themed('landing-button-default'); + @include on-event { + color: themed('body-color'); + } + } + } } /* Hide default HTML checkbox */ @@ -18,44 +47,18 @@ /* The slider */ .slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; background-color: transparent; -webkit-transition: .2s; transition: .2s; - &:before { - position: absolute; - content: ""; - height: 12px; - width: 13px; - left: 2px; - bottom: 2px; - -webkit-transition: .2s; - transition: .2s; - } - &__icon { - padding: 0.5rem; + svg { + @include flexbox(); + @include align-items(center); + } } } -// input:checked + .slider { -// @include themify($themes) { -// background-color: transparent; -// } -// } - -// input:focus + .slider { -// @include themify($themes) { -// background-color: transparent; -// } -// } - input:checked + .slider:before { -webkit-transform: translateX(13px); -ms-transform: translateX(13px); diff --git a/assets/sass/components/_tab.scss b/assets/sass/components/_tab.scss new file mode 100644 index 0000000..6190358 --- /dev/null +++ b/assets/sass/components/_tab.scss @@ -0,0 +1,57 @@ +.tab { + position: relative; + padding: 0.5rem 0; + margin: 2rem 0; + + &__links { + height: 30px; + border-top-left-radius: 0.25rem; + + @include flexbox(); + @include align-items(center); + @include justify-content(flex-start); + @include flex-wrap(wrap); + } + + &__link { + outline: none; + border: none; + cursor: pointer; + font-size: 13.8px; + font-family: $title-font; + text-transform: capitalize; + padding: 0.5rem 0.75rem; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; + + @include themify($themes) { + color: themed('navbar-title-color'); + background-color: themed('body-background-color'); + border: none; + border-bottom: 1px solid themed('hr-color'); + + &.active { + background-color: themed('body-background-color'); + border: 1px solid themed('hr-color'); + border-bottom: none; + } + + @include on-event { + color: themed('navbar-title-hover-color'); + background-color: themed('content-pre-header-background-color'); + } + } + } + + &__content { + display: none; + padding: 0 0.5rem; + border-radius: 0.25rem; + border-top-left-radius: 0; + + @include themify($themes) { + border: 1px solid themed('hr-color'); + background-color: themed('body-background-color'); + } + } +}
\ No newline at end of file diff --git a/assets/sass/components/_tag.scss b/assets/sass/components/_tag.scss index f1c9590..e499a74 100644 --- a/assets/sass/components/_tag.scss +++ b/assets/sass/components/_tag.scss @@ -1,6 +1,7 @@ .tag {
display: inline-block;
- margin: 0.25rem 0.4rem;
+ padding: 0.2rem 0;
+ width: 100%;
text-decoration: none !important;
@include themify($themes) {
@@ -16,14 +17,37 @@ }
&__text {
- font-size: 0.95rem;
- font-weight: bold;
color: inherit;
}
&__num {
- font-size: 0.75rem;
- font-weight: bold;
color: inherit;
}
+
+ &-cloud {
+ position: relative;
+
+ &__label {
+ font-family: $title-font;
+ font-size: 1rem;
+ margin: 3.5rem 0 0 0;
+ margin-left: 1.25rem;
+ padding-left: 2.5rem;
+
+ @include themify($themes) {
+ color: themed('toc-label-color');
+ }
+ }
+
+ &__tags {
+ // position: -webkit-sticky;
+ // position: sticky;
+ top: $grid-nav-height;
+ padding: 1rem;
+ padding-left: 3rem;
+ height: calc(100vh - $grid-nav-height);
+ overflow-y: auto;
+ z-index: z('menu');
+ }
+ }
}
\ No newline at end of file diff --git a/assets/sass/layout/_grid.scss b/assets/sass/layout/_grid.scss index 5b3154d..ab284f7 100644 --- a/assets/sass/layout/_grid.scss +++ b/assets/sass/layout/_grid.scss @@ -56,20 +56,18 @@ .sv { // single view display: grid; + grid-template-columns: minmax(630px, 1fr) minmax(125px, 325px); grid-template-rows: 1fr; grid-column-gap: 0px; grid-row-gap: 0px; - &[data-view="full"] { - grid-template-columns: 769px; - } - - &[data-view="mobile"] { - width: 100%; - grid-template-columns: 1fr; + @media only screen and (max-width: 769px) { + grid-template-columns: minmax(200px, 1fr); } } -.blog { - grid-area: 1 / 1 / 2 / 2; -}
\ No newline at end of file +.blog-post { grid-area: 1 / 1 / 2 / 2; } // left + +.blog-tags { grid-area: 1 / 2 / 2 / 3; } // right + +.blog-total { grid-area: 1 / 1 / 2 / 3; } // left right
\ No newline at end of file diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 85c935f..e79d637 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -49,6 +49,8 @@ $light-nav-icon-color: {{ .Site.Data.color.light_nav_icon_color }}; @import 'components/switch'; @import 'components/notice'; @import 'components/alert'; +@import 'components/tab'; +@import 'components/codetab'; @import 'layout/grid'; @import 'layout/footer'; diff --git a/assets/sass/pages/_list.scss b/assets/sass/pages/_list.scss index d132f00..f676f8a 100644 --- a/assets/sass/pages/_list.scss +++ b/assets/sass/pages/_list.scss @@ -8,26 +8,18 @@ &[data-dir="ltr"] { border-right: 1px solid themed('border-line-color'); + border-left: 1px solid themed('border-line-color'); } &[data-dir="rtl"] { border-left: 1px solid themed('border-line-color'); + border-right: 1px solid themed('border-line-color'); } } } #list-menu { position: relative; - - @include themify($themes) { - &[data-dir="ltr"] { - border-right: 1px solid themed('border-line-color'); - } - - &[data-dir="rtl"] { - border-left: 1px solid themed('border-line-color'); - } - } } #list-side { diff --git a/assets/sass/pages/_single.scss b/assets/sass/pages/_single.scss index 115f3ab..57e0262 100644 --- a/assets/sass/pages/_single.scss +++ b/assets/sass/pages/_single.scss @@ -1,13 +1,5 @@ #single-menu { - @include themify($themes) { - &[data-dir="ltr"] { - border-right: 1px solid themed('border-line-color'); - } - - &[data-dir="rtl"] { - border-left: 1px solid themed('border-line-color'); - } - } + position: relative; } .single { |