Add `-demo` to the SVG and text demo files
This commit is contained in:
parent
40c0e9b8c5
commit
8d6636b1cf
|
@ -1,5 +1,5 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="/css/bootstrap/bootstrap.css">
|
||||
<link rel="stylesheet" href="/css/pathfinder.css">
|
||||
<script type="text/javascript" src="js/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/bootstrap/bootstrap.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery/jquery.js"></script>
|
||||
<script type="text/javascript" src="/js/bootstrap/bootstrap.js"></script>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ref="/" aria-haspopup="true" aria-expanded="false">Demos</a>
|
||||
<div class="dropdown-menu" aria-labelledby="pf-demos-menu">
|
||||
<a class="dropdown-item" href="/">Text</a>
|
||||
<a class="dropdown-item" href="/svg">SVG</a>
|
||||
<a class="dropdown-item" href="/demo/svg">SVG</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<title>SVG — Pathfinder Demo</title>
|
||||
<meta charset="utf-8">
|
||||
${require('./include/header.html')}
|
||||
<script type="text/javascript" src="js/pathfinder/svg.js"></script>
|
||||
<script type="text/javascript" src="/js/pathfinder/svg-demo.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
${require('./include/navbar.html')}
|
|
@ -4,7 +4,7 @@
|
|||
<title>Text — Pathfinder Demo</title>
|
||||
<meta charset="utf-8">
|
||||
${require('./include/header.html')}
|
||||
<script type="text/javascript" src="js/pathfinder/text.js"></script>
|
||||
<script type="text/javascript" src="/js/pathfinder/text-demo.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
${require('./include/navbar.html')}
|
|
@ -1,4 +1,4 @@
|
|||
// pathfinder/client/src/svg.ts
|
||||
// pathfinder/client/src/svg-demo.ts
|
||||
//
|
||||
// Copyright © 2017 The Pathfinder Project Developers.
|
||||
//
|
||||
|
@ -21,7 +21,7 @@ import {PathfinderView, Timings} from './view';
|
|||
import AppController from './app-controller';
|
||||
import SSAAStrategy from "./ssaa-strategy";
|
||||
|
||||
require('../html/svg.html');
|
||||
require('../html/svg-demo.html');
|
||||
|
||||
const parseColor = require('parse-color');
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// pathfinder/client/src/text.ts
|
||||
// pathfinder/client/src/text-demo.ts
|
||||
//
|
||||
// Copyright © 2017 The Pathfinder Project Developers.
|
||||
//
|
||||
|
@ -26,7 +26,7 @@ import AppController from './app-controller';
|
|||
import PathfinderBufferTexture from './buffer-texture';
|
||||
import SSAAStrategy from './ssaa-strategy';
|
||||
|
||||
require('../html/text.html');
|
||||
require('../html/text-demo.html');
|
||||
|
||||
const TEXT: string =
|
||||
`’Twas brillig, and the slithy toves
|
|
@ -3,8 +3,8 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|||
module.exports = {
|
||||
devtool: 'inline-source-map',
|
||||
entry: {
|
||||
svg: "./src/svg.ts",
|
||||
text: "./src/text.ts",
|
||||
'svg-demo': "./src/svg-demo.ts",
|
||||
'text-demo': "./src/text-demo.ts",
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
|
|
@ -38,8 +38,8 @@ use std::mem;
|
|||
use std::path::{Path, PathBuf};
|
||||
use std::u32;
|
||||
|
||||
static STATIC_TEXT_DEMO_PATH: &'static str = "../client/text.html";
|
||||
static STATIC_SVG_DEMO_PATH: &'static str = "../client/svg.html";
|
||||
static STATIC_TEXT_DEMO_PATH: &'static str = "../client/text-demo.html";
|
||||
static STATIC_SVG_DEMO_PATH: &'static str = "../client/svg-demo.html";
|
||||
static STATIC_CSS_BOOTSTRAP_PATH: &'static str = "../client/node_modules/bootstrap/dist/css";
|
||||
static STATIC_CSS_PATHFINDER_PATH: &'static str = "../client/css/pathfinder.css";
|
||||
static STATIC_JS_BOOTSTRAP_PATH: &'static str = "../client/node_modules/bootstrap/dist/js";
|
||||
|
@ -475,7 +475,7 @@ fn partition_svg_paths(request: Json<PartitionSvgPathsRequest>)
|
|||
fn static_text_demo() -> io::Result<NamedFile> {
|
||||
NamedFile::open(STATIC_TEXT_DEMO_PATH)
|
||||
}
|
||||
#[get("/svg")]
|
||||
#[get("/demo/svg")]
|
||||
fn static_svg_demo() -> io::Result<NamedFile> {
|
||||
NamedFile::open(STATIC_SVG_DEMO_PATH)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue