Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New chrome noCard, shadow for cards, padding for positions
- Loading branch information
1 parent
c657ae3
commit 6ad0537
Showing
5 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
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,45 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Site | ||
* @subpackage Templates.cassiopeia | ||
* | ||
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
|
||
defined('_JEXEC') or die; | ||
|
||
use Joomla\Utilities\ArrayHelper; | ||
|
||
$module = $displayData['module']; | ||
$params = $displayData['params']; | ||
$attribs = $displayData['attribs']; | ||
|
||
if ($module->content === null || $module->content === '') | ||
{ | ||
return; | ||
} | ||
|
||
$moduleTag = $params->get('module_tag', 'div'); | ||
$moduleAttribs = []; | ||
$moduleAttribs['class'] = $module->position . ' no-card ' . htmlspecialchars($params->get('moduleclass_sfx'), ENT_QUOTES, 'UTF-8'); | ||
$headerTag = htmlspecialchars($params->get('header_tag', 'h4'), ENT_QUOTES, 'UTF-8'); | ||
$headerClass = htmlspecialchars($params->get('header_class', ''), ENT_QUOTES, 'UTF-8'); | ||
$headerAttribs = []; | ||
$headerAttribs['class'] = $headerClass; | ||
|
||
if ($module->showtitle) : | ||
$moduleAttribs['aria-labelledby'] = 'mod-' . $module->id; | ||
$headerAttribs['id'] = 'mod-' . $module->id; | ||
else: | ||
$moduleAttribs['aria-label'] = $module->title; | ||
endif; | ||
|
||
$header = '<' . $headerTag . ' ' . ArrayHelper::toString($headerAttribs) . '>' . $module->title . '</' . $headerTag . '>'; | ||
?> | ||
<<?php echo $moduleTag; ?> <?php echo ArrayHelper::toString($moduleAttribs); ?>> | ||
<?php if ($module->showtitle) : ?> | ||
<?php echo $header; ?> | ||
<?php endif; ?> | ||
<?php echo $module->content; ?> | ||
</<?php echo $moduleTag; ?>> |
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
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
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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
// Alerts | ||
// Cards | ||
|
||
.card { | ||
box-shadow: $cassiopeia-box-shadow; | ||
} | ||
|
||
.card-grey { | ||
background-color: $gray-100; | ||
|