Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
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
Martin Mareš
Odevzdávací Systém MO
Commits
a7305965
Commit
a7305965
authored
4 years ago
by
Jiří Setnička
Browse files
Options
Downloads
Patches
Plain Diff
CSS only taby + jejich použití v org_submit_list
parent
95118256
No related branches found
No related tags found
1 merge request
!28
Formulář na vše na stránce řešení
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
mo/web/templates/org_submit_list.html
+20
-6
20 additions, 6 deletions
mo/web/templates/org_submit_list.html
static/mo.css
+61
-0
61 additions, 0 deletions
static/mo.css
with
81 additions
and
6 deletions
mo/web/templates/org_submit_list.html
+
20
−
6
View file @
a7305965
...
@@ -24,8 +24,18 @@
...
@@ -24,8 +24,18 @@
{% if solution %}
{% if solution %}
<h3>
Odevzdaná řešení
</h3>
<div
class=
"tabbed"
>
<input
type=
"radio"
id=
"tab1"
name=
"css-tabs"
checked
>
<input
type=
"radio"
id=
"tab2"
name=
"css-tabs"
>
<input
type=
"radio"
id=
"tab3"
name=
"css-tabs"
>
<ul
class=
"tabs"
>
<li
class=
"tab"
><label
for=
"tab1"
>
Odevzdaná řešení ({{ sol_papers|length }})
</label>
<li
class=
"tab"
><label
for=
"tab2"
>
Opravená řešení ({{ fb_papers|length }})
</label>
<li
class=
"tab"
><label
for=
"tab3"
>
Historie udělených bodů
</label>
</ul>
<div
class=
"tab-content"
>
<p><i>
<p><i>
{% if sol_papers|length > 1 %}
{% if sol_papers|length > 1 %}
Existuje více než jedna verze řešení, finální je podbarvená.
Existuje více než jedna verze řešení, finální je podbarvená.
...
@@ -73,9 +83,9 @@ Existuje více než jedna verze řešení, finální je podbarvená.
...
@@ -73,9 +83,9 @@ Existuje více než jedna verze řešení, finální je podbarvená.
{% else %}
{% else %}
<p>
Žádná.
<p>
Žádná.
{% endif %}
{% endif %}
</div>
<h3>
Opravená řešení
</h3>
<div
class=
"tab-content"
>
<p><i>
<p><i>
{% if fb_papers|length > 1 %}
{% if fb_papers|length > 1 %}
Existuje více než jedna verze oprav, finální je podbarvená.
Existuje více než jedna verze oprav, finální je podbarvená.
...
@@ -124,10 +134,10 @@ Existuje více než jedna verze oprav, finální je podbarvená.
...
@@ -124,10 +134,10 @@ Existuje více než jedna verze oprav, finální je podbarvená.
{% else %}
{% else %}
<p>
Žádná.
<p>
Žádná.
{% endif %}
{% endif %}
</div>
<div
class=
"tab-content"
>
{% if points_history %}
{% if points_history %}
<h3>
Historie udělených bodů
</h3>
<p><i>
Účastník po uzavření kola uvidí jen naposledy zadané body.
</i></p>
<p><i>
Účastník po uzavření kola uvidí jen naposledy zadané body.
</i></p>
<table
class=
data
>
<table
class=
data
>
<thead>
<thead>
...
@@ -144,7 +154,11 @@ Existuje více než jedna verze oprav, finální je podbarvená.
...
@@ -144,7 +154,11 @@ Existuje více než jedna verze oprav, finální je podbarvená.
</tr>
</tr>
{% endfor %}
{% endfor %}
</table>
</table>
{% else %}
<p>
Zatím nebyly uděleny žádné body.
{% endif %}
{% endif %}
</div>
</div>
{% else %}
{% else %}
<p>
Žádné odevzdané řešení. {% if form %}Můžete ho přidat pomocí formuláře níže.{% endif %}
<p>
Žádné odevzdané řešení. {% if form %}Můžete ho přidat pomocí formuláře níže.{% endif %}
...
...
This diff is collapsed.
Click to expand it.
static/mo.css
+
61
−
0
View file @
a7305965
...
@@ -238,3 +238,64 @@ table.data tbody tr.job-failed:hover {
...
@@ -238,3 +238,64 @@ table.data tbody tr.job-failed:hover {
div
.alert
+
div
.alert
{
div
.alert
+
div
.alert
{
margin-top
:
-22px
;
margin-top
:
-22px
;
}
}
/* Tabs - source: https://codepen.io/MPDoctor/pen/mpJdYe */
.tabbed
{
margin
:
15px
0px
;
}
.tabbed
[
type
=
"radio"
]
{
/* hiding the inputs */
display
:
none
;
}
.tabs
{
display
:
flex
;
align-items
:
stretch
;
list-style
:
none
;
padding
:
0
;
margin-bottom
:
0px
;
border-bottom
:
1px
solid
#ddd
;
}
.tab
>
label
{
display
:
block
;
margin-bottom
:
-1px
;
padding
:
12px
15px
;
border
:
1px
solid
#ddd
;
background
:
#eee
;
color
:
#666
;
font-size
:
16px
;
cursor
:
pointer
;
transition
:
all
0.3s
;
}
.tab
:hover
label
{
border-top-color
:
#333
;
color
:
#333
;
}
.tab-content
{
display
:
none
;
margin
:
0px
;
padding
:
10px
;
border
:
1px
solid
#ddd
;
border-top
:
0px
;
}
/* As we cannot replace the numbers with variables or calls to element properties, the number of this selector parts is our tab count limit */
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
1
)
:checked
~
.tabs
.tab
:nth-of-type
(
1
)
label
,
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
2
)
:checked
~
.tabs
.tab
:nth-of-type
(
2
)
label
,
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
3
)
:checked
~
.tabs
.tab
:nth-of-type
(
3
)
label
,
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
4
)
:checked
~
.tabs
.tab
:nth-of-type
(
4
)
label
,
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
5
)
:checked
~
.tabs
.tab
:nth-of-type
(
5
)
label
{
border-bottom-color
:
#fff
;
border-top-color
:
#999
;
background
:
#fff
;
color
:
#222
;
}
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
1
)
:checked
~
.tab-content
:nth-of-type
(
1
),
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
2
)
:checked
~
.tab-content
:nth-of-type
(
2
),
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
3
)
:checked
~
.tab-content
:nth-of-type
(
3
),
.tabbed
[
type
=
"radio"
]
:nth-of-type
(
4
)
:checked
~
.tab-content
:nth-of-type
(
4
)
{
display
:
block
;
}
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