Skip to content

Commit

Permalink
Merge pull request #68 from diggyk/master
Browse files Browse the repository at this point in the history
Added quest target date/time
  • Loading branch information
jathanism committed Oct 13, 2015
2 parents 2b40618 + 4aaf0cf commit 586fed0
Show file tree
Hide file tree
Showing 15 changed files with 185 additions and 71 deletions.
4 changes: 3 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
"angular-animate": "~1.4.5",
"angular-location-update": "*",
"angular-route": "~1.4.5",
"angular-smooth-scroll": "ngSmoothScroll#~1.7.1",
"bootstrap": "~3.3.5",
"d3": "~3.5.6",
"jquery": "~2.1.4",
"raphael": "raphael.js#~2.1.4"
"raphael": "raphael.js#~2.1.4",
"angular-bootstrap": "~0.14.0"
}
}
7 changes: 6 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ var JS_SRC = SRC_ROOT + 'js/**/*.js';
var STYLE_SRC = SRC_ROOT + 'css/**/*.less';
var IMAGE_SRC = SRC_ROOT + 'img/**';
var HTML_SRC = SRC_ROOT + "**/*.html";
var BS_FONT_SRC = VENDOR_ROOT + "bootstrap/dist/fonts/*.woff2";


/**
Expand Down Expand Up @@ -140,6 +141,10 @@ gulp.task('build:images', function() {
.pipe(gulp.dest((BUILD_DEST + 'img')))
});

gulp.task('build:fonts', function() {
return gulp.src(BS_FONT_SRC)
.pipe(gulp.dest((BUILD_DEST + 'fonts')))
});

/**
* Uses bower to install the "main" files into our build. In most cases
Expand All @@ -156,7 +161,7 @@ gulp.task('build:3rdparty', ['bower'], function() {
* Create a hashed version of all built files. This is currently
* just a placeholder and hasn't been finished yet.
*/
gulp.task('build:revisions', ['build:html', 'build:js', 'build:bsless', 'build:style', 'build:images', 'build:3rdparty'], function() {
gulp.task('build:revisions', ['build:html', 'build:js', 'build:bsless', 'build:style', 'build:images', 'build:fonts', 'build:3rdparty'], function() {
// TODO(gary): Do.
return gulp.src(BUILD_DEST);
});
Expand Down
2 changes: 2 additions & 0 deletions hermes/handlers/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import json
import logging
import pytz
import random
import re
import sqlalchemy
Expand Down Expand Up @@ -1909,6 +1910,7 @@ def post(self):
target_time = parser.parse(
self.jbody["targetTime"]
)
target_time = target_time.replace(tzinfo=None)
if target_time <= datetime.utcnow():
raise exc.BadRequest(
"Quest target date must be in future"
Expand Down
2 changes: 1 addition & 1 deletion hermes/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Frontend Handlers
(
r"/((?:css|img|js|vendor|templates)/.*)",
r"/((?:css|fonts|img|js|vendor|templates)/.*)",
web.StaticFileHandler,
dict(
path=os.path.join(os.path.dirname(__file__), "webapp/build")
Expand Down
2 changes: 1 addition & 1 deletion hermes/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.15"
__version__ = "0.4.16"
158 changes: 107 additions & 51 deletions hermes/webapp/src/css/main.less
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
// Color variables (appears count calculates by raw css)
@color1: #fce897;
// Appears 10 times
@color2: #fff5cc;
// Appears 8 times
@color3: #000000;
// Appears 5 times
@color4: #25282b;
// Appears 5 times
@color5: #d0d4d9;
// Appears 4 times
@color6: #7b8994;
// Appears 3 times
@color7: #48ac68;
// Appears 3 times
@color8: #f6f9fc;
// Appears 3 times
@color9: #e82110;
// Appears 2 times
@color10: #004c8a;
// Appears 2 times
@color11: #72b6ec;
// Appears 2 times
@color12: #ddf0e2;
// Appears 2 times
@color13: #c99700;
// Appears 1 time
@color14: #e0e5ea;
// Appears 1 time
@color15: #121212;
// Appears 1 time

@c-background: #ffffff;
@c-highlight: #ffffff;
@c-selected: #72b6ec;
Expand All @@ -40,6 +8,7 @@
@light-gray: #dce1e6;
@xlight-gray: #e7ecf1;
@med-gray: #7e8184;
@dark-gray: #3A3C3D;
@burnt-orange: #c97429;
@red: #c92929;
@white: #ffffff;
Expand All @@ -54,7 +23,7 @@
@btn-color: @burnt-orange;
@btn-text-color: @white;
@btn-color2: @blue;
@shadow-color: @black;
@shadow-color: @dark-gray;
@error-color: @red;
@success-color: @blue;
@link-color: @burnt-orange;
Expand Down Expand Up @@ -137,18 +106,19 @@ button {
border: none;
color: @btn-text-color;
float: right;
transition: 0.15s ease-out all;
-webkit-transition: 0.15s ease-out all;
-moz-transition: 0.15s ease-out all;
-ms-transition: 0.15s ease-out all;
-o-transition: 0.15s ease-out all;
transition: 0.15s ease-out all;
-webkit-transition: 0.05s ease-out transform, 0.05s ease-out box-shadow;
-moz-transition: 0.05s ease-out transform, 0.05s ease-out box-shadow;
-ms-transition: 0.05s ease-out transform, 0.05s ease-out box-shadow;
-o-transition: 0.05s ease-out transform, 0.05s ease-out box-shadow;
transition: 0.05s ease-out transform, 0.05s ease-out box-shadow;
-webkit-transform: none;
-moz-transform: none;
-ms-transform: none;
-o-transform: none;
transform: none;
&:hover {
-webkit-box-shadow: 2px 2px 3px @shadow-color;
-moz-box-shadow: 2px 2px 3px @shadow-color;
box-shadow: 2px 2px 3px @shadow-color;
transform: translate(-2px, -2px);
-webkit-transform: translate(-2px, -2px);
Expand All @@ -159,6 +129,17 @@ button {
&:disabled {
opacity: 0.6;
}
&:active {
background: desaturate(@btn-color2, 15%);
-webkit-box-shadow: inset 0px 0px 6px @shadow-color;
-moz-box-shadow: inset 0px 0px 6px @shadow-color;
box-shadow: inset 0px 0px 6px @shadow-color;
transform: translate(-2px, -2px);
-webkit-transform: translate(0px, 0px);
-moz-transform: translate(0px, 0px);
-ms-transform: translate(0px, 0px);
-o-transform: translate(0px, 0px);
}
}

a {
Expand Down Expand Up @@ -277,7 +258,7 @@ a {
-webkit-border-radius: 5px;
background: @white;
border-radius: 5px;
border: @btn-color 1px solid;
border: @unselected-color 1px solid;
padding: 10px;
}

Expand All @@ -301,11 +282,15 @@ a {
padding: 5px;
}

.success-dialog {

}

.quest-list {
-moz-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
background: @unselected-color;
border-radius: 5px 5px 5px 5px;
background: @unselected-color;
padding: 0px;
h1 {
font-size: 1.5em;
Expand Down Expand Up @@ -339,6 +324,9 @@ a {
transform: none;
&:last-child {
border-bottom: none;
-moz-border-radius: 0px 0px 5px 5px;
-webkit-border-radius: 0px 0px 5px 5px;
border-radius: 0px 0px 5px 5px;
}
&:hover {
&:not(.selected) {
Expand Down Expand Up @@ -503,22 +491,88 @@ a {
min-height: 50px;
overflow: scroll;
padding: 0px 5px 0px 5px;
-moz-transition: 0.5s ease-out all;
-ms-transition: 0.5s ease-out all;
-o-transition: 0.5s ease-out all;
transition: 0.5s ease-out all;
}
}

.remove-img-button {
cursor: pointer;
#datepicker {
table {
color: @black;
border-collapse: separate;
border-spacing: 5px;
thead tr th button[disabled] {
color: @black;
opacity: 1;
}
}
}

.date-picker {
.btn[disabled] {
background-color: @dark-blue;
opacity: 1;
color: @dark-blue;
}

.btn {
.text-muted {
color: @dark-blue;
opacity: 1;
}
.text-info {
color: @black;
}
}

.btn-default[disabled] {
color: @dark-blue;
border-color: @dark-blue;
}
.btn-default {
background: @light-gray;
border-color: @black;
color: @black;
}
.btn-info {
background: @btn-color2;
color: @white !important;
border-color: @black;
opacity: 1;
&.active, &.active:hover, &:active {
background: @btn-color2 !important;
border-color: @black;
color: @white !important;
opacity: 1;
}
}
}

//.create-panel input, .create-panel button, .create-panel select, .create-panel .host-list {
// border: @color5 1px solid;
//}
#timepicker {
.btn-link {
color: @black;
&:hover {
color: @black;
}
}
.btn-default {
&:hover {
background: @white;
}
}
}

//.create-panel {
// textarea {
// border: @color5 1px solid;
// }
//}
.box-continuation {
-webkit-box-shadow: inset 0 -30px 30px -30px rgba(0,0,0,0.5);
-moz-box-shadow: inset 0 -30px 30px -30px rgba(0,0,0,0.5);
box-shadow: inset 0 -30px 30px -30px rgba(0,0,0,0.5);
}

.remove-img-button {
cursor: pointer;
}

.modal-wrapper {
background: rgba(0, 0, 0, .6);
Expand Down Expand Up @@ -594,6 +648,8 @@ a {
font-size: 1.2em;
font-weight: bold;
padding: 20px;
color: @btn-text-color;
background: @success-color;
}

#confirmModal {
Expand Down
4 changes: 3 additions & 1 deletion hermes/webapp/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
<script src="/vendor/angular-route/angular-route.js"></script>
<script src="/vendor/angular-animate/angular-animate.js"></script>
<script src="/vendor/angular-location-update/angular-location-update.js"></script>
<script src="/vendor/angular-smooth-scroll/angular-smooth-scroll.js"></script>
<script src="/vendor/raphael/raphael.js"></script>
<script src="/vendor/bootstrap/dist/js/bootstrap.js"></script>
<script src="/vendor/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<!--<script src="/vendor/bootstrap/dist/js/bootstrap.js"></script>-->
<script src="/js/app.js"></script>
</body>
</html>

0 comments on commit 586fed0

Please sign in to comment.