Skip to content

Commit

Permalink
add external link to config
Browse files Browse the repository at this point in the history
revert external nav in config yml

add link to main menu

add link to page submenu

indicate external link

add id to main nav
  • Loading branch information
samrichca committed Jan 2, 2020
1 parent 3cb1f1a commit 9e37921
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ pages:
- 'Bioinformatics Pipeline: Copy Number Variation Analysis': Data/Bioinformatics_Pipelines/CNV_Pipeline.md
- 'Bioinformatics Pipeline: Methylation Liftover Pipeline': Data/Bioinformatics_Pipelines/Methylation_LO_Pipeline.md
- Aligned Reads Summary Metrics: Data/Bioinformatics_Pipelines/Aligned_reads_summary_metrics.md
- GDC Reference Files: /
# GDC Reference Files link is replaced in nav.html
# with an external link
- Release Notes: Data/Release_Notes/Data_Release_Notes.md
- fa-file-text Download PDF /Data/PDF/Data_UG.pdf: Data/PDF/index.md
- Encyclopedia: Encyclopedia/index.md
Expand Down
2 changes: 1 addition & 1 deletion theme/js/gdc-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ $(function() {
function _initLinks(confineToContainerID) {
// Ensure all anchor links which appear to be external have the appropriate target and
// icon.
$(confineToContainerID + ' a[href^="http"]').each(function() {
$(confineToContainerID + ' a[href^="http"], #main-nav a[href^="http"]').each(function() {
var anchor = $(this);

anchor.attr('target', '_blank');
Expand Down
2 changes: 1 addition & 1 deletion theme/nav-section-map.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{% for sub_nav_item in nav_item.children %}
<li class="{% if sub_nav_item.active %} main active{% endif %}">
<a href="{{ sub_nav_item.url }}">
<a href="{{ "https://gdc.cancer.gov/about-data/data-harmonization-and-generation/gdc-reference-files" if sub_nav_item.title == "GDC Reference Files" else sub_nav_item.url }}">
{{ sub_nav_item.title }}
</a>
{% if toc and ((toc | first) is defined) and sub_nav_item.active %}
Expand Down
5 changes: 4 additions & 1 deletion theme/nav-sub.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% if not nav_item.children %}
<li {% if nav_item.active %}class="active"{% endif %}>
{% if disableRootNavPrefixing %}
{% if nav_item.title == "GDC Reference Files" %}
<a
href="https://gdc.cancer.gov/about-data/data-harmonization-and-generation/gdc-reference-files">{{ nav_item.title }}</a>
{% elif disableRootNavPrefixing %}
<a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
{% else %}
<a href="{{ config.extra.project_root_dir }}{{ nav_item.url }}">{{ nav_item.title }}</a>
Expand Down
2 changes: 1 addition & 1 deletion theme/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<!-- Expanded navigation -->
<div class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav nav-full">
<ul class="nav navbar-nav nav-full" id="main-nav">
{% for nav_item in nav %}
{% if nav_item.title in config.extra.nav_exclude %}
{% elif nav_item.children %}
Expand Down

0 comments on commit 9e37921

Please sign in to comment.