Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions language/en-GB/tpl_cassiopeia.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
; Note : All ini files need to be saved as UTF-8

TPL_CASSIOPEIA_BACKTOTOP="Back to Top"
TPL_CASSIOPEIA_BACKTOTOP_LABEL="Back-to-top Link"
TPL_CASSIOPEIA_FLUID="Fluid"
TPL_CASSIOPEIA_FLUID_LABEL="Fluid Layout"
TPL_CASSIOPEIA_LOGO_LABEL="Logo"
Expand Down
9 changes: 4 additions & 5 deletions templates/cassiopeia/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,16 +173,15 @@
</div>
<?php endif; ?>

<?php if ($this->countModules('footer')) : ?>
<?php if ($this->countModules('footer') || ($this->params->get('backTop') == 1)) : ?>
<footer class="grid-child container-footer footer">
<hr>
<p class="float-right">
<jdoc:include type="modules" name="footer" style="none" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test after installing blog sample data.
The menu module is next to the button, so much that they look related. This is really confusing.

<?php if ($this->params->get('backTop') == 1) : ?>
<a href="#top" id="back-top" class="back-top">
<span class="fas fa-arrow-up" aria-hidden="true"></span>
<span class="sr-only"><?php echo Text::_('TPL_CASSIOPEIA_BACKTOTOP'); ?></span>
</a>
</p>
<jdoc:include type="modules" name="footer" style="none" />
<?php endif; ?>
</footer>
<?php endif; ?>

Expand Down
3 changes: 3 additions & 0 deletions templates/cassiopeia/scss/blocks/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
.footer {

.back-top {
align-self: flex-end;
height: 40px;
padding: 8px 11px;
color: #fff;
background: $cassiopeia-template-color;
border-radius: 3px;

@include margin("right", 5px);
@include margin("left", auto);
}
}
8 changes: 8 additions & 0 deletions templates/cassiopeia/scss/blocks/_global.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
// Global
:root {
scroll-behavior: smooth;

// Disable smooth scroll when the user has set "prefers-reduced-motion"
@media screen and (prefers-reduced-motion: reduce) {
scroll-behavior: auto;
}
}

html {
font-size: $font-size-root;
Expand Down
12 changes: 12 additions & 0 deletions templates/cassiopeia/templateDetails.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>

<field
name="backTop"
type="radio"
label="TPL_CASSIOPEIA_BACKTOTOP_LABEL"
layout="joomla.form.field.radio.switcher"
default="0"
filter="integer"
>
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
</fieldset>
</fields>
</config>
Expand Down