fix: Index page

This commit is contained in:
Nathan Woodburn 2024-06-19 13:12:33 +10:00
parent 9568cfe177
commit 1f9b38306c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
4 changed files with 32 additions and 12 deletions

29
cleanSite.py Normal file
View File

@ -0,0 +1,29 @@
import os
# Read all files in the templates directory
for file in os.listdir('templates'):
# Check if the file is sitemap.xml
if file == 'sitemap.xml':
# Open the file
with open('templates/sitemap.xml', 'r') as f:
# Read the content
content = f.read()
# Replace all .html with empty string
content = content.replace('.html', '')
# Write the content back to the file
with open('templates/sitemap.xml', 'w') as f:
f.write(content)
# Skip the file
continue
# If the file is not an html file, skip it
if not file.endswith('.html'):
continue
# Open the file
with open('templates/' + file, 'r') as f:
# Read and remove all .html
content = f.read().replace('.html"', '"')
# Write the cleaned content back to the file
with open('templates/' + file, 'w') as f:
f.write(content)

View File

@ -101,15 +101,12 @@ Check them out here!</blockquote><img class="img-fluid" src="/assets/img/pfront.
<h1>Some recent projects</h1> <h1>Some recent projects</h1>
<div class="swiper"> <div class="swiper">
<div class="swiper-wrapper">{% for project in projects %} <div class="swiper-wrapper">{% for project in projects %}
<div class="swiper-slide site" data-url="{{ project_url }}"> <div class="swiper-slide site" data-url="{{ project.html_url }}">
<img class="site-img" src="{{ project.avatar_url }}" /> <img class="site-img" src="{{ project.avatar_url }}" />
<div class="site-body"> <div class="site-body">
<div class="site-detail" style="width: 100%;"> <div class="site-detail" style="width: 100%;">
<h2 class="site-name" style="text-align: left;">{{ project.name }}</h2> <h2 class="site-name" style="text-align: left;">{{ project.name }}</h2>
<p class="text-start site-author">{{ project.description }}</p> <p class="text-start site-author">{{ project.description }}</p>
{% if project.actions %}
<img src="{{project.actions}}" alt="Build Status">
{% endif %}
</div> </div>
</div> </div>
</div> </div>

View File

@ -36,10 +36,7 @@
<script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script> <script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script>
</head> </head>
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><!-- Google Tag Manager (noscript) --> <body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77">
<noscript><iframe src="https://www.googletagmanager.com/ns?id=GTM-NNXTCKW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<nav class="navbar navbar-expand-md fixed-top navbar-light" id="mainNav" style="background: var(--bs-navbar-hover-color);"> <nav class="navbar navbar-expand-md fixed-top navbar-light" id="mainNav" style="background: var(--bs-navbar-hover-color);">
<div class="container-fluid"><a class="navbar-brand nathanwoodburn" href="/#">Nathan.Woodburn/</a><button data-bs-toggle="collapse" class="navbar-toggler navbar-toggler-right" data-bs-target="#navbarResponsive" type="button" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" value="Menu"><i class="fa fa-bars"></i></button> <div class="container-fluid"><a class="navbar-brand nathanwoodburn" href="/#">Nathan.Woodburn/</a><button data-bs-toggle="collapse" class="navbar-toggler navbar-toggler-right" data-bs-target="#navbarResponsive" type="button" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation" value="Menu"><i class="fa fa-bars"></i></button>
<div class="collapse navbar-collapse" id="navbarResponsive"> <div class="collapse navbar-collapse" id="navbarResponsive">

View File

@ -35,10 +35,7 @@
<script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script> <script async src="https://umami.woodburn.au/script.js" data-website-id="6a55028e-aad3-481c-9a37-3e096ff75589"></script>
</head> </head>
<body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77"><!-- Google Tag Manager (noscript) --> <body id="page-top" data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="77">
<noscript><iframe src="https://www.googletagmanager.com/ns?id=GTM-NNXTCKW"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<header class="masthead" style="background-image:url('/assets/img/bg/projects.webp');"> <header class="masthead" style="background-image:url('/assets/img/bg/projects.webp');">
<div class="intro-body"> <div class="intro-body">
<div class="container"> <div class="container">