From b3a862c21cc30fc297eda499265d36f5caddd5fe Mon Sep 17 00:00:00 2001
From: maxiwee69
Date: Wed, 24 Jan 2024 20:20:30 +0100
Subject: [PATCH] removed the footer from the website because it was not needed
and it was bugged and i was too lazy to fix it and it looked bad
anyway(except for the footer on the / page that one is good but i didnt keep
it anyway) modified: index.html modified:
learntotweak/aarch64/index.html modified:
learntotweak/aarch64/style.css modified: learntotweak/index.html
modified: learntotweak/step1/index.html modified:
learntotweak/step1/style.css modified: learntotweak/step2/index.html
modified: learntotweak/step2/style.css modified:
learntotweak/step3/index.html modified: learntotweak/step3/style.css
modified: learntotweak/style.css modified: projects/index.html
modified: projects/style.css modified: style.css
---
footer.py | 44 +++++++++++++++------------------
index.html | 3 ---
learntotweak/aarch64/index.html | 4 +--
learntotweak/aarch64/style.css | 9 -------
learntotweak/index.html | 4 +--
learntotweak/step1/index.html | 4 +--
learntotweak/step1/style.css | 9 -------
learntotweak/step2/index.html | 4 +--
learntotweak/step2/style.css | 9 -------
learntotweak/step3/index.html | 4 +--
learntotweak/step3/style.css | 9 -------
learntotweak/style.css | 11 +--------
projects/index.html | 4 +--
projects/style.css | 11 +--------
style.css | 11 +--------
15 files changed, 29 insertions(+), 111 deletions(-)
diff --git a/footer.py b/footer.py
index e85af1c..fcf7928 100644
--- a/footer.py
+++ b/footer.py
@@ -4,33 +4,29 @@
# Specify the directory you want to start from
root_dir = r'C:\Users\maxi\maxiwee69.github.io'
-# Define the footer CSS you want to add
-footer_css = """.footer {
- background-color: #0a0a15; /* Darker blue */
- color: #e0e0e0; /* Lighter color for the footer text */
- font-family: Arial, sans-serif;
- text-align: center;
- padding: 20px;
- width: 100%;
- flex-shrink: 0;
-}"""
-
# Walk through all subdirectories
for dirpath, dirnames, filenames in os.walk(root_dir):
for filename in filenames:
- # Check if the file is a CSS file
- if filename.endswith('.css'):
- filepath = os.path.join(dirpath, filename)
+ filepath = os.path.join(dirpath, filename)
+ if filename.endswith('.html'):
+ with open(filepath, 'r+') as file:
+ # Read the existing content
+ content = file.read()
+ # Remove the footer
+ content = re.sub(r'', '', content, flags=re.DOTALL)
+ # Write the new content back to the file
+ file.seek(0)
+ file.write(content)
+ file.truncate()
+ print(f'Removed footer from: {filepath}')
+ elif filename.endswith('.css'):
with open(filepath, 'r+') as file:
# Read the existing content
content = file.read()
- # Check if the footer background-color is set to #0a0a15
- if re.search(r'\.footer\s*{\s*background-color:\s*#0a0a15;', content):
- print(f'Found matching file: {filepath}')
- # If yes, replace the entire .footer CSS with the new one
- content = re.sub(r'(\.footer\s*{[^}]*})', footer_css, content)
- # Write the new content back to the file
- file.seek(0)
- file.write(content)
- file.truncate()
- print(f'Updated file: {filepath}')
+ # Remove the .footer CSS rules
+ content = re.sub(r'\.footer\s*{[^}]*}', '', content)
+ # Write the new content back to the file
+ file.seek(0)
+ file.write(content)
+ file.truncate()
+ print(f'Removed .footer CSS from: {filepath}')
diff --git a/index.html b/index.html
index c55f6c3..4ec01e6 100644
--- a/index.html
+++ b/index.html
@@ -41,9 +41,6 @@ About Me
you can contact me via Twitter or Email.
-