Browse Source

style adjustments

main
Cailean Finn 5 months ago
parent
commit
77c3404762
  1. 7
      app.py
  2. 7
      static/assets/styles.css

7
app.py

@ -151,6 +151,7 @@ class WikiApp(Flask):
# Find all a tags with href not containing 'index.php' # Find all a tags with href not containing 'index.php'
links = soup.find_all('a', href=lambda href: href and 'index.php' not in href and not href.startswith('#') and not href.startswith('/File:')) links = soup.find_all('a', href=lambda href: href and 'index.php' not in href and not href.startswith('#') and not href.startswith('/File:'))
# Loop through each link and modify its href attribute # Loop through each link and modify its href attribute
for link in links: for link in links:
# Add _blank to href # Add _blank to href
@ -159,6 +160,7 @@ class WikiApp(Flask):
# Find all a tags with href containing 'index.php' # Find all a tags with href containing 'index.php'
links = soup.find_all('a', href=lambda href: href and 'index.php' in href) links = soup.find_all('a', href=lambda href: href and 'index.php' in href)
# Loop through each link and modify its href attribute # Loop through each link and modify its href attribute
for link in links: for link in links:
# Remove 'index.php' from the href attribute # Remove 'index.php' from the href attribute
@ -166,11 +168,10 @@ class WikiApp(Flask):
# print(links)
# Remove any element with class 'mw-editsection' # Remove any element with class 'mw-editsection'
edit_sections = soup.find_all(class_='mw-editsection') edit_sections = soup.find_all(class_='mw-editsection')
print(edit_sections)
for edit_section in edit_sections: for edit_section in edit_sections:
edit_section.decompose() edit_section.decompose()

7
static/assets/styles.css

@ -133,12 +133,9 @@ body {
} }
.content-cont .article-cont a { .content-cont .article-cont a {
color: white; color: red;
text-decoration: none; text-decoration: none;
background-color: black;
font-style: oblique; font-style: oblique;
padding-left: 5px;
padding-right: 5px;
} }
.content-cont ul { .content-cont ul {
@ -264,7 +261,7 @@ body {
.section-element a { .section-element a {
text-decoration: underline; text-decoration: underline;
color: black; color: red;
} }
.section-img img{ .section-img img{

Loading…
Cancel
Save