-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include by default a HoloViz dropdown in the primary sidebar with lin…
…ks to all the HoloViz sites (#319)
- Loading branch information
Showing
4 changed files
with
167 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* Sidebar styling for the HoloViz dropdown section */ | ||
.hv-sb-dd { | ||
margin-bottom: 0.5em; | ||
} | ||
|
||
.hv-sb-dd .btn-group { | ||
width: 100%; | ||
} | ||
|
||
.hv-sb-dd .hv-sb-dd-value { | ||
text-align: start; | ||
font-size: 0.9rem; | ||
} | ||
|
||
.hv-sb-dd .btn { | ||
background-color: var(--pst-color-surface); | ||
color: var(--pst-color-text-base); | ||
} | ||
|
||
.hv-sb-dd a.btn:hover { | ||
color: var(--pst-color-link-hover); | ||
text-decoration: underline; | ||
text-decoration-thickness: max(3px, 0.1875rem, 0.12em); | ||
} | ||
|
||
.hv-sb-dd .dropdown-toggle-split { | ||
border-left: solid 1px lightgray; | ||
} | ||
|
||
.hv-sb-dd .dropdown-menu { | ||
width: 100%; | ||
background-color: var(--pst-color-surface); | ||
color: var(--pst-color-text-base); | ||
} | ||
|
||
.hv-sb-dd .dropdown-item { | ||
font-size: 0.8rem; | ||
} | ||
|
||
.hv-sb-dd .hv-icon { | ||
font-size: 0.75em; | ||
margin-left: 0.3em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% if hv_sidebar_dropdown %} | ||
<div class="hv-sb-dd"> | ||
<div class="btn-group"> | ||
{% if 'href' in hv_sidebar_dropdown['dropdown_value'] %} | ||
<a href="{{ hv_sidebar_dropdown['dropdown_value']['href'] }}" class="btn hv-sb-dd-value" target="_blank">{{ hv_sidebar_dropdown['dropdown_value']['text'] }}<i class="fa fa-external-link hv-icon" aria-hidden="true"></i></a> | ||
{% else %} | ||
<span class="btn hv-sb-dd-value">{{ hv_sidebar_dropdown['dropdown_value']['text'] }}</span> | ||
{% endif %} | ||
<button type="button" class="btn dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false"> | ||
<span class="visually-hidden"></span> | ||
</button> | ||
<ul class="dropdown-menu"> | ||
{% for project_name, project_opts in hv_sidebar_dropdown['libraries'].items() %} | ||
{% if project_name | lower not in project | lower %} | ||
<li><a class="dropdown-item" href="{{ project_opts['url'] }}" target="_blank" title="{{ project_opts['title'] }}">{{ project_opts['text'] }}<i class="fa fa-external-link hv-icon" aria-hidden="true"></i></a></li> | ||
{% endif %} | ||
{% endfor %} | ||
{% if hv_sidebar_dropdown['others'] %} | ||
<li><hr class="dropdown-divider"></li> | ||
{% for project_name, project_opts in hv_sidebar_dropdown['others'].items() %} | ||
{% if project_name | lower not in project | lower %} | ||
<li><a class="dropdown-item" href="{{ project_opts['url'] }}" target="_blank" title="{{ project_opts['title'] }}">{{ project_opts['text'] }}<i class="fa fa-external-link hv-icon" aria-hidden="true"></i></a></li> | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters