Plume/static/css/_forms.scss
Baptiste Gelez bdfad844d7
Edit blogs, and add blog icons and banners (#460)
Also adds a parameter to `md_to_html` to only render inline elements (so that we don't have titles or images in blog descriptions). And moves the delete button for the blog on the edition page.

I still have to update the SQLite migration once others PRs with migrations will be merged.

Also, there will be a problem when you edit a blog while not owning its banner or icon: when validating they will be reset to their default values… I don't see a good solution to this until we have a better way to handle uploads with Rocket (the same is probably happening for articles btw).

And the icon/banner are not federated yet, I don't know if I should add it to this PR or if it can come after?

![image](https://user-images.githubusercontent.com/16254623/53894510-7d853300-4030-11e9-8a2c-f5c0b0c7f512.png)
![image](https://user-images.githubusercontent.com/16254623/53894539-8b3ab880-4030-11e9-8113-685a27be8d7c.png)

Fixes #453
Fixes #454
2019-03-22 19:51:36 +01:00

135 lines
No EOL
2.3 KiB
SCSS

label {
display: block;
margin: 2em auto .5em;
font-size: 1.2em;
}
input, textarea, select {
transition: all 0.1s ease-in;
display: block;
width: 100%;
margin: auto;
padding: 1em;
box-sizing: border-box;
background: $form-input-background;
color: $black;
border: none;
border: solid $lightgray thin;
font-size: 1.2em;
font-weight: 400;
&:focus {
border-color: $purple;
}
}
form input[type="submit"] { margin: 2em auto; }
textarea {
resize: vertical;
font-family: $lora;
font-size: 1.1em;
line-height: 1.5;
}
input[type="checkbox"] {
display: inline;
margin: initial;
min-width: initial;
width: initial;
}
/** Inline forms (containing only CSRF token and a <submit>, for protected links) **/
form.inline {
display: inline;
margin: 0px;
padding: 0px;
width: auto;
input[type="submit"] {
display: inline-block;
color: $purple;
cursor: pointer;
font-size: 1em;
width: auto;
-webkit-appearance: none;
&:not(.button) {
margin: 0;
padding: 0;
border: none;
background: transparent;
color: $purple;
}
}
}
.button, input[type="submit"], button {
transition: all 0.1s ease-in;
display: inline-block;
-webkit-appearance: none;
border-radius: 0.5em;
margin: 0.5em auto;
padding: 0.75em 1em;
background: transparent;
color: $purple;
border: 1px solid $purple;
cursor: pointer;
&:hover {
background: transparentize($purple, 0.6);
color: white;
}
&.destructive {
color: $red;
border-color: $red;
&:hover {
background: transparentize($red, 0.6);
color: $white;
}
}
}
input[type="submit"] { display: block; }
// Writing page
form.new-post {
max-width: 60em;
.title {
margin: 0 auto;
padding: 0.75em 0;
background: none;
border: none;
font-family: $playfair;
font-size: 2em;
text-align: left;
}
textarea {
min-height: 20em;
overflow-y: hidden;
resize: none;
}
input[type="submit"] {
background: $lightgray;
color: $black;
border: none;
-webkit-appearance: none;
font-family: $playfair;
font-size: 1.5em;
}
input[type="submit"]:hover { background: $lightgray; }
-webkit-appearance: none;
}
.button + .button {
margin-left: 1em;
}