Skip to content

Commit

Permalink
chore: Update home cards styling for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jespermhl committed Jul 25, 2024
1 parent 9508f1e commit c3472ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def generate_home_page(pages):
def generate_card(title, date, path, author, snippet, image):
image_html = f'<img src="{image}" class="card-img-top" alt="{title}">' if image else ''
return f"""
<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">
{image_html}
<div class="card-body">
<h5 class="card-title">{title}</h5>
Expand Down Expand Up @@ -208,7 +208,7 @@ def generate_card(title, date, path, author, snippet, image):
if len(filtered_pages) > 3:
more_page_path = os.path.join('more', f"{path_key}.html")
homepage_content += f"""
<div class="card home-card" style="margin: 10px;">
<div class="card" style="margin: 10px;">
<div class="card-body d-flex align-items-center justify-content-center">
<a href='{more_page_path}' class='btn btn-secondary mx-4'>More {section_title}</a>
</div>
Expand Down
14 changes: 7 additions & 7 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<h1>Sul sul, welcome to the Sims Info Hub!</h1>
<p>Welcome to my little Sims information site / wiki! Have fun browsing!</p>
<h2>Updates</h2><div class='card-container mb-3' style='display: flex; flex-wrap: wrap;'>
<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">
<img src="/assets/img/blogposts/update.jpeg" class="card-img-top" alt="Update May 28, 2024">
<div class="card-body">
<h5 class="card-title">Update May 28, 2024</h5>
Expand All @@ -57,7 +57,7 @@ <h6 class="card-subtitle mb-2 text-muted">Posted on May 28, 2024 by Jesper</h6>
</div>
</div>

<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">
<img src="/assets/img/blogposts/update.jpeg" class="card-img-top" alt="Update June 6, 2024">
<div class="card-body">
<h5 class="card-title">Update June 6, 2024</h5>
Expand All @@ -67,7 +67,7 @@ <h6 class="card-subtitle mb-2 text-muted">Posted on June 6, 2024 by Jesper</h6>
</div>
</div>

<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">
<img src="/assets/img/blogposts/update.jpeg" class="card-img-top" alt="Update July 24, 2024">
<div class="card-body">
<h5 class="card-title">Update July 24, 2024</h5>
Expand All @@ -77,12 +77,12 @@ <h6 class="card-subtitle mb-2 text-muted">Posted on July 24, 2024 by Jesper</h6>
</div>
</div>

<div class="card home-card" style="margin: 10px;">
<div class="card" style="margin: 10px;">
<div class="card-body d-flex align-items-center justify-content-center">
<a href='more/updates.html' class='btn btn-secondary mx-4'>More Updates</a>
</div>
</div></div><h2>SDX Drops</h2><div class='card-container mb-3' style='display: flex; flex-wrap: wrap;'>
<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">

<div class="card-body">
<h5 class="card-title">SDX Drop Example</h5>
Expand All @@ -92,7 +92,7 @@ <h6 class="card-subtitle mb-2 text-muted">Posted on July 23, 2024 by Jesper</h6>
</div>
</div>
</div><h2>Challenges</h2><div class='card-container mb-3' style='display: flex; flex-wrap: wrap;'>
<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">

<div class="card-body">
<h5 class="card-title">Rags to Riches Challenge</h5>
Expand All @@ -102,7 +102,7 @@ <h6 class="card-subtitle mb-2 text-muted">Posted on July 23, 2024 by Jesper</h6>
</div>
</div>
</div><h2>Expansion Packs</h2><div class='card-container mb-3' style='display: flex; flex-wrap: wrap;'>
<div class="card" style="min-width: 300px; margin: 10px;">
<div class="card home-card" style="min-width: 300px; margin: 10px;">
<img src="/assets/img/covers/ep/new/lovestruck.webp" class="card-img-top" alt="Lovestruck">
<div class="card-body">
<h5 class="card-title">Lovestruck</h5>
Expand Down

0 comments on commit c3472ee

Please sign in to comment.