Help: First Theme (Bringing Back The Blocks)

Moved Technical Support
  • Hi, thanks for looking.

    I currently use a modified version on Lavender but the only reason I do that is because I didn't want this:
    upload-d224cb43-fa5e-4c3d-83c0-85feec3b4342
    upload-cc44fe94-39ab-4c46-8680-03ca7571091d

    and much prefer the category and subcategory blocks from Lavender:
    upload-bb700501-5555-4529-905b-004b52b4b7df

    Realistically, it might make more sense for me to have a theme that inherits from Persona and just does different rendering of the categories.

    Are categories/subcategories from the same template partial?
    Where am I looking for this file?
    Is there anything special in Lavender for the masonry on those blocks that persona won't have?

    Thanks ❤

  • @drew This is exactly what I've been wanting, I've been using the material theme. Actually the dev is mia this week, usually pretty good, there are a few bugs with 0.8., that I can't get around and so I'm looking into other theme's again today trying to figure out what direction to go again.

    But you hit the nail on the head that's exactly where i've been trying to get to, please let me know if you find or come up with anything.

  • @drew Yeah, some quick differences I noticed when looking through the files:

    • Lavender defines the blocks themselves in templates/categories.tpl, whereas Persona uses a partial in partials/categories/item.tpl -- most likely just organisational in nature, but you'll have to actually update the partial, not categories.tpl, assuming your fork is using Persona as the base theme.
    • We use the Masonry library to arrange the blocks properly 😄
  • @julian Thanks for looking. I'll be giving it a go tomorrow I think. Obv will make it a public theme.

  • Cool @drew look forward to it, let me know if I can be of any help.


Suggested Topics


  • It shown "no post" on persona theme

    Unsolved Technical Support
    0 Votes
    5 Posts
    280 Views

    @julian

    sorry for late reply.
    But I set the guest can access topic. Just not available the posts only.
    I can see the post teaser in category page. Just no shown in categories page only.

    Then, sorry to late for provide my nodebb informations:

    version: 1.17.0
    Node ver: v14.17.2
    git hash: 6b4ef46eadce177d51b609bf75df8acdaab61f0a

  • 0 Votes
    11 Posts
    680 Views

    @Damien-Jay nice job man. glad you figured it out

  • 0 Votes
    7 Posts
    295 Views

    Let me say I didn't notice the CUSTOM CSS/LESS screen in the admin control panel!

    I dunno what version of the forum that was implemented but I really breezed by it somehow.

    This will work much more efficiently for my needs methinks! Hurrah!

    😌

  • 1 Votes
    5 Posts
    477 Views

    I just managed to make a quick hack which achieves the effect that I wanted. I added the following to the Custom Javascript tab in ACP:

    function showreplies() { $('li[component="post"]').has('a[component="post/parent"]').addClass('hidden'); $('[component="post/replies/open"]').click(); } function noreply(event, data){ if(data.posts.length==1 && data.posts[0].toPid) { // this is a reply to some post var el = $('li[data-pid="'+data.posts[0].pid+'"]'); // newly added post if(el.parent('div[component="post/replies"]').length===0){ // added as a standalone post el.addClass('hidden'); } } $('div[component="post/replies"]').find('a[component="post/reply"], a[component="post/quote"]').addClass('hidden'); } $(window).on('action:ajaxify.end', showreplies); $(window).on('action:posts.loaded', noreply);

    The first line in function showreplies hides those posts which are replies to previous posts, and the second line opens up the replies below the relevant posts. (@baris This was my attempt before I read your answer. Thanks for the pointer to the code! I will try that out).

    I added the handler for action:posts.loaded in order to

    Eliminate Reply and Quote buttons for the replies in order not to generate higher levels of nesting (this is ok for me) After adding a reply to a post, by default it is also added at the end - in order to avoid that I set it to hidden. This does not work so well as the page gets scrolled to the top after that.. - I am not quite sure how to fix it. If I figure it out I'll make an update..
  • 0 Votes
    6 Posts
    2k Views

    @countach that's nothing to be worried about for now. It's something that needs to be taken care of on the theme's end. Post an issue on the theme's repository.