From 879fab29eb98d9b299d77f05184fd10524c4fbbb Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Sat, 18 Nov 2023 19:54:41 +0800 Subject: [PATCH] add: disable select for some component. --- assets/css/dark.css | 6 +++++- assets/css/light.css | 4 ++++ assets/css/main.css | 19 +++++++++++++++++-- layouts/partials/footer.html | 2 +- layouts/partials/header.html | 4 ++-- layouts/partials/pagination.html | 2 +- layouts/partials/post-info.html | 2 +- 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/assets/css/dark.css b/assets/css/dark.css index 1865e78..ecb7024 100644 --- a/assets/css/dark.css +++ b/assets/css/dark.css @@ -21,13 +21,17 @@ --bq-color: #ccc; --hr-color: #333; ---pagination-bg-color: #373737; +--pagination-bg-color: #2e2e33; --pagination-link-color: #b6b6b6; +--pagination-border-color: #333333; +--pagination-border-radius: 5px; --post-info-color: grey; --switcher-color: #333; --switcher-bg-color: #fff; +--switcher-border-color: #333333 +--switcher-border-radius: 5px; --svg-color: #ccc; --svg-state-color:#ff5858; diff --git a/assets/css/light.css b/assets/css/light.css index c68c282..df05b45 100644 --- a/assets/css/light.css +++ b/assets/css/light.css @@ -25,11 +25,15 @@ --pagination-bg-color: #fafafa; --pagination-link-color: #696969; + --pagination-border-color: #eeeeee; + --pagination-border-radius: 5px; --post-info-color: grey; --switcher-color: #fff; --switcher-bg-color: #333; + --switcher-border-color: #eeeeee; + --switcher-border-radius: 5px; --svg-color: #333; --svg-state-color: #a31d1d; diff --git a/assets/css/main.css b/assets/css/main.css index 1ede1a3..307d07a 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -650,8 +650,10 @@ code.has-jax { } .pagination-item { + border: 1px solid var(--pagination-border-color); + border-radius: var(--pagination-border-radius); background: var(--pagination-bg-color); - padding: 0.75em 0.75em; + padding: 0.25em 0.75em; } .pagination-item a { @@ -709,7 +711,8 @@ ul.language-select > li, ul.footer-menu > li { background: var(--switcher-bg-color); padding: 0.5em 1em; font-size: 16px; - border: none; + border: 1px solid var(--switcher-border-color); + border-radius: var(--switcher-border-radius); margin-bottom: 1em; } @@ -760,6 +763,18 @@ ul.language-select > li, ul.footer-menu > li { margin: 8px; } +/* Others */ +.noselect { + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Safari */ + -khtml-user-select: none; /* Konqueror HTML */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ + user-select: none; /* Non-prefixed version, currently + supported by Chrome and Opera */ +} + + /* Media Queries */ @media (max-width: 840px) { diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 46dea49..c303eb5 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,4 +1,4 @@ -