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
9ccd4e3f
Commit
9ccd4e3f
authored
8 months ago
by
Thomas Schneider
Browse files
Options
Downloads
Plain Diff
Merge branch 'layout-index' into 'main'
apply layout of "template preview" for index page "schilder preview" Closes
#1
See merge request
!6
parents
9a6b64bd
6c951e16
No related branches found
No related tags found
1 merge request
!6
apply layout of "template preview" for index page "schilder preview"
Pipeline
#6394
passed
8 months ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/src/main.less
+17
-3
17 additions, 3 deletions
frontend/src/main.less
frontend/src/main.ts
+16
-13
16 additions, 13 deletions
frontend/src/main.ts
schilder2000/templates/index.html.j2
+11
-12
11 additions, 12 deletions
schilder2000/templates/index.html.j2
with
44 additions
and
28 deletions
frontend/src/main.less
+
17
−
3
View file @
9ccd4e3f
...
@@ -87,9 +87,11 @@ a {
...
@@ -87,9 +87,11 @@ a {
}
}
&:hover {
&:hover {
text-decoration: underline;
text-decoration: underline;
&, label {
cursor: pointer;
cursor: pointer;
}
}
}
}
}
nav {
nav {
&, #nav-links {
&, #nav-links {
...
@@ -289,15 +291,19 @@ main {
...
@@ -289,15 +291,19 @@ main {
}
}
}
}
&:hover .option-border {
border-color: var(--accent2);
}
input[type = "radio"] {
input[type = "radio"] {
display: none;
display: none;
&:checked + .option-border {
&:checked + .option-border {
border-color: var(--accent
2
);
border-color: var(--accent);
}
}
}
}
label {
.preview-
label {
flex-grow: 1;
flex-grow: 1;
// firefox hat hier lack gesoffen und erfindet 5px wenn das hier block oder
// firefox hat hier lack gesoffen und erfindet 5px wenn das hier block oder
// inline ist
// inline ist
...
@@ -305,6 +311,14 @@ main {
...
@@ -305,6 +311,14 @@ main {
}
}
}
}
a.option:hover {
text-decoration: none;
.option-border {
border-color: var(--accent2);
}
}
input[type = "radio"] {
input[type = "radio"] {
display: none;
display: none;
}
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/main.ts
+
16
−
13
View file @
9ccd4e3f
...
@@ -11,29 +11,32 @@ function onInputHandler(event: Event) {
...
@@ -11,29 +11,32 @@ function onInputHandler(event: Event) {
window
.
addEventListener
(
"
load
"
,
()
=>
{
window
.
addEventListener
(
"
load
"
,
()
=>
{
if
(
document
.
getElementById
(
'
preview
'
))
{
if
(
document
.
getElementById
(
'
preview
'
))
{
for
(
const
el
of
document
.
getElementsByClassName
(
'
input-dispatch
'
))
{
for
(
const
el
of
document
.
getElementsByClassName
(
'
input-dispatch
'
))
{
console
.
lo
g
(
el
);
console
.
debu
g
(
el
);
el
.
addEventListener
(
'
input
'
,
onInputHandler
);
el
.
addEventListener
(
'
input
'
,
onInputHandler
);
}
}
}
for
(
const
op
of
document
.
querySelectorAll
(
'
.option .preview
'
))
{
for
(
const
op
of
document
.
querySelectorAll
(
'
.option .preview
'
))
{
console
.
lo
g
(
op
);
console
.
debu
g
(
op
);
const
input_id
=
(
op
as
HTMLElement
).
dataset
.
for
;
const
input_id
=
(
op
as
HTMLElement
).
dataset
.
for
;
if
(
!
input_id
)
{
let
handler
:
(
_
:
Event
)
=>
void
;
console
.
error
(
"
Missing data-for attribute for
"
,
op
);
if
(
input_id
)
{
continue
;
}
const
input
=
document
.
getElementById
(
input_id
);
const
input
=
document
.
getElementById
(
input_id
);
if
(
!
input
||
input
===
null
)
{
if
(
!
input
||
input
===
null
)
{
console
.
error
(
"
Unable to find input for
"
,
op
);
console
.
error
(
"
Unable to find input for
"
,
op
);
continue
;
continue
;
}
}
const
handler
=
(
_
:
Event
)
=>
{
handler
=
(
_
:
Event
)
=>
{
console
.
log
(
"
clicked
"
);
(
input
as
HTMLInputElement
).
checked
=
true
;
(
input
as
HTMLInputElement
).
checked
=
true
;
};
}
}
else
{
const
p
=
(
op
as
HTMLElement
).
parentNode
;
handler
=
(
_
:
Event
)
=>
{
window
.
location
.
href
=
(
p
as
HTMLAnchorElement
).
href
;
}
}
op
.
addEventListener
(
'
click
'
,
handler
);
op
.
addEventListener
(
'
click
'
,
handler
);
(
op
as
HTMLIFrameElement
).
contentDocument
?.
addEventListener
(
'
click
'
,
handler
);
(
op
as
HTMLIFrameElement
).
contentDocument
?.
addEventListener
(
'
click
'
,
handler
);
}
}
}
});
});
This diff is collapsed.
Click to expand it.
schilder2000/templates/index.html.j2
+
11
−
12
View file @
9ccd4e3f
...
@@ -6,19 +6,18 @@
...
@@ -6,19 +6,18 @@
{% block main %}
{% block main %}
<h2>Existierende Schilder:</h2>
<h2>Existierende Schilder:</h2>
<div class="sign-grid">
{#- wir klauen uns hier an der Stelle einfach mal das Layout vom schild templateselect #}
<div class="select templateselect">
{%- for schild in schilder %}
{%- for schild in schilder %}
<a class="sign" href="{{ url_for('.schild', ident=schild.ident) }}">
<a class="sign option" href="{{ url_for('.schild', ident=schild.ident) }}">
<div>
<iframe
<iframe
class="preview
preview-small
"
class="preview
option-border
"
src="{{ url_for('instance.schild_html', ident=schild.ident) }}"
src="{{ url_for('instance.schild_html', ident=schild.ident) }}"
id="preview:{{ schild.ident }}">
id="preview:{{ schild.ident }}">
</iframe>
</iframe>
<label for="preview:{{ schild.ident }}" class="preview-label">
<label for="preview:{{ schild.ident }}" class="preview-label">
{{ schild.title }}
{{ schild.title }}
</label>
</label>
</div>
</a>
</a>
{%- endfor %}
{%- endfor %}
</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