Skip to content

Commit

Permalink
[4] New moduleposition below-top, option to switch off logo (#33751)
Browse files Browse the repository at this point in the history
  • Loading branch information
chmst committed May 14, 2021
1 parent c3703d9 commit 00cc7c4
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 10 deletions.
1 change: 1 addition & 0 deletions language/en-GB/tpl_cassiopeia.ini
Expand Up @@ -6,6 +6,7 @@
CASSIOPEIA="Cassiopeia Site template"
TPL_CASSIOPEIA_BACKTOTOP="Back to Top"
TPL_CASSIOPEIA_BACKTOTOP_LABEL="Back-to-top Link"
TPL_CASSIOPEIA_BRAND_LABEL="Brand"
TPL_CASSIOPEIA_COLOR_NAME_ALTERNATIVE="Alternative"
TPL_CASSIOPEIA_COLOR_NAME_LABEL="Colour Theme"
TPL_CASSIOPEIA_COLOR_NAME_STANDARD="Standard"
Expand Down
1 change: 1 addition & 0 deletions language/en-GB/tpl_cassiopeia.sys.ini
Expand Up @@ -6,6 +6,7 @@
CASSIOPEIA="Cassiopeia Site template"
TPL_CASSIOPEIA_MOD_MENU_LAYOUT_DROPDOWN-METISMENU="Dropdown"
TPL_CASSIOPEIA_POSITION_BANNER="Banner"
TPL_CASSIOPEIA_POSITION_BELOW-TOP="Below Top"
TPL_CASSIOPEIA_POSITION_BOTTOM-A="Bottom-a"
TPL_CASSIOPEIA_POSITION_BOTTOM-B="Bottom-b"
TPL_CASSIOPEIA_POSITION_BREADCRUMBS="Breadcrumbs"
Expand Down
27 changes: 18 additions & 9 deletions templates/cassiopeia/index.php
Expand Up @@ -125,16 +125,25 @@
</div>
<?php endif; ?>

<div class="grid-child">
<div class="navbar-brand">
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
</a>
<?php if ($this->params->get('siteDescription')) : ?>
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
<?php endif; ?>
<?php if ($this->countModules('below-top')) : ?>
<div class="grid-child container-below-top">
<jdoc:include type="modules" name="below-top" style="none" />
</div>
</div>
<?php endif; ?>

<?php if ($this->params->get('brand')) : ?>
<div class="grid-child">
<div class="navbar-brand">
<a class="brand-logo" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
</a>
<?php if ($this->params->get('siteDescription')) : ?>
<div class="site-description"><?php echo htmlspecialchars($this->params->get('siteDescription')); ?></div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>

<?php if ($this->countModules('menu', true) || $this->countModules('search', true)) : ?>
<div class="grid-child container-nav">
<?php if ($this->countModules('menu', true)) : ?>
Expand Down
3 changes: 2 additions & 1 deletion templates/cassiopeia/scss/blocks/_layout.scss
Expand Up @@ -12,7 +12,8 @@
position: relative;
}

.container-topbar {
.container-topbar,
.container-below-top {
color: $white;
a {
color: currentColor;
Expand Down
19 changes: 19 additions & 0 deletions templates/cassiopeia/templateDetails.xml
Expand Up @@ -24,6 +24,7 @@
</files>
<positions>
<position>topbar</position>
<position>below-top</position>
<position>menu</position>
<position>search</position>
<position>banner</position>
Expand All @@ -46,11 +47,24 @@
<config>
<fields name="params">
<fieldset name="advanced">
<field
name="brand"
type="radio"
label="TPL_CASSIOPEIA_BRAND_LABEL"
default="1"
layout="joomla.form.field.radio.switcher"
filter="boolean"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="logoFile"
type="media"
default=""
label="TPL_CASSIOPEIA_LOGO_LABEL"
showon="brand:1"
/>

<field
Expand All @@ -59,6 +73,7 @@
default=""
label="TPL_CASSIOPEIA_TITLE"
filter="string"
showon="brand:1"
/>

<field
Expand All @@ -67,13 +82,15 @@
default=""
label="TPL_CASSIOPEIA_TAGLINE"
filter="string"
showon="brand:1"
/>

<field
name="useFontScheme"
type="groupedlist"
label="TPL_CASSIOPEIA_FONT_LABEL"
default="0"
parentclass="span-3"
>
<option value="0">JNONE</option>
<group label="TPL_CASSIOPEIA_FONT_GROUP_LOCAL">
Expand All @@ -91,13 +108,15 @@
label="TPL_CASSIOPEIA_FONT_NOTE_TEXT"
heading="p"
class="alert alert-warning"
parentclass="span-3-inline"
/>

<field
name="colorName"
type="list"
default="colors_standard"
label="TPL_CASSIOPEIA_COLOR_NAME_LABEL"
parentclass="span-3"
>
<option value="colors_standard">TPL_CASSIOPEIA_COLOR_NAME_STANDARD</option>
<option value="colors_alternative">TPL_CASSIOPEIA_COLOR_NAME_ALTERNATIVE</option>
Expand Down

0 comments on commit 00cc7c4

Please sign in to comment.