Skip to content

Commit

Permalink
add version from time modified for js and css files
Browse files Browse the repository at this point in the history
  • Loading branch information
Uziel committed Oct 5, 2024
1 parent 910889e commit 0e50923
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions logic.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@
}
// Load Joomla 4 system icons
$wa->registerAndUseStyle('icons', 'media/system/css/joomla-fontawesome.min.css', array('version' => 'auto'));
$wa->registerAndUseStyle('template-css', Uri::root(true) . 'media/templates/site/' . $templateOriginal . '/css/template.css', array('version' => 'auto'));
$cssFilePath = JPATH_ROOT . '/media/templates/site/' . $templateOriginal . '/css/template.css';
if (file_exists($cssFilePath)) {
$wa->registerAndUseStyle('template-css', Uri::root(true) . 'media/templates/site/' . $templateOriginal . '/css/template.css', array('version' => filemtime($cssFilePath)));
}
// Load template-specific JavaScript after jQuery and Bootstrap
$wa->registerAndUseScript('template-js', Uri::root(true) . 'media/templates/site/' . $templateOriginal . '/js/template.js', array('version' => 'auto'), array('defer' => true));
$wa->registerAndUseStyle($this->template . 'template-css', Uri::root(true) . 'media/templates/site/' . $this->template . '/css/template.css', array('version' => 'auto'));
Expand Down Expand Up @@ -244,7 +247,11 @@
// Handle the case where the directory does not exist
// You can log an error or take appropriate action here
}
$wa->registerAndUseStyle($this->template . 'responsive-css', Uri::root(true) . 'media/templates/site/' . $this->template . '/css/responsive.css', array('version' => 'auto'));
$responsiveCssPath = JPATH_ROOT . '/media/templates/site/' . $this->template . '/css/responsive.css';
if (file_exists($responsiveCssPath)) {
$wa->registerAndUseStyle($this->template . 'responsive-css', Uri::root(true) . 'media/templates/site/' . $this->template . '/css/responsive.css', array('version' => filemtime($responsiveCssPath)));
}

// load social meta tags OpenGraph for Faceboook, Twitter Cards and Schema.org
if ($templateParams->get('enable_social_meta_tags', 1)) {
$disable_in = $templateParams->get('disable_in', '');
Expand Down
2 changes: 1 addition & 1 deletion templateDetails.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="template" client="site" version="" method="upgrade">
<name>minimalista</name>
<version>2.6.6</version>
<version>2.6.8</version>
<creationDate>2023-01</creationDate>
<author>Uziel - Via Ponto Mega</author>
<authorEmail>[email protected]</authorEmail>
Expand Down
4 changes: 2 additions & 2 deletions updates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<name>minimalista</name>
<description>Minimalista</description>
<element>minimalista</element>
<version>2.6.7</version>
<version>2.6.8</version>
<downloads>
<downloadurl type="full" format="zip">https://github.com/uzielweb/minimalista/archive/refs/tags/minimalista-v2.6.7.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/uzielweb/minimalista/archive/refs/tags/minimalista-v2.6.8.zip</downloadurl>
</downloads>
<type>template</type>
<maintainer>Uziel via Ponto Mega</maintainer>
Expand Down

0 comments on commit 0e50923

Please sign in to comment.