Commit a6918d2e authored by Laurent Heirendt's avatar Laurent Heirendt

Merge branch 'develop' into 'master'

Regular merge of develop

See merge request !133
parents 83a9c85c 3ed0f3dc
Pipeline #26386 passed with stage
in 3 minutes and 56 seconds
......@@ -76,7 +76,11 @@ sections = list(set(sections))
sections.sort()
# Index contains the generated content, init it with an empty container
index = '\n<div class="index-box-container">\n'
index = ''
index += '<script type="text/javascript" src="{{ "assets/js/jquery3.5.1.min.js" | relative_url }}"></script>\n'
index += '<script type="text/javascript" src="{{ "assets/js/router.js" | relative_url }}"></script>\n\n'
index += '\n<div class="index-box-container">\n'
localIndexArr = [[]] * len(sections)
for folder in cardDirs:
......
......@@ -75,6 +75,8 @@ build pages for VM deployment:
- if: $CI_COMMIT_BRANCH
- if: $CI_MERGE_REQUEST_ID
before_script:
- apt-get -qq update
- apt-get install -y -qq git-lfs
- gem install bundler:$BUNDLER_VERSION && bundle install
script:
# Generate the configuration for forks (will use Gitlab Pages on personal namespaces)
......
This diff is collapsed.
function UrlExists(url, cb) {
jQuery.ajax({
url: url,
dataType: 'text',
type: 'GET',
cache: false,
complete: function(xhr){
if(typeof cb === 'function')
cb.apply(this, [xhr.status]);
}
});
}
function GetShortcutDestination() {
var s = window.location.href;
var pathArray = s.split('?');
// Cut the query if it exists
if (pathArray.length > 1) {
return pathArray[1];
} else {
return '';
}
}
function RedirectTo(newLocation) {
document.location.replace(newLocation);
}
// Pick the shortcut link destination from URL, like: `category:subcategory:card-name`
var sub = GetShortcutDestination();
// If there's a shortcut to handle
if (sub.length > 0) {
var externalCardURL = '/external/cards/' + sub;
var internalCardURL = '/internal/cards/' + sub;
UrlExists(externalCardURL, function(status){
if (status == 200) { // The sub-card is external and accessible
RedirectTo(externalCardURL);
} else {
UrlExists(internalCardURL, function(status){
if (status == 200) { // The sub-card is internal and accessible
RedirectTo(internalCardURL);
} else {
// No external, no internal - probably no access
RedirectTo('/404.html');
}
})
}
});
}
......@@ -4,6 +4,10 @@ title: Home
order: 1
---
<script type="text/javascript" src="{{ "assets/js/jquery3.5.1.min.js" | relative_url }}"></script>
<script type="text/javascript" src="{{ "assets/js/router.js" | relative_url }}"></script>
# 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.
......@@ -62,4 +66,4 @@ The How-to cards are intended to provide practical guidance in implementing Data
</ul>
</div>
</div>
\ No newline at end of file
</div>
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