Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
schilder2000
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schilder
schilder2000
Commits
c3656e32
Commit
c3656e32
authored
11 months ago
by
Dominic Meiser
Committed by
Thomas Schneider
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Unify the .select/.option stuff
parent
37c69191
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!3
A bunch of design stuff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/main.less
+50
-46
50 additions, 46 deletions
frontend/src/main.less
schilder2000/templates/schild.html.j2
+4
-4
4 additions, 4 deletions
schilder2000/templates/schild.html.j2
with
54 additions
and
50 deletions
frontend/src/main.less
+
50
−
46
View file @
c3656e32
// the threshold at which we consider the screen "mobile"
// the threshold at which we consider the screen "mobile"
@mobile_threshold: 700px;
@mobile_threshold: 700px;
// the border around the
preview (per color)
// the border around the
options in the fieldset-select-like things
@
preview
_border: .3rem;
@
option
_border: .3rem;
// the minimum size of the left area in the form layout
// the minimum size of the left area in the form layout
@label-width: 90px;
@label-width: 90px;
...
@@ -17,6 +17,7 @@ body {
...
@@ -17,6 +17,7 @@ body {
// adjust colors for light theme here
// adjust colors for light theme here
--bg: #fff;
--bg: #fff;
--fg: #000;
--fg: #000;
--fg-dark: #bbb;
--accent: #80f;
--accent: #80f;
--accent2: #c4f;
--accent2: #c4f;
...
@@ -24,6 +25,7 @@ body {
...
@@ -24,6 +25,7 @@ body {
// adjust colors for dark theme here
// adjust colors for dark theme here
--bg: #222;
--bg: #222;
--fg: #fff;
--fg: #fff;
--fg-dark: #888;
}
}
}
}
...
@@ -40,7 +42,7 @@ body, @{inputs}, @{buttons} {
...
@@ -40,7 +42,7 @@ body, @{inputs}, @{buttons} {
}
}
@{inputs}, @{buttons}, fieldset {
@{inputs}, @{buttons}, fieldset {
border: .15rem solid var(--fg);
border: .15rem solid var(--fg
-dark
);
border-radius: .25rem;
border-radius: .25rem;
}
}
...
@@ -163,13 +165,6 @@ main {
...
@@ -163,13 +165,6 @@ main {
width: min(95vw, 100rem);
width: min(95vw, 100rem);
/* A4 aspect ratio: √2:1 */
/* A4 aspect ratio: √2:1 */
aspect-ratio: 1.4142135623730951;
aspect-ratio: 1.4142135623730951;
border: @preview_border solid var(--bg);
padding: @preview_border;
&.preview-small {
width: 15rem;
}
}
}
.preview-label {
.preview-label {
...
@@ -180,11 +175,12 @@ main {
...
@@ -180,11 +175,12 @@ main {
.box {
.box {
display: grid;
display: grid;
grid-template-columns: min(@label-width, auto) 1fr;
grid-template-columns: min(@label-width, auto) 1fr;
align-items:
start
;
align-items:
baseline
;
label.for-text {
label.for-text {
display: inline-block;
display: inline-block;
justify-self: end;
justify-self: end;
font-size: 1.1rem;
}
}
input[type = "text"], textarea {
input[type = "text"], textarea {
...
@@ -208,51 +204,59 @@ main {
...
@@ -208,51 +204,59 @@ main {
gap: 1ch;
gap: 1ch;
}
}
fieldset {
// these are the fieldsets containing select-like options modeled with radio buttons
.select {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
gap: 2 * @preview_border;
gap: 2 * @option_border;
}
fieldset > div
{
.option
{
display: flex;
display: flex;
gap: 0.5rem;
flex-direction: column;
flex-direction: column;
gap: .5rem;
.preview {
width: 15rem;
}
}
.imageselect > div
{
img
{
width: 10rem;
width: 10rem;
display: flex;
background-color: #fff;
gap: 0.5rem;
}
}
fieldset label
{
.option-border
{
flex-grow: 1
;
border: @option_border solid var(--fg-dark)
;
}
border-radius: 3 * @option_border;
.imageselect img {
// iframe's behave nicely
width: 100%;
&.preview {
background-color: #fff
;
padding: @option_border
;
}
}
fieldset input {
// label>img doesn't
display: none;
& > img {
border: @option_border solid var(--bg);
border-radius: 2 * @option_border;
}
}
fieldset img,
fieldset iframe,
.preview-small {
border-color: var(--fg);
border-radius: 3 * @preview_border;
}
}
input[type = "radio"] {
input[type = "radio"] {
&:checked + label > img,
display: none;
&:checked + iframe {
&:checked + .option-border {
border-color: var(--accent2);
border-color: var(--accent2);
}
}
}
&:not(:checked) + iframe {
label {
opacity: .8;
flex-grow: 1;
// firefox hat hier lack gesoffen und erfindet 5px wenn das hier block oder
// inline ist
display: flex;
}
}
input[type = "radio"] {
display: none;
}
}
}
}
This diff is collapsed.
Click to expand it.
schilder2000/templates/schild.html.j2
+
4
−
4
View file @
c3656e32
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
<fieldset class="select templateselect">
<fieldset class="select templateselect">
<legend>Vorlage</legend>
<legend>Vorlage</legend>
{%- for t in form.template.choices -%}
{%- for t in form.template.choices -%}
<div>
<div
class="option"
>
<input
<input
type="radio"
type="radio"
name="template"
name="template"
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
{%- endif -%}
{%- endif -%}
/>
/>
<iframe
<iframe
class="preview
preview-small
"
class="preview
option-border
"
src="{{ url_for('instance.sample_html', template=t.name) }}"
src="{{ url_for('instance.sample_html', template=t.name) }}"
id="template-preview:{{ t.name }}"
id="template-preview:{{ t.name }}"
>
>
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
<fieldset class="select imageselect">
<fieldset class="select imageselect">
<legend>Bild</legend>
<legend>Bild</legend>
{%- for img in form.image.choices -%}
{%- for img in form.image.choices -%}
<div>
<div
class="option"
>
<input
<input
type="radio"
type="radio"
name="image"
name="image"
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
checked
checked
{%- endif -%}
{%- endif -%}
/>
/>
<label for="img:{{ img }}">
<label for="img:{{ img }}"
class="option-border"
>
<img src="{{ url_for('instance.static', filename='img/'+img) }}" title="{{ img }}" />
<img src="{{ url_for('instance.static', filename='img/'+img) }}" title="{{ img }}" />
</label>
</label>
</div>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment