Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
CTF
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grzegorz
CTF
Commits
20220c97
Commit
20220c97
authored
Mar 04, 2016
by
Antek Grzanka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scoreboard works. Minor UI fixes.
parent
e5c9aaca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
558 additions
and
19 deletions
+558
-19
pom.xml
service/pom.xml
+5
-0
home.html
service/src/main/resources/assets/home.html
+4
-1
index.html
service/src/main/resources/assets/index.html
+1
-0
scoresheet.html
service/src/main/resources/assets/scoresheet.html
+11
-6
main.css
service/src/main/resources/assets/statics/css/main.css
+20
-0
logo_telephoners.svg
...rc/main/resources/assets/statics/img/logo_telephoners.svg
+456
-0
main.js
service/src/main/resources/assets/statics/js/main.js
+60
-11
typed.js
service/src/main/resources/assets/statics/libs/typed.js
+1
-1
No files found.
service/pom.xml
View file @
20220c97
...
@@ -90,6 +90,11 @@
...
@@ -90,6 +90,11 @@
<artifactId>
angular-ui-router
</artifactId>
<artifactId>
angular-ui-router
</artifactId>
<version>
0.2.17
</version>
<version>
0.2.17
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<artifactId>
font-awesome
</artifactId>
<version>
4.5.0
</version>
</dependency>
<dependency>
<dependency>
<groupId>
com.bazaarvoice.dropwizard
</groupId>
<groupId>
com.bazaarvoice.dropwizard
</groupId>
<artifactId>
dropwizard-webjars-bundle
</artifactId>
<artifactId>
dropwizard-webjars-bundle
</artifactId>
...
...
service/src/main/resources/assets/home.html
View file @
20220c97
no elo
<div
style=
"text-align:center"
>
\ No newline at end of file
KrakYournet 7 coś tam elo EESTEC fajnie
</div>
<div
style=
"text-align:center;width:100%"
>
made with
<i
class=
"fa fa-heart"
></i>
by
<a
href=
"http://telephoners.agh.edu.pl"
id=
"telephoners"
><img
src=
"/page/statics/img/logo_telephoners.svg"
></img></a></div>
\ No newline at end of file
service/src/main/resources/assets/index.html
View file @
20220c97
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<title>
CTF
</title>
<title>
CTF
</title>
<link
rel=
"stylesheet"
href=
"/webjars/materializecss/css/materialize.min.css"
>
<link
rel=
"stylesheet"
href=
"/webjars/materializecss/css/materialize.min.css"
>
<link
rel=
"stylesheet"
href=
"/page/statics/libs/angular-materialize.css"
>
<link
rel=
"stylesheet"
href=
"/page/statics/libs/angular-materialize.css"
>
<link
rel=
"stylesheet"
href=
"/webjars/font-awesome/css/font-awesome.min.css"
>
<link
rel=
"stylesheet"
href=
"/page/statics/css/main.css"
>
<link
rel=
"stylesheet"
href=
"/page/statics/css/main.css"
>
</head>
</head>
...
...
service/src/main/resources/assets/scoresheet.html
View file @
20220c97
endpoint: /solutions/all
<div
ng-controller=
"ScoreboardController"
class=
"scores"
>
format:
{
<div
id=
"scores"
>
"nazwa zadania": ["lista","druzyn","ktora","go","rozwiazala"],
<div
ng-repeat=
"(team, score) in teamsScores"
id=
"col-{{team}}"
data-score=
"{{score}}"
style=
"left:0; width:0; background-color:#336699;"
class=
"column"
>
"drugie zadanie": ["innalista","druzyn","ktora","go","rozwiazala"]
<div>
{{team}} - {{score}}
</div>
}
</div>
\ No newline at end of file
</div>
</div>
service/src/main/resources/assets/statics/css/main.css
View file @
20220c97
...
@@ -29,4 +29,24 @@ nav {
...
@@ -29,4 +29,24 @@ nav {
0
%
{
opacity
:
1
;
}
0
%
{
opacity
:
1
;
}
50
%
{
opacity
:
0
;
}
50
%
{
opacity
:
0
;
}
100
%
{
opacity
:
1
;
}
100
%
{
opacity
:
1
;
}
}
.column
{
height
:
50px
;
line-height
:
50px
;
overflow
:
hidden
;
margin-bottom
:
20px
;
}
.column
div
{
margin-left
:
15px
;
}
#telephoners
{
vertical-align
:
middle
;
display
:
inline-block
;
}
#telephoners
img
{
max-width
:
100px
;
}
}
\ No newline at end of file
service/src/main/resources/assets/statics/img/logo_telephoners.svg
0 → 100644
View file @
20220c97
This diff is collapsed.
Click to expand it.
service/src/main/resources/assets/statics/js/main.js
View file @
20220c97
...
@@ -25,19 +25,68 @@
...
@@ -25,19 +25,68 @@
});
});
});
});
app
.
factory
(
'AppSettings'
,
function
()
{
app
.
factory
(
'AppSettings'
,
function
()
{
return
{
return
{
apiAddress
:
"http://localhost:8080"
apiAddress
:
"http://localhost:8080"
}
}
});
});
app
.
controller
(
'TasksController'
,
[
'$scope'
,
'$http'
,
'AppSettings'
,
function
(
$scope
,
$http
,
AppSettings
)
{
app
.
controller
(
'TasksController'
,
[
'$scope'
,
'$http'
,
'AppSettings'
,
function
(
$scope
,
$http
,
AppSettings
)
{
$scope
.
apiAddress
=
AppSettings
.
apiAddress
;
$scope
.
apiAddress
=
AppSettings
.
apiAddress
;
$http
.
get
(
AppSettings
.
apiAddress
+
'/tasks'
).
$http
.
get
(
AppSettings
.
apiAddress
+
'/tasks'
).
success
(
function
(
data
)
{
success
(
function
(
data
)
{
console
.
log
(
data
);
console
.
log
(
data
);
$scope
.
tasks
=
data
;
$scope
.
tasks
=
data
;
});
});
}]);
}]);
app
.
controller
(
'ScoreboardController'
,
[
'$scope'
,
'$http'
,
'AppSettings'
,
function
(
$scope
,
$http
,
AppSettings
)
{
var
mock
=
{
"nazwa zadania"
:
[
"lista"
,
"druzyn"
,
"ktora"
,
"rozwiazala"
],
"drugie zadanie"
:
[
"inna"
,
"druzyn"
,
"ktora"
,
"go"
]
};
var
calculatePerTeam
=
function
(
data
)
{
var
teams
=
{};
for
(
var
key
in
data
)
{
if
(
data
.
hasOwnProperty
(
key
))
{
var
task
=
data
[
key
];
for
(
var
i
=
0
;
i
<
task
.
length
;
i
++
){
if
(
!
teams
[
task
[
i
]]){
teams
[
task
[
i
]]
=
1
;
}
else
{
teams
[
task
[
i
]]
+=
1
;
}
}
}
}
return
teams
;
};
function
viewGraph
(){
$
(
'.column'
).
css
(
'height'
,
'0'
);
console
.
log
(
$scope
.
teamsScores
);
setTimeout
(
function
(){
$
(
'.column'
).
each
(
function
(){
$
(
this
).
animate
({
width
:
150
*
$
(
this
).
attr
(
'data-score'
)},
1500
);
});
}
);
}
$http
.
get
(
AppSettings
.
apiAddress
+
'/solutions/all'
).
success
(
function
(
data
)
{
console
.
log
(
data
);
if
(
$
.
isEmptyObject
(
data
)){
data
=
mock
;
// Delete!
}
$scope
.
teamsScores
=
calculatePerTeam
(
data
);
console
.
log
(
$scope
.
teamsScores
);
viewGraph
()
});
}]);
})();
})();
...
...
service/src/main/resources/assets/statics/libs/typed.js
View file @
20220c97
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
this
.
stop
=
false
;
this
.
stop
=
false
;
// custom cursor
// custom cursor
this
.
cursorChar
=
this
.
options
.
cursorChar
;
this
.
cursorChar
=
'<a href="http://bit.do/aCoToChybaNieKolejnaFlaga">'
+
this
.
options
.
cursorChar
+
'</a>'
;
// shuffle the strings
// shuffle the strings
this
.
shuffle
=
this
.
options
.
shuffle
;
this
.
shuffle
=
this
.
options
.
shuffle
;
...
...
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