[simple theme] selection ui with border

* remove vim arrow
* add 1rem padding to results
* add 0.2rem left border to vim selected article
* set column gap to 1.2rem and make search bar in line with results
* put 10px border-radius selected article
* result article: 0.125rem margin on tablet and esktop; 1rem margin on phone
This commit is contained in:
MrPaulBlack 2021-10-29 18:57:36 +02:00 committed by Alexandre Flament
parent cfea51f40f
commit 9ddcd62464
4 changed files with 24 additions and 21 deletions

View file

@ -209,7 +209,8 @@ html {
@results-offset: 10rem; @results-offset: 10rem;
@results-tablet-offset: 0.5rem; @results-tablet-offset: 0.5rem;
@results-gap: 5rem; @results-gap: 5rem;
@results-margin: 2rem; @results-margin: 0.125rem;
@result-padding: 1rem;
@search-width: 40rem; @search-width: 40rem;
// heigh of #search, see detail.less // heigh of #search, see detail.less
@search-height: 7.5rem; @search-height: 7.5rem;

View file

@ -16,6 +16,12 @@
border-radius: @radius; border-radius: @radius;
} }
.rounded-right-corners (@radius: 0 10px 10px 0) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
// disable user selection // disable user selection
.disable-user-select () { .disable-user-select () {
-webkit-touch-callout: none; -webkit-touch-callout: none;

View file

@ -3,12 +3,12 @@
*/ */
#search { #search {
padding: 1.5em 2em 0 @results-offset - 4rem; padding: 1.5em 2em 0 @results-offset - 3rem;
margin: 0; margin: 0;
background: var(--color-header-background); background: var(--color-header-background);
border-bottom: 1px solid var(--color-header-border); border-bottom: 1px solid var(--color-header-border);
display: grid; display: grid;
column-gap: 1rem; column-gap: 1.2rem;
row-gap: 1rem; row-gap: 1rem;
grid-template-columns: 3rem 1fr; grid-template-columns: 3rem 1fr;
grid-template-areas: grid-template-areas:

View file

@ -126,33 +126,24 @@ a {
article[data-vim-selected] { article[data-vim-selected] {
background: var(--color-result-vim-selected); background: var(--color-result-vim-selected);
} border-left: 0.2rem solid var(--color-result-vim-arrow);
.rounded-right-corners;
article[data-vim-selected]::before {
position: absolute;
left: (@results-offset - 2rem);
padding: 2px;
content: ">";
font-weight: bold;
color: var(--color-result-vim-arrow);
} }
article.result-images[data-vim-selected] { article.result-images[data-vim-selected] {
background: var(--color-result-vim-arrow); background: var(--color-result-vim-arrow);
border: none;
.rounded-corners;
.image_thumbnail { .image_thumbnail {
filter: opacity(60%); filter: opacity(60%);
} }
} }
article.result-images[data-vim-selected]::before {
display: none;
content: "";
}
.result { .result {
margin: @results-margin 0; margin: @results-margin 0;
padding: 0; padding: @result-padding;
border-left: 0.2rem solid transparent;
h3 { h3 {
font-size: 1.1em; font-size: 1.1em;
@ -284,6 +275,7 @@ article.result-images[data-vim-selected]::before {
padding: 0; padding: 0;
position: relative; position: relative;
max-height: 200px; max-height: 200px;
border: none;
img { img {
float: inherit; float: inherit;
@ -464,7 +456,7 @@ article.result-images[data-vim-selected]::before {
.infobox { .infobox {
margin: 10px 0 10px; margin: 10px 0 10px;
border: 1px solid var(--color-sidebar-border); border: 1px solid var(--color-sidebar-border);
padding: 0.9em; padding: 1rem;
font-size: 0.9em; font-size: 0.9em;
.rounded-corners; .rounded-corners;
@ -752,13 +744,17 @@ article.result-images[data-vim-selected]::before {
} }
.result { .result {
padding: 8px 10px 6px 10px; margin: 1rem @results-tablet-offset;
margin: @results-tablet-offset;
border: 1px solid var(--color-result-border); border: 1px solid var(--color-result-border);
box-shadow: 0 0 5px var(--color-result-shadow); box-shadow: 0 0 5px var(--color-result-shadow);
.rounded-corners; .rounded-corners;
} }
article[data-vim-selected] {
border: 1px solid var(--color-result-border);
.rounded-corners;
}
.result-images { .result-images {
margin: 0; margin: 0;
padding: 0; padding: 0;