Commit 87227812 authored by Laurent Heirendt's avatar Laurent Heirendt

Merge branch 'add-index-cylon' into 'develop'

add index to id in header

See merge request !180
parents 1e955726 61d07bc6
Pipeline #34144 passed with stages
in 1 minute and 55 seconds
......@@ -11,13 +11,13 @@ def line_prepender(filename, line):
def build_link(title, href):
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
def build_section_start(title):
def build_section_start(title, shortcut):
title = title.replace("Gdpr", "GDPR")
title = title.replace("Handbook", "PI Handbook")
title = title.replace("Covid 19", "COVID-19")
return f'\n\t<div class="index-box">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
return f'\n\t<div class="index-box" id="{shortcut}">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
def build_section_end():
return "\t\t</ul>\n\t</div>"
......@@ -176,7 +176,7 @@ print(localIndexArr)
# determine the index
k = 0
for s in sections:
index += build_section_start(s.replace("-", " ").capitalize())
index += build_section_start(s.replace("-", " ").capitalize(), s)
index += ''.join(localIndexArr[k])
index += build_section_end()
k += 1
......
......@@ -17,7 +17,7 @@ The How-to cards are intended to provide practical guidance in implementing Data
<div class="index-box-container">
<div class="index-box">
<div class="index-box" id="access">
<h3>Access</h3>
<ul>
<li><a href="external/access/harrenhal-access">HARRENHAL access</a></li>
......@@ -27,7 +27,7 @@ The How-to cards are intended to provide practical guidance in implementing Data
</ul>
</div>
<div class="index-box">
<div class="index-box" id="contribute">
<h3>Contribute</h3>
<ul>
<li><a href="external/contribute/add-edit-card">How to add or edit a howto card</a></li>
......@@ -37,7 +37,7 @@ The How-to cards are intended to provide practical guidance in implementing Data
</ul>
</div>
<div class="index-box">
<div class="index-box" id="exchange-channels">
<h3>Exchange channels</h3>
<ul>
<li><a href="external/exchange-channels/asperaweb">AsperaWEB Quick Guide</a></li>
......@@ -46,7 +46,7 @@ The How-to cards are intended to provide practical guidance in implementing Data
</ul>
</div>
<div class="index-box">
<div class="index-box" id="general">
<h3>General</h3>
<ul>
<li><a href="external/general/attend-webex">Attend the LCSB Team Meeting online (webex)</a></li>
......@@ -54,7 +54,7 @@ The How-to cards are intended to provide practical guidance in implementing Data
</ul>
</div>
<div class="index-box">
<div class="index-box" id="integrity">
<h3>Integrity</h3>
<ul>
<li><a href="external/integrity/checksum">Ensuring Integrity of Data Files with Checksums</a></li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment