mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 20:13:31 +08:00
Left sidebar
This commit is contained in:
parent
62c743cb63
commit
0c23d0c49d
@ -76,7 +76,9 @@ main.main {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
@include respond(md) {
|
||||||
padding-top: var(--main-top-padding);
|
padding-top: var(--main-top-padding);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-container {
|
.main-container {
|
||||||
@ -84,6 +86,7 @@ main.main {
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
gap: var(--section-separation);
|
gap: var(--section-separation);
|
||||||
|
padding-top: var(--main-top-padding);
|
||||||
|
|
||||||
@include respond(md) {
|
@include respond(md) {
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
|
@ -135,13 +135,12 @@
|
|||||||
box-shadow: var(--shadow-l1);
|
box-shadow: var(--shadow-l1);
|
||||||
display: none;
|
display: none;
|
||||||
|
|
||||||
margin: 0 -15px;
|
margin: 0 calc(var(--container-padding) * -1);
|
||||||
|
|
||||||
&,
|
&,
|
||||||
.menu-bottom-section {
|
.menu-bottom-section {
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
@include respond(xl) {
|
@include respond(xl) {
|
||||||
margin-top: 30px;
|
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,11 +156,6 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
margin-top: var(--sidebar-element-separation);
|
|
||||||
}
|
|
||||||
|
|
||||||
@include respond(xl) {
|
|
||||||
margin-top: 30px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
li {
|
li {
|
||||||
@ -176,7 +170,6 @@
|
|||||||
|
|
||||||
svg {
|
svg {
|
||||||
stroke-width: 1.33;
|
stroke-width: 1.33;
|
||||||
margin-right: 40px;
|
|
||||||
|
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
@ -187,6 +180,7 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: var(--body-text-color);
|
color: var(--body-text-color);
|
||||||
|
gap: var(--menu-icon-separation);
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@ -211,7 +205,8 @@
|
|||||||
|
|
||||||
.social-menu {
|
.social-menu {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0%;
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
gap: var(--sidebar-element-separation);
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 30px 0 15px 0;
|
|
||||||
max-width: none;
|
max-width: none;
|
||||||
|
|
||||||
--sidebar-avatar-size: 120px;
|
--sidebar-avatar-size: 120px;
|
||||||
@ -49,11 +49,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.site-info {
|
.sidebar header {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transition: box-shadow 0.5s ease;
|
transition: box-shadow 0.5s ease;
|
||||||
|
display: flex;
|
||||||
padding: 15px;
|
flex-direction: column;
|
||||||
|
gap: var(--sidebar-element-separation);
|
||||||
|
|
||||||
@include respond(md) {
|
@include respond(md) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -65,8 +66,6 @@
|
|||||||
width: var(--sidebar-avatar-size);
|
width: var(--sidebar-avatar-size);
|
||||||
height: var(--sidebar-avatar-size);
|
height: var(--sidebar-avatar-size);
|
||||||
|
|
||||||
margin-bottom: var(--sidebar-element-separation);
|
|
||||||
|
|
||||||
.site-logo {
|
.site-logo {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -95,6 +94,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.site-meta {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.site-name {
|
.site-name {
|
||||||
color: var(--accent-color);
|
color: var(--accent-color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -108,7 +113,7 @@
|
|||||||
.site-description {
|
.site-description {
|
||||||
color: var(--body-text-color);
|
color: var(--body-text-color);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
margin: 10px 0;
|
margin: 0;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
|
|
||||||
@include respond(2xl) {
|
@include respond(2xl) {
|
||||||
@ -153,6 +158,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
gap: var(--menu-icon-separation);
|
||||||
|
|
||||||
.icon-tabler-toggle-right {
|
.icon-tabler-toggle-right {
|
||||||
display: none;
|
display: none;
|
||||||
@ -163,6 +169,7 @@
|
|||||||
color: var(--body-text-color);
|
color: var(--body-text-color);
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
|
gap: var(--menu-icon-separation);
|
||||||
|
|
||||||
select {
|
select {
|
||||||
border: 0;
|
border: 0;
|
||||||
|
@ -5,9 +5,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
* Global style
|
* Global style
|
||||||
*/
|
*/
|
||||||
:root {
|
:root {
|
||||||
@include respond(md) {
|
|
||||||
--main-top-padding: 35px;
|
--main-top-padding: 35px;
|
||||||
}
|
|
||||||
|
|
||||||
@include respond(xl) {
|
@include respond(xl) {
|
||||||
--main-top-padding: 50px;
|
--main-top-padding: 50px;
|
||||||
@ -159,3 +157,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
|
|||||||
--pre-background-color: #272822;
|
--pre-background-color: #272822;
|
||||||
@import "partials/highlight/dark.scss";
|
@import "partials/highlight/dark.scss";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--menu-icon-separation: 40px;
|
||||||
|
--container-padding: 15px;
|
||||||
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<header class="site-info">
|
<header>
|
||||||
{{ with .Site.Params.sidebar.avatar }}
|
{{ with .Site.Params.sidebar.avatar }}
|
||||||
{{ if (default true .enabled) }}
|
{{ if (default true .enabled) }}
|
||||||
<figure class="site-avatar">
|
<figure class="site-avatar">
|
||||||
@ -31,8 +31,10 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="site-meta">
|
||||||
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
|
<h1 class="site-name"><a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Title }}</a></h1>
|
||||||
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
<h2 class="site-description">{{ .Site.Params.sidebar.subtitle }}</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{- with .Site.Menus.social -}}
|
{{- with .Site.Menus.social -}}
|
||||||
<ol class="social-menu">
|
<ol class="social-menu">
|
||||||
|
Loading…
Reference in New Issue
Block a user