-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
d3b3733
commit 84f5990
Showing
6 changed files
with
95 additions
and
48 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
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use sjaakp\icon\Icon; | ||
use yii\bootstrap5\Html; | ||
|
||
?> | ||
<?= Html::beginTag('li') ?> | ||
<?= Html::beginTag('div', ['class' => 'dropdown bd-mode-toggle']) ?> | ||
<?= Html::beginTag( | ||
'button', | ||
[ | ||
'aria-expanded' => 'false', | ||
'aria-label' => 'Toggle theme (auto)', | ||
'class' => 'btn btn-bd-primary dropdown-toggle d-flex align-items-center', | ||
'data-bs-toggle' => 'dropdown', | ||
'id' => 'bd-theme', | ||
'type' => 'button' | ||
], | ||
) ?> | ||
<?= Icon::renderIcon('solid', 'circle-half-stroke', ['class' => 'me-2 fa-solid fa-xl theme-icon-active']) ?> | ||
<?= Html::tag('span', 'Toggle theme', ['class' => 'visually-hidden', 'id' => 'bd-theme-text']) ?> | ||
<?= Html::endTag('button') ?> | ||
<?= Html::beginTag( | ||
'ul', | ||
['aria-labelledby' => 'bd-theme-text', 'class' => 'dropdown-menu dropdown-menu-end shadow'], | ||
) ?> | ||
<?= Html::beginTag('li') ?> | ||
<?= Html::beginTag( | ||
'button', | ||
[ | ||
'aria-pressed' => 'false', | ||
'class' => 'dropdown-item d-flex align-items-center', | ||
'data-bs-theme-value' => 'light', | ||
], | ||
) ?> | ||
<?= Icon::renderIcon('solid', 'sun', ['class' => 'me-2 fa-solid theme-icon']) ?> | ||
Light | ||
<?= Icon::renderIcon( | ||
'solid', | ||
'check', | ||
['class' => 'check ms-auto d-none', 'width' => '1em', 'height' => '1em'], | ||
) ?> | ||
<?= Html::endTag('button') ?> | ||
<?= Html::endTag('li') ?> | ||
<?= Html::beginTag('li') ?> | ||
<?= Html::beginTag( | ||
'button', | ||
[ | ||
'aria-pressed' => 'false', | ||
'class' => 'dropdown-item d-flex align-items-center', | ||
'data-bs-theme-value' => 'dark', | ||
], | ||
) ?> | ||
<?= Icon::renderIcon('solid', 'moon', ['class' => 'me-2 fa-solid theme-icon']) ?> | ||
Dark | ||
<?= Icon::renderIcon( | ||
'solid', | ||
'check', | ||
['class' => 'check ms-auto d-none', 'width' => '1em', 'height' => '1em'], | ||
) ?> | ||
<?= Html::endTag('button') ?> | ||
<?= Html::endTag('li') ?> | ||
<?= Html::beginTag('li') ?> | ||
<?= Html::beginTag( | ||
'button', | ||
[ | ||
'aria-pressed' => 'false', | ||
'class' => 'dropdown-item d-flex align-items-center', | ||
'data-bs-theme-value' => 'auto', | ||
], | ||
) ?> | ||
<?= Icon::renderIcon('solid', 'circle-half-stroke', ['class' => 'me-2 fa-solid theme-icon']) ?> | ||
Auto | ||
<?= Icon::renderIcon( | ||
'solid', | ||
'check', | ||
['class' => 'check ms-auto d-none', 'width' => '1em', 'height' => '1em'], | ||
) ?> | ||
<?= Html::endTag('button') ?> | ||
<?= Html::endTag('li') ?> | ||
<?= Html::endTag('ul') ?> | ||
<?= Html::endTag('div') ?> | ||
<?= Html::endTag('li'); |
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