Skip to content

Commit

Permalink
added some stuff
Browse files Browse the repository at this point in the history
	modified:   learntotweak/aarch64/style.css
	modified:   learntotweak/step1/style.css
	modified:   learntotweak/step2/style.css
	modified:   learntotweak/step3/style.css
	deleted:    tag.py
  • Loading branch information
maxiwee69 committed Jan 24, 2024
1 parent bf52c27 commit f0cb0ab
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 49 deletions.
36 changes: 36 additions & 0 deletions footer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import os
import re

# 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)
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}')
6 changes: 1 addition & 5 deletions learntotweak/aarch64/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ html {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
position: absolute;
bottom: 0;
left: 0; /* Add this */
right: 0; /* Add this */
margin: auto; /* Add this */
width: 100%;
flex-shrink: 0;
}
9 changes: 4 additions & 5 deletions learntotweak/step1/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ body {
background-color: #1a1a2e; /* Softer dark blue */
color: #e0e0e0; /* Lighter text color */
padding: 20px;
display: flex;
flex-direction: column;
min-height: 100vh;
}

html {
Expand Down Expand Up @@ -114,10 +117,6 @@ html {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
position: absolute;
bottom: 0;
left: 0; /* Add this */
right: 0; /* Add this */
margin: auto; /* Add this */
width: 100%;
flex-shrink: 0;
}
6 changes: 1 addition & 5 deletions learntotweak/step2/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ html {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
position: absolute;
bottom: 0;
left: 0; /* Add this */
right: 0; /* Add this */
margin: auto; /* Add this */
width: 100%;
flex-shrink: 0;
}
6 changes: 1 addition & 5 deletions learntotweak/step3/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ html {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
position: absolute;
bottom: 0;
left: 0; /* Add this */
right: 0; /* Add this */
margin: auto; /* Add this */
width: 100%;
flex-shrink: 0;
}
29 changes: 0 additions & 29 deletions tag.py

This file was deleted.

0 comments on commit f0cb0ab

Please sign in to comment.