Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
605f794f
Commit
605f794f
authored
Oct 12, 2020
by
Robert Czechowski
Browse files
Add title tag to tasks and make title more meaningful in contests, add favicon to tasks
parent
7bf809c2
Pipeline
#861
passed with stages
in 25 minutes and 27 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core.rs
View file @
605f794f
...
...
@@ -321,6 +321,7 @@ pub fn show_contest<T: MedalConnection>(conn: &T, contest_id: i32, session_token
data
.insert
(
"parent"
.to_string
(),
to_json
(
&
"base"
));
data
.insert
(
"empty"
.to_string
(),
to_json
(
&
"empty"
));
data
.insert
(
"contest"
.to_string
(),
to_json
(
&
ci
));
data
.insert
(
"title"
.to_string
(),
to_json
(
&
ci
.name
));
data
.insert
(
"message"
.to_string
(),
to_json
(
&
contest
.message
));
fill_oauth_data
(
login_info
,
&
mut
data
);
...
...
@@ -419,6 +420,7 @@ pub fn show_contest<T: MedalConnection>(conn: &T, contest_id: i32, session_token
data
.insert
(
"time_left"
.to_string
(),
to_json
(
&
time_left
));
data
.insert
(
"seconds_left"
.to_string
(),
to_json
(
&
left_secs
));
}
data
.insert
(
"no_login"
.to_string
(),
to_json
(
&
true
));
}
// This only checks if a query string is existent, so any query string will
...
...
@@ -738,6 +740,7 @@ pub fn show_task<T: MedalConnection>(conn: &T, task_id: i32, session_token: &str
data
.insert
(
"contestname"
.to_string
(),
to_json
(
&
c
.name
));
data
.insert
(
"name"
.to_string
(),
to_json
(
&
tg
.name
));
data
.insert
(
"title"
.to_string
(),
to_json
(
&
format!
(
"Aufgabe „{}“ in {}"
,
&
tg
.name
,
&
c
.name
)));
data
.insert
(
"taskid"
.to_string
(),
to_json
(
&
task_id
));
data
.insert
(
"csrf_token"
.to_string
(),
to_json
(
&
session
.csrf_token
));
data
.insert
(
"taskpath"
.to_string
(),
to_json
(
&
taskpath
));
...
...
templates/default/task.hbs
View file @
605f794f
...
...
@@ -3,6 +3,12 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=600"
>
{{#if
title
}}
<title>
Jugendwettbewerb Informatik –
{{
title
}}
</title>
{{else}}
<title>
Jugendwettbewerb Informatik: Programmieren – leichter, als du denkst!
</title>
{{/if}}
<link
rel=
"icon"
href=
"/static/images/favicon.png"
type=
"image/png"
>
<style>
body
{
margin
:
0px
;
...
...
templates/jwinf/base.hbs
View file @
605f794f
...
...
@@ -3,7 +3,11 @@
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=300"
>
<title>
Jugendwettbewerb Informatik: Programmieren – leichter, als du denkst!
</title>
{{#if
title
}}
<title>
Jugendwettbewerb Informatik –
{{
title
}}
</title>
{{else}}
<title>
Jugendwettbewerb Informatik: Programmieren – leichter, als du denkst!
</title>
{{/if}}
<link
rel=
"stylesheet"
href=
"/static/lib/bulma/medal-bulma-0.7.5.css"
>
<link
rel=
"icon"
href=
"/static/images/favicon.png"
type=
"image/png"
>
<style>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment