Skip to content

Commit

Permalink
+ scrollama / adjust for theme options
Browse files Browse the repository at this point in the history
  • Loading branch information
dcnb committed Nov 20, 2024
1 parent abee9d7 commit fbcfd9d
Show file tree
Hide file tree
Showing 9 changed files with 1,101 additions and 142 deletions.
25 changes: 15 additions & 10 deletions _includes/transcript/item/filters.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<!-- cb: _includes/transcript/item/filters.html -->
{% if site.data.theme.search-and-filters == false %}
<div class="row my-3 sticky-top bg-white border-bottom border-left border-right d-print-none py-3 w-md-75" id="filters-search" style="height:1px; width:1px;opacity:0;">
<div id="filter-tab" class="d-none filter-tab col-4 col-lg-2 text-center justify-content-end bg-primary text-white small px-1 py-1" style="height:1px; width:1px;opacity:0;"></div>
</div>
{% else %}
<div class="row my-3 {% unless site.data.theme.search-and-filters-sticky == false %}sticky-top {% endunless %}bg-white border-bottom border-left border-right d-print-none py-3 w-md-75" id="filters-search">
{% unless site.data.theme.search-and-filters == false %}
<div class="row my-3 {% unless site.data.theme.search-and-filters-sticky == false %}sticky-top {% endunless %}bg-white border-bottom border-left border-right d-print-none py-3 w-md-75 mx-0" id="filters-search">
<div class="col {% unless site.data.filters %}d-none{% endunless %}">
<select id="filters" title="Filter by Topic" aria-label="Topic filtering dropdown select option" class="filters py-1 form-select border border-primary" onchange="filterLines(this.value)">
<option value="all" class="reset" selected="selected reset">Filter by Topic</option>
Expand All @@ -31,13 +27,12 @@
</div>
</div>
<div class="col-md-6">
<button class="reset btn btn-sm btn-primary input-group-text float-end float-md-none mt-2 mt-md-0" onclick="{% if site.data.filters %}vizFilter('all');{% else %}resetVals();{% endif %}">Reset
Filters</button>
<button class="reset btn btn-sm btn-primary input-group-text float-end float-md-none mt-2 mt-md-0" onclick="{% if site.data.filters %}vizFilter('all');{% else %}resetVals();{% endif %}">Reset Filters</button>
</div>
</div>
</div>
</div>
<div id="filtersearch" class="col-12 d-none mt-3">
<div id="filtersearch-dropdown" class="col-12 d-none mt-3">
<h5 id="linecount" class="d-none small ms-3"><span id="numberof"></span></h5>

<select class="w-100 col-md-8 mb-2 form-select p-2 border border-primary" id="searchResults" onchange="scrollToLine(this.value);">
Expand All @@ -48,4 +43,14 @@ <h5 id="linecount" class="d-none small ms-3"><span id="numberof"></span></h5>
<span id="hide-filters-text">Hide Filters &#9650;</span>
<span id="show-filters-text">Show Filters &#9660;</span>
</div>
</div>{% endif %}
</div>
{% else %}
<div style="height:1px; width:1px;opacity:0;">
<div class="row my-3 sticky-top bg-white border-bottom border-left border-right d-print-none py-3 w-md-75"
id="filters-search" style="height:1px; width:1px;opacity:0;">
<div id="filter-tab"
class="d-none filter-tab col-4 col-lg-2 text-center justify-content-end bg-primary text-white small px-1 py-1"
style="height:1px; width:1px;opacity:0;"></div>
</div>
</div>
{% endunless %}
9 changes: 8 additions & 1 deletion _includes/transcript/item/transcript-viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@ <h4 class="mt-2 mb-0 meta">Topics:</h4>
</a>{%endfor%}</svg>
</div>
</div>
{% include /transcript/style/visualization-filter-legend.html %}
{% include /transcript/style/visualization-filter-legend.html %}
{% if site.data.filters and site.data.theme.search-and-filters == false%}
<div class="row mt-3">
<div class='col-12'>
<button class="reset btn btn-sm btn-outline-primary float-end w-25" onclick="{% if site.data.filters %}vizFilter('all');{% else %}resetVals();{% endif %}">Reset Filters</button>
</div>
</div>
{% endif %}
Loading

0 comments on commit fbcfd9d

Please sign in to comment.