Skip to content
GitLab
Explore
Sign in
Commits on Source (1)
Change the mark list page from img to css background-image
· fe7910bf
Marco De Donno
authored
Mar 05, 2020
fe7910bf
Hide whitespace changes
Inline
Side-by-side
views/submission/templates/shared/mark_list.html
View file @
fe7910bf
...
@@ -47,27 +47,20 @@
...
@@ -47,27 +47,20 @@
</script>
</script>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.icnml_lp_list
{
.icnml_list_of_boxes
{
margin
:
10px
;
display
:
grid
;
display
:
grid
;
grid-gap
:
10px
;
grid-gap
:
10px
;
grid-template-columns
:
repeat
(
auto-fit
,
320px
);
grid-template-columns
:
repeat
(
auto-fit
,
220px
);
grid-auto-rows
:
min-content
;
margin-bottom
:
10px
;
}
}
.icnml_lp_list
>
div
{
.icnml_mark
{
height
:
347px
;
height
:
200px
;
}
width
:
200px
;
background-size
:
contain
;
.icnml_box_content
{
background-position
:
center
;
height
:
300px
;
background-repeat
:
no-repeat
;
}
cursor
:
pointer
;
.icnml_img
>
a
>
img
{
display
:
block
;
width
:
auto
;
height
:
auto
;
max-width
:
300px
;
max-height
:
300px
;
margin
:
auto
;
}
}
.icnml_search_bar
{
.icnml_search_bar
{
margin-left
:
10px
;
margin-left
:
10px
;
...
@@ -85,15 +78,15 @@
...
@@ -85,15 +78,15 @@
<input
id=
"search_bar"
placeholder=
"Search for a file..."
/>
<input
id=
"search_bar"
placeholder=
"Search for a file..."
/>
</div>
</div>
<div
class=
"icnml_l
p_l
ist"
>
<div
class=
"icnml_list
_of_boxes
"
>
{% for file in files %}
{% for file in files %}
<div
id=
"mark_{{ file[ 'uuid' ] }}"
>
<div
id=
"mark_{{ file[ 'uuid' ] }}"
>
<div
class=
"ui-widget-header ui-corner-top icnml_box_top"
id=
"mark_{{ file[ 'uuid' ] }}_filename"
>
-
</div>
<div
class=
"ui-widget-header ui-corner-top icnml_box_top"
id=
"mark_{{ file[ 'uuid' ] }}_filename"
>
-
</div>
<div
class=
"ui-widget-content ui-corner-bottom icnml_box_content"
>
<div
class=
"ui-widget-content ui-corner-bottom icnml_box_content"
>
<div
class=
"icnml_img"
>
<div
<a
id=
"edit_{{ file[ 'id' ] }}"
href=
"{{ url_for( 'submission.submission_mark', submission_id = submission_id, mark_id = file[ 'uuid' ] ) }}"
>
class=
"icnml_mark"
<img
src=
"{{ url_for( 'image.image_file_serve', file_id =
file[ 'uuid' ]
)
}}"
loading=
"lazy"
>
id=
"mark_{{
file[ 'uuid' ] }}"
</a
>
style=
"background-image: url( {{ url_for( 'image.image_file_serve', file_id = file[ 'uuid' ] ) }} )"
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -101,10 +94,15 @@
...
@@ -101,10 +94,15 @@
</div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
"
#search_bar
"
).
on
(
"
keyup
"
,
update_search_result
);
$
(
"
#search_bar
"
).
on
(
"
keyup
"
,
update_search_result
);
$
(
"
#search_bar
"
).
focus
();
$
(
"
#search_bar
"
).
focus
();
{
%
for
file
in
files
%
}
$
(
"
#mark_{{ file[ 'uuid' ] }}
"
).
on
(
"
click
"
,
function
()
{
window
.
location
.
href
=
"
{{ url_for( 'submission.submission_mark', submission_id = submission_id, mark_id = file[ 'uuid' ] ) }}
"
;
}
);
{
%
endfor
%
}
//
//
$
(
"
#icnml_navigation_updatedonor
"
)
$
(
"
#icnml_navigation_updatedonor
"
)
...
...