mirror of https://github.com/ascribe/onion.git
[wip] add temporary base url
This commit is contained in:
parent
669f2b3ae7
commit
5445698eea
|
@ -6,10 +6,10 @@
|
|||
<title>ascribe</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="//brick.a.ssl.fastly.net/Source+Sans+Pro:400,600,700,900">
|
||||
<link rel="stylesheet" href="/static/css/main.css">
|
||||
<link rel="stylesheet" href="/beta/static/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="main" class="container"></div>
|
||||
<script src="/static/js/app.js"></script>
|
||||
<script src="/beta/static/js/app.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -38,10 +38,10 @@ let Header = React.createClass({
|
|||
return (
|
||||
<Navbar>
|
||||
<Nav>
|
||||
<a className="navbar-brand" href="/">
|
||||
<Link className="navbar-brand" to="pieces">
|
||||
<span>ascribe </span>
|
||||
<span className="glyph-ascribe-spool-chunked ascribe-color"></span>
|
||||
</a>
|
||||
</Link>
|
||||
</Nav>
|
||||
<Nav right>
|
||||
<DropdownButton eventKey="1" title={this.state.currentUser.username}>
|
||||
|
|
11
js/routes.js
11
js/routes.js
|
@ -8,12 +8,17 @@ import PieceList from './components/piece_list';
|
|||
import EditionContainer from './components/edition_container';
|
||||
|
||||
let Route = Router.Route;
|
||||
let Redirect = Router.Redirect;
|
||||
let baseUrl = '/beta';
|
||||
|
||||
|
||||
let routes = (
|
||||
<Route name="app" handler={AscribeApp}>
|
||||
<Route name="pieces" path="/" handler={PieceList} />
|
||||
<Route name="edition" path="/editions/:editionId" handler={EditionContainer} />
|
||||
<Route name="app" path={baseUrl} handler={AscribeApp}>
|
||||
<Route name="pieces" path="collection" handler={PieceList} />
|
||||
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
|
||||
|
||||
<Redirect from={baseUrl} to="pieces" />
|
||||
<Redirect from={baseUrl + '/'} to="pieces" />
|
||||
</Route>
|
||||
);
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
@font-face {
|
||||
font-family: 'ascribe';
|
||||
src:url('/static/fonts/ascribe.eot?-oi6ttk');
|
||||
src:url('/static/fonts/ascribe.eot?#iefix-oi6ttk') format('embedded-opentype'),
|
||||
url('/static/fonts/ascribe.woff?-oi6ttk') format('woff'),
|
||||
url('/static/fonts/ascribe.ttf?-oi6ttk') format('truetype'),
|
||||
url('/static/fonts/ascribe.svg?-oi6ttk#ascribe') format('svg');
|
||||
src:url('/beta/static/fonts/ascribe.eot?-oi6ttk');
|
||||
src:url('/beta/static/fonts/ascribe.eot?#iefix-oi6ttk') format('embedded-opentype'),
|
||||
url('/beta/static/fonts/ascribe.woff?-oi6ttk') format('woff'),
|
||||
url('/beta/static/fonts/ascribe.ttf?-oi6ttk') format('truetype'),
|
||||
url('/beta/static/fonts/ascribe.svg?-oi6ttk#ascribe') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
var express = require('express');
|
||||
var compression = require('compression')
|
||||
var baseUrl = '/beta';
|
||||
|
||||
var app = express();
|
||||
|
||||
app.use(compression());
|
||||
|
||||
app.use('/static/js', express.static(__dirname + '/build/js'));
|
||||
app.use('/static/css', express.static(__dirname + '/build/css'));
|
||||
app.use('/static/fonts', express.static(__dirname + '/build/fonts'));
|
||||
app.use('/static/thirdparty/', express.static(__dirname + '/node_modules'));
|
||||
app.use(baseUrl + '/static/js', express.static(__dirname + '/build/js'));
|
||||
app.use(baseUrl + '/static/css', express.static(__dirname + '/build/css'));
|
||||
app.use(baseUrl + '/static/fonts', express.static(__dirname + '/build/fonts'));
|
||||
app.use(baseUrl + '/static/thirdparty/', express.static(__dirname + '/node_modules'));
|
||||
|
||||
app.get(/.*/, function(req, res) {
|
||||
res.sendFile(__dirname + '/index.html');
|
||||
|
|
Loading…
Reference in New Issue