mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-06-09 11:21:07 -04:00
Split out name and view for routes
This will help for the conference urls, which will be sub-urls, all under `conference`
This commit is contained in:
parent
eed6f1fc08
commit
38c4566e2b
3 changed files with 22 additions and 12 deletions
|
@ -1,50 +1,60 @@
|
|||
[
|
||||
{
|
||||
"name": "splash",
|
||||
"pattern": "^/?$",
|
||||
"view": "splash",
|
||||
"view": "splash/splash",
|
||||
"title": "Imagine, Program, Share"
|
||||
},
|
||||
{
|
||||
"name": "about",
|
||||
"pattern": "^/about$",
|
||||
"view": "about",
|
||||
"view": "about/about",
|
||||
"title": "About"
|
||||
},
|
||||
{
|
||||
"name": "components",
|
||||
"pattern": "^/components$",
|
||||
"view": "components",
|
||||
"view": "components/components",
|
||||
"title": "Components"
|
||||
},
|
||||
{
|
||||
"name": "hoc",
|
||||
"pattern": "^/hoc$",
|
||||
"view": "hoc",
|
||||
"view": "hoc/hoc",
|
||||
"title": "Hour of Code"
|
||||
},
|
||||
{
|
||||
"name": "credits",
|
||||
"pattern": "^/info/credits$",
|
||||
"view": "credits",
|
||||
"view": "credits/credits",
|
||||
"title": "Credits"
|
||||
},
|
||||
{
|
||||
"name": "cards",
|
||||
"pattern": "^/info/cards$",
|
||||
"view": "cards",
|
||||
"view": "cards/cards",
|
||||
"title": "Cards"
|
||||
},
|
||||
{
|
||||
"name": "communityblocks-interviews",
|
||||
"pattern": "^/info/communityblocks-interviews$",
|
||||
"view": "communityblocks-interviews",
|
||||
"view": "communityblocks-interviews/communityblocks-interviews",
|
||||
"title": "Community Blocks Beta Tester Interviews"
|
||||
},
|
||||
{
|
||||
"name": "jobs",
|
||||
"pattern": "^/jobs$",
|
||||
"view": "jobs",
|
||||
"view": "jobs/jobs",
|
||||
"title": "Jobs"
|
||||
},
|
||||
{
|
||||
"name": "wedo2",
|
||||
"pattern": "^/wedo$",
|
||||
"view": "wedo2",
|
||||
"view": "wedo2/wedo2",
|
||||
"title": "LEGO WeDo 2.0"
|
||||
},
|
||||
{
|
||||
"name": "donate",
|
||||
"pattern": "^/info/donate",
|
||||
"redirect": "https://secure.donationpay.org/scratchfoundation/"
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@
|
|||
<script src="/js/lib/react-intl-with-locales{{min}}.js"></script>
|
||||
<script src="/js/lib/raven.min.js"></script>
|
||||
|
||||
<script src="/js/{{view}}.intl.js"></script>
|
||||
<script src="/js/{{view}}.bundle.js"></script>
|
||||
<script src="/js/{{name}}.intl.js"></script>
|
||||
<script src="/js/{{name}}.bundle.js"></script>
|
||||
|
||||
<!-- Error logging (Sentry) -->
|
||||
<script>
|
||||
|
|
|
@ -12,7 +12,7 @@ var entry = {
|
|||
};
|
||||
routes.forEach(function (route) {
|
||||
if (!route.redirect) {
|
||||
entry[route.view] = './src/views/' + route.view + '/' + route.view + '.jsx';
|
||||
entry[route.name] = './src/views/' + route.view + '.jsx';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue