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