Skip to content

Theming support in Sudonix

Moved Announcements
  • For a long time (well, it certainly feels like forever as Iā€™m writing code as and when I have time in between my day job), Iā€™ve been working on a theming engine (something similar but not quite the same as the code provided for @DownPW) that will be in the soon to be released theme set for Sudonix.

    The most pertinent of these themes (and likely the primary if you choose dark mode, or have it set as default in your OS) is Midnight. This particular theme makes extensive use of CSS modifications, and also changes the layout somewhat - moving away from the ā€œtraditionalā€ NodeBB stock Persona theme.

    Without further ado, the Midnight theme looks like this

    9eec8af9-7046-4549-968d-eb58e1813d27-image.png

    Changing the actual theme itself to one of the defined is shown below

    595e4197-f155-485f-a173-b655bc08face-image.png

    Youā€™ll notice that Iā€™ve hooked into the main-nav area for this, as itā€™s better suited here in my view

    The look and feel is consistent across the entire platform

    0c4b0ee4-480f-4e58-b2ee-72f5759829f2-image.png

    Even the profile page hasnā€™t escaped šŸ™‚

    bf52bd06-f0d0-4167-8714-dc7e3f5a1f74-image.png

    Hope you like the new logoā€¦ šŸ™‚

    611c7565-bccf-44c9-b725-c91765632b41-image.png

    Weā€™re also doing ā€œmore with lessā€ - in the sense that this new CSS file uses variables to simplify it.

    Ideally, Iā€™d like views / input etc. in terms of colours, layouts, etcā€¦

  • @Madchatthew thanks. Much appreciated

  • A bit more eye candy from the mobile perspective

    Screenshot_2022-05-25-19-37-37-01_df198e732186825c8df26e3c5a10d7cd.jpg

    Screenshot_2022-05-25-19-36-00-99_df198e732186825c8df26e3c5a10d7cd.jpg

    Screenshot_2022-05-25-19-35-17-53_df198e732186825c8df26e3c5a10d7cd.jpg

    Screenshot_2022-05-25-19-32-00-40_df198e732186825c8df26e3c5a10d7cd.jpg

    Several changes in the mobile viewport to make the most of limited screen estate, yet retaining a much functionality as possible.

    The search applet has been modified to make it look more modern on mobile devices. Anything over 767px remains unchanged.

  • Itā€™s worth noting at this point that all new themes leverage Font Awesome 6 Pro (I have a paid subscription) to make the most of the newly available icons. Of course, itā€™s perfectly feasible to use the free version, although this will require the replacement of various icons from Pro if they arenā€™t available in the free version. Another issue here is that you can only use the solid icons.

  • In addition to the theming support, Iā€™m also going to be branding the email templates, so they look as follows

    55909fa8-5db0-4416-8d5b-e77178912b4f-image.png

    This uses the new logo, new layout (based on Midnight, as this is the flagship theme if you use Dark Mode by default). The Welcome template has been completed so far, and we have some way to go to complete all of the templates - but as soon as we do, the PROD instance of Sudonix will get the update šŸ™‚

  • Theming support in Sudonix is now live !!! šŸ™‚

    Enjoy. if youā€™re using dark mode on your operating system, then the newer midnight theme is now active. The original dark theme is still there, but will be revamped shortly.

  • ** NEW *** NORD theme added - enjoy šŸ™‚

    fc89081a-ca5c-40d7-9a6d-54f652b2a9f3-image.png

  • ** NEW ** SLATE theme added - enjoy šŸ™‚

    525a9cca-b581-4cb9-8434-4440b3b37c2c-image.png

  • *** NEW *** Superhero (from Bootstrap 3 because I think the colours from v4 are hideous šŸ™‚ ) theme added - enjoy

    b23561de-cd1e-4d82-bc49-8b8f40430218-image.png

  • *** NEW *** Darkly theme added (supersedes previous ā€œdarkā€ theme) - enjoy šŸ™‚

    76928673-7b1b-4d90-ae60-79c446eb41ff-image.png

  • Great Job Bro Mark @phenomlab šŸ˜‰

  • @DownPW thanks

  • I canā€™t believe I actually missed this part - the icon where the magic happens ! To change the swatch to something else, use the ā€œswatchā€ icon as shown below

    3a13e4c8-46c3-4393-985c-def4b7c59caa-image.png

    Select the swatch youā€™d like and the site will reload with the new colours.

  • Something of a slight deviation here in the sense that Iā€™m developing a new stock light theme that will override the default. Itā€™s designed to be easy on the eye, appealing from the layout perspective, and to be engagingā€¦ Here goesā€¦

    edeec2c1-379e-4157-a6b5-a81ebba1c295-image.png

    Itā€™s not quite ready yet as it needs some final polish before it gets officially released. However, Iā€™ll let you into a secret. If you click on the swatch icon, youā€™ll see ā€œLightā€ in the list which is the working title for this theme

    6fbabb7c-8b72-4fb4-a3eb-acf6714c4ff9-image.png

    Give it a spin, and let me know what you think. Just remember that this is a moving target currently and still has bugs šŸ›

    Let me know if you find anything major (aside from what @crazycells has already reported which relates to the modified core CSS)

  • Small addition of sexy looking gradient popular tags

    c16f90bf-17ac-4a40-9080-621ae1a08f29-image.png

    This is part of the light theme Iā€™ve been working on, and is designed to match the progress bar

    27fe918e-fd31-42b3-9f25-ee3996f0626a-image.png

    Seriously falling in love with this new design. Itā€™s clean, sharp, and attractive all at once šŸ™‚

  • Beautiful šŸ™‚

  • For anyone following this thread or using the ā€œlightā€ theme, itā€™s been renamed to ā€œDaylightā€ to more accurately reflect the colour scheme in use. If you are using this, when you reload, the default theme will probably be loaded. This is expected because the cookie is storing ā€œlightā€ and there will no longer be a match.

    If you select ā€œDaylightā€, then you should be good to go.

  • I spent some more time this afternoon / evening reviewing the overall structure of the themes, and had a lightbulb moment in the sense that it could (and should) be leaner / quicker. The big mistake here is duplicating the CSS in each Swatch (note Iā€™m using the word ā€œSwatchā€ here because the ā€œthemeā€ is undergoing major refactoring) makes the initial loading slower than it really should be as the entire page has to be reloaded to remove the previous CSS classes.

    From a design perspective, this didnā€™t make any sense the more I thought about it. So, off to Dev I went and began refactoring. The end result (in Dev at least) is that there is now one ā€œcommonā€ CSS file that gets loaded once, and the ā€œswatchesā€ are just CSS variables (rather like mixins) where the existing ones are replaced with a new set on selection.

    Instead of adding another large CSS file, and effectively increasing the load time, we now simply call around 15 mixins and inject these into the head with an Ajax request. This means the Swatch changes instantly, and the site no longer needs to be reloaded to clear out any odd looking artefacts.

    Admittedly, this has now ā€œbrokenā€ the daylight theme in the sense that I have to restructure it as it was experiential at the time, and something of a deviation in that the mixins used do not align properly as they do in the other swatches. This was more about attempting to achieve a specific look.

    I succeeded on that front as per the previous post, but now have to rework it based on the changes Iā€™ve made to the other swatches in order to streamline them. One thing I did take from the daylight Swatch is the user posting style (giving an illusion of threaded replies) that makes the overall reading experience better in my view - this is now sewn into all swatches meaning a consistent viewing experience throughout.

    Tomorrow will hopefully allow me time to get the daylight Swatch working again. Once done and tested, Iā€™ll implement it in production.


Related Topics
  • Ch..ch..ch..ch..changes!

    Announcements
    16
    15 Votes
    16 Posts
    222 Views

    @phenomlab of course, to be recognised is fantastic.

    @phenomlab said in Ch..ch..ch..ch..changes!:

    Sadly, no. Web crawlers and scrapers are often JS based and read text only, so styles donā€™t have any bearing.

    Iā€™ve read mixed things about this, but no that does make sense, it was something I read a many years back when using Wordpress.

  • Swatch / Theme Changer

    Code Respository
    8
    3 Votes
    8 Posts
    2k Views

    @veronikya it might flicker on load, yes, and thatā€™s normal. Itā€™s because the CSS and JS are loaded before the custom elements, but it shouldnā€™t be too bad on reasonable links.

    It shouldnā€™t flicker at all navigating through the site though as the CSS and JS are already loaded.

  • Theme retirement

    Announcements
    21
    16 Votes
    21 Posts
    1k Views

    I relented somewhat here and added another swatch - one I missed, which was previous called ā€œblackoutā€. This specific one has been adapted to work on the new theming engine, but the others have been reclassified, and renamed to suit.

    image.png

    As a result, the theme you might have had will probably be reflecting something else, so you (might) need to change your themes accordingly. The changes are as follows

    Light -> No Change
    Cloudy -> Is now the old ā€œDimā€
    Dim -> Is now the old ā€œDarkā€
    Dark -> Now a new theme based on the revamped ā€œBlackoutā€

  • Sudonix Branding

    Announcements
    2
    5 Votes
    2 Posts
    443 Views

    Thank you mark @phenomlab for sharing šŸ‘
    And good job for the new logo šŸ™‚

  • NodeBB templates

    Locked Chitchat
    12
    4 Votes
    12 Posts
    1k Views

    Placing this here for reference
    https://sudonix.com/topic/216/nodebb-js-script-css-theme-switcher

    Further information and posts can be found at this link

  • Sudonix featured on justoverclock.it

    Announcements
    3
    8 Votes
    3 Posts
    360 Views

    @Madchatthew thanks

  • PWA support for Sudonix Platform

    Announcements
    4
    5 Votes
    4 Posts
    450 Views

    @crazycells Yes, you should install the app that is offered when you access the site. Iā€™ve had mixed experiences with this though. It seems to work fine with Chrome and Firefox, but itā€™s a bit hit and miss with Apple devices because of their closed ecosystem, and the inability to access the push service directly.

    Android is completely different in the sense that the service is open for usage, meaning hooking into the pusher is simple. For Apple, it is closed source, so probably wonā€™t work.

  • Support for Apple Emojis

    Announcements
    3
    0 Votes
    3 Posts
    296 Views

    @jac šŸ˜ž Seems not