Your IP : 216.73.216.84


Current Path : /home/helpink/www/libraries/astroid/framework/frontend/blog/modules/
Upload File :
Current File : /home/helpink/www/libraries/astroid/framework/frontend/blog/modules/badge.php

<?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
 * 	DO NOT MODIFY THIS FILE DIRECTLY AS IT WILL BE OVERWRITTEN IN THE NEXT UPDATE
 *  You can easily override all files under /frontend/ folder.
 *	Just copy the file to ROOT/templates/YOURTEMPLATE/html/frontend/blog/ folder to create and override
 */
use Joomla\CMS\Language\Text;
// No direct access.
defined('_JEXEC') or die;
extract($displayData);

$params = $article->attribs;
if (is_string($params)) {
    $params = $article->params;
}
$status = (int) $params->get('astroid_article_badge', 0);
if (!$status) {
    return;
}
$type = $params->get('astroid_article_badge_type', 2);
if ($type != 1) {
?>
    <div class="article-badge article-badge-<?php echo $type; ?>"><?php echo Text::_('ASTROID_ARTICLE_OPTIONS_BADGE_' . $type . '_LBL'); ?></div>
<?php } else { ?>
    <div class="article-badge article-badge-1 article-badge-custom-<?php echo $article->id; ?>"><?php echo Text::_($params->get('astroid_article_badge_text', '')); ?></div>
<?php
    $color = $params->get('astroid_article_badge_text_color', '#fff');
    $bg = $params->get('astroid_article_badge_color', '#000');
    $style = '.article-badge.article-badge-custom-' . $article->id . '{color: ' . $color . '; background-color: ' . $bg . ';} .article-badge.article-badge-custom-' . $article->id . ':after{ border-left-color: ' . $bg . '}';
    Astroid\Framework::getDocument()->addStyleDeclaration($style);
} ?>