+ CLOUD PAGES; style updated; other changes
This commit is contained in:
1 parent
dad12f52f4
commit
edf5fbf4bd
27 files changed
+339
-161
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import {getInitialData} from './core/init';
|
||||
import Navigation from './components/Navigation';
|
||||
import MainMenu from './components/MainMenu';
|
||||
import Breadcrumbs from './components/Breadcrumbs';
|
||||
@@ -20,6 +21,7 @@ import ArticlePageControl from './components/ArticlePageControl';
|
||||
import Album from './components/Album';
|
||||
import Parallax from './components/Parallax';
|
||||
|
||||
import Page from './components/CloudPage';
|
||||
import PageSchool from './components/PageSchool';
|
||||
import PageEvents from './components/PageEvents';
|
||||
import PageArticle from './components/PageArticle';
|
||||
@@ -61,6 +63,21 @@ app.config(($locationProvider, $routeProvider) => {
|
||||
$locationProvider.hashPrefix('!');
|
||||
$locationProvider.html5Mode(true);
|
||||
|
||||
const pages = getInitialData().pages
|
||||
.map(i => i.url)
|
||||
.map(i => ({
|
||||
name: i,
|
||||
template: '<cloud-page data="$.data"></cloud-page>',
|
||||
resolveAs: '$',
|
||||
resolve: {
|
||||
data: (api) => {
|
||||
return api.page
|
||||
.url(location.pathname)
|
||||
.then(i => i.data)
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
let routers = [
|
||||
{
|
||||
name: '/',
|
||||
@@ -191,6 +208,7 @@ app.config(($locationProvider, $routeProvider) => {
|
||||
}
|
||||
}
|
||||
]
|
||||
.concat(pages)
|
||||
.map(i => {
|
||||
let path = i.name;
|
||||
delete i.name;
|
||||
@@ -264,6 +282,7 @@ app.run(($location, $rootScope, $http) => {
|
||||
GalleryItem,
|
||||
AlbumCollection,
|
||||
TeacherProfile,
|
||||
Page,
|
||||
PageSchool,
|
||||
PageArticle,
|
||||
PageEvents,
|
||||
|
||||
Reference in new issue
Block a user