Pyx's Modern Theme

3558 views 39 replies Created 2025-03-17 23:17

Install this theme

Pyx’s Modern Theme is the successor to my old theme, darkpixlz’s Modern Theme, which was a fork of the Air theme. It was roughly 2500 lines and had many issues, so I have rewritten it!

Screenshots









Features

  • Supports the full admin interface and review panel
  • Supports almost every modern core feature (new topic map, new upgrade page, chat, …) and some plugins
  • Customizable background image
  • Adds a --user-bg-url property for your plugins to read a users background image on profiles
  • Compared to my old theme, way less LOC overall and easier for devices to render

Known issues

Nothing at the moment!

All contributions on the repository are more than welcome and will (probably) be reviewed same-day. Comments or ideas? Drop a reply here. Issues? Make a github issue please.

Please note that I test all of my styles for Firefox and Firefox only; if Chromium is acting up, please don't hesitate to file a report. I do not test nor verify mobile view at the moment, but support is planned.

That’s it for now - enjoy the theme!


Well, there seems to be a problem with not having any components installed, and then it seems to change the CSS of the images, causing a lot of them to become rectangles.

Yep, this was an oversight. I forgot components could add images like this. A fix has been pushed 👍

This is intended behavior, I guess it just looks kinda wrong if the banner is closed. I’ll see what I can do.


I tried a different image and it seemed to be a bit of a problem, but the problem with making the image an oval did go away.

I wonder if it’s possible to add an adaptive scale? I’d like to have a sidebar component on the right side.

CSS
/* Get the user's avatar width and set the maximum width of the ad container */

/* Ad container styles */
#list-area {
    display: flex;            /* Arrange ads using flexbox */
    flex-direction: column;   /* Display ads vertically */
    gap: 0;                   /* Remove spacing between ad images */
    padding: 0;               /* Remove container padding */
    margin: 0;                /* Ensure no extra margin around the ad container */
    max-width: 812px;         /* Limit the ad container width to a maximum of 812px (avatar width: 48px) */
}

/* Ad link styles */
.banner-ad {
    display: block;           /* Make the ad container a block element */
    width: 100%;              /* Ensure the ad container occupies 100% width */
    max-width: 100%;          /* Prevent exceeding the maximum width */
    margin: 0;                /* Remove spacing between ad containers */
}

/* Responsive ad image styles */
.ad-image {
    width: 100%;              /* Ensure the image occupies the full width of its parent */
    height: auto;             /* Maintain the original aspect ratio of the image */
    max-width: 100%;          /* Prevent the image from exceeding its container's max width */
    display: block;           /* Fix the empty space issue at the bottom of images */
    margin: 0;                /* Remove any additional space around the image */
}

/* Responsive Design: Adjust ad display for large and small screens */

/* Adjust ad display on devices with a width less than 768px */
@media (max-width: 768px) {
    #list-area {
        padding: 0;            /* Ensure no extra padding on mobile devices */
    }

    .banner-ad {
        width: 100%;           /* Ensure the ad occupies the full width on small screens */
    }

    .ad-image {
        width: 100%;           /* Ensure the image adapts to the container width */
        height: auto;          /* Maintain the image's aspect ratio */
    }
}

/* Further adjust ad images on very small devices (e.g., phones in portrait mode) */
@media (max-width: 480px) {
    .ad-image {
        width: 100%;             /* Ensure images adapt to the phone's screen width */
        max-width: 100%;         /* Set the maximum width to 100% to avoid oversizing */
        height: auto;            /* Maintain the image's aspect ratio */
    }
}

I’ll check on the side component thing tomorrow. No promises on advertising because I cannot test that but for general scaling I should be able to fix that.

Nicely done! 👏 :star_struck: :discourse:

Update pushed with many fixes and support for the category edit page and other admin areas!


@Monikas your issue with side buttons should also be fixed now.

Sorry, I was sick a lot of this week, have also had other things to be doing. Just polished the post stream up, fixed many bugs, and made the composer float!

Also, I noticed that the theme page got reverted to the old version which has summoned a lot of issues. I’m not going to make an effort to fix anything there because I feel like it will be re-added and it will look like intended.

Is there a way to have a layout like below:

With the nice rendering and stuff of this theme? Like can I have the leaderboard sidebar and stuff too(see below):

Unfortunately that’s a little out of scope for this theme because it’s intentionally unibody so I would not adopt a layout where the sidebar is detached. If you’re looking for a design like that I’d recommend these two amazing themes:

However if the header banner is something you’d like to see supported feel free to give me a site URL and I’ll check out the possibility of supporting it.

so cool

Hi all, sorry for the lack of updates lately! I have just added support for the review queue and docker manager.



Hi guys,

Sorry for the slow update, I requested the title to be changed last week and never really followed up. I went to sync the theme on my local site, but I learned about some port conflicts, 8 hours later I have my entire homelab migrated to Proxmox. Mix that and the week I’ve had with personal projects (documenting 4000 LOC frontend + backend is not easy) and you don’t get a lot of spare time :melting_face:

tl;dr: The theme is now out of the “preview” stage! :tada: I’m confident enough it’ll work for most everybody’s sites and be styled ok. With this new stage, I am no longer looking for bug reports here, please file GitHub issues going forward.

Please keep the feedback coming - any and all is welcome. Thank you for your continued support even if I may be slow :3

Brilliant work as always, thanks!

Hi guys,

Sorry about the deprecation warning at the top of your sites for a few days 😅, it has been fixed now. Everything should be normal again.

More good news! I just ended up rewriting the theme again so it is no longer one massive common.scss file. It shouldn’t look any different besides some minor fixes I made. Enjoy :3


Really liked the theme, but there’s some “artifacts” that unfortunately prevents me from using it 😦

  • The “Profile” page has little button behind the header that says “skip to content”
  • When I try to select a different color palette (as user, on my profile) the dropdown selection shows close to the “skip to content” button i mentioned above (that’s how I realized it was there)

@darkpixlz I’ve recorded a video because I realize that my feedback may be hard to understand 😃

Hey - thanks for the report. I just fixed the profile “Skip to content” error and it should be better now!

In regards to the dropdown I found the line that was blocking it but when I remove it, it looks like this, so I figured it wasn’t worth it to “fix”.

Thanks !!!

I wonder why does it show, I see the fix was to disappear it from the screen hahaha but do you know what is it used for usually ?

Yes, people (myself included) often use tab for easily navigating pages for either convenience or accessibility reasons. For example, if you’re in a form with a lot of inputs, often instead of moving your mouse over to the next box you can press tab and it’ll go to the next one.

Small update released to support the lightbox which now has a scrapped lightbox-style background!


Support for the search UI has also been added

I also made some smaller consistency changes to things like text boxes. Enjoy and let me know your thoughts!

I’m trying to change the color pallet entirely but am unable to do so. Using Vivaldi, also confirmed on Google Chrome

Hi there, are you using a tablet or computer? Working fine (not great but i can click it) for me on Firefox Desktop

Hello, I am using desktop (Windows 11 24H2). I saw earlier posts showing that the theme select works so I don’t know why this occurs over here. I can download Firefox and test that, however.

It’s working fine for me on Chromium (Brave) too, so you can try FIrefox or try disabling all of your extensions and userstyles if present.

Still happens, I don’t know why 😭

You can try using your phone and making sure Discourse is fully up to date (the theme is always tested against latest tests-passed commit), otherwise I’m not sure what your issue could be, sorry!

the theme look pretty sick honestly thank you for this, do you have a link so i can send it to the admin to add in their theme as well?

thanks

If you mean their site, you can send them the link to this topic and they can click the “Install this theme” button!

oh okay sounds good, i’m on a different community, i will send the link thanks

@darkpixlz is this theme works on ios26.1?

i just check a quick preview of the theme on my phone and wondering if there is any way to make the popup screen blurry like the one from the “search bar “ for the profil, like in the picture, it’s hard to read as you can see, the search bar background is perfectly blur and nice

would be awesome to have the same for on profile, be much easier to read notifications

thanks for your hard work, really like this theme

Historically I haven’t tested against mobile, thanks for letting me know about the issues. I’ll look into fixing the user menu, I guess it’s just broken on anything non-Gecko based.

oh okay, no problem,would be really awesome if you can test it when you have time for iOS, would love to see this theme on my Discourse hub app

thank you mate, really appreciate it🙏🏽

January Update

Hello all! Just another routine cleaning up of the theme and fixing some existing issues and breakage caused by newer Discourse.

Changelog:

  • Fixed the body being ~5px offcenter
  • Fixed the user menu and many dropdowns
  • Corrected composer warnings for new minified core style
  • Added table builder support
  • Numerous post stream improvements [quotes, onebox, nav buttons, codeboxes]
  • Admin and group page fixes
  • User card improvemenets







image

That’s about it for this update, as per usual let me know if you have questions/comments/concerns!! I’m also working on getting GitHub Sponsors up so you can support the theme if you like it, no news on that for the time being due to Stripe but it’s coming.

hey mate, did you had time to test on iOS 26 yet? still wondering how it will look like

thanks

Hi, I did briefly look at the theme on my iPhone 15 Plus with 26.3 beta something on it. It looks fine and is functional but there is definitely some changes I can make, which I might get around to tonight or sometime this week.

Hi everybody! Back with some more minor changes but the review queue has been fixed and I changed some other minor things.


I also updated the photos in the OP because they were a year old at this point. There’s still more I want to do in the near future (like a mobile layout) so stay tuned for that. I’m also still working on GitHub sposors.

Thanks for your support, enjoy the theme!