redesign 2023
This commit is contained in:
96
themes/FixIt/assets/css/_core/_base.scss
Normal file
96
themes/FixIt/assets/css/_core/_base.scss
Normal file
@ -0,0 +1,96 @@
|
||||
@import "../../lib/normalize/normalize";
|
||||
|
||||
html {
|
||||
font-family: $global-font-family;
|
||||
font-weight: $global-font-weight;
|
||||
font-display: swap;
|
||||
font-size: $global-font-size;
|
||||
line-height: $global-line-height;
|
||||
width: 100%;
|
||||
scroll-behavior: smooth;
|
||||
overflow: overlay;
|
||||
}
|
||||
|
||||
@media screen and (prefers-reduced-motion: reduce) {
|
||||
html {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* scrollbar, only support webkit */
|
||||
::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
height: 0.5rem;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: $scrollbar-color;
|
||||
@include border-radius($global-border-radius);
|
||||
|
||||
&:hover {
|
||||
background-color: $scrollbar-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
::selection {
|
||||
background-color: $selection-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $selection-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: $global-background-color;
|
||||
color: $global-font-color;
|
||||
scrollbar-color: auto;
|
||||
@include overflow-wrap(break-word);
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 0.75rem;
|
||||
height: 0.75rem;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background-color: transparent;
|
||||
background-clip: content-box;
|
||||
border: 2px solid transparent;
|
||||
@include border-radius(0.5rem);
|
||||
}
|
||||
|
||||
&[data-scroll]::-webkit-scrollbar-thumb {
|
||||
background-color: $scrollbar-color;
|
||||
}
|
||||
|
||||
&[data-theme='dark'] {
|
||||
color: $global-font-color-dark;
|
||||
background-color: $global-background-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
@include border-radius($global-border-radius);
|
||||
}
|
||||
|
||||
[role='button'] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
abbr[title] {
|
||||
cursor: help;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
@include link(true, true);
|
||||
|
||||
@import '../_partials/mask';
|
||||
@import '../_partials/img';
|
||||
@import '../_partials/icon';
|
||||
@import '../_partials/details';
|
||||
@import '../_partials/widgets';
|
46
themes/FixIt/assets/css/_core/_breadcrumb.scss
Normal file
46
themes/FixIt/assets/css/_core/_breadcrumb.scss
Normal file
@ -0,0 +1,46 @@
|
||||
.breadcrumb-container {
|
||||
padding-inline: 1rem;
|
||||
font-size: 0.75rem;
|
||||
@include z-index(1);
|
||||
@extend .print-d-none;
|
||||
|
||||
&.sticky {
|
||||
position: sticky;
|
||||
top: $header-height;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0.5rem 0;
|
||||
margin: 0 auto;
|
||||
list-style: none;
|
||||
border-bottom: 1px inset $global-border-color;
|
||||
background-color: $global-background-color;
|
||||
@extend %page-style;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
border-bottom-color: $global-border-color-dark;
|
||||
background-color: $global-background-color-dark;
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
display: flex;
|
||||
|
||||
+.breadcrumb-item::before {
|
||||
content: "/";
|
||||
display: inline-block;
|
||||
padding-inline: 0.5rem;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
@extend .text-secondary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
66
themes/FixIt/assets/css/_core/_common.scss
Normal file
66
themes/FixIt/assets/css/_core/_common.scss
Normal file
@ -0,0 +1,66 @@
|
||||
// ==============================
|
||||
// Common Styles
|
||||
// 常用样式
|
||||
// ==============================
|
||||
|
||||
.text-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.text-start {
|
||||
text-align: left !important;
|
||||
}
|
||||
.text-end {
|
||||
text-align: right !important;
|
||||
}
|
||||
.text-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.d-none {
|
||||
display: none !important;
|
||||
}
|
||||
.d-none-desktop {
|
||||
display: none;
|
||||
}
|
||||
.d-none-mobile {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ms-1,
|
||||
.mx-1 {
|
||||
margin-left: 0.25rem !important;
|
||||
}
|
||||
.me-1,
|
||||
.mx-1 {
|
||||
margin-right: 0.25rem !important;
|
||||
}
|
||||
.ps-1,
|
||||
.px-1 {
|
||||
padding-left: 0.25rem !important;
|
||||
}
|
||||
.pe-1,
|
||||
.px-1 {
|
||||
padding-right: 0.25rem !important;
|
||||
}
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
.text-#{$color} {
|
||||
color: #{$value} !important;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: #{darken($value, 5%)} !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $key, $value in $orders {
|
||||
.order-#{$key} {
|
||||
order: #{$value} !important;
|
||||
}
|
||||
}
|
||||
|
||||
.variant-numeric {
|
||||
font-variant-numeric: tabular-nums lining-nums;
|
||||
}
|
63
themes/FixIt/assets/css/_core/_footer.scss
Normal file
63
themes/FixIt/assets/css/_core/_footer.scss
Normal file
@ -0,0 +1,63 @@
|
||||
footer {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 1.25rem;
|
||||
padding: 1rem 0;
|
||||
@extend .print-d-none;
|
||||
|
||||
.footer-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 0.875rem;
|
||||
|
||||
.footer-line {
|
||||
width: 100%;
|
||||
|
||||
.footer-divider:not(:first-child)::before {
|
||||
content: '|';
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.fixit-icon {
|
||||
top: 0.25em;
|
||||
}
|
||||
|
||||
.animate-icon {
|
||||
color: #dc143c;
|
||||
animation: icon-animate 1.33s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.run-times {
|
||||
font-variant-numeric: tabular-nums lining-nums;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include blur;
|
||||
}
|
||||
|
||||
@keyframes icon-animate {
|
||||
0%,
|
||||
100% {
|
||||
@include transform(scale(1));
|
||||
}
|
||||
|
||||
10%,
|
||||
30% {
|
||||
@include transform(scale(0.9));
|
||||
}
|
||||
|
||||
20%,
|
||||
40%,
|
||||
60%,
|
||||
80% {
|
||||
@include transform(scale(1.1));
|
||||
}
|
||||
|
||||
50%,
|
||||
70% {
|
||||
@include transform(scale(1.1));
|
||||
}
|
||||
}
|
645
themes/FixIt/assets/css/_core/_header.scss
Normal file
645
themes/FixIt/assets/css/_core/_header.scss
Normal file
@ -0,0 +1,645 @@
|
||||
header {
|
||||
width: 100%;
|
||||
background-color: $header-background-color;
|
||||
@include z-index(2);
|
||||
@include transition(box-shadow 0.3s ease);
|
||||
@extend .print-d-none;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $header-background-color-dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
|
||||
|
||||
[data-theme='dark'] & {
|
||||
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-family: $header-title-font-family;
|
||||
font-weight: bold;
|
||||
margin-right: 0.5rem;
|
||||
min-width: 10%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
@include flex(10);
|
||||
|
||||
.logo {
|
||||
min-height: 1.5em;
|
||||
height: 1.5em;
|
||||
vertical-align: middle;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.header-title-text {
|
||||
margin-left: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
.header-subtitle {
|
||||
margin-left: 0.25rem;
|
||||
font-size: 0.6em;
|
||||
}
|
||||
}
|
||||
|
||||
.menu {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
.menu-item {
|
||||
list-style: none;
|
||||
|
||||
& .dropdown-icon {
|
||||
margin-left: 0.25rem;
|
||||
font-size: .875em;
|
||||
color: $global-font-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-color-dark;
|
||||
}
|
||||
|
||||
&.open::before {
|
||||
content: "\f078";
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
>.menu-link,
|
||||
>.nested-item>.menu-link {
|
||||
font-weight: bold;
|
||||
color: $menu-active-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $menu-active-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.language-switch,
|
||||
&.theme-switch {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
position: relative;
|
||||
|
||||
input {
|
||||
color: transparent;
|
||||
box-sizing: border-box;
|
||||
height: 2.5rem;
|
||||
width: 1.25rem;
|
||||
@include border-radius(0.5rem);
|
||||
border: none;
|
||||
outline: none;
|
||||
background-color: transparent;
|
||||
vertical-align: baseline !important;
|
||||
@include transition(width 0.3s ease);
|
||||
}
|
||||
|
||||
@include placeholder(transparent);
|
||||
|
||||
.search-button {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: auto;
|
||||
right: 1rem;
|
||||
}
|
||||
|
||||
.search-toggle {
|
||||
left: 0.5rem;
|
||||
right: auto;
|
||||
|
||||
#header-desktop.open & {
|
||||
left: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.search-loading {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.open &,
|
||||
&.mobile {
|
||||
input {
|
||||
color: $global-font-color;
|
||||
background-color: $search-background-color;
|
||||
padding: 0 2rem 0 2rem;
|
||||
}
|
||||
|
||||
[data-theme='dark'] & {
|
||||
input {
|
||||
color: darken($global-font-color-dark, 10%);
|
||||
background-color: darken($code-background-color-dark, 5%);
|
||||
}
|
||||
|
||||
@include placeholder($global-font-secondary-color-dark);
|
||||
}
|
||||
|
||||
@include placeholder($global-font-secondary-color);
|
||||
|
||||
.search-button {
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.search-clear:hover {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
|
||||
.search-toggle:hover {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.theme-switch {
|
||||
i {
|
||||
@include transform(rotate(225deg));
|
||||
@include transition(transform 0.4s ease);
|
||||
}
|
||||
|
||||
&:hover i {
|
||||
@include transform(rotate(45deg));
|
||||
}
|
||||
}
|
||||
|
||||
#header-desktop {
|
||||
display: block;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
height: $header-height;
|
||||
line-height: $header-height;
|
||||
box-sizing: border-box;
|
||||
|
||||
[data-header-desktop='normal'] & {
|
||||
position: static;
|
||||
}
|
||||
|
||||
nav {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header-wrapper {
|
||||
// use css native function to calculate max value
|
||||
padding: 0 2rem 0 MAX(10vh, $header-height);
|
||||
height: 100%;
|
||||
|
||||
&[data-github-corner='right'] {
|
||||
padding-right: $header-height;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: $header-title-font-size;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
float: right;
|
||||
|
||||
>.menu-item {
|
||||
&:hover .sub-menu {
|
||||
display: block;
|
||||
@include transform(translateX(-0.5rem));
|
||||
}
|
||||
&.language-switch:hover .sub-menu {
|
||||
@include transform(translateX(calc(1.75rem - 100%)));
|
||||
}
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
padding: 0 0.5rem;
|
||||
|
||||
&.delimiter {
|
||||
width: 0;
|
||||
margin: 0.125rem 0.25rem;
|
||||
padding: 0;
|
||||
border-left: 1px dashed lighten($global-font-secondary-color, 15%);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
border-left-color: darken($global-font-secondary-color-dark, 15%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
padding: 0.25rem 0;
|
||||
display: none;
|
||||
top: calc(#{$header-height} - 0.75rem);
|
||||
border-radius: $global-border-radius;
|
||||
border: 1px solid $global-border-color;
|
||||
background-color: $header-background-color;
|
||||
@include transition(box-shadow 0.3s ease);
|
||||
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $header-background-color-dark;
|
||||
border-color: $global-border-color-dark;
|
||||
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
height: $header-height*0.5;
|
||||
line-height: $header-height*0.5;
|
||||
max-width: 15rem;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.open .header-wrapper .menu .menu-item.search {
|
||||
input {
|
||||
width: 24rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#header-mobile {
|
||||
display: none;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
min-height: $header-height;
|
||||
line-height: $header-height;
|
||||
|
||||
[data-header-mobile='normal'] & {
|
||||
position: static;
|
||||
}
|
||||
|
||||
.header-container {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
.header-wrapper {
|
||||
padding: 0 1rem;
|
||||
font-size: 1.125rem;
|
||||
@include transition(margin-top 0.3s ease);
|
||||
|
||||
.header-title {
|
||||
font-size: $header-title-font-size;
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.menu-toggle {
|
||||
line-height: 4rem;
|
||||
cursor: pointer;
|
||||
@include transition(width 0.3s ease);
|
||||
|
||||
span {
|
||||
display: block;
|
||||
background: $global-font-color;
|
||||
width: 1.5rem;
|
||||
height: 2px;
|
||||
@include border-radius(3px);
|
||||
@include transition(all 0.3s ease-in-out);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background: $global-font-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
span:nth-child(3) {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
&.active {
|
||||
span:nth-child(1) {
|
||||
@include transform(rotate(45deg) translate(0.4rem, 0.5rem));
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
span:nth-child(3) {
|
||||
@include transform(rotate(-45deg) translate(0.4rem, -0.5rem));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu {
|
||||
background: $header-background-color;
|
||||
border-top: 2px solid $global-border-color;
|
||||
display: none;
|
||||
overflow-y: overlay;
|
||||
max-height: 70vh;
|
||||
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
|
||||
|
||||
[data-theme='dark'] & {
|
||||
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.search-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: ($header-height - 2.5rem) / 2 1rem;
|
||||
line-height: 2.5rem;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background-color: $header-background-color;
|
||||
@include z-index(0, 50);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $header-background-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.search {
|
||||
flex-grow: 10;
|
||||
|
||||
.algolia-autocomplete,
|
||||
input {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.search-loading,
|
||||
.search-clear {
|
||||
right: 0.5rem;
|
||||
}
|
||||
|
||||
.search-button {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.search-cancel {
|
||||
display: none;
|
||||
margin-left: 0.75rem;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: block;
|
||||
position: relative;
|
||||
line-height: 2.5rem;
|
||||
padding: 0 1rem;
|
||||
|
||||
&:not(.menu-system):hover {
|
||||
background-color: lighten($code-background-color, 24%);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: lighten($code-background-color-dark, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
.menu-link {
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
@include flex(4);
|
||||
}
|
||||
|
||||
& .nested-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.menu-link {
|
||||
max-width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.menu-system {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 0.25rem;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
line-height: 2.5rem;
|
||||
padding: 0 1rem;
|
||||
background-color: $header-background-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $header-background-color-dark;
|
||||
}
|
||||
|
||||
.menu-system-item {
|
||||
padding-inline: 0.5rem;
|
||||
}
|
||||
|
||||
.language-switch {
|
||||
position: relative;
|
||||
|
||||
.language-select {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
padding-left: 0;
|
||||
display: none;
|
||||
|
||||
&.open {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.menu-item:hover {
|
||||
background-color: lighten($global-font-secondary-color, 20%);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: darken($global-font-secondary-color-dark, 20%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background: $header-background-color-dark;
|
||||
border-top-color: $global-border-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.open {
|
||||
.header-wrapper {
|
||||
margin-top: -$header-height;
|
||||
}
|
||||
|
||||
.menu {
|
||||
padding-top: 0;
|
||||
border-top: none;
|
||||
|
||||
.menu-item {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-cancel {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-dropdown {
|
||||
position: fixed;
|
||||
top: $header-height;
|
||||
@include z-index(2);
|
||||
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
|
||||
|
||||
[data-theme='dark'] & {
|
||||
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
|
||||
}
|
||||
|
||||
&.desktop {
|
||||
right: 2rem;
|
||||
width: 30rem;
|
||||
}
|
||||
|
||||
&.mobile {
|
||||
right: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
right: 0 !important;
|
||||
background-color: $global-background-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $global-background-color-dark;
|
||||
}
|
||||
|
||||
.suggestions {
|
||||
overflow-y: auto;
|
||||
max-height: calc(100vh - #{$header-height});
|
||||
|
||||
.suggestion {
|
||||
padding: 0.75rem 1rem;
|
||||
|
||||
.suggestion-title {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 1rem;
|
||||
font-weight: bold;
|
||||
max-width: 75%;
|
||||
}
|
||||
|
||||
.suggestion-date {
|
||||
font-size: 0.875rem;
|
||||
float: right;
|
||||
text-align: right;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
.suggestion-context {
|
||||
line-height: 1.25rem;
|
||||
@include box(vertical);
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@include overflow-wrap(break-word);
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: normal;
|
||||
background-color: $selection-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background-color: $selection-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
&.cursor {
|
||||
background: darken($code-background-color, 5%);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
background: lighten($code-background-color-dark, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-empty {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
|
||||
.search-query {
|
||||
font-weight: bold;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: #ddd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search-footer {
|
||||
padding: 0.5rem 1rem;
|
||||
float: right;
|
||||
font-size: 0.8rem;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
|
||||
@include link(false, false);
|
||||
|
||||
a {
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
41
themes/FixIt/assets/css/_core/_layout.scss
Normal file
41
themes/FixIt/assets/css/_core/_layout.scss
Normal file
@ -0,0 +1,41 @@
|
||||
/** Layout **/
|
||||
.wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
|
||||
main {
|
||||
flex: 1 0 auto;
|
||||
|
||||
aside {
|
||||
flex: 1;
|
||||
padding-inline: 0.5rem;
|
||||
|
||||
&:first-child {
|
||||
order: 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.container {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
padding: 0 1rem;
|
||||
|
||||
&.container-reverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
&:has(.home:not(.posts)) {
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@import "_core/header";
|
||||
@import "_core/breadcrumb";
|
||||
@import "_core/footer";
|
||||
@import "_core/pagination";
|
160
themes/FixIt/assets/css/_core/_media.scss
Normal file
160
themes/FixIt/assets/css/_core/_media.scss
Normal file
@ -0,0 +1,160 @@
|
||||
@media only screen and (min-width: 1441px) {
|
||||
%page-style {
|
||||
width: 60%;
|
||||
|
||||
[data-page-style='wide'] & {
|
||||
width: 64%;
|
||||
}
|
||||
|
||||
[data-page-style='narrow'] & {
|
||||
max-width: 800px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1440px) {
|
||||
%page-style {
|
||||
width: 56%;
|
||||
|
||||
[data-page-style='wide'] & {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1200px) {
|
||||
%page-style {
|
||||
width: 52%;
|
||||
|
||||
[data-page-style='wide'] & {
|
||||
width: 56%;
|
||||
}
|
||||
}
|
||||
|
||||
#header-desktop .header-wrapper {
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.search-dropdown.desktop {
|
||||
right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 960px) {
|
||||
%page-style {
|
||||
width: 80% !important;
|
||||
}
|
||||
|
||||
aside {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
#toc-static {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#header-desktop .header-wrapper {
|
||||
padding-left: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 681px) {
|
||||
.breadcrumb-container.sticky {
|
||||
body:not([data-header-desktop='sticky']) & {
|
||||
top: 0;
|
||||
}
|
||||
// adjust the scroll margin top of the content anchors on the page
|
||||
body:not([data-header-desktop='auto']) &+.container .content [id] {
|
||||
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
|
||||
}
|
||||
}
|
||||
|
||||
[data-header-desktop='normal'] .page .content [id] {
|
||||
--#{$prefix}scroll-mt: #{$global-scroll-margin-top};
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 680px) {
|
||||
#header-desktop {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#header-mobile,
|
||||
.d-none-desktop {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.d-none-mobile {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.breadcrumb-container.sticky {
|
||||
body:not([data-header-mobile='sticky']) & {
|
||||
top: 0;
|
||||
}
|
||||
// adjust the scroll margin top of the content anchors on the page
|
||||
body:not([data-header-mobile='auto']) &+.container .content [id] {
|
||||
scroll-margin-top: calc(var(--#{$prefix}scroll-mt) + var(--#{$prefix}breadcrumb-offset));
|
||||
}
|
||||
}
|
||||
|
||||
[data-header-mobile='normal'] .page .content [id] {
|
||||
--#{$prefix}scroll-mt: #{$global-scroll-margin-top};
|
||||
}
|
||||
|
||||
%page-style {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.page {
|
||||
.categories-card {
|
||||
.card-item {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
.footer-container {
|
||||
font-size: 0.618rem;
|
||||
}
|
||||
}
|
||||
|
||||
.pagination .page-item {
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only print {
|
||||
@page {
|
||||
size: A4 portrait;
|
||||
margin: 1.27cm;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100% !important;
|
||||
padding-top: 0 !important;
|
||||
|
||||
&.single {
|
||||
.single-title,
|
||||
.single-subtitle,
|
||||
.post-meta {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
h1:not(.single-title),
|
||||
.page-break-before {
|
||||
page-break-before: always;
|
||||
}
|
||||
|
||||
.page-break-after {
|
||||
page-break-after: always;
|
||||
}
|
||||
}
|
||||
|
||||
.print-d-none {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
90
themes/FixIt/assets/css/_core/_pagination.scss
Normal file
90
themes/FixIt/assets/css/_core/_pagination.scss
Normal file
@ -0,0 +1,90 @@
|
||||
.pagination {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
list-style: none;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: 1rem 0;
|
||||
|
||||
a {
|
||||
font-size: 0.8rem;
|
||||
color: $pagination-link-color;
|
||||
letter-spacing: 0.1rem;
|
||||
font-weight: 700;
|
||||
padding: 5px 5px;
|
||||
text-decoration: none;
|
||||
@include transition(0.3s);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $pagination-link-color-dark;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 5px;
|
||||
margin: 0 10px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
display: inline;
|
||||
|
||||
&.disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover a {
|
||||
color: $pagination-link-hover-color;
|
||||
}
|
||||
|
||||
[data-theme='dark'] &:hover a {
|
||||
color: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 3px;
|
||||
background: $pagination-link-hover-color;
|
||||
@include transition(0.3s);
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
[data-theme='dark'] &::before,
|
||||
[data-theme='dark'] &::after {
|
||||
background: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&::before {
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
&::after {
|
||||
right: 50%;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::before,
|
||||
&::after {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
a {
|
||||
color: $pagination-link-hover-color;
|
||||
}
|
||||
|
||||
[data-theme='dark'] & a {
|
||||
color: $pagination-link-hover-color-dark;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
themes/FixIt/assets/css/_core/_patch.scss
Normal file
20
themes/FixIt/assets/css/_core/_patch.scss
Normal file
@ -0,0 +1,20 @@
|
||||
/* Resolve style conflicts between third-party plugins */
|
||||
|
||||
@keyframes #{$prefix}pulse {
|
||||
from {
|
||||
@include transform(scale3d(1, 1, 1));
|
||||
}
|
||||
|
||||
50% {
|
||||
@include transform(scale3d(1.05, 1.05, 1.05));
|
||||
}
|
||||
|
||||
to {
|
||||
@include transform(scale3d(1, 1, 1));
|
||||
}
|
||||
}
|
||||
|
||||
.animate__pulse {
|
||||
-webkit-animation-name: #{$prefix}pulse !important;
|
||||
animation-name: #{$prefix}pulse !important;
|
||||
}
|
15
themes/FixIt/assets/css/_core/_root.scss
Normal file
15
themes/FixIt/assets/css/_core/_root.scss
Normal file
@ -0,0 +1,15 @@
|
||||
:root {
|
||||
// Note: Custom variable values only support SassScript inside `#{}`.
|
||||
|
||||
// Theme colors varibles
|
||||
@each $color, $value in $theme-colors {
|
||||
--#{$prefix}#{$color}: #{$value};
|
||||
}
|
||||
@each $color, $value in $theme-colors {
|
||||
--#{$prefix}#{$color}-dark: #{darken($value, 5%)};
|
||||
}
|
||||
|
||||
// Scroll margin top and Stack sticky top related
|
||||
--#{$prefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top});
|
||||
--#{$prefix}breadcrumb-offset: 2.5rem;
|
||||
}
|
Reference in New Issue
Block a user