mirror of
https://github.com/godotengine/godot-website.git
synced 2026-01-04 06:09:55 +03:00
Add a download card for use in articles
This commit is contained in:
@@ -188,7 +188,7 @@ layout: default
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include outdated_article_notice.html %}
|
||||
{% include articles/outdated_notice.html %}
|
||||
|
||||
<div class="article-body">
|
||||
{{ content }}
|
||||
@@ -198,6 +198,7 @@ layout: default
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/anchor-link.css?1">
|
||||
<link rel="stylesheet" href="/assets/css/article-cards.css">
|
||||
<script src="/assets/js/anchor-link.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
@@ -206,6 +207,10 @@ layout: default
|
||||
|
||||
// Add lightbox elements in blog articles for Tobii.
|
||||
document.querySelectorAll('.article-cover img, .article-body img').forEach((articleImg) => {
|
||||
if (articleImg.classList.contains('lightbox-ignore')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const lightbox = document.createElement('a');
|
||||
lightbox.href = articleImg.src;
|
||||
lightbox.classList.add('lightbox');
|
||||
|
||||
Reference in New Issue
Block a user