Skip to content
Snippets Groups Projects
Commit fdbe677d authored by Cam Saul's avatar Cam Saul
Browse files

Merge branch 'master' into autoinfer_json_blobs

parents ee128ee5 ba82e0b6
Branches
Tags
No related merge requests found
......@@ -53,7 +53,8 @@ Corvus.config(['$routeProvider', '$locationProvider', function($routeProvider, $
// TODO: we need an appropriate homepage or something to show in this situation
$routeProvider.otherwise({
redirectTo: '/user/edit_current'
templateUrl: '/app/not_found.html',
controller: 'NotFound'
});
}]);
......
<section class="brand-scene absolute bottom left right">
<svg class="brand-boat" width="27px" height="28px" viewBox="0 0 27 28">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-52.000000, -49.000000)" fill="#fff">
<path d="M56.9966734,62.0821591 C56.9548869,62.5960122 56.5246217,63 56,63 C55.4477153,63 55,62.5522847 55,62 C55,61.4477153 55.4477153,61 56,61 C56.1542427,61 56.3003292,61.0349209 56.4307846,61.0972878 C56.4365546,60.9708421 56.4672874,60.8469847 56.5249064,60.738086 L60.591292,53.0527085 C60.6128147,53.0120312 60.6340855,52.9741034 60.6550548,52.9389125 C60.2727349,52.7984089 60,52.4310548 60,52 C60,51.4477153 60.4477153,51 61,51 C61.5522847,51 62,51.4477153 62,52 C62,52.4778316 61.6648606,52.8773872 61.2168176,52.9764309 C61.2239494,53.0443316 61.2276783,53.1212219 61.2276783,53.2070193 L61.2276783,64.6460667 C61.2276783,64.7905295 61.2109404,64.9142428 61.1799392,65.0161455 C61.6463447,65.1008929 62,65.5091461 62,66 C62,66.5522847 61.5522847,67 61,67 C60.4477153,67 60,66.5522847 60,66 C60,65.6775356 60.1526298,65.3907197 60.3895873,65.2078547 C60.3353792,65.1698515 60.2797019,65.1246206 60.2229246,65.0720038 L56.9966734,62.0821591 Z M66.1768361,51.0536808 L76.3863147,62.9621534 C76.6248381,62.7575589 76.9348843,62.6339439 77.2738087,62.6339439 C78.0269541,62.6339439 78.6374991,63.2443563 78.6374991,63.9973383 C78.6374991,64.7503202 78.0269541,65.3607327 77.2738087,65.3607327 C76.7179077,65.3607327 76.2396954,65.0281798 76.0273418,64.5512033 L76.0273418,64.5512033 L66.2470617,68.8970508 L66.2470617,68.8970508 C66.3224088,69.0662913 66.3642852,69.2537142 66.3642852,69.4509158 C66.3642852,70.2038977 65.7537402,70.8143102 65.0005948,70.8143102 C64.2474494,70.8143102 63.6369043,70.2038977 63.6369043,69.4509158 C63.6369043,68.6979339 64.2474494,68.0875214 65.0005948,68.0875214 L65.0005948,51.7267888 C64.2474494,51.7267888 63.6369043,51.1163763 63.6369043,50.3633944 C63.6369043,49.6104125 64.2474494,49 65.0005948,49 C65.7537402,49 66.3642852,49.6104125 66.3642852,50.3633944 C66.3642852,50.6152816 66.2959632,50.8512148 66.1768361,51.0536808 L66.1768361,51.0536808 Z M74.9589487,72 C76.0592735,72 76.2934239,72.6072543 75.4783436,73.3596586 L73.4702868,75.2133052 C72.656816,75.9642239 71.1011127,76.5729638 69.999426,76.5729638 L57.9641665,76.5729638 C56.8607339,76.5729638 55.3083859,75.9657095 54.4933056,75.2133052 L52.4852488,73.3596586 C51.6717779,72.6087399 51.9052063,72 53.0046438,72 L74.9589487,72 Z" id="boat" sketch:type="MSShapeGroup"></path>
<div class="brand-boat-container">
<svg class="brand-boat" width="27px" height="28px" viewBox="0 0 27 28">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g transform="translate(-52.000000, -49.000000)" fill="#fff">
<path d="M56.9966734,62.0821591 C56.9548869,62.5960122 56.5246217,63 56,63 C55.4477153,63 55,62.5522847 55,62 C55,61.4477153 55.4477153,61 56,61 C56.1542427,61 56.3003292,61.0349209 56.4307846,61.0972878 C56.4365546,60.9708421 56.4672874,60.8469847 56.5249064,60.738086 L60.591292,53.0527085 C60.6128147,53.0120312 60.6340855,52.9741034 60.6550548,52.9389125 C60.2727349,52.7984089 60,52.4310548 60,52 C60,51.4477153 60.4477153,51 61,51 C61.5522847,51 62,51.4477153 62,52 C62,52.4778316 61.6648606,52.8773872 61.2168176,52.9764309 C61.2239494,53.0443316 61.2276783,53.1212219 61.2276783,53.2070193 L61.2276783,64.6460667 C61.2276783,64.7905295 61.2109404,64.9142428 61.1799392,65.0161455 C61.6463447,65.1008929 62,65.5091461 62,66 C62,66.5522847 61.5522847,67 61,67 C60.4477153,67 60,66.5522847 60,66 C60,65.6775356 60.1526298,65.3907197 60.3895873,65.2078547 C60.3353792,65.1698515 60.2797019,65.1246206 60.2229246,65.0720038 L56.9966734,62.0821591 Z M66.1768361,51.0536808 L76.3863147,62.9621534 C76.6248381,62.7575589 76.9348843,62.6339439 77.2738087,62.6339439 C78.0269541,62.6339439 78.6374991,63.2443563 78.6374991,63.9973383 C78.6374991,64.7503202 78.0269541,65.3607327 77.2738087,65.3607327 C76.7179077,65.3607327 76.2396954,65.0281798 76.0273418,64.5512033 L76.0273418,64.5512033 L66.2470617,68.8970508 L66.2470617,68.8970508 C66.3224088,69.0662913 66.3642852,69.2537142 66.3642852,69.4509158 C66.3642852,70.2038977 65.7537402,70.8143102 65.0005948,70.8143102 C64.2474494,70.8143102 63.6369043,70.2038977 63.6369043,69.4509158 C63.6369043,68.6979339 64.2474494,68.0875214 65.0005948,68.0875214 L65.0005948,51.7267888 C64.2474494,51.7267888 63.6369043,51.1163763 63.6369043,50.3633944 C63.6369043,49.6104125 64.2474494,49 65.0005948,49 C65.7537402,49 66.3642852,49.6104125 66.3642852,50.3633944 C66.3642852,50.6152816 66.2959632,50.8512148 66.1768361,51.0536808 L66.1768361,51.0536808 Z M74.9589487,72 C76.0592735,72 76.2934239,72.6072543 75.4783436,73.3596586 L73.4702868,75.2133052 C72.656816,75.9642239 71.1011127,76.5729638 69.999426,76.5729638 L57.9641665,76.5729638 C56.8607339,76.5729638 55.3083859,75.9657095 54.4933056,75.2133052 L52.4852488,73.3596586 C51.6717779,72.6087399 51.9052063,72 53.0046438,72 L74.9589487,72 Z" id="boat" sketch:type="MSShapeGroup"></path>
</g>
</g>
</g>
</svg>
</svg>
</div>
<div class="brand-illustration">
<!-- mountain 1 -->
<div class="brand-mountain-1">
......
......@@ -182,3 +182,7 @@
border-color: var(--brand-color);
transition: background .2s linear .2s, border .2s linear .2s;
}
.Button--withIcon {
line-height: 1;
}
......@@ -63,11 +63,12 @@ CorvusControllers.controller('Unauthorized', ['$scope', '$location', function($s
}]);
CorvusControllers.controller('NotFound', ['AppState', function(AppState) {
AppState.setAppContext('none');
}]);
CorvusControllers.controller('Nav', ['$scope', '$routeParams', '$location', 'AppState', function($scope, $routeParams, $location, AppState) {
$scope.activeClass = 'is--selected';
$scope.isActive = function(location) {
return $location.path().indexOf(location) >= 0;
};
......@@ -80,6 +81,9 @@ CorvusControllers.controller('Nav', ['$scope', '$routeParams', '$location', 'App
case "setup":
$scope.nav = 'setup';
break;
case "none":
$scope.nav = 'none';
break;
default:
$scope.nav = 'main';
}
......
......@@ -20,7 +20,7 @@
height: 180px;
}
.brand-boat {
.brand-boat-container {
position: absolute;
bottom: 0;
z-index: 6;
......@@ -28,7 +28,13 @@
margin-bottom: 0.5em;
}
@-webkit-keyframes boat_trip {
.brand-boat {
transform-origin: 50% bottom;
animation: boat_rock 2s ease-in-out infinite;
animation-direction: alternate;
}
@keyframes boat_trip {
0% {
margin-left: -2%;
}
......@@ -41,6 +47,38 @@
}
}
@keyframes boat_lost {
0% {
margin-left: 40%;
transform: rotateY(0deg);
}
45% {
margin-left: 60%;
transform: rotateY(0deg);
}
50% {
margin-left: 60%;
transform: rotateY(180deg);
}
95% {
margin-left: 40%;
transform: rotateY(180deg);
}
100% {
margin-left: 40%;
transform: rotateY(0deg);
}
}
@keyframes boat_rock {
from {
transform: rotate(-10deg);
}
to {
transform: rotate(10deg);
}
}
.brand-illustration {
height: 180px;
position: absolute;
......@@ -59,6 +97,17 @@
z-index: 50;
}
.NotFoundScene .brand-bridge,
.NotFoundScene .brand-mountain-1,
.NotFoundScene .brand-mountain-1,
.NotFoundScene .brand-illustration {
display: none;
}
.NotFoundScene .brand-boat-container {
animation: boat_lost 30s linear infinite;
}
/* flip the second mountain around */
.brand-mountain-2 {
-moz-transform: scaleX(-1);
......
<div class="layout-centered flex full-height">
<div class="p4 text-bold">
<h1 class="text-brand text-light mb3">We're a little lost...</h1>
<p class="h4 mb1">The page you asked for couldn't be found.</p>
<p class="h4">You might've been tricked by a ninja, but in all likelihood, you were just given a bad link.</p>
<p class="h4 my4">You can always:</p>
<div class="flex align-center">
<a class="Button Button--primary" href="/q">
<div class="p1">Ask a new question.</div>
</a>
<span class="mx2">or</span>
<a class="Button Button--withIcon" target="_blank" href="http://tv.giphy.com/kitten">
<div class="p1 flex align-center relative">
<span class="h2">😸</span>
<span class="ml1">Take a kitten break.</span>
</div>
</a>
</div>
</div>
</div>
<div class="NotFoundScene" ng-include="'/app/auth/partials/auth_scene.html'"></div>
......@@ -94,6 +94,11 @@ CorvusServices.factory('AppState', ['$rootScope', '$q', '$location', '$timeout',
$location.path('/unauthorized/');
},
setAppContext: function(appContext) {
service.model.appContext = appContext;
$rootScope.$broadcast('appstate:context-changed', service.model.appContext);
},
routeChanged: function(event) {
// establish our application context based on the route (URI)
// valid app contexts are: 'setup', 'auth', 'main', 'admin', or 'unknown'
......@@ -110,8 +115,7 @@ CorvusServices.factory('AppState', ['$rootScope', '$q', '$location', '$timeout',
// if the context of the app has changed due to this route change then send out an event
if (service.model.appContext !== routeContext) {
service.model.appContext = routeContext;
$rootScope.$broadcast('appstate:context-changed', service.model.appContext);
service.setAppContext(routeContext);
}
// this code is here to ensure that we have resolved our currentUser BEFORE we execute any other
......
......@@ -20,7 +20,7 @@
<ul class="wrapper flex align-center">
<li>
<a class="NavItem cursor-pointer text-white flex align-center" href="/">
<mb-logo-icon class="text-white"></mb-logo-icon>
<mb-logo-icon class="text-white my2"></mb-logo-icon>
</a>
</li>
<li>
......@@ -96,6 +96,18 @@
<mb-profile-link user="user" context="nav"></mb-profile-link>
</div>
</nav>
<!-- NO NAV -->
<nav class="py2 sm-py1 xl-py3 relative" ng-show="nav === 'none'">
<ul class="wrapper flex align-center">
<li>
<a class="NavItem cursor-pointer flex align-center" href="/">
<mb-logo-icon class="text-brand my2">
</mb-logo-icon>
</a>
</li>
</ul>
</nav>
</div>
<main class="Main full-height flex flex-column" ng-view></main>
......
......@@ -41,8 +41,8 @@
display_name NonEmptyString}
(write-check Field id)
(check-500 (m/mapply upd Field id (merge {:description description ; you're allowed to unset description and special_type
:special_type special_type
:display_name display_name} ; but field_type and preview_display must be replaced
:special_type special_type} ; but field_type and preview_display must be replaced
(when display_name {:display_name display_name})
(when field_type {:field_type field_type}) ; with new non-nil values
(when-not (nil? preview_display) {:preview_display preview_display}))))
(Field id))
......
......@@ -70,7 +70,7 @@
:table_id (id :venues)
:special_type "fk"
:name "LATITUDE"
:display_name nil
:display_name "Latitude"
:updated_at $
:active true
:id $
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment