Fix certain improper rendering of forms (#560)

This commit is contained in:
Marek Ľach 2019-05-06 20:18:53 +02:00 committed by Baptiste Gelez
parent c52aac012c
commit 33619abdfb
7 changed files with 28 additions and 13 deletions

View File

@ -312,6 +312,7 @@ main .article-meta {
.popup:not(.show), .popup-bg:not(.show) { .popup:not(.show), .popup-bg:not(.show) {
display: none; display: none;
appearance: none;
} }
.popup-bg { .popup-bg {
@ -332,6 +333,7 @@ main .article-meta {
.cw-text { .cw-text {
display: none; display: none;
appearance: none;
} }
input[type="checkbox"].cw-checkbox { input[type="checkbox"].cw-checkbox {

View File

@ -10,6 +10,7 @@ input, textarea, select {
margin: auto; margin: auto;
padding: 1em; padding: 1em;
box-sizing: border-box; box-sizing: border-box;
-webkit-appearance: textarea;
background: $form-input-background; background: $form-input-background;
color: $black; color: $black;
@ -23,7 +24,10 @@ input, textarea, select {
border-color: $purple; border-color: $purple;
} }
} }
form input[type="submit"] { margin: 2em auto; } form input[type="submit"] {
margin: 2em auto;
-webkit-appearance: none;
}
textarea { textarea {
resize: vertical; resize: vertical;
@ -38,6 +42,7 @@ input[type="checkbox"] {
margin: initial; margin: initial;
min-width: initial; min-width: initial;
width: initial; width: initial;
-webkit-appearance: checkbox;
} }
/** Inline forms (containing only CSRF token and a <submit>, for protected links) **/ /** Inline forms (containing only CSRF token and a <submit>, for protected links) **/
@ -96,7 +101,10 @@ form.inline {
} }
} }
} }
input[type="submit"] { display: block; } input[type="submit"] {
display: block;
-webkit-appearance: none;
}
// Writing page // Writing page
form.new-post { form.new-post {
@ -116,6 +124,7 @@ form.new-post {
min-height: 20em; min-height: 20em;
overflow-y: hidden; overflow-y: hidden;
resize: none; resize: none;
-webkit-appearance: textarea;
} }
input[type="submit"] { input[type="submit"] {
background: $lightgray; background: $lightgray;
@ -126,7 +135,8 @@ form.new-post {
font-family: $playfair; font-family: $playfair;
font-size: 1.5em; font-size: 1.5em;
} }
input[type="submit"]:hover { background: $lightgray; } input[type="submit"]:hover {
background: $lightgray;}
-webkit-appearance: none; -webkit-appearance: none;
} }

View File

@ -54,6 +54,7 @@ small {
.hidden { .hidden {
display: none; display: none;
appearance: none;
} }
/// Main /// Main

View File

@ -10,6 +10,7 @@ header {
nav#menu { nav#menu {
position: relative; position: relative;
display: none; display: none;
appearance: none;
transform: skewX(-15deg); transform: skewX(-15deg);
left: -1em; left: -1em;
padding: 1em 1em 1em 2em; padding: 1em 1em 1em 2em;

View File

@ -41,6 +41,7 @@ html {
#content { #content {
display: none; display: none;
appearance: none;
text-align: center; text-align: center;
} }
} }

View File

@ -6,7 +6,7 @@
@:base(ctx, i18n!(ctx.1, "Search"), {}, {}, { @:base(ctx, i18n!(ctx.1, "Search"), {}, {}, {
<h1>@i18n!(ctx.1, "Search")</h1> <h1>@i18n!(ctx.1, "Search")</h1>
<form method="get" id="form"> <form method="get" id="form">
<input id="q" name="q" placeholder="@i18n!(ctx.1, "Your query")" type="search"> <input id="q" name="q" placeholder="@i18n!(ctx.1, "Your query")" type="search" style="-webkit-appearance: none;">
<details> <details>
<summary>@i18n!(ctx.1, "Advanced search")</summary> <summary>@i18n!(ctx.1, "Advanced search")</summary>
@input!(ctx.1, title (text), "Article title matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Title"))) @input!(ctx.1, title (text), "Article title matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Title")))
@ -17,7 +17,7 @@
@input!(ctx.1, tag (text), "Containing these tags", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Tags"))) @input!(ctx.1, tag (text), "Containing these tags", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Tags")))
@input!(ctx.1, instance (text), "Posted on one of these instances", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Instance domain"))) @input!(ctx.1, instance (text), "Posted on one of these instances", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Instance domain")))
@input!(ctx.1, author (text), "Posted by one of these authors", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Authors"))) @input!(ctx.1, author (text), "Posted by one of these authors", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Author(s)")))
@input!(ctx.1, blog (text), "Posted on one of these blogs", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Blog title"))) @input!(ctx.1, blog (text), "Posted on one of these blogs", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Blog title")))
@input!(ctx.1, lang (text), "Written in this language", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Language"))) @input!(ctx.1, lang (text), "Written in this language", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Language")))
@input!(ctx.1, license (text), "Published under this license", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Article license"))) @input!(ctx.1, license (text), "Published under this license", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Article license")))

View File

@ -4,14 +4,14 @@
@(ctx: BaseContext, query_str: &str, articles: Vec<Post>, page: i32, n_pages: i32) @(ctx: BaseContext, query_str: &str, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "Search result for \"{0}\""; query_str), {}, {}, { @:base(ctx, i18n!(ctx.1, "Search result(s) for \"{0}\""; query_str), {}, {}, {
<h1>@i18n!(ctx.1, "Search result")</h1> <h1>@i18n!(ctx.1, "Search result(s)")</h1>
<p>@query_str</p> <p>@query_str</p>
@if articles.is_empty() { @if articles.is_empty() {
<section> <section>
@if page == 1 { @if page == 1 {
<h2>@i18n!(ctx.1, "No result for your query")</h2> <h2>@i18n!(ctx.1, "No results for your query")</h2>
} else { } else {
<h2>@i18n!(ctx.1, "No more results for your query")</h2> <h2>@i18n!(ctx.1, "No more results for your query")</h2>
} }