angular routing

This commit is contained in:
Michael Zhang 2015-12-24 21:38:00 -06:00
parent 29e26e54d9
commit b7d4196e1b
6 changed files with 62 additions and 170 deletions

View file

@ -8,8 +8,12 @@ server {
server_name localhost;
location / {
try_files $uri $uri/ =404;
# location / {
# try_files $uri $uri/ =404;
# }
location ~^/(about|login|register)$ {
default_type text/html;
try_files /index.html /index.html;
}
location ~ /api {

View file

@ -2,23 +2,40 @@ h1 {
font-size: 75px;
}
::-webkit-input-placeholder {
color: #999999;
color: #999999;
}
:-moz-placeholder { /* Firefox 18- */
color: #999999;
color: #999999;
}
::-moz-placeholder { /* Firefox 19+ */
color: #999999;
color: #999999;
}
:-ms-input-placeholder {
color: #999999;
color: #999999;
}
.intro {
text-align: center;
}
.column {
max-width: 450px;
}
body {
background-color: #F0F0F0;
}
.ui.menu .item img.logo {
margin-right: 1.5em;
}
.main.container {
margin-top: 7em;
}
.wireframe {
margin-top: 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}

View file

@ -1,53 +1,32 @@
<html ng-app="easyctf">
<head>
<title>EasyCTF 2016</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script src="https://code.jquery.com/jquery-2.1.4.min.js" integrity="sha384-R4/ztc4ZlRqWjqIuvf6RX5yb/v90qNGx6fS48N0tRxiGkqveZETq72KgDVJCp2TC" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js" integrity="sha384-r1y8TJcloKTvouxnYsi4PJAx+nHNr90ibsEn3zznzDzWBN9X3o3kbHLSgcIPtzAp" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.0/angular-route.min.js" integrity="sha384-9MZDoFf10trgrfsQOs9GJhf/mP/sh5weVp3FDSi8h/4TEaV6dloEDkpxGTaOmAs6" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.7/semantic.min.js" integrity="sha384-raqmvMx1osRCvgOKS+pn3feCjT4fwsgIgSfQLadfxqEKU49Gk8yWzQnGsBCYYjLz" crossorigin="anonymous"></script>
<script src="js/ascript.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.7/semantic.min.css" integrity="sha384-MkMf11Odtq01GxtmoywADPd87cCCjYkAUcFiuOytgpBP16Ei82+ulJraHrxcTl/m" crossorigin="anonymous">
<style>
body {
background-color: #F0F0F0;
}
.ui.menu .item img.logo {
margin-right: 1.5em;
}
.main.container {
margin-top: 7em;
}
.wireframe {
margin-top: 2em;
}
.ui.footer.segment {
margin: 5em 0em 0em;
padding: 5em 0em;
}
</style>
</head>
<body ng-controller="mainController">
<div class="ui inverted menu">
<div class="ui container">
<a href="#/" class="header item">
<img class="logo" src="http://placehold.it/40x40"> EasyCTF
</a>
<a class="item" href="#/">Home</a>
<a class="item" href="#/about">About</a>
<div class="right menu">
<a class="item" href="#/register">Register</a>
<a class="item" href="#/login">Login</a>
<head>
<meta charset="utf-8">
<title>EasyCTF 2016</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.7/semantic.min.css" integrity="sha384-MkMf11Odtq01GxtmoywADPd87cCCjYkAUcFiuOytgpBP16Ei82+ulJraHrxcTl/m" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="css/style.css">
<base href="/">
</head>
<body ng-controller="mainController">
<div class="ui inverted menu">
<div class="ui container">
<a href="/" class="header item">
<img class="logo" src="http://placehold.it/40x40"> EasyCTF
</a>
<a class="item" href="/">Home</a>
<a class="item" href="/about">About</a>
<div class="right menu">
<a class="item" href="/register">Register</a>
<a class="item" href="/login">Login</a>
</div>
</div>
</div>
</div>
<div id="mainContent" ng-view class="ui container"></div>
</body>
</html>
<div id="mainContent" class="ui container">
<div ng-view></div>
</div>
<script src="https://code.jquery.com/jquery-2.1.4.min.js" integrity="sha384-R4/ztc4ZlRqWjqIuvf6RX5yb/v90qNGx6fS48N0tRxiGkqveZETq72KgDVJCp2TC" crossorigin="anonymous"></script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.7/semantic.min.js" integrity="sha384-raqmvMx1osRCvgOKS+pn3feCjT4fwsgIgSfQLadfxqEKU49Gk8yWzQnGsBCYYjLz" crossorigin="anonymous"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js" integrity="sha384-r1y8TJcloKTvouxnYsi4PJAx+nHNr90ibsEn3zznzDzWBN9X3o3kbHLSgcIPtzAp" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-rc.0/angular-route.min.js" integrity="sha384-9MZDoFf10trgrfsQOs9GJhf/mP/sh5weVp3FDSi8h/4TEaV6dloEDkpxGTaOmAs6" crossorigin="anonymous"></script>
<script src="js/easyctf.js"></script>
</body>
</html>

View file

@ -1,5 +1,5 @@
var app = angular.module("easyctf", [ "ngRoute" ]);
app.config(function($routeProvider) {
app.config(function($routeProvider, $locationProvider) {
$routeProvider.when("/", {
templateUrl: "pages/home.html",
controller: "mainController"
@ -15,8 +15,9 @@ app.config(function($routeProvider) {
.when("/login", {
templateUrl: "pages/login.html",
controller: "mainController"
})
});
$locationProvider.html5Mode(true);
});
app.controller("mainController", function($scope) {
});
});

View file

@ -1,97 +1 @@
<!DOCTYPE html>
<html>
<head>
<title>About</title>
<script src="js/semantic.min.js"></script>
<script src="js/jquery-1.11.3.js"></script>
<link type="text/css" rel="stylesheet" href="css/semantic.min.css">
</head>
<body style="background-color: #EEEEEE;">
<div class="ui inverted menu" style="margin: -0.1em; background-color: #FA6900;">
<a class="item" href="./">Home</a>
<a class="item" href="./about.html">About</a>
<a class="item" href="./register.html">Register</a>
<div class="right menu">
<a class="item" href="./login.html">Login</a>
<a class="item" href="./account.html">Account</a>
</div>
</div>
<center style="margin-left: 10em; margin-right: 10em;">
<h1 style="color: #69D2E7; font-size: 75px;">About EasyCTF</h1>
<hr>
<br>
<div class="page-header">
<h2 style="font-size: 2.5em;">Capture The Flag?</h2>
</div>
<p style="font-size:1.2em;">Capture the Flag? Hope you brought your gym clothes! Just kidding. This time we promise no one will end up with a floor burn. Capture the flag contests, or CTFs for short, are intense cybersecurity contests that take place all over the world. To hit
the top of the scoreboard, participants (and their teammates) must capture a piece of information, known as a flag. All of our problems will, after a little bit of this and that, will provide you with a flag which you can submit for points. Harder
problems are worth more points. With most CTFs, it can be hard to determine whether or not you have the flag. Sometimes it's a long string of numbers or letters and it's hard to distinguish from the sorrounding code. Here at EasyCTF, our flags -- when
you find them -- will look something like this:
<code style="background-color:#FFFEEA;color:#FF4D4D;">flag{this_is_a_flag}</code>. Simply enter in the data between the curly braces (case-insensative) and you'll get your due points. The more flags you find, and the harder flags you find, the easier it will be for you to move up the scoreboard. If you
are in one of the highest scoring teams at the end of the competition, your team will win bragging rights, and some pretty cool prizes.</p>
<br>
<div class="page-header">
<h2 style="font-size: 2.5em;">So What's EasyCTF?</h2>
</div>
<p style="font-size:1.2em;">EasyCTF is a CTF that's tailored for the high school level. Started by high school students, it was created with a passion for learning. With computer science related fields doubling in size over the next decade, The United States, and the world are
short on programmers. The world has started to focus in on the youth of the world, from teenagers all the way down to five and six year olds. Being the future of the world, it is imperative a large enough percentage of the population is trained and
educated to handle the constant progession of technology. We, the EasyCTF team, have put in countless hours to provide you with a fun, inviting experiance for you and your friends to gang up and hack away. Our challenges range cover significant topics
in contemporary computer science such cryptography, web, programming, binary and even more. Here at EasyCTF, we hope to provide you with a fun, competetive, educational, and safe enviroment where you, your friends, or your peers can show off your skills
behind the keyboard for the world to see. Good luck, see you soon!</p>
<br>
<div class="page-header">
<h2 style="font-size: 2.5em;">Isn't Hacking Illegal?</h2>
</div>
<p style="font-size:1.2em;">Yes and no. Despite the connotation "hacking" has recieved in contemporary culture and media, hacking is more or less split up into two categorizations, <i>Black Hat</i> and <i>White Hat</i>. Black Hat hackers are the ones you hear about on the news;
attacking websites and their accounts to steal information or money. They attack without warning, all for their own benefit. Black Hat hackers go to prison. White Hat hackers, while rarely in the news, are the men and women who, <b><span style="text-decoration:underline;">with permission</span></b>,
attack a website or service in order to find holes in the security and report them to the owners for patching. The types of hacking you will be doing in the competition are created by the EasyCTF team just for you. Take part in EasyCTF to show off
your skills as a white hat hacker.</p>
<br>
<div class="page-header">
<h2 style="font-size:2.5em">How Difficult Is This?</h2>
</div>
<p style="font-size:1.2em">Well Goldilocks, our problems aren't too hard, and they're not too hard. Even if you're just a probie in the field, our problem start at the very bottom. Our reconnasince category of questions only requires a search engine and a person behind the keyboard.
For those of you who have been in the field long enough to see the sights, you can start off with our most introductory problems and work your way up. Finally, for those of you who've been there, done that, humor yourself with our probie problems,
work your way up through the majority of the problems, then prepare yourself to face our hardest problems. Go after the problems no one has solved. I'm sure our bigger problems will keep you working.</p>
<br>
<div class="page-header">
<h2 style="font-size:2.5em">What Resources Can I Use?</h2>
</div>
<p style="font-size:1.2em">Hope you didn't think this was like one of your finals! No phones, no Google, no calculator, no friends. EasyCTF is a hacking competition, we would be worried if you weren't using technology to aid you in your competition. Feel free to search Google,
use your calculator or text your nearest computer scientist friend. We at EasyCTF wish to emulate real-world hacking and technology. The World Wide Web is a vast ocean of more information than any library or mind in the world, feel free to use it!
After all, no one is going to tell a hacker (penetration tester is the euphamism) not to Google "how to append to list in Python 3". In fact we have devoted an entire section of our problems to online reconissance. These problems require you scour
the World Wide Web in search for a vital piece of information or flag using you favorite search engine. You can ask your teacher, but don't let them do it for themselves. Also, cheating such as attempting to hack the EasyCTF platform will disqualify
your team, but you can read more about that below.</p>
<br>
<div class="page-header">
<h2 style="font-size:2.5em">Are There Rules?</h2>
</div>
<p style="font-size:1.2em">Gilbert K. Chesterton once said "There are no rules of architecture for a castle in the clouds." Here at EasyCTF, we want the competition to be almost rule free to encourage the utmost creativity from our participants and teams. However, we have a few
important rules to make sure everyone has the same opportunities to win. If you're in it to win it, you shouldn't need to break the rules.
<ol style="font-size:1.2em;text-align:left;">
<b>
<li>Don't try to disrupt the competition. We keep our age group from middle school up because we expect all our competitors to act maturely.</li>
<br>
<li>It's all about you. If we wanted to see what your teacher's knew, we'd attend a CSTA meeting. Problems should only be solved by members of your team.</li>
<br>
<li>Don't wreck your opportunity to hack. No hacking of the EasyCTF infrastructure, other teams, or any websites/services that would prevent other teams from solving problems.</li>
</b>
</ol>
</p>
<br>
<br>
<br>
<p style="font-size:1.2em">To prepare for the competition, feel free to check out this super cool <a href="https://trailofbits.github.io/ctf/">CTF Field Guide</a></p>
<br>
</center>
</body>
</html>
<h1>About</h1>

View file

@ -1,14 +1 @@
<div class="ui inverted menu">
<div class="ui container">
<a href="#/" class="header item">
<img class="logo" src="http://placehold.it/40x40"> EasyCTF
</a>
<a class="item" href="#/">Home</a>
<a class="item" href="#/about">About</a>
<div class="right menu">
<a class="item" href="#/register">Register</a>
<a class="item" href="#/login">Login</a>
</div>
</div>
</div>
<div id="mainContent" ng-view class="ui container"></div>
<h1>EasyCTF</h1>