diff --git a/extension.json b/extension.json index a75aa07..bded7fc 100644 --- a/extension.json +++ b/extension.json @@ -49,6 +49,15 @@ }, "ResourceModules": { + "ext.wikibase.facetedsearch.styles": { + "styles": [ + "ext.wikibase.facetedsearch.less" + ], + "targets": [ + "mobile", + "desktop" + ] + } }, "RestRoutes": [ diff --git a/resources/ext.wikibase.facetedsearch.less b/resources/ext.wikibase.facetedsearch.less new file mode 100644 index 0000000..ca71525 --- /dev/null +++ b/resources/ext.wikibase.facetedsearch.less @@ -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; +} diff --git a/src/EntryPoints/WikibaseFacetedSearchHooks.php b/src/EntryPoints/WikibaseFacetedSearchHooks.php index 9fd18a6..70db899 100644 --- a/src/EntryPoints/WikibaseFacetedSearchHooks.php +++ b/src/EntryPoints/WikibaseFacetedSearchHooks.php @@ -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' ] ) + ); } }