Skip to content
Snippets Groups Projects
Verified Commit 2513e17a authored by TheJoeCoder's avatar TheJoeCoder
Browse files

Make social icons into a json file

parent 1b37e143
Branches
No related tags found
No related merge requests found
......@@ -38,7 +38,9 @@ for filename in files:
# Add to projects
projects.append(project)
social_icons = json.load(open("templates/social_icons.json", "r"))
# Format template
template = env.get_template("index.html")
with open("public/index.html", "w") as f:
f.write(template.render(projects=projects))
f.write(template.render(projects=projects, social_icons=social_icons))
......@@ -22,14 +22,16 @@
<div class="row mx-auto p-2 text-center">
<!-- Social icons -->
<p>
<a class="social-link" target="_blank"
href="https://rb9.xyz/yt"><i class="bi bi-youtube"></i></a>
<a class="social-link" target="_blank"
href="https://git.rb9.xyz/TheJoeCoder"><i class="bi bi-gitlab"></i></a>
<a class="social-link" target="_blank"
href="https://github.com/TheJoeCoder"><i class="bi bi-github"></i></a>
<a class="social-link" target="_blank"
href="https://chat.radialbog9.com/@radialbog9"><i class="bi bi-mastodon"></i></a>
{% for icon in social_icons %}
<a
class="social-link"
{% if icon.blank_target %}target="_blank"{% endif %}
href="{{ icon.url }}"
{% if icon.title %}title="{{ icon.title }}"{% endif %}
>
<i class="bi {{ icon.icon }}"></i>
</a>
{% endfor %}
</p>
</div>
<div class="row mx-auto p-2 text-center">
......
[
{
"title": "Buy Me A Coffee",
"url": "https://buymeacoff.ee/Radialbog9",
"icon": "bi-wallet",
"blank_target": true
},
{
"title": "YouTube",
"url": "https://rb9.xyz/yt",
"icon": "bi-youtube",
"blank_target": true
},
{
"title": "GitLab",
"url": "https://git.rb9.xyz/TheJoeCoder",
"icon": "bi-gitlab",
"blank_target": true
},
{
"title": "GitHub",
"url": "https://github.com/TheJoeCoder",
"icon": "bi-github",
"blank_target": true
},
{
"title": "Mastodon",
"url": "https://chat.radialbog9.com/@radialbog9",
"icon": "bi-mastodon",
"blank_target": true
}
]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment