Erweiterung der Funktionalität, erste Anbindung an Editoren, Einbinden von JS-Bibliotheken
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
if ($this->data['type'] === 'imageSmall')
|
||||
if ($this->data['type'] === 'small')
|
||||
{
|
||||
$imageClass = 'col-md-4';
|
||||
$textClass = 'col-md-8';
|
||||
@@ -9,10 +9,18 @@
|
||||
$imageClass = 'col-md-8';
|
||||
$textClass = 'col-md-4';
|
||||
}
|
||||
|
||||
$editorData = '';
|
||||
if ($this->isEditable === true)
|
||||
{
|
||||
$editorData = ' data-editor="imageText" data-id="' . $this->data['ID'] . '" data-element="imageText_' . $this->data['ID'] . '"';
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="<?php echo $imageClass; ?>"><img class="img-responsive" src="<?php echo HTML_IMG . $this->data['image']; ?>"/></div>
|
||||
<div class="<?php echo $textClass; ?>"><?php echo nl2br($this->data['text']); ?></div>
|
||||
|
||||
<div class="row"<?php echo $editorData; ?>>
|
||||
<div class="col-md-4 col-sm-6 col-xs-8 col-xs-offset-2 col-sm-offset-0"><img class="img-responsive" src="<?php echo HTML_IMG . $this->data['image']; ?>"/></div>
|
||||
<div class="col-md-8 col-sm-6 col-xs-12">
|
||||
<p><?php echo nl2br($this->data['text']); ?></p>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="row"> </div>
|
||||
</div>
|
||||
@@ -1,57 +1,81 @@
|
||||
<?php
|
||||
if (strpos($this->data['headline'], "\n") !== false)
|
||||
{
|
||||
$headline = explode("\n", $this->data['headline']);
|
||||
$headline[1] = '</h1><h3 class="col-md-offset-4 col-md-8">' . $headline[1] . '';
|
||||
$this->data['headline'] = implode('', $headline);
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php echo $this->data['title']; ?></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="<?php echo HTML_CSS; ?>bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo HTML_CSS; ?>bootstrap.min.css">
|
||||
<link rel="stylesheet" href="<?php echo HTML_CSS; ?>bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" href="<?php echo HTML_CSS; ?>ahd.css">
|
||||
<link rel="stylesheet" href="<?php echo HTML_CSS; ?>ahd.min.css">
|
||||
<script type="text/javascript" src="<?php echo HTML_JS; ?>jquery-3.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo HTML_JS; ?>jquery-ui-1.12.1.min.js"></script>
|
||||
<script type="text/javascript" src="<?php echo HTML_JS; ?>bootstrap.min.js"></script>
|
||||
<?php
|
||||
|
||||
if ($this->isEditable)
|
||||
{
|
||||
$registry = \Helper\Registry::getInstance();
|
||||
$registry->editorConfig['navID'] = $this->data['navID'];
|
||||
?>
|
||||
<link rel="stylesheet" href="<?php echo $registry->editorConfig['editorUrl'] . $registry->editorConfig['editorVersion']; ?>/css/editor.min.css">
|
||||
<script type="text/javascript">var csEditorParams = <?php echo json_encode($registry->editorConfig, JSON_UNESCAPED_UNICODE); ?>;</script>
|
||||
<script type="text/javascript" src="<?php echo $registry->editorConfig['editorUrl'] . $registry->editorConfig['editorVersion']; ?>/editor.js.php?lang=<?php echo $_SESSION['lang']; ?>"></script>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<header class="navbar navbar-fixed-top navbar-inverse">
|
||||
<div class="container">
|
||||
<div class="navbar-header pull-left">
|
||||
<button aria-controls="main-navbar" aria-expanded="false" class="navbar-toggle collapsed" data-target="#main-navbar" data-toggle="collapse" type="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
<?php echo $this->data['navigation']; ?>
|
||||
<div class="pull-right">
|
||||
<img src="<?php echo HTML_IMG; ?>subaru/subaru_logo.png"/>
|
||||
<img src="<?php echo HTML_IMG; ?>daihatsu/daihatsu_logo.png"/>
|
||||
<div class="navbar-header pull-right">
|
||||
<div class="pull-right">
|
||||
<div class="subaru_logo pull-left"></div>
|
||||
<div class="daihatsu_logo pull-right"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<img class="img-responsive" src="<?php echo HTML_IMG; ?>allradhaus/header/allradhaus_01.jpg"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container" id="content">
|
||||
<div class="row"><h1><span class="col-md-12"><?php echo nl2br($this->data['headline']); ?></span></h1></div>
|
||||
<div class="row"> </div>
|
||||
<?php echo $this->data['content']; ?>
|
||||
<?php
|
||||
echo $this->data['keyVisual'];
|
||||
$editorData = '';
|
||||
if ($this->isEditable === true)
|
||||
{
|
||||
$editorData = ' data-editor="headline" data-id="' . $this->data['navID'] . '" data-element="headline_' . $this->data['navID'] . '"';
|
||||
}
|
||||
?>
|
||||
<div class="row"<?php echo $editorData; ?>><h1 class="col-md-12"><?php echo $this->data['headline']; ?></h1></div>
|
||||
<div class="sortable">
|
||||
<?php echo $this->data['content']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-bottom">
|
||||
<div class="container" id="footer">
|
||||
<div class="row col-md-12">
|
||||
<div class="row">
|
||||
<div class="navbar-brand">
|
||||
Kontakt <span class="caret"></span><br/> <br/>
|
||||
<p>
|
||||
Kontakt <span class="caret"></span><br/> <br/>AHD Allradhaus GmbH<br/>Hauptstraße 45<br/>87466 Oy-Mittelberg<br/>Telefon 08366 / 232<br/>Telefax 08366 / 286
|
||||
AHD Allradhaus GmbH<br/>Hauptstraße 45<br/>87466 Oy-Mittelberg<br/>Telefon 08366 / 232<br/>Telefax 08366 / 286
|
||||
</p>
|
||||
</div>
|
||||
<div class="navbar-brand">
|
||||
Öffnungszeiten <span class="caret"></span><br/> <br/>
|
||||
<p>
|
||||
Öffnungszeiten <span class="caret"></span><br/> <br/>Montag - Freitag:<br/>8-12 Uhr und 13-17 Uhr<br/>Samstag:<br/>9-12 Uhr
|
||||
Montag - Freitag:<br/>8-12 Uhr und 13-17 Uhr<br/> <br/>Samstag:<br/>9-12 Uhr
|
||||
</p>
|
||||
</div>
|
||||
<div class="navbar-brand pull-right">
|
||||
<div class="navbar-brand ahd pull-right">
|
||||
<img src="<?php echo HTML_IMG; ?>allradhaus/ahd_allradhaus_logo.png"><br/>
|
||||
<img class="center-block" src="<?php echo HTML_IMG; ?>allradhaus/ahd_allradhaus_raeder_gross.png"/>
|
||||
</div>
|
||||
|
||||
73
templates/keyvisual.phtml
Normal file
73
templates/keyvisual.phtml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
if (isset($this->data['Type']))
|
||||
{
|
||||
$editorData = '';
|
||||
if ($this->isEditable === true)
|
||||
{
|
||||
$editorData = ' data-editor="' . $this->data['Type'] . '" data-id="' . $this->data['navID'] . '" data-element="' . $this->data['Type'] . '_' . $this->data['navID'] . '"';
|
||||
}
|
||||
|
||||
if ($this->data['Type'] === 'slider')
|
||||
{
|
||||
?>
|
||||
<div class="row slider"<?php echo $editorData; ?>>
|
||||
<div class="col-md-12">
|
||||
<?php
|
||||
|
||||
foreach ($this->data as $key => $data)
|
||||
{
|
||||
if (!is_numeric($key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<img class="img-responsive" src="<?php echo HTML_MED . $this->data['navID'] . '/' . $data['imageName'] . '.' . $data['imageExtension']; ?>"/>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
elseif ($this->data['Type'] === 'kenburns')
|
||||
{
|
||||
?>
|
||||
<div class="row kenburns"<?php echo $editorData; ?>>
|
||||
<div class="col-md-12">
|
||||
<?php
|
||||
|
||||
foreach ($this->data as $key => $data)
|
||||
{
|
||||
if (!is_numeric($key))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<img class="img-responsive" src="<?php echo HTML_MED . $this->data['navID'] . '/' . $data['imageName'] . '.' . $data['imageExtension']; ?>" data-zoom="<?php echo $data['imageZoom']; ?>" data-direction="<?php echo $data['imageZoomDirection']; ?>"/>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
elseif ($this->data['Type'] === 'single')
|
||||
{
|
||||
?>
|
||||
<div class="row"<?php echo $editorData; ?>>
|
||||
<div class="col-md-12">
|
||||
<img class="img-responsive" src="<?php echo HTML_MED . $this->data['navID'] . '/' . $this->data[0]['imageName'] . '.' . $this->data[0]['imageExtension']; ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user