Skip to content

Commit

Permalink
Add facets styles
Browse files Browse the repository at this point in the history
  • Loading branch information
malberts committed Nov 27, 2024
1 parent 5aefecc commit 0ddf7c5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
},

"ResourceModules": {
"ext.wikibase.facetedsearch.styles": {
"styles": [
"ext.wikibase.facetedsearch.less"
],
"targets": [
"mobile",
"desktop"
]
}
},

"RestRoutes": [
Expand Down
6 changes: 6 additions & 0 deletions resources/ext.wikibase.facetedsearch.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import 'mediawiki.skin.variables.less';

.wikibase-faceted-search__facets {
border: @border-width-base @border-style-base @border-color-base;
padding: @spacing-100;
}
4 changes: 4 additions & 0 deletions src/EntryPoints/WikibaseFacetedSearchHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public static function onSpecialSearchResultsAppend(
string $term
): void {
// TODO: generate facets from search term
$output->addModuleStyles( 'ext.wikibase.facetedsearch.styles' );
$output->addHTML(
\Html::element( 'div', [ 'class' => 'wikibase-faceted-search__facets' ] )
);
}

}

0 comments on commit 0ddf7c5

Please sign in to comment.