Skip to content

Post Style View

Solved Customisation
  • @cagatay You also need to set the same for .topic-response-post

  • @cagatay You also need to set the same for .topic-response-post

    @phenomlab said in Post Style View:

    .topic-response-post

    So i think we can fixed that small problem to use same color all of them 🙂

  • @phenomlab said in Post Style View:

    .topic-response-post

    So i think we can fixed that small problem to use same color all of them 🙂

    @cagatay You can try this (with different colours), but it might be a bit greedy

    li.self-post.topic-response-post:before {
    display: none;
    }
  • @cagatay You can try this (with different colours), but it might be a bit greedy

    li.self-post.topic-response-post:before {
        display: none;
    }
    

    @phenomlab said in Post Style View:
    Same color is worked.

    li.self-post.topic-response-post:before {
    display: none;
    }

    also worked 🙂

  • @phenomlab said in Post Style View:
    Same color is worked.

    li.self-post.topic-response-post:before {
    display: none;
    }

    also worked 🙂

    @cagatay Good. Keep an eye on that though - as I said, it may produce unexpected results as it’s quite “greedy”

  • @cagatay Good. Keep an eye on that though - as I said, it may produce unexpected results as it’s quite “greedy”

    @phenomlab If the post is new one created by me, there is also shown 🙂

    856c68b0-b288-46d5-aa7f-75a8c2658e47-image.png

    @phenomlab said in Post Style View:

    Good. Keep an eye on that though - as I said, it may produce unexpected results as it’s quite “greedy”

    Yes i know dear, it is a no problem for me, i m learning with you thats cool.

  • @phenomlab If the post is new one created by me, there is also shown 🙂

    856c68b0-b288-46d5-aa7f-75a8c2658e47-image.png

    @phenomlab said in Post Style View:

    Good. Keep an eye on that though - as I said, it may produce unexpected results as it’s quite “greedy”

    Yes i know dear, it is a no problem for me, i m learning with you thats cool.

    @cagatay This is a bit experimental currently, but the below jQuery should detect correctly when the HTML being targeted has no class.

    Can you please try replacing the below you previously inserted

    $(window).on('action:ajaxify.loaded', function(data) {
    $(document).ready(function() {
    if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });
    $(window).on('action:ajaxify.end', function(data) {
    $(document).ready(function() {
    if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });

    with

    // Target those elements already loaded in the DOM
    $(document).ready(function() {
    $(window).on('action:ajaxify.end', function(data) {
    if ($('li[component="post"]').hasClass("")) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });
    // Target elements dynamically added to the DOM on post load
    $(document).ready(function() {
    $(window).on('action:ajaxify.loaded', function(data) {
    if ($('li[component="post"]').hasClass("")) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });

    Try it and let me know.

  • @cagatay This is a bit experimental currently, but the below jQuery should detect correctly when the HTML being targeted has no class.

    Can you please try replacing the below you previously inserted

    $(window).on('action:ajaxify.loaded', function(data) {
        $(document).ready(function() {
            if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
    
            }
        });
    });
    
    $(window).on('action:ajaxify.end', function(data) {
        $(document).ready(function() {
            if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
    
            }
        });
    });
    

    with

    // Target those elements already loaded in the DOM
    $(document).ready(function() {
        $(window).on('action:ajaxify.end', function(data) {
            if ($('li[component="post"]').hasClass("")) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
            }
        });
    });
    // Target elements dynamically added to the DOM on post load
    $(document).ready(function() {
        $(window).on('action:ajaxify.loaded', function(data) {
            if ($('li[component="post"]').hasClass("")) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
            }
        });
    });
    

    Try it and let me know.

    @phenomlab nothing changed for first owner post;

    0e13b6dc-ac14-4a15-b56b-e5b87461d351-image.png

  • @phenomlab nothing changed for first owner post;

    0e13b6dc-ac14-4a15-b56b-e5b87461d351-image.png

    @cagatay Is that with or without the new functions I provided, or with both ?

  • @cagatay Is that with or without the new functions I provided, or with both ?

    @phenomlab css side;

    @media (min-width: 1200px) {
    li.topic-owner-post .content, li.topic-response-post .content {
    background: PowderBlue;
    padding: 30px;
    border-radius: 6px;
    }
    .topic .posts.timeline .timeline-event>div:not(.content), .topic .posts.timeline>[component=post]>div:not(.content) {
    margin-left: 2.5rem;
    }
    [data-index="0"] .content[component="post/content"]:before, .topic-owner-post:before, .topic-response-post:before {
    border-left: 20px solid transparent;
    border-top: 20px solid PowderBlue;
    top: 66px;
    content: "";
    position: absolute;
    left: 70px;
    }
    li.self-post .content:not(.isSolved [component="post/content"])[itemprop="text"] {
    background: CadetBlue;
    padding: 30px;
    border-radius: 6px;
    margin-right: 8.5rem !important;
    }
    li.self-post .content:not(.isSolved [component="post/content"]):after, li.self-post.topic-owner-post:first-child:after {
    border-right: 20px solid transparent;
    border-top: 20px solid var(--self-post);
    top: 66px;
    content: "";
    position: absolute;
    right: 90px;
    left: unset !important;
    border-bottom: none !important;
    bottom: unset !important;
    }
    li.self-post.topic-response-post .pull-left {
    float: right !important;
    }
    li.self-post .content:not(.isSolved [component="post/content"]):after, li.self-post.topic-owner-post:first-child:after {
    border-right: 20px solid transparent;
    border-top: 20px solid CadetBlue;
    top: 58px;
    content: "";
    position: absolute;
    right: 95px;
    left: unset !important;
    border-bottom: none !important;
    bottom: unset !important;
    }
    }
    li.self-post.topic-response-post:before {
    display: none;
    }

    JS side;

    $(window).on('action:ajaxify.end', function(data) {
    $(document).ready(function() {
    if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });
    // Target those elements already loaded in the DOM
    $(document).ready(function() {
    $(window).on('action:ajaxify.end', function(data) {
    if ($('li[component="post"]').hasClass("")) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });
    // Target elements dynamically added to the DOM on post load
    $(document).ready(function() {
    $(window).on('action:ajaxify.loaded', function(data) {
    if ($('li[component="post"]').hasClass("")) {
    console.log("Adding required classes for messenger type view");
    $('li[component="post"]').addClass('topic-response-post');
    }
    });
    });
  • @phenomlab css side;

    @media (min-width: 1200px) {
    li.topic-owner-post .content, li.topic-response-post .content {
        background: PowderBlue;
        padding: 30px;
        border-radius: 6px;
    }
    .topic .posts.timeline .timeline-event>div:not(.content), .topic .posts.timeline>[component=post]>div:not(.content) {
        margin-left: 2.5rem;
    }
    [data-index="0"] .content[component="post/content"]:before, .topic-owner-post:before, .topic-response-post:before {
        border-left: 20px solid transparent;
        border-top: 20px solid PowderBlue;
        top: 66px;
        content: "";
        position: absolute;
        left: 70px;
    }
    li.self-post .content:not(.isSolved [component="post/content"])[itemprop="text"] {
        background: CadetBlue;
        padding: 30px;
        border-radius: 6px;
        margin-right: 8.5rem !important;
    }
    li.self-post .content:not(.isSolved [component="post/content"]):after, li.self-post.topic-owner-post:first-child:after {
        border-right: 20px solid transparent;
        border-top: 20px solid var(--self-post);
        top: 66px;
        content: "";
        position: absolute;
        right: 90px;
        left: unset !important;
        border-bottom: none !important;
        bottom: unset !important;
    }
    li.self-post.topic-response-post .pull-left {
        float: right !important;
    }
    li.self-post .content:not(.isSolved [component="post/content"]):after, li.self-post.topic-owner-post:first-child:after {
        border-right: 20px solid transparent;
        border-top: 20px solid CadetBlue;
        top: 58px;
        content: "";
        position: absolute;
        right: 95px;
        left: unset !important;
        border-bottom: none !important;
        bottom: unset !important;
    }
    }
    li.self-post.topic-response-post:before {
        display: none;
    }
    
    

    JS side;

    $(window).on('action:ajaxify.end', function(data) {
        $(document).ready(function() {
            if (!$('li[component="post"]').hasClass('.topic-owner-post') || (!$('li[component="post"]').hasClass('.self-post'))) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
    
            }
        });
    });
    // Target those elements already loaded in the DOM
    $(document).ready(function() {
        $(window).on('action:ajaxify.end', function(data) {
            if ($('li[component="post"]').hasClass("")) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
            }
        });
    });
    // Target elements dynamically added to the DOM on post load
    $(document).ready(function() {
        $(window).on('action:ajaxify.loaded', function(data) {
            if ($('li[component="post"]').hasClass("")) {
                console.log("Adding required classes for messenger type view");
                $('li[component="post"]').addClass('topic-response-post');
            }
        });
    });
    

    @cagatay Let me have a look

    EDIT - I see it. Find class

    [data-index="0"] .content[component="post/content"]:before, .topic-owner-post:before, .topic-response-post:before
    

    change it to

    .topic-owner-post:before, .topic-response-post:before
    

    So basically, just remove

    [data-index="0"] .content[component="post/content"]:before, 
    

    That should do it

  • @cagatay Let me have a look

    EDIT - I see it. Find class

    [data-index="0"] .content[component="post/content"]:before, .topic-owner-post:before, .topic-response-post:before
    

    change it to

    .topic-owner-post:before, .topic-response-post:before
    

    So basically, just remove

    [data-index="0"] .content[component="post/content"]:before, 
    

    That should do it

    @phenomlab said in Post Style View:

    [data-index=“0”] .content[component=“post/content”]:before, .topic-owner-post:before, .topic-response-post:before

    I did, everything looks like well 🙂 thank you.

    See you again when i see minor problem 🙂

  • @phenomlab said in Post Style View:

    [data-index=“0”] .content[component=“post/content”]:before, .topic-owner-post:before, .topic-response-post:before

    I did, everything looks like well 🙂 thank you.

    See you again when i see minor problem 🙂

    @cagatay said in Post Style View:

    See you again when i see minor problem

    🙂 Looking forward !

  • undefined phenomlab referenced this topic on 26 Oct 2022, 17:16
  • @cagatay said in Post Style View:

    See you again when i see minor problem

    🙂 Looking forward !

    @phenomlab When I post something to the thread, my avatar can be seen on the left side of the post. However, when I refresh the page, avatar goes to the right side.

    before f5;
    15b01a72-dbd3-48c0-8ace-ff195c793455-image.png
    after f5;
    4afb6140-1338-4038-b0b4-a8c68f2ac6cd-image.png

  • That’s odd. It looks like the specific class that controls they isn’t being loaded until you perform a hard refresh. I’ll need to have a look at your site to determine why that is.

  • That’s odd. It looks like the specific class that controls they isn’t being loaded until you perform a hard refresh. I’ll need to have a look at your site to determine why that is.

    @phenomlab the problem still persist, did you have a look?

  • @phenomlab the problem still persist, did you have a look?

    @cagatay Not yet 🙂 Will do so today

  • @cagatay Not yet 🙂 Will do so today

    @phenomlab Sorry for waste one’s your time.

  • @cagatay Not yet 🙂 Will do so today

    @phenomlab new miror problem is when i created new topic the codes are figure out not working. After F5 also…

    8ba2daf6-ea20-4e53-92f1-7aee3051a63f-image.png

    Maybe we can change the codes just for different color for user not right side avatar etc.

  • undefined cagatay has marked this topic as unsolved on 27 Oct 2022, 19:33
  • @phenomlab new miror problem is when i created new topic the codes are figure out not working. After F5 also…

    8ba2daf6-ea20-4e53-92f1-7aee3051a63f-image.png

    Maybe we can change the codes just for different color for user not right side avatar etc.

    @cagatay I’ll have a look at this tomorrow. However, this is the reason why I said to do this in a DEV environment 👍

  • Did this solution help you?
    Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗


25/67

26 Oct 2022, 16:56


Threaded Replies


Related Topics
  • Nodebb design

    Solved General nodebb 11 Jul 2023, 10:13
    1 Votes
    2 Posts
    386 Views
    @Panda said in Nodebb design: One negative is not being so good for SEO as more Server side rendered forums, if web crawlers dont run the JS to read the forum. From recollection, Google and Bing have the capability to read and process JS, although it’s not in the same manner as a physical person will consume content on a page. It will be seen as plain text, but will be indexed. However, it’s important to note that Yandex and Baidu will not render JS, although seeing as Google has a 90% share of the content available on the web in terms of indexing, this isn’t something you’ll likely lose sleep over. @Panda said in Nodebb design: The “write api” is preferred for server-to-server interactions. This is mostly based around overall security - you won’t typically want a client machine changing database elements or altering data. This is why you have “client-side” which could be DOM manipulation etc, and “server-side” which performs more complex operations as it can communicate directly with the database whereas the client cannot (and if it can, then you have a serious security flaw). Reading from the API is perfectly acceptable on the client-side, but not being able to write. A paradigm here would be something like SNMP. This protocol exists as a UDP (UDP is very efficient, as it is “fire and forget” and does not wait for a response like TCP does) based service which reads performance data from a remote source, thus enabling an application to parse that data for use in a monitoring application. In all cases, SNMP access should be “RO” (Read Only) and not RW (Read Write). It is completely feasible to assume complete control over a firewall for example by having RW access to SNMP and then exposing it to the entire internet with a weak passphrase. You wouldn’t do it (at least, I hope you wouldn’t) and the same ethic applies to server-side rendering and the execution of commands.
  • 1 Votes
    1 Posts
    260 Views
    No one has replied
  • 1 Votes
    16 Posts
    885 Views
    @DownPW sure. Let me have a look at this in more detail. I know nginx plus has extensive support for this, but it’s not impossible to get somewhere near acceptable with the standard version. You might be better off handling this at the Cloudflare level given that it sits in between the requesting client and your server.
  • 3 Votes
    3 Posts
    378 Views
    @phenomlab thanks a lot, this combination works best .posts-list .posts-list-item .content { overflow: auto; max-height: 600px; }
  • 6 Votes
    9 Posts
    825 Views
    I have just figured it out… it can be targeted with text-decoration-color: I was mistakenly using color
  • [NodeBB] username cards

    Solved Customisation nodebb 28 Dec 2021, 23:18
    5 Votes
    8 Posts
    1k Views
    @phenomlab Aha…nice to know. As always thank you for the reply and information.
  • NodeBB metadata

    Solved Configure nodebb 8 Dec 2021, 16:37
    2 Votes
    4 Posts
    552 Views
    @phenomlab said in NodeBB metadata: @jac Are you sure ? https://www.google.co.uk/search?q=site%3Astockportcounty.fans&sxsrf=AOaemvLwnaZL-PliU_2dBOg_Eo1pMVhBjg%3A1638982328139&source=hp&ei=uOKwYeatBcOsad3yp7AE&iflsig=ALs-wAMAAAAAYbDwyLBSDcG5XYoFCKwQFhgz94wTxOcV&ved=0ahUKEwjm6dX71NT0AhVDVhoKHV35CUYQ4dUDCAk&uact=5&oq=site%3Astockportcounty.fans&gs_lcp=Cgdnd3Mtd2l6EAM6BAgjECc6CwgAEIAEELEDEIMBOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQowI6BQguEIAEOggIABCABBCxAzoFCAAQgAQ6CAguELEDEIMBOgsILhCABBDHARCvAToICC4QgAQQsQM6BQgAELEDOgsILhCABBDHARDRAzoLCAAQgAQQsQMQyQM6BQgAEJIDUABYySZg0CdoAHAAeACAAW2IAa0NkgEEMjMuMpgBAKABAQ&sclient=gws-wiz Fair enough 🤪🤪.
  • 0 Votes
    3 Posts
    935 Views
    @phenomlab many thanks Mark .