Commit 1e65e128 authored by tron's avatar tron
Browse files

filter finalized

added no Affiliation
number of dummy-blocks computed in js for an even layout
parent 32dbd02f
Pipeline #32470 passed with stage
in 11 minutes and 31 seconds
......@@ -434,9 +434,10 @@ if (element !== null) {
{ id: 7, category: "type", label: "project", name: "Project", isChecked: false, checkBoxRef: React.createRef()},
{ id: 8, category: "type", label: "thesis", name: "Thesis", isChecked: false, checkBoxRef: React.createRef()},
{ id: 9, category: "type", label: "intern", name: "Internship", isChecked: false, checkBoxRef: React.createRef()},
{ id: 10, category: "affiliation", label: "no-affil", name: "No Affiliation", isChecked: false, checkBoxRef: React.createRef()},
{ id: 11, category: "affiliation", label: "emlab", name: "Embodiment Lab", isChecked: false, checkBoxRef: React.createRef()},
{ id: 10, category: "affiliation", label: "grl", name: "Games Research Lab", isChecked: false, checkBoxRef: React.createRef()},
{ id: 12, category: "affiliation", label: "ind", name: "Industry Cooperation", isChecked: false, checkBoxRef: React.createRef()}
{ id: 12, category: "affiliation", label: "grl", name: "Games Research Lab", isChecked: false, checkBoxRef: React.createRef()},
{ id: 13, category: "affiliation", label: "ind", name: "Industry Cooperation", isChecked: false, checkBoxRef: React.createRef()}
],
};
......@@ -472,9 +473,20 @@ if (element !== null) {
Object.keys(checked).forEach(e => {
toShow = checked[e].length != 0 ? toShow.filter(checked[e].join(',')) : toShow.not(unChecked[e].join(','));
});
toHide.hide();
toShow.show();
let dummyBlocks = toShow.length % 3;
$('.block.placeholder').remove();
let topicContainer = $('.column-layout.topics');
if(dummyBlocks == 1){
topicContainer.append('<div class="block placeholder"></div>');
topicContainer.append('<div class="block placeholder"></div>');
}
if(dummyBlocks == 2){
topicContainer.append('<div class="block placeholder"></div>');
}
}
handleChange (event) {
......
......@@ -32,7 +32,7 @@ layout: base
{% assign topics = array %}
{% endif %}
<div class="column-layout">
<div class="column-layout topics">
<!-- expired topics -->
{% if page.topic-status == "expired" %}
......@@ -63,7 +63,12 @@ layout: base
{% for topic in topics %}
{% for t in topic.topic-category %}
{% assign typeClasses = "topic" %}
{% assign typeClasses = typeClasses | append: " " | append: t.focus | append: " " | append: t.level | append: " " | append: t.type | append: " " | append: t.affiliation | remove: "," %}
{% if t.affiliation and t.affiliation != '' and t.affiliation != ' ' %}
{% assign no-affiliation = '' %}
{% else %}
{% assign no-affiliation = 'no-affil' %}
{% endif %}
{% assign typeClasses = typeClasses | append: " " | append: t.focus | append: " " | append: t.level | append: " " | append: t.type | append: " " | append: t.affiliation | append: no-affiliation | remove: "," %}
{% endfor %}
{% assign title = topic.title %}
......
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