JoomlaPolska / jezyk-J4

Język polski dla Joomla 4
GNU General Public License v2.0
3 stars 5 forks source link

[5.0] Cassiopeia Fontstacks #363

Closed joomlapl-bot closed 5 months ago

joomlapl-bot commented 1 year ago

PR w związku ze zmianą oryginału https://github.com/joomla/joomla-cms/pull/40124 Poniżej zmiany w oryginale:

Click to expand the diff! ```diff diff --git a/language/en-GB/tpl_cassiopeia.ini b/language/en-GB/tpl_cassiopeia.ini index 1e41d15aa1c99..767466ee41822 100644 --- a/language/en-GB/tpl_cassiopeia.ini +++ b/language/en-GB/tpl_cassiopeia.ini @@ -15,11 +15,29 @@ TPL_CASSIOPEIA_FLUID_LABEL="Layout" TPL_CASSIOPEIA_FONT_GROUP_LOCAL="Fonts from Folder" TPL_CASSIOPEIA_FONT_GROUP_WEB="Fonts from Web" TPL_CASSIOPEIA_FONT_LABEL="Fonts Scheme" -TPL_CASSIOPEIA_FONT_NOTE_TEXT="Loading fonts from external sources might be against privacy regulations in some countries.
Loading fonts from a local folder might have a performance impact on your site." +TPL_CASSIOPEIA_FONT_NOTE_TEXT="System fonts are the most performant although there may be small differences between operating systems.
Loading fonts from external sources might be against privacy regulations in some countries.
Loading fonts from a local folder might have a performance impact on your site." +TPL_CASSIOPEIA_FONT_SYSTEM="System Fonts" +TPL_CASSIOPEIA_FONT_SYSTEM_BODY="Body Font Stack" +TPL_CASSIOPEIA_FONT_SYSTEM_HEADING="Heading Font Stack" +TPL_CASSIOPEIA_FONT_SYSTEM_SELECT="Select System Fonts" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ANTIQUE="Antique" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CLASSICAL="Classical Humanist" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_CODE="Monospace Code" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_DIDONE="Didone" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GEOMETRIC="Geometric Humanist" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_GROTESQUE="Neo-Grotesque" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HANDWRITTEN="Handwritten" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_HUMANIST="Humanist" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_INDUSTRIAL="Industrial" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_MONOSPACE="Monospace Slab Serif" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_OLDSTYLE="Old Style" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_ROUNDED="Rounded Sans" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_SLAB="Slab Serif" +TPL_CASSIOPEIA_FONT_SYSTEM_STACK_SYSTEM_TRANSITIONAL="Transitional" TPL_CASSIOPEIA_LOGO_LABEL="Logo" TPL_CASSIOPEIA_STATIC="Static" TPL_CASSIOPEIA_STICKY_LABEL="Sticky Header" -TPL_CASSIOPEIA_TAGLINE_LABEL="Tagline" TPL_CASSIOPEIA_TAGLINE_DESC="Optional text to show as a subheading" +TPL_CASSIOPEIA_TAGLINE_LABEL="Tagline" TPL_CASSIOPEIA_TITLE="Title (alternative to logo)" TPL_CASSIOPEIA_XML_DESCRIPTION="Continuing the space theme (Solarflare from 1.0, Milkyway from 1.5 and Protostar from 3.0), Cassiopeia is the Joomla 4 site template based on Bootstrap 5." diff --git a/templates/cassiopeia/index.php b/templates/cassiopeia/index.php index 0ead32b485aeb..8b8b1407f4314 100644 --- a/templates/cassiopeia/index.php +++ b/templates/cassiopeia/index.php @@ -58,6 +58,18 @@ --cassiopeia-font-weight-normal: 400; --cassiopeia-font-weight-headings: 700;'; } + } elseif ($paramsFontScheme === 'system') { + $fontStylesBody = $this->params->get('systemFontBody', ''); + $fontStylesHeading = $this->params->get('systemFontHeading', ''); + + if ($fontStylesBody) { + $fontStyles = '--cassiopeia-font-family-body: ' . $fontStylesBody . '; + --cassiopeia-font-weight-normal: 400;'; + } + if ($fontStylesHeading) { + $fontStyles .= '--cassiopeia-font-family-headings: ' . $fontStylesHeading . '; + --cassiopeia-font-weight-headings: 700;'; + } } else { $wa->registerAndUseStyle('fontscheme.current', $paramsFontScheme, ['version' => 'auto'], ['media' => 'print', 'rel' => 'lazy-stylesheet', 'onload' => 'this.media=\'all\'']); $this->getPreloadManager()->preload($wa->getAsset('style', 'fontscheme.current')->getUri() . '?' . $this->getMediaVersion(), ['as' => 'style']); @@ -113,6 +125,7 @@ ?> + @@ -133,7 +146,7 @@ countModules('topbar')) : ?>
- +
@@ -178,21 +191,21 @@ countModules('top-a', true)) : ?> -
- -
+
+ +
countModules('top-b', true)) : ?> -
- -
+
+ +
countModules('sidebar-left', true)) : ?> -
- -
+
+ +
@@ -200,36 +213,36 @@
- +
countModules('sidebar-right', true)) : ?> -
- -
+
+ +
countModules('bottom-a', true)) : ?> -
- -
+
+ +
countModules('bottom-b', true)) : ?> -
- -
+
+ +
countModules('footer', true)) : ?> - + params->get('backTop') == 1) : ?> @@ -240,4 +253,5 @@ + diff --git a/templates/cassiopeia/templateDetails.xml b/templates/cassiopeia/templateDetails.xml index d8628d3324a9f..b7e8ba817a1d4 100644 --- a/templates/cassiopeia/templateDetails.xml +++ b/templates/cassiopeia/templateDetails.xml @@ -94,6 +94,9 @@ default="0" > + + + @@ -103,6 +106,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +