• Members 16 posts
    May 16, 2017, 11:31 p.m.

    What is the name of the css class for the category customization. And how much is editable ofc the lable color, but more like background,font,cursor mb some background music or are thees things to come or are they doable by default or by writing some custom templates or something?

  • May 16, 2017, 11:38 p.m.

    You are only able to enter custom suffix that will cause Misago to add custom css classes containing it to items on categories and threads lists. Misago defines few example classes out of the box that you may find in the docs.

    I've found this approach better than writing complex forms for letting folk to click trough list and page styles. Template complexity is sane that way, and it spares me the rabbithole of "could you add form for customizing XYZ" requests. ;)

  • Members 16 posts
    May 17, 2017, 8:50 p.m.

    How/can i use the

    page-header-bg
    

    In the for mentioned category css class

    and just a quickie would it be possible to load a custom css for just that page?

  • May 17, 2017, 9:24 p.m.

    Have you looked at the html generated by Misago after setting the class? This very thread's in category that has "green" as its defined css class. This results in Misago adding page-thread-green css class to this page. So to style page-header-bg I can use .page-thread-green .page-header-bg selector in my CSS. This is same for category's threads list.

    Loading custom CSS is possible by editing the misago/base.html and misago/categories/base.html templates. This is tricky tough because you'll need to copy them to your own forum's theme/templates directory as misago/base.html and misago/categories/base.html. This will make Misago load your copies instead of defaults. Now edit your theme/templates/misago/base.html and find this line:

    {% include "misago/head.html" %}
    

    Edit it to include your own custom block:

    {% include "misago/head.html" %}
    {% block extra-css %}{% endblock extra-css %}
    

    Not edit theme/templates/misago/categories/base.html and find in it:

    {% block title %}
    

    Edit it to look like this:

    {% block extra-css %}
    <link href="{% static 'my-custom.css' %}" rel="stylesheet">
    {% endblock extra-css %}
    
    
    {% block title %}
    

    Also find:

    {% load i18n %}
    

    And change it to:

    {% load i18n staticfiles %}
    

    Now create theme/static/my-custom.css file. After those modifications Misago should include it on category page. Likewise you may add your custom template block to other templates like misago/threads/thread.html to include custom css at thread view.

  • Members 16 posts
    May 17, 2017, 11:54 p.m.

    OK yeah. Well now im having a problem with

    .page-thread-green
    

    It dosn't seem to bee loading for some reason? or it "flashes" with the right background and stuff but does not stay that way and defaults back to the default theme?

    in page source i see

    <div class="page page-thread page-thread-green">
    

    like u mentioned.But when i inspect the div it's missing the "page-thread-green" part any ideas?

  • May 18, 2017, 12:16 a.m.

    Looks like a bug in Misago then. I'll be releasing next alpha in few days, I'll have a look on this by then.

  • Members 16 posts
    May 18, 2017, 12:22 a.m.

    Another question.

    Do you have any objections to loading a custom css like this

    <link href="/static/misago/css/misago.css" rel="stylesheet">
    <link href="/static/misago/css/custom.css" rel="stylesheet">
    

    Right after the misago one, and just right in the <head> tags?

    Thats the way i'we done it on other projects and it works but if there a better or "right" way of doing this since i'm currently just putting all customization in one file

  • May 18, 2017, 11:16 a.m.

    You should never hardcode /static/ url's - this will break your app the moment you'll change default static files store to something else, like S3 or just fingerprinted assets.

    I don't see anything else to bring up here.