Skip to content

Commit d822234

Browse files
author
Automatic preview publish
committed
Merge Split Branch
2 parents 454b83d + 231e972 commit d822234

File tree

2 files changed

+1414
-1390
lines changed

2 files changed

+1414
-1390
lines changed

Diff for: preview-pr-page/about.html

+35-11
Original file line numberDiff line numberDiff line change
@@ -771,24 +771,40 @@ <h1 class="text-center">
771771
// This script is used to toggle the css styles of the types of institutions
772772
// on the about page.
773773

774-
let currentHighlight = 'institution';
775-
774+
let currentType = 'institution';
776775
function toggleInstitutionType(type) {
777776

777+
// Untoggle the current button
778+
const currentButton = document.getElementById(currentType);
779+
currentButton.classList.remove('btn-secondary');
780+
currentButton.classList.add('btn-outline-secondary');
781+
782+
const button = document.getElementById(type);
783+
784+
// Change the toggle button class to btn-secondary
785+
button.classList.remove('btn-outline-secondary');
786+
button.classList.add('btn-secondary');
787+
788+
778789
// Untoggle the current highlight
779-
const currentElements = document.getElementsByClassName(currentHighlight);
790+
const currentElements = document.getElementsByClassName(currentType);
780791
for (let i = 0; i < currentElements.length; i++) {
781792
currentElements[i].classList.toggle('highlight');
782793
}
783794

784-
currentHighlight = type;
795+
currentType = type;
785796

786797
// Toggle the new highlight
787798
const elements = document.getElementsByClassName(type);
788799
for (let i = 0; i < elements.length; i++) {
789800
elements[i].classList.toggle('highlight');
790801
}
791802
}
803+
804+
// This function is used to get the number of organizations that have reported
805+
document.addEventListener('DOMContentLoaded', function() {
806+
toggleInstitutionType('institution');
807+
});
792808
</script>
793809

794810
<div class="container-xxl pb-4 pt-5">
@@ -799,10 +815,10 @@ <h1 class="text-center">
799815
Sample of institutions using HTCSS to broaden their impact.
800816
</p>
801817
<div class="d-flex justify-content-center">
802-
<button autofocus class="btn btn-outline-secondary" onclick="toggleInstitutionType('institution')">Academic</button>
803-
<button class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('government')">Government</button>
804-
<button class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('private-sector')">Private Sector</button>
805-
<button class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('collaboration')">Collaborations</button>
818+
<button id="institution" class="btn btn-outline-secondary" onclick="toggleInstitutionType('institution')">Academic</button>
819+
<button id="government" class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('government')">Government</button>
820+
<button id="private-sector" class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('private-sector')">Private Sector</button>
821+
<button id="collaboration" class="btn btn-outline-secondary ms-2" onclick="toggleInstitutionType('collaboration')">Collaborations</button>
806822
</div>
807823
</div>
808824
<div class="p-3">
@@ -1529,8 +1545,16 @@ <h1 class="text-center">
15291545
gte: DATE_RANGE['oneYearAgo']
15301546
}
15311547
}
1548+
},
1549+
// Filter out all documents that have a VOName that are gluex, dune
1550+
{
1551+
bool: {
1552+
must_not: {
1553+
term: {VOName: "gluex"},
1554+
term: {VOName: "dune"}
1555+
}
1556+
}
15321557
}
1533-
// Filter out all documents that have a VOName that is not cms, igwn, gluex, or dune
15341558
]
15351559
},
15361560
},
@@ -1641,7 +1665,7 @@ <h1 class="text-center">
16411665

16421666
function updateCollaborationUsageValues() {
16431667
let usages = getUsage()
1644-
let collaborations = [{"name":"REDTOP","ids":["REDTOP"]},{"name":"IceCube","ids":["icecube"]},{"name":"IGWN","ids":["ligo"]},{"name":"South Pole Telescope","ids":["spt.all"]},{"name":"Xenon","ids":["xenon"]},{"name":"Future Colliders","ids":["snowmass21","snowmass21.futurecolliders","snowmass21.energy","snowmass21.en-prod"]},{"name":"KOTO","ids":["KOTO"]},{"name":"CLAS12","ids":["CLAS12"]},{"name":"GLUEX","ids":["gluex","GLUEX"]},{"name":"EIC","ids":["EIC"]},{"name":"MOLLER","ids":["MOLLER"]},{"name":"DUNE","ids":["dune"]},{"name":"EHT","ids":["eht"]},{"name":"ePIC","ids":["ePIC"]},{"name":"CMS","ids":["cms"]},{"name":"ATLAS","ids":["ATLAS","atlas"]}]
1668+
let collaborations = [{"name":"REDTOP","ids":["REDTOP"]},{"name":"IceCube","ids":["IceCube"]},{"name":"IGWN","ids":["ligo"]},{"name":"South Pole Telescope","ids":["spt.all"]},{"name":"Xenon","ids":["xenon"]},{"name":"Future Colliders","ids":["snowmass21","snowmass21.futurecolliders","snowmass21.energy","snowmass21.en-prod"]},{"name":"KOTO","ids":["KOTO"]},{"name":"CLAS12","ids":["CLAS12"]},{"name":"GLUEX","ids":["gluex","GLUEX"]},{"name":"EIC","ids":["EIC"]},{"name":"MOLLER","ids":["MOLLER"]},{"name":"DUNE","ids":["dune"]},{"name":"EHT","ids":["eht"]},{"name":"ePIC","ids":["ePIC"]},{"name":"CMS","ids":["cms"]},{"name":"ATLAS","ids":["ATLAS","atlas"]}]
16451669

16461670
// Using the usages object get all the usages for the collaborations
16471671
// each collaboration has a list of ids that should be summed for final usage
@@ -2544,7 +2568,7 @@ <h4 class="fw-bold text-center">
25442568

25452569

25462570

2547-
<div class="container-xxl pb-3">
2571+
<div class="container-xxl py-3">
25482572
<h1 class="text-center">
25492573
Featured HTCSS Users
25502574
</h1>

0 commit comments

Comments
 (0)