Skip to content

Commit

Permalink
feat: fix layouts on very large screen widths
Browse files Browse the repository at this point in the history
  • Loading branch information
gouravkhunger committed May 30, 2024
1 parent 940d016 commit b9f8642
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
{% else %}
{% assign author = site.data.authors[page.author]%}

<div class="flex flex-col lg:flex-row p-2">
<div class="flex flex-col lg:flex-row lg:max-w-screen-2xl lg:mx-auto">
<div class="flex justify-center items-center lg:w-1/2 md:mb-0">
{% if page.image %}
<img
Expand Down
2 changes: 1 addition & 1 deletion _includes/relatedposts.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2>Related content</h2>
{% assign maxRelatedCounter = 0 %}

<div
class="flex flex-col sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:gap-4 md:gap-4 lg:gap-6 text-center"
class="flex flex-col sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:gap-4 md:gap-4 lg:gap-6 text-center lg:max-w-screen-2xl lg:mx-auto"
>
<!-- prettier-ignore -->
{% for post in site.posts %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!-- prettier-ignore -->
{% include_cached infeed-ad.html environment=jekyll.environment sitemap=page.sitemap %}

<section class="p-6 sm:p-10">
<section class="p-6 sm:p-10 max-w-screen-2xl mx-auto">
<div
class="flex flex-col sm:grid sm:grid-cols-2 lg:grid-cols-3 sm:gap-4 md:gap-4 lg:gap-6 text-center"
>
Expand Down
2 changes: 1 addition & 1 deletion _layouts/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ <h4>{{ author.role }}</h4>
<!-- prettier-ignore -->
{% include_cached infeed-ad.html environment=jekyll.environment sitemap=page.sitemap %}

<section class="p-6 sm:p-10">
<section class="p-6 sm:p-10 max-w-screen-2xl mx-auto">
<!-- prettier-ignore -->
{% assign arrSize = paginator.posts | size %}
{% if arrSize > 0 %}
Expand Down
2 changes: 1 addition & 1 deletion _layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
---

<article class="elevated md:text-lg m-8 md:m-10 lg:m-14 p-6 md:p-8">{{ content | extlinks | optimize_images }}</article>
<article class="elevated md:text-lg m-8 md:m-10 p-6 md:p-8 lg:mx-auto lg:max-w-[80%] 2xl:max-w-screen-xl">{{ content | extlinks | optimize_images }}</article>

{% if page.showlatest %}
<div class="m-8 md:m-10 lg:m-14">{% include latestposts.html %}</div>
Expand Down
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- prettier-ignore -->
{% include_cached infeed-ad.html environment=jekyll.environment sitemap=page.sitemap %}

<section class="lg:flex lg:justify-center">
<section class="lg:flex lg:justify-center lg:max-w-screen-2xl lg:mx-auto">
<div class="content-area elevated">
{% if site.sponsor-notice %}
<div
Expand Down Expand Up @@ -290,7 +290,7 @@ <h4 class="mt-4">

<!-- prettier-ignore -->
{% include_cached infeed-ad.html environment=jekyll.environment sitemap=page.sitemap %}
<br />
<br />
{% include_cached cta.html %}

{% if jekyll.environment == 'production' and page.comments != false and page.sitemap != false %}
Expand Down
2 changes: 1 addition & 1 deletion _pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
enabled: true
---

<section class="p-6 sm:p-10">
<section class="p-6 sm:p-10 max-w-screen-2xl mx-auto">
{% include featured-content.html %}

<div
Expand Down
2 changes: 1 addition & 1 deletion assets/css/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ code.highlighter-rouge:not(h1 code, h2 code, h3 code, h4 code, h5 code, h6 code)
}

.cta {
@apply flex justify-center mx-6 md:mx-auto md:max-w-[80%];
@apply flex justify-center mx-6 md:mx-auto md:max-w-[80%] 2xl:max-w-screen-xl;
}

.notice {
Expand Down

0 comments on commit b9f8642

Please sign in to comment.