Template:Hp-sliders: Difference between revisions
From Electrical Installation Guide
(pb missing <div>) |
(updated as in FR wiki (optional links)) |
||
Line 1: | Line 1: | ||
__NOEDITSECTION__<includeonly>{{#default_form:Hp-highlight}}<div class="hp-slider row"> | __NOEDITSECTION__<includeonly>{{#default_form:Hp-highlight}}<div class="hp-slider row"> | ||
<div id="carousel-example-generic" class="carousel slide" data-interval="false" data-ride="carousel" data-interval="10000"> | <div id="carousel-example-generic" class="carousel slide" data-interval="false" data-ride="carousel" data-interval="10000"><!-- | ||
-->{{#if: {{{title2|}}}| | |||
<ol class="carousel-indicators"> | <ol class="carousel-indicators"> | ||
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>{{#if: {{{title2|}}}| | <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>{{#if: {{{title2|}}}| | ||
<li data-target="#carousel-example-generic" data-slide-to="1"></li>}}{{#if: {{{title3|}}}| | <li data-target="#carousel-example-generic" data-slide-to="1"></li>}}{{#if: {{{title3|}}}| | ||
<li data-target="#carousel-example-generic" data-slide-to="2"></li>}} | <li data-target="#carousel-example-generic" data-slide-to="2"></li>}} | ||
</ol> | </ol>}}<!-- | ||
<!--------------------------------------------------------------------------> | ------------------------------------------------------------------------> | ||
<div class="carousel-inner"> | <div class="carousel-inner"><!-- | ||
<!--------------------- slider 1 ---------------------------> | -------------------------------- slider 1 ---------------------------> | ||
<div class="item active">[[file:{{{image|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | <div class="item active">[[file:{{{image|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | ||
<div class="carousel-caption"> | <div class="carousel-caption"> | ||
<h4>{{{title}}}</h4> | <h4>{{{title}}}</h4> | ||
<p class="text">{{{text}}}</p> | <p class="text">{{{text}}}</p> | ||
{{#ifeq: {{#sub:{{{link}}}|0|4}} | http |[{{{link}}} <span class="btn btn-primary">{{{btn-text}}}</span>] | [[{{{link}}}|> {{{btn-text}}} ...]]}} | {{#if: {{{btn-text|}}} | {{#ifeq: {{#sub:{{{link}}}|0|4}} | http |[{{{link}}} <span class="btn btn-primary">{{{btn-text}}}</span>] | [[{{{link}}}|> {{{btn-text}}} ...]]}} }} | ||
</div> | </div> | ||
</div> | </div><!-- | ||
<!--------------------- slider 2 ---------------------------> | -------------------------------- slider 2 ------------------------- | ||
{{#if: {{{title2|}}}| | -->{{#if: {{{title2|}}}| | ||
<div class="item">[[file:{{{image2|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | <div class="item">[[file:{{{image2|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | ||
<div class="carousel-caption"> | <div class="carousel-caption"> | ||
<h4>{{{title2}}}</h4> | <h4>{{{title2}}}</h4> | ||
<p class="text">{{{text2}}}</p> | <p class="text">{{{text2}}}</p> | ||
{{#ifeq: {{#sub:{{{link2}}}|0|4}} | http |[{{{link2}}} <span class="btn btn-primary">{{{btn-text2}}}</span>] | [[{{{link2}}}|> {{{btn-text2}}} ...]]}} | {{#if: {{{btn-text2|}}} | {{#ifeq: {{#sub:{{{link2}}}|0|4}} | http |[{{{link2}}} <span class="btn btn-primary">{{{btn-text2}}}</span>] | [[{{{link2}}}|> {{{btn-text2}}} ...]]}} }} | ||
</div> | </div> | ||
</div> | </div> | ||
}} | }}<!-- | ||
<!--------------------- slider 3 ---------------------------> | -------------------------------- slider 3 ------------------------- | ||
{{#if: {{{title3|}}}| | -->{{#if: {{{title3|}}}| | ||
<div class="item">[[file:{{{image3|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | <div class="item">[[file:{{{image3|Wiki-Home-Slider-image 1920x450.jpg}}}|class=img-responsive|link=]] | ||
<div class="carousel-caption"> | <div class="carousel-caption"> | ||
<h4>{{{title3}}}</h4> | <h4>{{{title3}}}</h4> | ||
<p class="text">{{{text3}}}</p> | <p class="text">{{{text3}}}</p> | ||
{{#ifeq: {{#sub:{{{link3}}}|0|4}} | http |[{{{link3}}} <span class="btn btn-primary">{{{btn-text3}}}</span>] | [[{{{link3}}}|> {{{btn-text3}}} ...]]}} | {{#if: {{{btn-text3|}}} | {{#ifeq: {{#sub:{{{link3}}}|0|4}} | http |[{{{link3}}} <span class="btn btn-primary">{{{btn-text3}}}</span>] | [[{{{link3}}}|> {{{btn-text3}}} ...]]}} }} | ||
</div> | </div> | ||
</div> | </div> | ||
}} | }} | ||
<!--------------------- carousel control arrows, only add if there is at least 2 sliders ---------------------------> | <!--------------------- carousel control arrows, only add if there is at least 2 sliders --------------------------->{{#if: {{{title2|}}}| | ||
{{#if: {{{title2|}}}| | |||
<span class="left carousel-control" data-target="#carousel-example-generic" role="button" data-slide="prev"> | <span class="left carousel-control" data-target="#carousel-example-generic" role="button" data-slide="prev"> | ||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> |
Revision as of 17:25, 27 May 2020
This is the "Hp-sliders" template, used as a model to create/modify Homepage "sliders".
To modify Homepage "sliders", go to the dedicated form page
Alternatively, you can call this template in the following format:
{{Hp-sliders |title= |image= |text= |btn-text= |link= |title2= |image2= |text2= |btn-text2= |link2= |title3= |image3= |text3= |btn-text3= |link3= }}