mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Separate template added to hero for when used within a menu. (ie. Menu Manager)
{HERO_BGIMAGE} behavior modified.
This commit is contained in:
parent
cb95b4b243
commit
8e1b547171
@ -34,8 +34,10 @@ li .hero-list-icon .hero-icon {
|
||||
border-radius: 50%
|
||||
}
|
||||
|
||||
.hero-buttons { padding-right:20px }
|
||||
|
||||
.carousel-hero-menu .hero-buttons { padding-right:30px }
|
||||
.carousel-hero-menu .hero-media-container { padding-right: 45px }
|
||||
.carousel-hero-menu h1, .carousel-hero-menu h2, .carousel-hero-menu ul.hero-list { margin-left: 30px; }
|
||||
|
||||
.text-bold { font-weight: bold; }
|
||||
|
||||
@ -163,6 +165,7 @@ li .hero-list-text {
|
||||
#carousel-hero.carousel .carousel-inner .item {
|
||||
background-color: rgb(127,127,127);
|
||||
background-size: cover;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#carousel-hero .hero-text-container .hero-title {
|
||||
@ -175,12 +178,12 @@ li .hero-list-text {
|
||||
padding-left: 10000px;
|
||||
z-index: 6;
|
||||
margin-bottom: 40px;
|
||||
margin-bottom: 4rem;
|
||||
/* margin-bottom: 4rem;*/
|
||||
}
|
||||
|
||||
#carousel-hero .hero-list li { padding-bottom: 15px }
|
||||
|
||||
#carousel-hero h1, #carousel-hero h2, #carousel-hero ul.hero-list { margin-left: 20px; }
|
||||
|
||||
|
||||
#carousel-hero h2 { font-size: 1.2em}
|
||||
|
||||
|
@ -50,7 +50,7 @@ class hero_shortcodes extends e_shortcode
|
||||
|
||||
$sc = e107::getScBatch('hero', true, 'hero');
|
||||
|
||||
$template = e107::getTemplate('hero','hero','default'); // todo use a table field to make layout dynamic.
|
||||
$template = e107::getTemplate('hero','hero', varset($parm['template'],'default')); // todo use a table field to make layout dynamic.
|
||||
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
@ -15,6 +15,6 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
// e107::lan('hero','menu', true);
|
||||
|
||||
$text = e107::getParser()->parseTemplate("{HERO}");
|
||||
$text = e107::getParser()->parseTemplate("{HERO: template=menu}");
|
||||
e107::getRender()->tablerender(null, $text, 'hero-menu');
|
||||
|
||||
|
@ -44,10 +44,15 @@ class plugin_hero_hero_shortcodes extends e_shortcode
|
||||
{
|
||||
if(empty($this->var['hero_bg']))
|
||||
{
|
||||
return null;
|
||||
return 'none';
|
||||
}
|
||||
|
||||
return e107::getParser()->replaceConstants($this->var['hero_bg'], 'full');
|
||||
if($url = e107::getParser()->replaceConstants($this->var['hero_bg'], 'full'))
|
||||
{
|
||||
return 'url('.$url.')';
|
||||
}
|
||||
|
||||
return 'none';
|
||||
}
|
||||
|
||||
public function sc_hero_carousel_indicators($parm=null)
|
||||
|
@ -8,7 +8,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
$HERO_TEMPLATE['default']['header'] = '<!-- Hero Menu: header -->{SETIMAGE: w=400&h=400}
|
||||
<div id="carousel-hero" class="carousel carousel-fade slide" data-bs-ride="carousel" data-ride="carousel" data-interval="{HERO_SLIDE_INTERVAL}" data-bs-interval="{HERO_SLIDE_INTERVAL}">
|
||||
<div id="carousel-hero" class="carousel carousel-hero-default carousel-fade slide" data-bs-ride="carousel" data-ride="carousel" data-interval="{HERO_SLIDE_INTERVAL}" data-bs-interval="{HERO_SLIDE_INTERVAL}">
|
||||
<div class="carousel-inner d-flex" role="listbox">';
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ $HERO_TEMPLATE['default']['footer'] = '</div><div class="carousel-controls">
|
||||
</div>';
|
||||
|
||||
|
||||
$HERO_TEMPLATE['default']['start'] = '<div class="carousel-item item {HERO_SLIDE_ACTIVE}" style="background-image:url({HERO_BGIMAGE})">
|
||||
$HERO_TEMPLATE['default']['start'] = '<div class="carousel-item item {HERO_SLIDE_ACTIVE}" style="background-image:{HERO_BGIMAGE}">
|
||||
<div class="container">
|
||||
|
||||
<div class="carousel-caption">
|
||||
@ -45,13 +45,14 @@ $HERO_TEMPLATE['default']['start'] = '<div class="carousel-item item {HERO_
|
||||
|
||||
$HERO_TEMPLATE['default']['end'] = '</ul>
|
||||
</div>
|
||||
<div class="col-md-6 ">
|
||||
<div class="col-md-6 hero-media-container">
|
||||
<div class="pull-right animated fadeInRight animation-delay-10">
|
||||
{HERO_MEDIA: class=img-responsive img-fluid d-block w-100}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-buttons text-right">
|
||||
|
||||
<div class="hero-buttons py-3 text-right text-end">
|
||||
|
||||
<a href="{HERO_BUTTON1_URL}" class="btn btn-{HERO_BUTTON1_CLASS} btn-raised animated fadeInRight animation-delay-28">
|
||||
{HERO_BUTTON1_ICON} {HERO_BUTTON1_LABEL}
|
||||
@ -68,7 +69,7 @@ $HERO_TEMPLATE['default']['end'] = '</ul>
|
||||
$HERO_TEMPLATE['default']['item'] = '<li>
|
||||
|
||||
<div class="hero-list-icon animated zoomInUp {HERO_ANIMATION_DELAY}">
|
||||
<span class="hero-icon hero-icon-circle hero-icon-xlg label-{HERO_ICON_STYLE} badge-{HERO_ICON_STYLE} shadow-3dp">
|
||||
<span class="hero-icon hero-icon-circle hero-icon-xlg label-{HERO_ICON_STYLE} bg-{HERO_ICON_STYLE} badge-{HERO_ICON_STYLE} shadow-3dp">
|
||||
{HERO_ICON}
|
||||
</span>
|
||||
</div>
|
||||
@ -78,6 +79,22 @@ $HERO_TEMPLATE['default']['item'] = '<li>
|
||||
|
||||
|
||||
|
||||
$HERO_TEMPLATE['menu'] = $HERO_TEMPLATE['default'];
|
||||
$HERO_TEMPLATE['menu']['header'] = '<!-- Hero Menu: header -->{SETIMAGE: w=400&h=400}
|
||||
<div id="carousel-hero" class="carousel carousel-hero-menu carousel-fade slide" data-bs-ride="carousel" data-ride="carousel" data-interval="{HERO_SLIDE_INTERVAL}" data-bs-interval="{HERO_SLIDE_INTERVAL}">
|
||||
<div class="carousel-inner d-flex" role="listbox">';
|
||||
$HERO_TEMPLATE['menu']['start'] = '<div class="carousel-item item {HERO_SLIDE_ACTIVE}" style="background-image:{HERO_BGIMAGE}">
|
||||
<div>
|
||||
|
||||
<div class="carousel-caption">
|
||||
<div class="hero-text-container">
|
||||
<header class="hero-title animated slideInLeft animation-delay-5">
|
||||
<h1 class="animated fadeInLeft animation-delay-10 font-smoothing">{HERO_TITLE: enwrap=strong}</h1>
|
||||
<h2 class="animated fadeInLeft animation-delay-12">{HERO_DESCRIPTION: enwrap=span&class=text-bold}</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<ul class="hero-list list-unstyled">';
|
||||
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
"class": ""
|
||||
}</field>
|
||||
<field name="hero_order">0</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x300.jpg?text=Image+1</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x350.jpg?text=Image+1</field>
|
||||
<field name="hero_bg"></field>
|
||||
</item>
|
||||
<item>
|
||||
@ -113,7 +113,7 @@
|
||||
"class": ""
|
||||
}</field>
|
||||
<field name="hero_order">1</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x300.jpg?text=Image+2</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x350.jpg?text=Image+2</field>
|
||||
<field name="hero_bg"></field>
|
||||
</item>
|
||||
<item>
|
||||
@ -170,7 +170,7 @@
|
||||
"class": ""
|
||||
}</field>
|
||||
<field name="hero_order">2</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x300.jpg?text=Image+3</field>
|
||||
<field name="hero_media">https://via.placeholder.com/800x350.jpg?text=Image+3</field>
|
||||
<field name="hero_bg"></field>
|
||||
</item>
|
||||
</dbTable>
|
||||
|
Loading…
x
Reference in New Issue
Block a user