Skip to content

Commit

Permalink
Merge pull request #40 from Tathanen/master
Browse files Browse the repository at this point in the history
Support installation in non-root directory
  • Loading branch information
Tathanen authored Jun 16, 2016
2 parents 22227bf + 6560965 commit b4d0c95
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Be sure to set `apiroot`, `token`, or `theme` in the deploy command as appropria

You can also just run `grunt` with the appropriate `env` value to export the full site to your `/build` directory, and manually deploy its contents to whatever web hosting solution you prefer.

If you plan to deploy to a non-root directory, update the `<base>` tag in `index.html`, found in `/source/modules/_app/templates`, before running your Grunt tasks. For example, if you want to deploy to `something.com/wall`, set `href` to `/wall/`.

## Docker Image

We provide a lightweight (6mb) Docker image for quick setup and installation:
Expand Down
6 changes: 3 additions & 3 deletions source/modules/_app/controllers/wall.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module.exports = [
}
else
{
toastr.error( "Malformed Drone response. <a href='/#/config'><i class='fa fa-cog'></i></a>" );
toastr.error( "Malformed Drone response. <a href='#/config'><i class='fa fa-cog'></i></a>" );
ctrl.updating = false;
}

Expand All @@ -180,12 +180,12 @@ module.exports = [
if( response.status === 401 )
{
toastr.error(
"Drone authorization failed. <a href='/#/config'><i class='fa fa-cog'></i></a>" );
"Drone authorization failed. <a href='#/config'><i class='fa fa-cog'></i></a>" );
}
else
{
toastr.error(
"Could not retrieve Drone status. <a href='/#/config'><i class='fa fa-cog'></i></a>" );
"Could not retrieve Drone status. <a href='#/config'><i class='fa fa-cog'></i></a>" );
}

ctrl.updating = false;
Expand Down
42 changes: 21 additions & 21 deletions source/modules/_app/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,30 @@
data-ng-repeat="( property, content ) in head.meta.tags"
data-ng-if="content">

<link rel="apple-touch-icon" sizes="57x57" href="/favicon/apple-touch-icon-57x57.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="60x60" href="/favicon/apple-touch-icon-60x60.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="72x72" href="/favicon/apple-touch-icon-72x72.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="76x76" href="/favicon/apple-touch-icon-76x76.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="114x114" href="/favicon/apple-touch-icon-114x114.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="120x120" href="/favicon/apple-touch-icon-120x120.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="144x144" href="/favicon/apple-touch-icon-144x144.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="152x152" href="/favicon/apple-touch-icon-152x152.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon-180x180.png?v=Nmmr44wJaG">
<link rel="icon" type="image/png" href="/favicon/favicon-32x32.png?v=Nmmr44wJaG" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon/favicon-194x194.png?v=Nmmr44wJaG" sizes="194x194">
<link rel="icon" type="image/png" href="/favicon/favicon-96x96.png?v=Nmmr44wJaG" sizes="96x96">
<link rel="icon" type="image/png" href="/favicon/android-chrome-192x192.png?v=Nmmr44wJaG" sizes="192x192">
<link rel="icon" type="image/png" href="/favicon/favicon-16x16.png?v=Nmmr44wJaG" sizes="16x16">
<link rel="manifest" href="/favicon/manifest.json?v=Nmmr44wJaG">
<link rel="mask-icon" href="/favicon/safari-pinned-tab.svg?v=Nmmr44wJaG" color="#5bbad5">
<link rel="shortcut icon" href="/favicon/favicon.ico?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-touch-icon-57x57.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-touch-icon-60x60.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-touch-icon-72x72.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-touch-icon-76x76.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-touch-icon-114x114.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-touch-icon-120x120.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-touch-icon-144x144.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-touch-icon-152x152.png?v=Nmmr44wJaG">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon-180x180.png?v=Nmmr44wJaG">
<link rel="icon" type="image/png" href="faviconfavicon-32x32.png?v=Nmmr44wJaG" sizes="32x32">
<link rel="icon" type="image/png" href="faviconfavicon-194x194.png?v=Nmmr44wJaG" sizes="194x194">
<link rel="icon" type="image/png" href="faviconfavicon-96x96.png?v=Nmmr44wJaG" sizes="96x96">
<link rel="icon" type="image/png" href="favicon/android-chrome-192x192.png?v=Nmmr44wJaG" sizes="192x192">
<link rel="icon" type="image/png" href="faviconfavicon-16x16.png?v=Nmmr44wJaG" sizes="16x16">
<link rel="manifest" href="favicon/manifest.json?v=Nmmr44wJaG">
<link rel="mask-icon" href="favicon/safari-pinned-tab.svg?v=Nmmr44wJaG" color="#5bbad5">
<link rel="shortcut icon" href="faviconfavicon.ico?v=Nmmr44wJaG">
<meta name="apple-mobile-web-app-title" content="Drone Wall">
<meta name="application-name" content="Drone Wall">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/favicon/mstile-144x144.png?v=Nmmr44wJaG">
<meta name="msapplication-config" content="/favicon/browserconfig.xml?v=Nmmr44wJaG">
<meta name="msapplication-TileImage" content="favicon/mstile-144x144.png?v=Nmmr44wJaG">
<meta name="msapplication-config" content="favicon/browserconfig.xml?v=Nmmr44wJaG">

<link rel="stylesheet" href="/project.css">
<link rel="stylesheet" href="project.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,700">

Expand All @@ -47,7 +47,7 @@

<main data-ng-view data-autoscroll></main>

<script src="/dist.js" defer></script>
<script src="dist.js" defer></script>

</body>

Expand Down
2 changes: 1 addition & 1 deletion source/modules/_app/templates/wall.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<aside class="config">
<a href="/#/config"><i class="fa fa-cog"></i> Config</a>
<a href="#/config"><i class="fa fa-cog"></i> Config</a>
</aside>

<section class="build-column">
Expand Down
9 changes: 6 additions & 3 deletions source/modules/config/controllers/config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";

module.exports = [ "DroneAPI",
module.exports = [ "$location", "DroneAPI",

function ( DroneAPI )
function ( $location, DroneAPI )
{
var ctrl = this;

Expand All @@ -18,7 +18,10 @@ module.exports = [ "DroneAPI",
localStorage.setItem( "path", ctrl.path );
localStorage.setItem( "token", ctrl.token );

window.location = "/";
DroneAPI.rootPath = ctrl.path || DroneAPI.rootPath;
DroneAPI.setKey( ctrl.token || DroneAPI.getKey() );

$location.path( "/" );
}
};

Expand Down
2 changes: 1 addition & 1 deletion source/modules/config/templates/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1><span>Drone</span> <span>Wall</span></h1>

<div class="buttons">
<button type="submit">Save</button>
<a href="/#/">Cancel</a>
<a href="#/">Cancel</a>
</div>

</form>
Expand Down

0 comments on commit b4d0c95

Please sign in to comment.