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
f22a1c52
Commit
f22a1c52
authored
Mar 03, 2016
by
Antek Grzanka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UI prototype. Showing tasks.
parent
2497ecaa
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1701 additions
and
16 deletions
+1701
-16
pom.xml
service/pom.xml
+7
-2
about.html
service/src/main/resources/assets/about.html
+1
-0
home.html
service/src/main/resources/assets/home.html
+1
-0
index.html
service/src/main/resources/assets/index.html
+26
-3
scoresheet.html
service/src/main/resources/assets/scoresheet.html
+1
-11
main.css
service/src/main/resources/assets/statics/css/main.css
+10
-0
bkg.jpg
service/src/main/resources/assets/statics/img/bkg.jpg
+0
-0
main.js
service/src/main/resources/assets/statics/js/main.js
+44
-0
angular-breadcrumb.min.js
...n/resources/assets/statics/libs/angular-breadcrumb.min.js
+4
-0
angular-materialize.css
...ain/resources/assets/statics/libs/angular-materialize.css
+627
-0
angular-materialize.js
...main/resources/assets/statics/libs/angular-materialize.js
+938
-0
submitflag.html
service/src/main/resources/assets/submitflag.html
+10
-0
task.html
service/src/main/resources/assets/task.html
+10
-0
tasks.html
service/src/main/resources/assets/tasks.html
+22
-0
No files found.
service/pom.xml
View file @
f22a1c52
...
...
@@ -77,14 +77,19 @@
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<artifactId>
bootstrap
</artifactId>
<version>
3.3
.5
</version>
<artifactId>
materializecss
</artifactId>
<version>
0.97
.5
</version>
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<artifactId>
angularjs
</artifactId>
<version>
1.4.7
</version>
</dependency>
<dependency>
<groupId>
org.webjars
</groupId>
<artifactId>
angular-ui-router
</artifactId>
<version>
0.2.17
</version>
</dependency>
<dependency>
<groupId>
com.bazaarvoice.dropwizard
</groupId>
<artifactId>
dropwizard-webjars-bundle
</artifactId>
...
...
service/src/main/resources/assets/about.html
0 → 100644
View file @
f22a1c52
About what?
\ No newline at end of file
service/src/main/resources/assets/home.html
0 → 100644
View file @
f22a1c52
no elo
\ No newline at end of file
service/src/main/resources/assets/index.html
View file @
f22a1c52
...
...
@@ -3,10 +3,33 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
CTF
</title>
<link
rel=
"stylesheet"
href=
"/webjars/bootstrap/css/bootstrap.min.css"
>
<script
type=
"text/javascript"
src=
"/webjars/angularjs/angular.min.js"
></script>
<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/css/main.css"
>
</head>
<nav>
<div
class=
"nav-wrapper container"
>
<a
href=
"#"
class=
"brand-logo"
>
Capture the flAGH
</a>
<ul
id=
"nav-mobile"
class=
"right hide-on-med-and-down"
>
<li><a
href=
"page#/home"
>
Początek
</a></li>
<li><a
href=
"page#/tasks"
>
Zadania
</a></li>
<li><a
href=
"page#/scores"
>
Wyniki
</a></li>
</ul>
</div>
</nav>
<body>
sup sup sup
<div
ng-app=
"ctfApp"
class=
"container"
>
<div
ui-view
></div>
</div>
</body>
<script
type=
"text/javascript"
src=
"/webjars/jquery/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"/webjars/materializecss/js/materialize.min.js"
></script>
<script
type=
"text/javascript"
src=
"/webjars/angularjs/angular.min.js"
></script>
<script
type=
"text/javascript"
src=
"/webjars/angular-ui-router/angular-ui-router.min.js"
></script>
<script
type=
"text/javascript"
src=
"/page/statics/libs/angular-materialize.js"
></script>
<script
type=
"text/javascript"
src=
"/page/statics/libs/angular-breadcrumb.min.js"
></script>
<script
type=
"text/javascript"
src=
"/page/statics/js/main.js"
></script>
</html>
\ No newline at end of file
service/src/main/resources/assets/score
S
heet.html
→
service/src/main/resources/assets/score
s
heet.html
View file @
f22a1c52
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<body>
endpoint: /solutions/all
format:
{
"nazwa zadania": ["lista","druzyn","ktora","go","rozwiazala"],
"drugie zadanie": ["innalista","druzyn","ktora","go","rozwiazala"]
}
\ No newline at end of file
</body>
</html>
\ No newline at end of file
service/src/main/resources/assets/statics/css/main.css
0 → 100644
View file @
f22a1c52
body
{
background
:
url('/page/statics/img/bkg.jpg')
;
color
:
white
;
}
nav
{
background
:
none
;
line-height
:
120px
;
height
:
120px
;
}
\ No newline at end of file
service/src/main/resources/assets/statics/img/bkg.jpg
0 → 100644
View file @
f22a1c52
500 KB
service/src/main/resources/assets/statics/js/main.js
0 → 100644
View file @
f22a1c52
(
function
(){
'use strict'
;
var
app
=
angular
.
module
(
'ctfApp'
,
[
'ui.router'
,
'ncy-angular-breadcrumb'
]);
app
.
config
(
function
(
$stateProvider
,
$urlRouterProvider
,
$breadcrumbProvider
)
{
$urlRouterProvider
.
otherwise
(
'/home'
);
$stateProvider
.
state
(
'home'
,
{
url
:
'/home'
,
templateUrl
:
'/page/home.html'
})
.
state
(
'tasks'
,
{
url
:
'/tasks'
,
templateUrl
:
'/page/tasks.html'
})
.
state
(
'scores'
,
{
url
:
'/scores'
,
templateUrl
:
'/page/scoresheet.html'
});
});
app
.
factory
(
'AppSettings'
,
function
()
{
return
{
apiAddress
:
"http://localhost:8080"
}
});
app
.
controller
(
'TasksController'
,
[
'$scope'
,
'$http'
,
'AppSettings'
,
function
(
$scope
,
$http
,
AppSettings
)
{
$scope
.
apiAddress
=
AppSettings
.
apiAddress
;
$http
.
get
(
AppSettings
.
apiAddress
+
'/tasks'
).
success
(
function
(
data
)
{
console
.
log
(
data
);
$scope
.
tasks
=
data
;
});
}]);
})();
service/src/main/resources/assets/statics/libs/angular-breadcrumb.min.js
0 → 100644
View file @
f22a1c52
/*! angular-breadcrumb - v0.4.1
* http://ncuillery.github.io/angular-breadcrumb
* Copyright (c) 2015 Nicolas Cuillery; Licensed MIT */
!
function
(
a
,
b
,
c
){
"use strict"
;
function
d
(
a
,
c
){
return
b
.
equals
(
a
.
length
,
c
.
length
)?
a
>
c
:
a
.
length
>
c
.
length
}
function
e
(
a
){
var
b
=
a
.
replace
(
/
\n
/g
,
" "
).
match
(
/^
([^
(
]
+
?)\s
*
(\((
.*
)\))?
$/
);
if
(
!
b
||
4
!==
b
.
length
)
throw
new
Error
(
"Invalid state ref '"
+
a
+
"'"
);
return
{
state
:
b
[
1
],
paramExpr
:
b
[
3
]
||
null
}}
function
f
(){
var
a
=
{
prefixStateName
:
null
,
template
:
"bootstrap3"
,
templateUrl
:
null
,
includeAbstract
:
!
1
};
this
.
setOptions
=
function
(
c
){
b
.
extend
(
a
,
c
)},
this
.
$get
=
[
"$state"
,
"$stateParams"
,
"$rootScope"
,
function
(
b
,
f
,
g
){
var
h
=
g
;
g
.
$on
(
"$viewContentLoaded"
,
function
(
a
){
!
a
.
targetScope
.
ncyBreadcrumbIgnore
&&
d
(
a
.
targetScope
.
$id
,
h
.
$id
)
&&
(
h
=
a
.
targetScope
)});
var
i
=
function
(
a
){
var
b
=
a
.
parent
||
(
/^
(
.+
)\.[^
.
]
+$/
.
exec
(
a
.
name
)
||
[])[
1
],
c
=
"object"
==
typeof
b
;
return
c
?
b
.
name
:
b
},
j
=
function
(
c
,
d
){
for
(
var
g
,
i
,
j
=
e
(
d
),
k
=!
1
,
l
=!
1
,
m
=
0
,
n
=
c
.
length
;
n
>
m
;
m
+=
1
)
if
(
c
[
m
].
name
===
j
.
state
)
return
;
g
=
b
.
get
(
j
.
state
),
g
.
ncyBreadcrumb
&&
(
g
.
ncyBreadcrumb
.
force
&&
(
k
=!
0
),
g
.
ncyBreadcrumb
.
skip
&&
(
l
=!
0
)),
g
[
"abstract"
]
&&!
a
.
includeAbstract
&&!
k
||
l
||
(
j
.
paramExpr
&&
(
i
=
h
.
$eval
(
j
.
paramExpr
)),
g
.
ncyBreadcrumbLink
=
b
.
href
(
j
.
state
,
i
||
f
||
{}),
c
.
unshift
(
g
))},
k
=
function
(
a
){
var
c
=
e
(
a
),
d
=
b
.
get
(
c
.
state
);
if
(
d
.
ncyBreadcrumb
&&
d
.
ncyBreadcrumb
.
parent
){
var
f
=
"function"
==
typeof
d
.
ncyBreadcrumb
.
parent
,
g
=
f
?
d
.
ncyBreadcrumb
.
parent
(
h
):
d
.
ncyBreadcrumb
.
parent
;
if
(
g
)
return
g
}
return
i
(
d
)};
return
{
getTemplate
:
function
(
b
){
return
a
.
templateUrl
?
null
:
b
[
a
.
template
]?
b
[
a
.
template
]:
a
.
template
},
getTemplateUrl
:
function
(){
return
a
.
templateUrl
},
getStatesChain
:
function
(
c
){
for
(
var
d
=
[],
e
=
b
.
$current
.
self
.
name
;
e
;
e
=
k
(
e
))
if
(
j
(
d
,
e
),
c
&&
d
.
length
)
return
d
;
return
a
.
prefixStateName
&&
j
(
d
,
a
.
prefixStateName
),
d
},
getLastStep
:
function
(){
var
a
=
this
.
getStatesChain
(
!
0
);
return
a
.
length
?
a
[
0
]:
c
},
$getLastViewScope
:
function
(){
return
h
}}}]}
function
g
(
a
,
c
,
d
){
var
e
=
{
bootstrap2
:
'<ul class="breadcrumb"><li ng-repeat="step in steps" ng-switch="$last || !!step.abstract" ng-class="{active: $last}"><a ng-switch-when="false" href="{{step.ncyBreadcrumbLink}}">{{step.ncyBreadcrumbLabel}}</a><span ng-switch-when="true">{{step.ncyBreadcrumbLabel}}</span><span class="divider" ng-hide="$last">/</span></li></ul>'
,
bootstrap3
:
'<ol class="breadcrumb"><li ng-repeat="step in steps" ng-class="{active: $last}" ng-switch="$last || !!step.abstract"><a ng-switch-when="false" href="{{step.ncyBreadcrumbLink}}">{{step.ncyBreadcrumbLabel}}</a><span ng-switch-when="true">{{step.ncyBreadcrumbLabel}}</span></li></ol>'
};
return
{
restrict
:
"AE"
,
replace
:
!
0
,
scope
:{},
template
:
c
.
getTemplate
(
e
),
templateUrl
:
c
.
getTemplateUrl
(),
link
:{
post
:
function
(
e
){
var
f
=
[],
g
=
function
(){
l
(
f
),
f
=
[];
var
d
=
c
.
$getLastViewScope
();
e
.
steps
=
c
.
getStatesChain
(),
b
.
forEach
(
e
.
steps
,
function
(
b
){
if
(
b
.
ncyBreadcrumb
&&
b
.
ncyBreadcrumb
.
label
){
var
c
=
a
(
b
.
ncyBreadcrumb
.
label
);
b
.
ncyBreadcrumbLabel
=
c
(
d
),
k
(
f
,
c
,
d
,
b
)}
else
b
.
ncyBreadcrumbLabel
=
b
.
name
})};
d
.
$on
(
"$viewContentLoaded"
,
function
(
a
){
a
.
targetScope
.
ncyBreadcrumbIgnore
||
g
()}),
g
()}}}}
function
h
(
a
,
b
,
c
){
return
{
restrict
:
"A"
,
scope
:{},
template
:
"{{ncyBreadcrumbLabel}}"
,
compile
:
function
(
d
,
e
){
var
f
=
d
.
attr
(
e
.
$attr
.
ncyBreadcrumbLast
);
return
f
&&
d
.
html
(
f
),{
post
:
function
(
d
){
var
e
=
[],
f
=
function
(){
l
(
e
),
e
=
[];
var
c
=
b
.
$getLastViewScope
(),
f
=
b
.
getLastStep
();
if
(
f
)
if
(
d
.
ncyBreadcrumbLink
=
f
.
ncyBreadcrumbLink
,
f
.
ncyBreadcrumb
&&
f
.
ncyBreadcrumb
.
label
){
var
g
=
a
(
f
.
ncyBreadcrumb
.
label
);
d
.
ncyBreadcrumbLabel
=
g
(
c
),
k
(
e
,
g
,
c
,
d
)}
else
d
.
ncyBreadcrumbLabel
=
f
.
name
};
c
.
$on
(
"$viewContentLoaded"
,
function
(
a
){
a
.
targetScope
.
ncyBreadcrumbIgnore
||
f
()}),
f
()}}}}}
function
i
(
a
,
c
,
d
){
return
{
restrict
:
"A"
,
scope
:{},
template
:
"{{ncyBreadcrumbChain}}"
,
compile
:
function
(
e
,
f
){
var
g
=
e
.
attr
(
f
.
$attr
.
ncyBreadcrumbText
);
g
&&
e
.
html
(
g
);
var
h
=
e
.
attr
(
f
.
$attr
.
ncyBreadcrumbTextSeparator
)
||
" / "
;
return
{
post
:
function
(
e
){
var
f
=
[],
g
=
function
(
a
,
c
,
d
){
b
.
forEach
(
j
(
c
),
function
(
b
){
var
c
=
d
.
$watch
(
b
,
function
(
a
,
b
){
a
!==
b
&&
i
()});
a
.
push
(
c
)})},
i
=
function
(){
l
(
f
),
f
=
[];
var
d
=
c
.
$getLastViewScope
(),
i
=
c
.
getStatesChain
(),
j
=
[];
b
.
forEach
(
i
,
function
(
b
){
if
(
b
.
ncyBreadcrumb
&&
b
.
ncyBreadcrumb
.
label
){
var
c
=
a
(
b
.
ncyBreadcrumb
.
label
);
j
.
push
(
c
(
d
)),
g
(
f
,
c
,
d
)}
else
j
.
push
(
b
.
name
)}),
e
.
ncyBreadcrumbChain
=
j
.
join
(
h
)};
d
.
$on
(
"$viewContentLoaded"
,
function
(
a
){
a
.
targetScope
.
ncyBreadcrumbIgnore
||
i
()}),
i
()}}}}}
var
j
=
function
(
a
){
if
(
a
.
expressions
)
return
a
.
expressions
;
var
c
=
[];
return
b
.
forEach
(
a
.
parts
,
function
(
a
){
b
.
isFunction
(
a
)
&&
c
.
push
(
a
.
exp
)}),
c
},
k
=
function
(
a
,
c
,
d
,
e
){
b
.
forEach
(
j
(
c
),
function
(
b
){
var
f
=
d
.
$watch
(
b
,
function
(){
e
.
ncyBreadcrumbLabel
=
c
(
d
)});
a
.
push
(
f
)})},
l
=
function
(
a
){
b
.
forEach
(
a
,
function
(
a
){
a
()})};
g
.
$inject
=
[
"$interpolate"
,
"$breadcrumb"
,
"$rootScope"
],
h
.
$inject
=
[
"$interpolate"
,
"$breadcrumb"
,
"$rootScope"
],
i
.
$inject
=
[
"$interpolate"
,
"$breadcrumb"
,
"$rootScope"
],
b
.
module
(
"ncy-angular-breadcrumb"
,[
"ui.router.state"
]).
provider
(
"$breadcrumb"
,
f
).
directive
(
"ncyBreadcrumb"
,
g
).
directive
(
"ncyBreadcrumbLast"
,
h
).
directive
(
"ncyBreadcrumbText"
,
i
)}(
window
,
window
.
angular
);
\ No newline at end of file
service/src/main/resources/assets/statics/libs/angular-materialize.css
0 → 100644
View file @
f22a1c52
This diff is collapsed.
Click to expand it.
service/src/main/resources/assets/statics/libs/angular-materialize.js
0 → 100644
View file @
f22a1c52
This diff is collapsed.
Click to expand it.
service/src/main/resources/assets/submitflag.html
0 → 100644
View file @
f22a1c52
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title></title>
</head>
<body>
</body>
</html>
\ No newline at end of file
service/src/main/resources/assets/task.html
0 → 100644
View file @
f22a1c52
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title></title>
</head>
<body>
</body>
</html>
\ No newline at end of file
service/src/main/resources/assets/tasks.html
0 → 100644
View file @
f22a1c52
<div
ng-controller=
"TasksController"
>
<div
class=
"row"
>
<div
class=
"col s12 m6"
ng-repeat=
"task in tasks"
>
<div
class=
"card blue-grey darken-1"
>
<div
class=
"card-content white-text"
>
<span
class=
"card-title"
>
<!--<div class="chip">-->
<!--<!–<img src="" alt="Contact Person">–>-->
<!--</div>-->
{{task.name}}
</span>
<p>
Poziom {{task.level}}. Super zadanie.
</p>
</div>
<div
class=
"card-action"
>
<a
href=
"{{apiAddress}}/task/{{task.level}}"
>
Go!
</a></td>
-->
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
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