105 lines
3.2 KiB
Python
105 lines
3.2 KiB
Python
import re
|
|
|
|
with open("current_about_post.html", "r", encoding="utf-8") as f:
|
|
content = f.read()
|
|
|
|
content = re.sub(
|
|
r'\.about-middle\s*{\s*background-color:\s*#[0-9A-Fa-f]+;\s*padding:\s*100px 0;\s*}',
|
|
'.about-middle {
|
|
background-color: #F5F2EC;
|
|
padding: 100px 0;
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-card\s*{\s*background:\s*#FFFFFF;\s*border-radius:\s*24px;\s*padding:\s*40px;\s*box-shadow:\s*0 4px 24px rgba\(0,0,0,0\.03\);\s*}',
|
|
'.about-card {
|
|
background: #FFFFFF;
|
|
border-radius: 32px;
|
|
padding: 48px;
|
|
box-shadow: 0 4px 24px rgba(0,0,0,0.03);
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-card-title\s*{\s*font-family:\s*\'Cardo\',\s*serif;\s*font-size:\s*32px;\s*font-weight:\s*700;\s*margin:\s*0 0 32px;\s*color:\s*#1C3434;\s*}',
|
|
'.about-card-title {
|
|
font-family: \'Cardo\', serif;
|
|
font-size: 44px;
|
|
font-weight: 700;
|
|
margin: 0 0 40px;
|
|
color: #1C3434;
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-list\s*{\s*display:\s*flex;\s*flex-direction:\s*column;\s*gap:\s*24px;\s*}',
|
|
'.about-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 32px;
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-list-item\s*{\s*display:\s*flex;\s*align-items:\s*center;\s*gap:\s*16px;\s*font-size:\s*18px;\s*font-weight:\s*600;\s*color:\s*#1C3434;\s*}',
|
|
'.about-list-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 24px;
|
|
font-family: \'Inter\', sans-serif;
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
color: #1C3434;
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-connect-card\s*{\s*display:\s*flex;\s*align-items:\s*center;\s*justify-content:\s*space-between;\s*}',
|
|
'.about-connect-card {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
gap: 24px;
|
|
padding: 32px 48px;
|
|
}',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-social-icon\s*{\s*width:\s*56px;\s*height:\s*56px;',
|
|
'.about-social-icon {
|
|
width: 48px;
|
|
height: 48px;',
|
|
content
|
|
)
|
|
|
|
content = re.sub(
|
|
r'\.about-middle-image\s*{\s*width:\s*100%;\s*height:\s*100%;\s*object-fit:\s*cover;\s*border-radius:\s*24px;\s*min-height:\s*400px;\s*}',
|
|
'.about-middle-image {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
border-radius: 32px;
|
|
min-height: 400px;
|
|
}',
|
|
content
|
|
)
|
|
|
|
icon1_old = '<svg viewBox="0 0 24 24"><path d="M12 2L3 9h18L12 2zm0 0v7M5 9v13h14V9" stroke-linecap="round" stroke-linejoin="round"/></svg>'
|
|
icon1_new = '<svg viewBox="0 0 24 24" fill="none" stroke="#1C3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 14h4v7h-4z" /><path d="M14 17h5v4h-5z" /><path d="M5 19h5v2H5z" /><path d="M12 4l1.5 3.5 3.5 1.5-3.5 1.5L12 14l-1.5-3.5-3.5-1.5 3.5-1.5z"/></svg>'
|
|
|
|
icon2_old = '<svg viewBox="0 0 24 24"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7" stroke-linecap="round" stroke-linejoin="round"/></svg>'
|
|
icon2_new = '<svg viewBox="0 0 24 24" fill="none" stroke="#1C3434" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7"/></svg>'
|
|
|
|
content = content.replace(icon1_old, icon1_new)
|
|
content = content.replace(icon2_old, icon2_new)
|
|
|
|
with open("current_about_post.html", "w", encoding="utf-8") as f:
|
|
f.write(content)
|