SubTemplate: use SubTemplates for boxed content only
This commit is contained in:
parent
0366df9b5f
commit
307d34430a
@ -16,10 +16,7 @@
|
|||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Open Sans", sans-serif;
|
font-family: "Open Sans", sans-serif;
|
||||||
padding: 0 0 3em;
|
|
||||||
margin: 0;
|
|
||||||
background: #aaa 0 -50% fixed;
|
background: #aaa 0 -50% fixed;
|
||||||
background-image: radial-gradient(ellipse at top, #ccc 0%, #aaa 55%, #333 100%);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#wrapper, header {
|
#wrapper, header {
|
||||||
@ -94,6 +91,17 @@ ul#nav li a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Content boxes
|
||||||
|
------------------*/
|
||||||
|
.content-box {
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 0 auto 2rem;
|
||||||
|
padding: 2rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Tiled grid
|
/* Tiled grid
|
||||||
---------------*/
|
---------------*/
|
||||||
.tiled_header {
|
.tiled_header {
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class AdminBar extends SubTemplate
|
class AdminBar extends Template
|
||||||
{
|
{
|
||||||
private $extra_items = [];
|
private $extra_items = [];
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div id="admin_bar">
|
<div id="admin_bar">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class AlbumButtonBox extends SubTemplate
|
class AlbumButtonBox extends Template
|
||||||
{
|
{
|
||||||
private $buttons;
|
private $buttons;
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ class AlbumButtonBox extends SubTemplate
|
|||||||
$this->buttons = $buttons;
|
$this->buttons = $buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="album_button_box">';
|
<div class="album_button_box">';
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class AlbumHeaderBox extends SubTemplate
|
class AlbumHeaderBox extends Template
|
||||||
{
|
{
|
||||||
private $back_link_title;
|
private $back_link_title;
|
||||||
private $back_link;
|
private $back_link;
|
||||||
@ -21,7 +21,7 @@ class AlbumHeaderBox extends SubTemplate
|
|||||||
$this->back_link_title = $back_link_title;
|
$this->back_link_title = $back_link_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="album_title_box">
|
<div class="album_title_box">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class AlbumIndex extends SubTemplate
|
class AlbumIndex extends Template
|
||||||
{
|
{
|
||||||
protected $albums;
|
protected $albums;
|
||||||
protected $show_edit_buttons;
|
protected $show_edit_buttons;
|
||||||
@ -23,7 +23,7 @@ class AlbumIndex extends SubTemplate
|
|||||||
$this->show_labels = $show_labels;
|
$this->show_labels = $show_labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="tiled_grid clearfix">';
|
<div class="tiled_grid clearfix">';
|
||||||
|
@ -18,14 +18,14 @@ class MediaUploader extends SubTemplate
|
|||||||
protected function html_content()
|
protected function html_content()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<form action="', BASEURL, '/uploadmedia/?tag=', $this->tag->id_tag, '" class="boxed_content" method="post" enctype="multipart/form-data">
|
<form action="', BASEURL, '/uploadmedia/?tag=', $this->tag->id_tag, '" method="post" enctype="multipart/form-data">
|
||||||
<h2>Upload new photos to "', $this->tag->tag, '"</h2>
|
<h2>Upload new photos to "', $this->tag->tag, '"</h2>
|
||||||
<div>
|
<div>
|
||||||
<h3>Select files</h3>
|
<h3>Select files</h3>
|
||||||
<input type="file" id="upload_queue" name="uploads[]" multiple>
|
<input class="form-control" type="file" id="upload_queue" name="uploads[]" multiple>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<input name="save" id="photo_submit" type="submit" value="Upload the lot">
|
<input class="btn btn-primary" name="save" id="photo_submit" type="submit" value="Upload the lot">
|
||||||
</div>
|
</div>
|
||||||
<div id="upload_preview_area">
|
<div id="upload_preview_area">
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2016, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class PhotoPage extends SubTemplate
|
class PhotoPage extends Template
|
||||||
{
|
{
|
||||||
protected $photo;
|
protected $photo;
|
||||||
private $exif;
|
private $exif;
|
||||||
@ -34,7 +34,7 @@ class PhotoPage extends SubTemplate
|
|||||||
$this->is_asset_owner = $flag;
|
$this->is_asset_owner = $flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
$this->photoNav();
|
$this->photoNav();
|
||||||
$this->photo();
|
$this->photo();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
* Kabuki CMS (C) 2013-2015, Aaron van Geffen
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
class PhotosIndex extends SubTemplate
|
class PhotosIndex extends Template
|
||||||
{
|
{
|
||||||
protected $mosaic;
|
protected $mosaic;
|
||||||
protected $show_edit_buttons;
|
protected $show_edit_buttons;
|
||||||
@ -42,7 +42,7 @@ class PhotosIndex extends SubTemplate
|
|||||||
$this->show_labels = $show_labels;
|
$this->show_labels = $show_labels;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function html_content()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo '
|
echo '
|
||||||
<div class="tiled_grid clearfix">';
|
<div class="tiled_grid clearfix">';
|
||||||
|
@ -8,10 +8,32 @@
|
|||||||
|
|
||||||
abstract class SubTemplate extends Template
|
abstract class SubTemplate extends Template
|
||||||
{
|
{
|
||||||
|
protected $_class = 'content-box container';
|
||||||
|
protected $_id;
|
||||||
|
protected $_title;
|
||||||
|
|
||||||
|
public function __construct($title = '')
|
||||||
|
{
|
||||||
|
$this->_title = $title;
|
||||||
|
}
|
||||||
|
|
||||||
public function html_main()
|
public function html_main()
|
||||||
{
|
{
|
||||||
echo $this->html_content();
|
echo '
|
||||||
|
<div class="', $this->_class, '"', isset($this->_id) ? ' id="' . $this->_id . '"' : '', '>',
|
||||||
|
$this->html_content(), '
|
||||||
|
</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract protected function html_content();
|
abstract protected function html_content();
|
||||||
|
|
||||||
|
public function setClassName($className)
|
||||||
|
{
|
||||||
|
$this->_class = $className;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setDOMId($id)
|
||||||
|
{
|
||||||
|
$this->_id = $id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user