Improve category toolbar
This commit is contained in:
parent
41e54846f0
commit
76de859b21
@ -10,13 +10,13 @@ News::load($SETTINGS["sources"]["news"]);
|
||||
$newsitems = News::getItems();
|
||||
?>
|
||||
|
||||
<div class="btn-toolbar mb-4" role="toolbar">
|
||||
<div class="btn-group btn-group-toggle">
|
||||
<div class="btn-toolbar mb-4 justify-content-center" role="toolbar">
|
||||
<div class="btn-group btn-group-toggle flex-wrap justify-content-center" data-toggle="buttons">
|
||||
<?php
|
||||
foreach (NewsCategory::CATEGORIES as $cat) {
|
||||
$category = NewsCategory::fromString($cat);
|
||||
?>
|
||||
<label class="btn btn-secondary">
|
||||
<label class="btn btn-secondary category-btn<?php echo $category->get() == NewsCategory::GENERAL ? " active" : ""; ?>">
|
||||
<input
|
||||
type="radio"
|
||||
name="newscategory"
|
||||
|
@ -14,7 +14,6 @@ function fetchVisibleGridImages() {
|
||||
|
||||
$("input[name=newscategory]").on("change", function () {
|
||||
window.shuffleInstance.filter($(this).val());
|
||||
$(this).button('toggle');
|
||||
setTimeout(fetchVisibleGridImages, 500);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user