Skip to content
Snippets Groups Projects
Commit 6f463120 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'fix-gdpr' into 'develop'

Add slug to card layers

See merge request R3/howto-cards!294
parents a205c9b4 bd74c40a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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