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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schilder
schilder2000
Commits
47014e76
Commit
47014e76
authored
9 months ago
by
Dominic Meiser
Committed by
Thomas Schneider
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Place the preview on the side for wide screens
parent
7aaaaa3f
No related branches found
No related tags found
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
+22
-0
22 additions, 0 deletions
frontend/src/main.less
schilder2000/templates/schild.html.j2
+99
-96
99 additions, 96 deletions
schilder2000/templates/schild.html.j2
with
121 additions
and
96 deletions
frontend/src/main.less
+
22
−
0
View file @
47014e76
// the threshold at which we consider the screen "mobile"
@mobile_threshold: 700px;
// the threshold at which we consider the screen "wide", i.e. display the preview on the
// side instead of at the bottom
@wide_threshold: 1700px;
// the border around the options in the fieldset-select-like things
@option_border: .3rem;
// the minimum size of the left area in the form layout
...
...
@@ -161,6 +164,25 @@ main {
}
}
.section-container {
display: grid;
grid-gap: 1rem;
grid-template-columns: 1fr;
.section {
grid-column-start: 1;
}
@media screen and (min-width: @wide_threshold) {
grid-template-columns: 1fr 1fr;
.preview-section {
grid-column-start: 2;
grid-row: 1/span 3;
}
}
}
.preview {
/* A4 aspect ratio: √2:1 */
aspect-ratio: 1.4142135623730951;
...
...
This diff is collapsed.
Click to expand it.
schilder2000/templates/schild.html.j2
+
99
−
96
View file @
47014e76
...
...
@@ -28,7 +28,8 @@
{%- endblock title %}
{% block main -%}
<section>
<div class="section-container">
<div class="section">
{%- with messages = get_flashed_messages() -%}
{%- if messages -%}
<ul class="flashes">
...
...
@@ -38,9 +39,9 @@
</ul>
{%- endif -%}
{%- endwith -%}
</
section
>
</
div
>
<section>
<
div class="
section
"
>
<form method="post" action="">
{{ form.csrf_token }}
...
...
@@ -107,10 +108,11 @@
{%- endif -%}
</div>
</form>
</
section
>
</
div
>
{%- if schild %}
<section><form method="post" action="{{ url_for('.print', ident=schild.ident) }}">
<div class="section">
<form method="post" action="{{ url_for('.print', ident=schild.ident) }}">
{%- for field in printform -%}
{{ render_field(field) }}
{%- endfor -%}
...
...
@@ -121,10 +123,10 @@
</a>
<input type="submit" value="Drucken" />
</div>
</form>
</section>
</form>
</div>
<div>
<div
class="section preview-section"
>
<h2>Vorschau</h2>
<div class="preview-container" id="preview-container">
<iframe
...
...
@@ -135,4 +137,5 @@
</div>
</div>
{% endif %}
</div>
{% endblock main %}
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