summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReorx <novoreorx@gmail.com>2022-04-21 23:26:08 +0800
committerReorx <novoreorx@gmail.com>2022-04-21 23:26:08 +0800
commit8c47961c418f874d0fa2bda7065651e277809f41 (patch)
treed5a661740fe066b39044c0db8e52ab518e950f02
parentff711a0be216dddacb039bc58f492c42480484ae (diff)
enhance responsive style
-rw-r--r--assets/css/common/post-entry.css8
-rw-r--r--assets/css/common/post-single.css15
-rw-r--r--data/svg.toml2
-rw-r--r--layouts/shortcodes/video.html2
4 files changed, 24 insertions, 3 deletions
diff --git a/assets/css/common/post-entry.css b/assets/css/common/post-entry.css
index 17f8712..b23805f 100644
--- a/assets/css/common/post-entry.css
+++ b/assets/css/common/post-entry.css
@@ -8,14 +8,18 @@
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
- -webkit-line-clamp: 3;
- margin: 1.5em 0;
+ margin: var(--gap) 0 calc(var(--gap) * 2);
}
.first-entry .entry-header h1 {
font-size: 34px;
line-height: 1.3;
}
+@media screen and (max-width: 400px) {
+ .first-entry .entry-header h1 {
+ font-size: 30px;
+ }
+}
.first-entry .entry-content {
margin: 14px 0;
diff --git a/assets/css/common/post-single.css b/assets/css/common/post-single.css
index d91e872..e5f85d5 100644
--- a/assets/css/common/post-single.css
+++ b/assets/css/common/post-single.css
@@ -84,6 +84,7 @@
font-weight: 500;
color: var(--primary);
box-shadow: var(--link-underline-shadow);
+ transition: var(--link-transition);
}
.post-content a:hover {
color: var(--link-hover-color);
@@ -288,6 +289,10 @@ h6:hover .anchor {
margin: 1rem auto;
}
+.post-content video {
+ width: 100%;
+}
+
.post-content figure.align-center {
text-align: center;
}
@@ -485,3 +490,13 @@ h6:hover .anchor {
[dir="rtl"] .paginav .next {
text-align: left;
}
+
+.full-width {
+ left: 50%;
+ margin-left: -50vw;
+ margin-right: -50vw;
+ max-width: 100vw;
+ position: relative;
+ right: 50%;
+ width: 100vw;
+ }
diff --git a/data/svg.toml b/data/svg.toml
index 4eb4c51..f3ffabe 100644
--- a/data/svg.toml
+++ b/data/svg.toml
@@ -244,7 +244,7 @@ gitlab = '''
</svg>
'''
gmail = '''
-<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Gmail</title><path d="M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"/></svg>
+<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>Gmail</title><path d="M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z"/></svg>
'''
goodreads = '''
<svg xmlns="http://www.w3.org/2000/svg" role="img" fill="currentColor" viewBox="0 0 24 24">
diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html
index 9bb2cbb..0132bb2 100644
--- a/layouts/shortcodes/video.html
+++ b/layouts/shortcodes/video.html
@@ -1,5 +1,7 @@
+<figure>
<video class="video-shortcode" preload="{{ .Get "preload" }}" controls>
<source src="{{ .Get "src" }}" type="{{ .Get "type" }}">
There should have been a video here but your browser does not seem
to support it.
</video>
+</figure>