Merge branch 'master' into template-search

This commit is contained in:
Jimmy Cai 2020-10-04 16:05:02 +02:00
commit b027cbf5aa
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18
9 changed files with 42 additions and 34 deletions

View File

@ -54,7 +54,7 @@
} }
@media (min-width: $on-desktop) { @media (min-width: $on-desktop) {
max-width: 1200px; max-width: 1050px;
.left-sidebar { .left-sidebar {
width: 20%; width: 20%;

View File

@ -75,10 +75,14 @@
} }
.article-title { .article-title {
font-size: 2.4rem;
font-weight: 600; font-weight: 600;
margin: 10px 0; margin: 10px 0;
color: var(--card-text-color-main); color: var(--card-text-color-main);
font-size: 2.2rem;
@media (min-width: $on-desktop-large) {
font-size: 2.4rem;
}
a { a {
color: var(--card-text-color-main); color: var(--card-text-color-main);
@ -88,14 +92,6 @@
} }
} }
@media (min-width: $on-desktop-large) {
font-size: 2.4rem;
}
@media (max-width: $on-desktop) {
font-size: 2rem;
}
& + .article-subtitle { & + .article-subtitle {
margin-top: 0; margin-top: 0;
} }
@ -103,18 +99,14 @@
.article-subtitle { .article-subtitle {
font-weight: normal; font-weight: normal;
font-size: 1.8rem;
color: var(--card-text-color-secondary); color: var(--card-text-color-secondary);
margin: 5px 0; margin: 5px 0;
line-height: 1.5; line-height: 1.5;
font-size: 1.75rem;
@media (min-width: $on-desktop-large) { @media (min-width: $on-desktop-large) {
font-size: 2rem; font-size: 2rem;
} }
@media (max-width: $on-desktop) {
font-size: 1.6rem;
}
} }
.article-time { .article-time {

View File

@ -126,7 +126,8 @@
list-style: none; list-style: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-top: 25px; margin-top: var(--sidebar-element-separation);
margin-bottom: 0;
overflow-y: auto; overflow-y: auto;
@media (min-width: $on-desktop-large) { @media (min-width: $on-desktop-large) {
@ -179,6 +180,11 @@
height: 25px; height: 25px;
stroke-width: 1.33; stroke-width: 1.33;
margin-right: 40px; margin-right: 40px;
@media (max-width: $on-desktop-large) {
width: 20px;
height: 20px;
}
} }
a { a {
@ -188,7 +194,7 @@
color: var(--body-text-color); color: var(--body-text-color);
font-size: 1.5rem; font-size: 1.5rem;
@media (max-width: $on-desktop) { @media (max-width: $on-desktop-large) {
font-size: 1.4rem; font-size: 1.4rem;
} }
} }

View File

@ -12,6 +12,14 @@
flex-direction: column; flex-direction: column;
flex-shrink: 0; flex-shrink: 0;
--sidebar-avatar-size: 150px;
--sidebar-element-separation: 25px;
@media (max-width: $on-desktop-large) {
--sidebar-avatar-size: 120px;
--sidebar-element-separation: 20px;
}
@media (max-width: $on-phone) { @media (max-width: $on-phone) {
width: 100%; width: 100%;
padding: 30px 0; padding: 30px 0;
@ -49,6 +57,7 @@
.site-info { .site-info {
z-index: 1; z-index: 1;
transition: box-shadow 0.5s ease; transition: box-shadow 0.5s ease;
@media (max-width: $on-phone) { @media (max-width: $on-phone) {
padding: 15px 30px; padding: 15px 30px;
} }
@ -56,14 +65,10 @@
.site-avatar { .site-avatar {
position: relative; position: relative;
margin: 0; margin: 0;
margin-bottom: 25px; width: var(--sidebar-avatar-size);
width: 150px; height: var(--sidebar-avatar-size);
height: 150px;
@media (max-width: $on-desktop-large) { margin-bottom: var(--sidebar-element-separation);
height: 120px;
width: 120px;
}
.site-logo { .site-logo {
width: 100%; width: 100%;

View File

@ -6,9 +6,14 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff;
*/ */
:root { :root {
@media (min-width: $on-phone + 1) { @media (min-width: $on-phone + 1) {
--main-top-padding: 35px;
}
@media (min-width: $on-desktop-large) {
--main-top-padding: 50px; --main-top-padding: 50px;
} }
--body-background: #f5f5fa; --body-background: #f5f5fa;
--accent-color: #34495e; --accent-color: #34495e;

View File

@ -236,10 +236,10 @@ function wrap(gallery: HTMLElement[]) {
*/ */
function loadPhotoSwipe() { function loadPhotoSwipe() {
const tasks = [ const tasks = [
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.js"), loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.js"),
loadScript("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe-ui-default.min.js"), loadScript("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe-ui-default.min.js"),
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/photoswipe.min.css"), loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/photoswipe.min.css"),
loadStyle("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.3/default-skin/default-skin.min.css") loadStyle("https://cdn.jsdelivr.net/npm/photoswipe@4.1.3/dist/default-skin/default-skin.min.css")
]; ];
return Promise.all(tasks); return Promise.all(tasks);

View File

@ -25,7 +25,7 @@ DefaultContentLanguage = "en" # Theme i18n support
math = false math = false
[params.article.license] [params.article.license]
enabled = true enabled = true
default = "Licenced under CC BY-NC-SA 4.0" default = "Licensed under CC BY-NC-SA 4.0"
[params.comments] [params.comments]
enabled = true enabled = true
# Only Disqus is available so far # Only Disqus is available so far

View File

@ -34,7 +34,7 @@
<description> <description>
{{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}} {{- $image := partial "helper/image" (dict "Context" . "Type" "rss") -}}
{{- if $image.exists -}} {{- if $image.exists -}}
{{ "<" | html }}img src="{{ $image.permalink | absURL }}" width="{{ $image.resource.Width }}" height="{{ $image.resource.Height }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}} {{ "<" | html }}img src="{{ $image.permalink | absURL }}" alt="Featured image of post {{ .Title }}" {{ "/>" | html}}
{{- end -}}{{ $content }}</description> {{- end -}}{{ $content }}</description>
</item> </item>
{{ end }} {{ end }}

View File

@ -5,7 +5,7 @@ name = "Stack"
license = "GPL-3.0-only" license = "GPL-3.0-only"
licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE" licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE"
description = "Card-style Hugo theme designed for bloggers" description = "Card-style Hugo theme designed for bloggers"
homepage = "https://blog.jimmycai.com/p/hugo-theme-stack" homepage = "https://theme-stack.jimmycai.com"
tags = [ tags = [
"blog", "blog",
"responsive", "responsive",