mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
update the author text section
This commit is contained in:
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
22
index.html
22
index.html
@@ -29,26 +29,10 @@
|
||||
<nav class="sidebar left-sidebar">
|
||||
<div id="file-index"></div>
|
||||
<div class="subtitle">
|
||||
<span class="name">Litruv</span>
|
||||
<span class="role">Dev/Tech Artist @MatesMedia</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>
|
||||
<span class="name"></span>
|
||||
<span class="role"></span>
|
||||
</div>
|
||||
<div class="social-links"></div>
|
||||
<div class="github-link">
|
||||
<a href="https://github.com/litruv/docs" target="_blank" title="Docs Viewer GitHub">
|
||||
<i class="fab fa-github"></i> Docs Viewer
|
||||
|
||||
24
index.js
24
index.js
@@ -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) {
|
||||
const doc = this.indexService.findDocumentBySlug(this.indexData.documents, slug);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user