mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
294 lines
6.0 KiB
HTML
294 lines
6.0 KiB
HTML
---
|
|
layout: default
|
|
---
|
|
|
|
{% include header.html %}
|
|
|
|
<style>
|
|
body {
|
|
background-color: var(--background-color);
|
|
}
|
|
|
|
h1 {
|
|
margin-bottom: 8px;
|
|
margin-top: 32px;
|
|
}
|
|
|
|
:not(pre)>code {
|
|
background: var(--code-background-color);
|
|
padding: 1px 4px;
|
|
font-size: 0.95em;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
pre {
|
|
background: var(--codeblock-background-color);
|
|
color: var(--codeblock-color);
|
|
}
|
|
|
|
pre code {
|
|
display: block;
|
|
overflow-x: auto;
|
|
padding: .5em;
|
|
}
|
|
|
|
.date-big {
|
|
line-height: 2;
|
|
margin-left: 32px;
|
|
}
|
|
|
|
article {
|
|
background-color: var(--base-color);
|
|
box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
figure {
|
|
margin: 0;
|
|
}
|
|
|
|
figure img {
|
|
margin: 0;
|
|
}
|
|
|
|
article img,
|
|
article video {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
margin: auto;
|
|
margin-top: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
article h1 {
|
|
margin-top: 64px;
|
|
}
|
|
|
|
article h2,
|
|
article h3,
|
|
article h4 {
|
|
margin-top: 42px;
|
|
}
|
|
|
|
.article-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.article-metadata {
|
|
display: flex;
|
|
gap: 24px;
|
|
align-items: center;
|
|
font-family: var(--header-font-family);
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.article-metadata {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 16px;
|
|
}
|
|
}
|
|
|
|
.article-author {
|
|
color: var(--base-color-text-subtitle-date);
|
|
font-weight: 700;
|
|
font-size: 18px;
|
|
flex-grow: 1;
|
|
display: flex;
|
|
gap: 12px;
|
|
align-items: center;
|
|
}
|
|
|
|
.article-author .avatar {
|
|
border-radius: 100%;
|
|
margin: 0;
|
|
background: transparent;
|
|
}
|
|
|
|
.article-author .by {
|
|
color: var(--base-color-text-subtitle);
|
|
}
|
|
|
|
.article-metadata .date {
|
|
color: var(--base-color-text-subtitle-date);
|
|
}
|
|
|
|
.article-metadata .date.post-recent-highlight {
|
|
color: var(--post-recent-highlight-color);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.article-metadata .date.post-recent-highlight::after {
|
|
font-size: 80%;
|
|
content: "NEW";
|
|
border: 2px solid var(--post-recent-highlight-color);
|
|
padding: 2px 3px;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.tag.active {
|
|
filter: saturate(0.75);
|
|
}
|
|
|
|
@media screen and (min-width: 900px) {
|
|
article .content {
|
|
width: 70%;
|
|
margin: auto;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
body {
|
|
background-color: var(--base-color);
|
|
}
|
|
|
|
article {
|
|
background-color: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
article img:first-child,
|
|
article video:first-child {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
/* Blog previous and next links */
|
|
.blog-navigation {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
padding-top: 30px;
|
|
padding-bottom: 60px;
|
|
}
|
|
|
|
.blog-navigation .next {
|
|
text-align: right;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.blog-navigation {
|
|
grid-template-columns: 1fr;
|
|
gap: 20px;
|
|
border-top: 1px solid var(--code-background-color);
|
|
}
|
|
.blog-navigation .next {
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
.blog-navigation span {
|
|
opacity: 0.6;
|
|
font-weight: 700;
|
|
margin-bottom: 5px;
|
|
display: block;
|
|
}
|
|
|
|
.blog-navigation a {
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
opacity: 0.6;
|
|
transition: opacity 0.2s;
|
|
}
|
|
|
|
.blog-navigation a:hover {
|
|
opacity: 1;
|
|
}
|
|
</style>
|
|
|
|
<link rel="stylesheet" href="/assets/css/highlight.obsidian.min.css">
|
|
<div class="container">
|
|
<article class="padded">
|
|
<div class="content article-container">
|
|
<figure class="article-cover">
|
|
{% if page.image_caption_title or page.image_caption_description %}
|
|
<figcaption>
|
|
<strong>{{ page.image_caption_title }}</strong>
|
|
<span style="margin-left: 0.75rem; font-size: 90%">{{ page.image_caption_description }}</span>
|
|
</figcaption>
|
|
{% endif %}
|
|
|
|
<img src="{{ page.image }}" title="{{ page.image_caption_title }}"
|
|
alt="{{ page.image_caption_title }} {{ page.image_caption_description }}" class="rounded-lg"
|
|
style="width: 100%; height: auto; background-color: transparent;" />
|
|
</figure>
|
|
|
|
<div class="article-info">
|
|
<h1>
|
|
{{ page.title }}
|
|
</h1>
|
|
<div class="article-metadata">
|
|
<div class="article-author">
|
|
<span>By: </span>
|
|
{% assign post_author = site.data.authors | find: "name", page.author %}
|
|
{% if post_author %}
|
|
<img class="avatar" width="25" height="25" src="{{ post_author.image }}" alt="{{ page.author }}" loading="lazy">
|
|
{% else %}
|
|
<img class="avatar" width="25" height="25" src="/assets/images/authors/default_avatar.svg" alt="{{ page.author }}" loading="lazy">
|
|
{% endif %}
|
|
<span class="by">{{ page.author }}</span>
|
|
</div>
|
|
<span class="date" data-post-date="{{ page.date }}"> {{ page.date | date: "%e %B %Y" }}</span>
|
|
</div>
|
|
|
|
<div class="tags">
|
|
{% for category in page.categories %}
|
|
<a href="/blog/{{ category }}">
|
|
<div class="tag active">{{ site.data.categories[category][0].name }}</div>
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
|
|
{% include articles/outdated_notice.html %}
|
|
|
|
<div class="article-body">
|
|
{{ content }}
|
|
</div>
|
|
</div>
|
|
</article>
|
|
<div class="blog-navigation">
|
|
{% if page.previous.url %}
|
|
<div class="previous">
|
|
<span>Previous</span>
|
|
<a rel="prev" href="{{page.previous.url}}">{{page.previous.title}}</a>
|
|
</div>
|
|
{% endif %}
|
|
{% if page.next.url %}
|
|
<div class="next">
|
|
<span>Next</span>
|
|
<a rel="next" href="{{page.next.url}}">{{page.next.title}}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<link rel="stylesheet" href="/assets/css/anchor-link.css?1">
|
|
<link rel="stylesheet" href="/assets/css/article-cards.css?3">
|
|
<script src="/assets/js/anchor-link.js"></script>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
// Add icons to easily copy section links.
|
|
window.applyAnchorLinks('.article-body');
|
|
|
|
// 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');
|
|
lightbox.dataset.group = 'article';
|
|
articleImg.parentNode.appendChild(lightbox);
|
|
lightbox.appendChild(articleImg);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
{% include footer.html %}
|