File tree Expand file tree Collapse file tree 6 files changed +34
-0
lines changed
Expand file tree Collapse file tree 6 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1919 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap "
2020 rel ="stylesheet ">
2121 < link rel ="stylesheet " href ="style.css ">
22+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
2223 < link rel ="icon " type ="image/png " sizes ="32x32 " href ="assets/icons/favicon-32.png ">
2324 < link rel ="icon " type ="image/png " sizes ="16x16 " href ="assets/icons/favicon-16.png ">
2425 < link rel ="apple-touch-icon " sizes ="192x192 " href ="assets/icons/techstack-logo-192.png ">
Original file line number Diff line number Diff line change 88 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap "
99 rel ="stylesheet ">
1010 < link rel ="stylesheet " href ="style.css ">
11+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
1112 < link rel ="icon " type ="image/png " sizes ="32x32 " href ="assets/icons/favicon-32.png ">
1213 < link rel ="icon " type ="image/png " sizes ="16x16 " href ="assets/icons/favicon-16.png ">
1314 < link rel ="apple-touch-icon " sizes ="192x192 " href ="assets/icons/techstack-logo-192.png ">
Original file line number Diff line number Diff line change 2020 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap "
2121 rel ="stylesheet ">
2222 < link rel ="stylesheet " href ="style.css ">
23+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
2324 < link rel ="icon " type ="image/png " sizes ="32x32 " href ="assets/icons/favicon-32.png ">
2425 < link rel ="icon " type ="image/png " sizes ="16x16 " href ="assets/icons/favicon-16.png ">
2526 < link rel ="apple-touch-icon " sizes ="192x192 " href ="assets/icons/techstack-logo-192.png ">
Original file line number Diff line number Diff line change 1+ import sys
2+
3+ files = [
4+ 'about.html' ,
5+ 'contact.html' ,
6+ 'affiliate-disclosure.html' ,
7+ 'privacy-policy.html' ,
8+ 'terms-of-service.html'
9+ ]
10+
11+ fa_tag = '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">'
12+
13+ count = 0
14+ for filepath in files :
15+ with open (filepath , 'r' , encoding = 'utf-8' ) as f :
16+ content = f .read ()
17+
18+ if fa_tag not in content :
19+ print (f"Adding Font Awesome to { filepath } " )
20+ content = content .replace (
21+ '<link rel="stylesheet" href="style.css">' ,
22+ '<link rel="stylesheet" href="style.css">\n ' + fa_tag
23+ )
24+
25+ with open (filepath , 'w' , encoding = 'utf-8' ) as f :
26+ f .write (content )
27+ count += 1
28+
29+ print (f"Fixed { count } files." )
Original file line number Diff line number Diff line change 88 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap "
99 rel ="stylesheet ">
1010 < link rel ="stylesheet " href ="style.css ">
11+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
1112 < style >
1213 body {
1314 padding : 2rem ;
Original file line number Diff line number Diff line change 88 < link href ="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap "
99 rel ="stylesheet ">
1010 < link rel ="stylesheet " href ="style.css ">
11+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css ">
1112 < style >
1213 body {
1314 padding : 2rem ;
You can’t perform that action at this time.
0 commit comments