-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
modules/mod_astroid_layout/language/en-GB/mod_astroid_layout.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
MOD_ASTROID_LAYOUT="Astroid Layout" | ||
MOD_ASTROID_LAYOUT_XML_DESCRIPTION="This module displays the Astroid Layout on the Frontend." |
2 changes: 2 additions & 0 deletions
2
modules/mod_astroid_layout/language/en-GB/mod_astroid_layout.sys.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
MOD_ASTROID_LAYOUT="Astroid Layout" | ||
MOD_ASTROID_LAYOUT_XML_DESCRIPTION="This module displays the astroid layout on the Frontend." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
/** | ||
* @package Astroid Framework | ||
* @author Astroid Framework Team https://astroidframe.work | ||
* @copyright Copyright (C) 2023 AstroidFrame.work. | ||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
defined('_ASTROID') or die('Please install and activate <a href="https://astroidframe.work/" target="_blank">Astroid Framework</a> in order to use this module.'); | ||
use Joomla\CMS\Helper\ModuleHelper; | ||
$class_sfx = htmlspecialchars($params->get('class_sfx', ''), ENT_COMPAT, 'UTF-8'); | ||
require ModuleHelper::getLayoutPath('mod_astroid_layout', $params->get('layout', 'default')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<extension type="module" client="site" method="upgrade"> | ||
<name>mod_astroid_layout</name> | ||
<author>Astroid Framework</author> | ||
<creationDate>December 2024</creationDate> | ||
<copyright>(C) 2024 Astroid Framework</copyright> | ||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>astroidframe.work</authorUrl> | ||
<version>3.1.8</version> | ||
<description>MOD_ASTROID_LAYOUT_XML_DESCRIPTION</description> | ||
<files> | ||
<filename module="mod_astroid_layout">mod_astroid_layout.php</filename> | ||
<folder>tmpl</folder> | ||
</files> | ||
<languages> | ||
<language tag="en-GB">language/en-GB/mod_astroid_layout.ini</language> | ||
<language tag="en-GB">language/en-GB/mod_astroid_layout.sys.ini</language> | ||
</languages> | ||
<config> | ||
<fields name="params"> | ||
<fieldset name="basic" addfieldpath="/libraries/astroid/framework/fields"> | ||
<field type="astroidlayoutmodule" name="layout" data-fieldset="astroid_layout" /> | ||
</fieldset> | ||
</fields> | ||
</config> | ||
<updateservers> | ||
<server type="extension" priority="1" name="Astroid Framework">https://raw.githubusercontent.com/templaza/astroid-framework/master/astroid_framework.xml</server> | ||
</updateservers> | ||
</extension> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
/** | ||
* @package Astroid Framework | ||
* @author Astroid Framework Team https://astroidframe.work | ||
* @copyright Copyright (C) 2023 AstroidFrame.work. | ||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
use Astroid\Element\Layout; | ||
use Astroid\Element\Section; | ||
$layout = Layout::loadModuleLayout($module->id); | ||
$devices = isset($layout['devices']) && $layout['devices'] ? $layout['devices'] : [ | ||
[ | ||
'code'=> 'lg', | ||
'icon'=> 'fa-solid fa-computer', | ||
'title'=> 'title' | ||
] | ||
]; | ||
$content = ''; | ||
foreach ($layout['sections'] as $section) { | ||
$section = new Section($section, $devices); | ||
$content .= $section->render(); | ||
} | ||
echo $content; |