Skip to content

Commit

Permalink
Replace theme variables with CSS variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yurabakhtin committed Sep 13, 2024
1 parent 6c67264 commit ec4fe18
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
-------------------------
- Fix #135: Fix gallery comment URL from notifications
- Fix: Add autofocus on edit (for HumHub 1.17 - see https://github.com/humhub/humhub/issues/7136)
- Enh #140: Replace theme variables with CSS variables

1.5.5 (December 22, 2023)
-------------------------
Expand Down
11 changes: 5 additions & 6 deletions views/custom-gallery/gallery_view.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

use \humhub\modules\comment\widgets\Comments;
use humhub\modules\comment\widgets\Comments;
use humhub\modules\content\components\ContentActiveRecord;
use humhub\modules\content\widgets\ContentObjectLinks;
use \humhub\modules\gallery\assets\Assets;
use humhub\modules\gallery\assets\Assets;
use humhub\modules\gallery\helpers\Url;
use humhub\modules\gallery\models\CustomGallery;
use humhub\modules\gallery\models\Media;
Expand All @@ -14,7 +14,6 @@
use humhub\libs\Html;
use humhub\modules\gallery\widgets\GalleryList;


/* @var CustomGallery $gallery */
/* @var Media[] $media */
/* @var boolean $showMore */
Expand All @@ -24,9 +23,9 @@
?>
<div id="gallery-container" class="panel panel-default">

<div class="panel-heading clearfix" style="background-color: <?= $this->theme->variable('background-color-secondary') ?>">
<div style="margin-right:40px;" class="pull-left">
<?= Yii::t('GalleryModule.base', '<strong>Gallery</strong> ') . Html::encode($gallery->title) ?>
<div class="panel-heading clearfix" style="background-color: var(--background-color-secondary)">
<div style="margin-right:40px" class="pull-left">
<?= Yii::t('GalleryModule.base', '<strong>Gallery</strong> {title}', ['title' => Html::encode($gallery->title)]) ?>
</div>

<?= GalleryMenu::widget(['gallery' => $gallery,
Expand Down
13 changes: 5 additions & 8 deletions views/stream-gallery/gallery_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
* @link https://www.humhub.org/
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
* @license https://www.humhub.com/licences
*
*
* @package humhub.modules.gallery.views
* @since 1.0
* @author Sebastian Stumpf
*/
?>

<?php

use humhub\modules\content\components\ContentActiveRecord;
use humhub\modules\file\models\File;
Expand All @@ -30,13 +27,13 @@
$bundle = Assets::register($this);

$description = ($container instanceof Space)
? Yii::t('GalleryModule.base', 'This gallery contains all posted media files from the space.')
? Yii::t('GalleryModule.base', 'This gallery contains all posted media files from the space.')
: Yii::t('GalleryModule.base', 'This gallery contains all posted media files from the profile.');
?>

<div id="gallery-container" class="panel panel-default">

<div class="panel-heading" style="background-color: <?= $this->theme->variable('background-color-secondary') ?>"><?= Yii::t('GalleryModule.base', '<strong>Gallery</strong> ') . Yii::t('GalleryModule.base', 'of posted media files') ?></div>
<div class="panel-heading" style="background-color: var(--background-color-secondary)"><?= Yii::t('GalleryModule.base', '<strong>Gallery</strong> of posted media files') ?></div>

<div class="panel-body">
<div class="row">
Expand All @@ -51,8 +48,8 @@
<?= GalleryList::widget([
'entryList' => $files,
'parentGallery' => $gallery,
'showMore' => $showMore
'showMore' => $showMore,
]) ?>
</div>
</div>
</div>
</div>

0 comments on commit ec4fe18

Please sign in to comment.