Fix link-grid overflow & darkmode note color

* See: https://github.com/next-theme/hexo-theme-next/issues/30
This commit is contained in:
Mimi 2020-06-16 14:14:24 +08:00
parent b9968b6be0
commit 44ba30e367
2 changed files with 17 additions and 16 deletions

View File

@ -2,7 +2,8 @@
display: grid;
gap: 1.5rem 1.5rem;
grid-template-columns: 1fr 1fr;
padding: 1.5rem;
margin-bottom: 20px;
padding: 1rem;
+mobile() {
grid-template-columns: 1fr;
@ -10,19 +11,21 @@
.link-grid-container {
border: solid $grey-lighter;
box-shadow: 1rem 1rem .5rem gray;
height: 5rem;
box-shadow: 1rem 1rem .5rem rgba(0, 0, 0, .5);
min-height: 5rem;
// Fix issue #30
min-width: 0;
padding: .5rem;
position: relative;
transition: background .3s;
&:hover {
animation: shake .5s;
background: rgba(230, 244, 250, .5);
background: var(--card-bg-color);
}
&:active {
box-shadow: .5rem .5rem .25rem gray;
box-shadow: .5rem .5rem .25rem rgba(0, 0, 0, .5);
transform: translate(.2rem, .2rem);
}

View File

@ -24,14 +24,8 @@
}
h2, h3, h4, h5, h6 {
if ($note-icons) {
margin-top: 3px;
} else {
margin-top: 0;
}
border-bottom: initial;
margin-bottom: 0;
margin: 0;
padding-top: 0;
}
@ -54,7 +48,6 @@
left: .3em;
position: absolute;
top: calc(50% - 1em);
font-family-icons();
}
}
}
@ -63,6 +56,11 @@
&.{$type} {
if ($note-style == 'flat') {
background: lookup('$note-bg-' + $type);
if (hexo-config('darkmode')) {
@media (prefers-color-scheme: dark) {
background: mix(lookup('$note-bg-' + $type), $body-bg-color-dark, 10%);
}
}
}
if ($note-style == 'modern') {
@ -72,11 +70,11 @@
a, span.exturl {
&:not(.btn) {
border-bottom: 1px solid lookup('$note-modern-text-' + $type);
border-bottom-color: lookup('$note-modern-text-' + $type);
color: lookup('$note-modern-text-' + $type);
&:hover {
border-bottom: 1px solid lookup('$note-modern-hover-' + $type);
border-bottom-color: lookup('$note-modern-hover-' + $type);
color: lookup('$note-modern-hover-' + $type);
}
}
@ -93,7 +91,7 @@
if ($note-icons) {
&:not(.no-icon)::before {
content: lookup('$note-icon-' + $type);
font-family-icons(lookup('$note-icon-' + $type));
if ($note-style != 'modern') {
color: lookup('$note-text-' + $type);