Commit 6f463120 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

Merge branch 'fix-gdpr' into 'develop'

Add slug to card layers

See merge request !294
parents a205c9b4 bd74c40a
Pipeline #45883 passed with stages
in 3 minutes and 10 seconds
......@@ -34,7 +34,7 @@ def build_section_start(title, shortcut):
title = title.replace("Covid 19", "COVID-19")
title = title.replace("Ppc", "PPC")
return f'\n\t<div class="index-box noborderbox" id="{shortcut}">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
return f'\n\t<div class="index-box noborderbox" id="{shortcut}-card">\n\t\t<h3>{title}</h3>\n\t\t<ul>\n'
def build_section_end():
return "\t\t</ul>\n\t</div>"
......
/**
/**
* This is used to hide the sections of the index page
* based on the URL fragment (a.k.a. "hash")
*/
window.boxHider = (function() {
function GetSelectedId() {
var boxId = window.location.hash;
var boxId = window.location.hash + '-card';
if (boxId.length > 0) {
return boxId.substring(1);
}
......@@ -24,10 +24,10 @@ window.boxHider = (function() {
function GetSelectedBoxElement(id) {
var allBoxesArray = GetAllBoxElementsArray();
var element = document.getElementById(id);
if (allBoxesArray.includes(element)) {
return element;
}
}
return false;
}
......@@ -61,7 +61,7 @@ window.boxHider = (function() {
var boxId = GetSelectedId();
if (boxId.length == 0) {
// If there is no hash in the URL, just show all the boxes
ShowAllBoxes();
ShowAllBoxes();
return;
}
// Otherwise, proceed to getting the corresponding div element
......
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