Skip to content

Commit

Permalink
add link to images
Browse files Browse the repository at this point in the history
  • Loading branch information
clemiller committed Jan 25, 2024
1 parent fbb13c0 commit 3132083
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions attack-theme/static/style/_layouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1276,6 +1276,9 @@ div#sidebars {
padding: 0px !important;
height: 150px;
display: flex;
a {
display: contents;
}
img.sponsor-logo {
background-color: color(body);
border-radius: 6px;
Expand Down
16 changes: 12 additions & 4 deletions modules/benefactors/templates/benefactors.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ <h4>ATT&CK Benefactors</h4>
<div class="row sponsor-list">
{% for n in range(5) %}
<div class="col-sm sponsor-square">
<img class="w-100 sponsor-logo p-3" id="sponsor-{{n}}" alt="Placeholder Image" src=""/>
<a href="" target="_blank">
<img class="w-100 sponsor-logo p-3" id="sponsor-{{n}}" alt="Placeholder Image" src=""/>
</a>
</div>
{% endfor %}
</div>
Expand Down Expand Up @@ -104,7 +106,10 @@ <h4>ATT&CK Benefactors</h4>
{
support: "Support 1",
sponsors: [
"/theme/images/benefactors/SOC-prime-logo.png",
{
logo: "/theme/images/benefactors/SOC-prime-logo.png",
url: "https://socprime.com/"
},
],
},
];
Expand Down Expand Up @@ -133,12 +138,15 @@ <h4>ATT&CK Benefactors</h4>
for (let colCounter = 0; colCounter < 5; colCounter++) {
if (colCounter < numCols) {
// update sponsor image
items[colCounter].src = sponsorSupport[rowCounter].sponsors[colCounter];
items[colCounter].src = sponsorSupport[rowCounter].sponsors[colCounter].logo;
items[colCounter].parentElement.href = sponsorSupport[rowCounter].sponsors[colCounter].url;
} else {
// hide placeholders
items[colCounter].style.display = 'none';
// hide parent element
// hide parent anchor element
items[colCounter].parentElement.style.display = 'none';
// hide outer parent div element
items[colCounter].parentElement.parentElement.style.display = 'none';
}
}
// bold support level
Expand Down

0 comments on commit 3132083

Please sign in to comment.