update the author text section

This commit is contained in:
2025-02-09 20:20:33 +11:00
parent 267c598484
commit a230348d96
3 changed files with 44 additions and 20 deletions

View File

@@ -25,5 +25,21 @@
} }
] ]
} }
],
"author": {
"name": "Litruv",
"role": "Dev/Tech Artist @MatesMedia",
"socials": [
{
"icon": "fab fa-github",
"url": "https://github.com/Litruv",
"title": "GitHub - Litruv"
},
{
"icon": "fab fa-youtube",
"url": "https://www.youtube.com/c/Litruv",
"title": "YouTube - Litruv"
}
] ]
}
} }

View File

@@ -29,26 +29,10 @@
<nav class="sidebar left-sidebar"> <nav class="sidebar left-sidebar">
<div id="file-index"></div> <div id="file-index"></div>
<div class="subtitle"> <div class="subtitle">
<span class="name">Litruv</span> <span class="name"></span>
<span class="role">Dev/Tech Artist @MatesMedia</span> <span class="role"></span>
</div>
<div class="social-links">
<a href="https://github.com/Litruv" target="_blank" title="GitHub - Litruv">
<i class="fab fa-github"></i>
</a>
<a href="https://www.youtube.com/c/Litruv" target="_blank" title="YouTube - Litruv">
<i class="fab fa-youtube"></i>
</a>
<a href="https://steamcommunity.com/id/Litruv" target="_blank" title="Steam - Litruv">
<i class="fab fa-steam"></i>
</a>
<a href="https://discordapp.com/users/220772082055774210" target="_blank" title="Discord - @Litruv">
<i class="fab fa-discord"></i>
</a>
<a href="https://bsky.app/profile/lit.mates.dev" target="_blank" title="Bluesky - lit.mates.dev">
<i class="fa-brands fa-bluesky"></i>
</a>
</div> </div>
<div class="social-links"></div>
<div class="github-link"> <div class="github-link">
<a href="https://github.com/litruv/docs" target="_blank" title="Docs Viewer GitHub"> <a href="https://github.com/litruv/docs" target="_blank" title="Docs Viewer GitHub">
<i class="fab fa-github"></i> Docs Viewer <i class="fab fa-github"></i> Docs Viewer

View File

@@ -565,6 +565,30 @@ class Documentation {
} }
} }
populateAuthorInfo(author) {
const subtitleName = document.querySelector('.name');
const subtitleRole = document.querySelector('.role');
if (!subtitleName || !subtitleRole) return;
subtitleName.textContent = author.name || '';
subtitleRole.textContent = author.role || '';
const socials = document.querySelector('.social-links');
if (socials) {
socials.innerHTML = '';
if (author.socials) {
author.socials.forEach(s => {
const link = document.createElement('a');
link.href = s.url;
link.target = '_blank';
link.title = s.title;
link.innerHTML = `<i class="${s.icon}"></i>`;
socials.appendChild(link);
});
}
}
}
async loadDocumentBySlug(slug) { async loadDocumentBySlug(slug) {
const doc = this.indexService.findDocumentBySlug(this.indexData.documents, slug); const doc = this.indexService.findDocumentBySlug(this.indexData.documents, slug);