add: disable select for some component.

This commit is contained in:
Junyi Hou 2023-11-18 19:54:41 +08:00
parent c9e7a81509
commit 879fab29eb
7 changed files with 31 additions and 8 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -1,4 +1,4 @@
<footer class="common-footer">
<footer class="common-footer noselect">
{{ $languagesCount := $.Site.Home.AllTranslations }}
{{ if gt $languagesCount 1 }}
{{ partial "language-switcher.html" . }}

View File

@ -1,9 +1,9 @@
<div class="header-top">
<div class="header-top noselect">
{{ partial "site-title.html" . }}
{{ partial "social.html" . }}
</div>
{{ if .Site.Menus.main }}
<nav>
<nav class="noselect">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>

View File

@ -1,7 +1,7 @@
{{ if or ( .Paginator.HasPrev ) ( .Paginator.HasNext ) }}
{{ $toNewPostsMessage := i18n "toNewPosts" }}
{{ $toOldPostsMessage := i18n "toOldPosts" }}
<div class="pagination">
<div class="pagination noselect">
<div class="left pagination-item {{ if not .Paginator.HasPrev }}disabled{{ end }}">
{{ if .Paginator.HasPrev }}
<a href="{{ .Paginator.Prev.URL }}">{{ $toNewPostsMessage }}</a>

View File

@ -4,7 +4,7 @@
{{ end }}
{{ $machineDateFormat := "2006-01-02" }}
<div class="post-info">
<div class="post-info noselect">
{{ if .Params.date }}
<div class="post-date dt-published">
<a class="u-url" href="{{ .RelPermalink }}"><time datetime="{{ .Params.date.Format $machineDateFormat }}">