refactor(core): ♻️ drop footer mustache fallback

This commit is contained in:
alistair3149 2022-10-04 20:08:06 -04:00
parent 2bc022aba2
commit 4c9aa17bb2
No known key found for this signature in database
4 changed files with 7 additions and 10 deletions

View file

@ -39,13 +39,6 @@ final class Footer extends Partial {
$data = []; $data = [];
$footerLinks = $skin->getFooterLinksPublic(); $footerLinks = $skin->getFooterLinksPublic();
$msg = [ 'desc', 'tagline' ];
// Get site footer messages
foreach ( $msg as $key ) {
$data["msg-citizen-footer-$key"] = $skin->msg( "citizen-footer-$key" )
->inContentLanguage()->parse();
}
// Based on SkinMustache // Based on SkinMustache
// Backported because of 1.35 support // Backported because of 1.35 support

View file

@ -105,6 +105,10 @@ class SkinCitizen extends SkinMustache {
'html-citizen-jumptotop' => $this->msg( 'citizen-jumptotop' )->text() . ' [home]', 'html-citizen-jumptotop' => $this->msg( 'citizen-jumptotop' )->text() . ' [home]',
'html-body-content--formatted' => $bodycontent->buildBodyContent(), 'html-body-content--formatted' => $bodycontent->buildBodyContent(),
'html-tagline' => $tagline->getTagline(), 'html-tagline' => $tagline->getTagline(),
// Messages
// Needed to be parsed here as it should be wikitext
'msg-citizen-footer-desc' => $this->msg( "citizen-footer-desc" )->inContentLanguage()->parse(),
'msg-citizen-footer-tagline' => $this->msg( "citizen-footer-tagline" )->inContentLanguage()->parse(),
]; ];
$data += $tools->getPageToolsData( $parentData ); $data += $tools->getPageToolsData( $parentData );

View file

@ -23,11 +23,11 @@
<div id="footer-sitetitle" class="mw-wiki-title">{{>Wordmark}}</div> <div id="footer-sitetitle" class="mw-wiki-title">{{>Wordmark}}</div>
<p id="footer-desc">{{{msg-citizen-footer-desc}}}</p> <p id="footer-desc">{{{msg-citizen-footer-desc}}}</p>
</div> </div>
{{#data-citizen-places}}{{>Footer__row}}{{/data-citizen-places}} {{#data-places}}{{>Footer__row}}{{/data-places}}
</section> </section>
<section class="citizen-footer__bottom"> <section class="citizen-footer__bottom">
<div id="footer-tagline">{{{msg-citizen-footer-tagline}}}</div> <div id="footer-tagline">{{{msg-citizen-footer-tagline}}}</div>
{{#data-footer.data-icons}}{{>Footer__row}}{{/data-footer.data-icons}} {{#data-icons}}{{>Footer__row}}{{/data-icons}}
</section> </section>
</div> </div>
</footer> </footer>

View file

@ -23,4 +23,4 @@
{{>ContentFooter}} {{>ContentFooter}}
</main> </main>
{{{html-after-content}}} {{{html-after-content}}}
{{#data-citizen-footer}}{{>Footer}}{{/data-citizen-footer}} {{#data-footer}}{{>Footer}}{{/data-footer}}