Initial commit
This commit is contained in:
commit
65e0da7e11
1397 changed files with 596542 additions and 0 deletions
11
site/controllers/about.php
Normal file
11
site/controllers/about.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
27
site/controllers/artist.php
Normal file
27
site/controllers/artist.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
$releases = $page->children()->published();
|
||||
|
||||
$songs = '[';
|
||||
foreach ($releases as $key => $release){
|
||||
$tracks = $release->tracklist()->toStructure();
|
||||
foreach ($tracks as $key => $track){
|
||||
if ($file = $track->audioFile()->toFile()){
|
||||
$songs .= esc('{"url": "'.$file->url().'","song_title": "'.$page->title()->html().' — '.$track->title()->html().'"},');
|
||||
}
|
||||
}
|
||||
}
|
||||
if(strlen($songs) > 1) $songs = substr($songs, 0, -1);
|
||||
$songs .= ']';
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
'medias' => $page->medias()->shuffle(),
|
||||
'releases' => $releases,
|
||||
'songs' => $songs
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
11
site/controllers/contact.php
Normal file
11
site/controllers/contact.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
28
site/controllers/news.php
Normal file
28
site/controllers/news.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
// return function ($site, $pages, $page) {
|
||||
|
||||
// $gridField = $page->gridLayout()->toStructure()->table();
|
||||
// $gridLayout = '[';
|
||||
|
||||
// if ($page->gridLayout()->isNotEmpty()) {
|
||||
// foreach ($gridField as $key => $tableRow) {
|
||||
// $gridLayout .= '[';
|
||||
// foreach ($tableRow as $key2 => $tableCell) {
|
||||
// $gridLayout .= $tableCell->int();
|
||||
// if($key2 < $tableRow->count() - 1) $gridLayout .= ',';
|
||||
// }
|
||||
// $gridLayout .= ']';
|
||||
// if($key < $gridField->count() - 1) $gridLayout .= ',';
|
||||
// }
|
||||
// }
|
||||
// $gridLayout .= ']';
|
||||
|
||||
// return array(
|
||||
// 'ptemplate' => $page->intendedTemplate(),
|
||||
// 'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
// 'gridLayout' => $gridLayout
|
||||
// );
|
||||
// }
|
||||
|
||||
?>
|
||||
13
site/controllers/project.php
Normal file
13
site/controllers/project.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'menuPosition' => 'bottom',
|
||||
'medias' => $page->medias()->toStructure(),
|
||||
'projects' => $page->parent()->children()->published()
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
16
site/controllers/projects.php
Normal file
16
site/controllers/projects.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
$projects = $page->children()->published();
|
||||
|
||||
if (param('type')) {
|
||||
$projects = $projects->filterBy('category', 'categories/'.param('type'), ',');
|
||||
}
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'projects' => $projects,
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
13
site/controllers/shop.category.php
Normal file
13
site/controllers/shop.category.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
$products = $page->children()->published();
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
'products' => $products
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
13
site/controllers/shop.php
Normal file
13
site/controllers/shop.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
$products = $page->grandChildren()->published();
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
'products' => $products->shuffle()
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
13
site/controllers/shop.product.php
Normal file
13
site/controllers/shop.product.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
$products = [$page];
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
'products' => $products
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
11
site/controllers/site.php
Normal file
11
site/controllers/site.php
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
return function ($site, $pages, $page) {
|
||||
|
||||
return array(
|
||||
'ptemplate' => $page->intendedTemplate(),
|
||||
'artists' => $site->index()->published()->filterBy('intendedTemplate', 'artist'),
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue