Skip to content
Snippets Groups Projects
Commit 5d07b1f5 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

feat: new index page

parent 87fcb951
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,15 @@ def line_prepender(filename, line):
f.seek(0, 0)
f.write(line.rstrip('\r\n') + '\n' + content)
def build_link(title, href):
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
def build_section_start(title):
return f'\n\t<div class="index-box">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
def build_section_end():
return "\t\t</ul>\n\t</div>"
def remove_header(localroot, root, filename, n=5):
nfirstlines = []
......@@ -66,7 +75,8 @@ for direct in cardDirs:
sections = list(set(sections))
sections.sort()
index = ""
# Index contains the generated content, init it with an empty container
index = '\n<div class="index-box-container">\n'
localIndexArr = [[]] * len(sections)
for folder in cardDirs:
......@@ -144,8 +154,7 @@ for folder in cardDirs:
title = title.rstrip("\n\r")
title = title[2:]
#index += " * [" + title + "](./" + root + "/" + "\n"
localIndexArr[indexS].append("* [" + title + "](./" + root + "/" + ")\n")
localIndexArr[indexS].append(build_link(title, root))
# output
print(" + New header added.")
......@@ -159,10 +168,14 @@ print(localIndexArr)
# determine the index
k = 0
for s in sections:
index += "\n### " + s.replace("-", " ").capitalize() + "\n"
index += build_section_start(s.replace("-", " ").capitalize())
index += ''.join(localIndexArr[k])
index += build_section_end()
k += 1
# Close the container
index += "\n</div>"
# output the index
#print(index)
# Read in the file
......@@ -184,4 +197,4 @@ filedata = filedata.replace('[[ index ]]', index)
with open(indexFile, 'w') as file:
file.write(filedata)
print("\n > New index generated and saved in " + indexFile)
\ No newline at end of file
print("\n > New index generated and saved in " + indexFile)
......@@ -44,9 +44,6 @@ pages:
- if: $CI_COMMIT_BRANCH == "develop"
script:
- mv processed_build public
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH == "develop"
artifacts:
expire_in: 1 week
paths:
......
......@@ -4,6 +4,52 @@ title: Home
order: 1
---
{% comment %} This is to be moved to separate CSS file after feature is accepted {% endcomment %}
<style>
.index-box-container {
display: flex;
flex-wrap: wrap;
}
.index-box {
width: 38%;
margin-right: 4%;
padding: 10px 20px 0px 20px;
border: solid 2px #efefef;
margin-bottom: min(35px, 5%);
border-radius: 0 0 15px 15px;
border-top: solid 5px #4085e4;
}
@media (max-width: 800px) {
.index-box {
width: 100%;
margin-right: 0;
}
}
.index-box:hover {
/* border-color: #60a5f4; */
border-color: #ddd;
border-top: solid 5px #4085ef;
}
.index-box > h3 {
font-size: 20pt;
color: #444;
margin-block-end: 10px;
border-bottom: solid 1px #e8e8e8;
}
.index-box > ul {
margin-block-end: 12px;
}
</style>
# LCSB How-to Cards
The Bioinformatics Core and Lab Support teams assist researchers from the Luxembourg Centre for Systems Biomedicine ([LCSB](https://www.uni.lu/lcsb)) with the organization, management, and curation of research data through its R3 initiative.
......@@ -13,31 +59,50 @@ The How-to cards are intended to provide practical guidance in implementing Data
<!-- index -->
### Access
* [LUMS account](./external/access/lums-passwords/)
* [Managing your passwords](./external/access/passwords/)
* [VPN/CERBERE connection](./external/access/vpn-cerbere-access/)
### Contribute
* [Git clients](./external/contribute/git-clients/)
* [How to add or edit a howto card](./external/contribute/add-edit-card/)
* [Markdown](./external/contribute/markdown/)
<div class="index-box-container">
### Daisy
<div class="index-box">
<h3>Access</h3>
<ul>
<li><a href="external/access/lums-passwords">LUMS account</a></li>
<li><a href="external/access/passwords">Managing your passwords</a></li>
<li><a href="external/access/vpn-cerbere-access">VPN/CERBERE connection</a></li>
* [DAISY User Guide](./external/daisy/)
</ul>
</div>
<div class="index-box">
<h3>Contribute</h3>
<ul>
<li><a href="external/contribute/add-edit-card">How to add or edit a howto card</a></li>
<li><a href="external/contribute/git-clients">Git clients</a></li>
<li><a href="external/contribute/markdown">Markdown</a></li>
### Exchange channels
</ul>
</div>
<div class="index-box">
<h3>Daisy</h3>
<ul>
<li><a href="external/daisy">DAISY User Guide</a></li>
* [AsperaWEB Quick Guide](./external/exchange-channels/asperaweb/)
* [Owncloud](./external/exchange-channels/owncloud/)
* [Sharing calendar in Microsoft Exchange](./external/exchange-channels/calendar/)
</ul>
</div>
<div class="index-box">
<h3>Exchange channels</h3>
<ul>
<li><a href="external/exchange-channels/asperaweb">AsperaWEB Quick Guide</a></li>
<li><a href="external/exchange-channels/calendar">Sharing calendar in Microsoft Exchange</a></li>
<li><a href="external/exchange-channels/owncloud">Owncloud</a></li>
### Integrity
</ul>
</div>
<div class="index-box">
<h3>Integrity</h3>
<ul>
<li><a href="external/integrity/checksum">Ensuring Integrity of Data Files with Checksums</a></li>
<li><a href="external/integrity/encryption/disk">Encrypting the Startup Disk for Your Laptop/Desktop</a></li>
<li><a href="external/integrity/encryption/file">Encrypting Files and Folders</a></li>
<li><a href="external/integrity/naming">Naming files</a></li>
* [Encrypting Files and Folders](./external/integrity/encryption/file/)
* [Encrypting the Startup Disk for Your Laptop/Desktop](./external/integrity/encryption/disk/)
* [Ensuring Integrity of Data Files with Checksums](./external/integrity/checksum/)
* [Naming files](./external/integrity/naming/)
</ul>
</div>
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment