From ee5901b25869763e3c30b495b03fe4b286edd6da Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 25 Jan 2021 20:36:10 -0800 Subject: html/css: refactor RTL filter bar code --- fatcat_scholar/static/scholar.css | 23 ++++++++++++++++++++++- fatcat_scholar/templates/base.html | 13 +++++++++++++ fatcat_scholar/templates/search.html | 4 ++-- fatcat_scholar/templates/search_macros.html | 3 ++- 4 files changed, 39 insertions(+), 4 deletions(-) (limited to 'fatcat_scholar') diff --git a/fatcat_scholar/static/scholar.css b/fatcat_scholar/static/scholar.css index b162ad5..3258dc6 100644 --- a/fatcat_scholar/static/scholar.css +++ b/fatcat_scholar/static/scholar.css @@ -26,7 +26,7 @@ nav.ui.menu { box-sizing: border-box; border-radius: 0; margin-bottom: 0.4em; - text-align: left; + text-align: start; width: 14em; } @@ -222,6 +222,27 @@ a:hover .ui.card { display: inline-block; } +.tablet-filter-bar { + display: flex; + align-items: flex-start; + column-gap: 2em; + row-gap: 2em; + flex-wrap: wrap; + padding-bottom:1.5em; +} + +.filter-bar .text-button { + white-space: nowrap; + position: absolute; + right: 0.9em; +} +.filter-bar .filter-label { + color: rgba(0,0,0,0.55); + white-space: nowrap; + position: absolute; + right: 0.9em; +} + details.title-dropdown summary { text-decoration: none; color: inherit; diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index e73a38f..2dd2643 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -33,6 +33,19 @@ .ui.action.input:not([class*="left action"]) > input { border-right-color: #999!important; } + + .filter-bar .text-button { + left: 0.9em; + right: auto; + } + .filter-bar .filter-label { + left: 0.9em; + right: auto; + } + .ui.labeled.icon.button.serp-button .menu.fulltext-thumbnail { + left: auto; + right: calc(-100% - 1em); + } {% endif %} {{ _("Filters") }} -
+
{{ search_macros.query_option(query.time_options, query.filter_time) }} {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} @@ -90,7 +90,7 @@
{% endif %} -
+
{{ search_macros.query_option(query.time_options, query.filter_time) }} {{ search_macros.query_option(query.type_options, query.filter_type) }} {{ search_macros.query_option(query.availability_options, query.filter_availability) }} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index dc47203..613feac 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -513,7 +513,8 @@ {% macro query_option(options, selected) -%}
- + +