NodeBB composer drag bar, simple CSS tweak



  • Any way to make the color of the bar change dynamically based on the category selected?



  • @Arc
    It looks a bit funky in mobile view.. Maybe because the top bar background in mobile view (default) is blue matching the colour of the close and submit colors but with your css the bar is gray - which probably wouldnt look too bad if the close and submit buttons were centered vertically.



  • If you update the CSS it should have- no effect on mobile view at all, really. Anyway- As for the color changing!

    Its possible, yeah! I'm just not sure how, each theme is very different and I'm not sure how yours handles per-category colors.



  • Yeh.. thats what i thought.. i think i will just set the bar to the blue that persona uses in the mobile view (same colors as the buttons) so that they blend in more.. Either way this is a great little tweak.. thanks again


  • Gamers

    works with redactor?



  • @bitspook Not sure! It should, though, I think redactor uses the same class. Try it out and let me know if it doesnt work, I can tweak a version for redactor.


  • Gamers

    @Arc

    Threw some code line warnings, but it works 😄

    I LOVE it.


  • Gamers

    A friend worked out some of the warnings and spaced out the classes. Love the drag effect; will be using it going forward. Thanks for your work on it.

    /*Custom Composer Bar Tweak by Arc begin*/
    .composer .resizer .trigger i:before {
    content: "\f0c9";
    cursor: n-resize;
    }
    .composer.maximized .resizer .trigger i:before {
    content: "\f0c9";
    cursor: n-resize;
    }
    .composer .resizer {
    position: absolute;
    width: 100%;
    top: 10px;
    height: 0;
    cursor: n-resize;
    }
    .composer .resizer .trigger i {
    margin-left: -10%;
    position: relative;
    color: #FFF;
    font-size: 14px;
    }
    .composer .resizer .trigger {
    position: relative;
    display: block;
    width: 110%;
    height: 20px;
    top: -10px;
    margin: 0 auto;
    margin-left: -11px;
    background: #000;
    background: rgba(0,0,0,0.1);
    border: 0 solid #E4E4E4;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    border-radius: 0;
    line-height: 20px;
    -o-transition:.3s ease-in-out;
    -ms-transition:.3 ease-in-outs;
    -moz-transition:.3s ease-in-out;
    -webkit-transition:.3s ease-in-out;
    transition:.3s ease-in-out;
    }
    .composer .resizer .trigger:hover {
    background: #000;
    background: rgba(0,0,0,0.2);
    -o-transition:.3s ease-in-out;
    -ms-transition:.3 ease-in-outs;
    -moz-transition:.3s ease-in-out;
    -webkit-transition:.3s ease-in-out;
    transition:.3s ease-in-out;
    }
    /*Custom Composer Bar Tweak by Arc end*/



  • @bitspook Its actually spaced out in the original too, for some stupid reason Markdown's code formatting is removing the spacing! Mind running me through what errors he corrected, so if they're all good I can add it to the OP and credit you guys?



  • great 😗


  • Plugin & Theme Dev

    @Arc It's because you use inline-codes rather than block codes, try ``` or 4 space indention instead of `.


  • Gamers

    @Arc

    it threw some warnings about zero value px, and he pulled the % symbols and it removed the warnings. He said that there is still an "unimportant warning" about how using height and width with borders can make elements appear larger than intended. Anyway, they were exclamations rather than X's; trivial warnings. No credit is needed nor due. 😉

    I like the drag bar much better than the stock arrow. 🙂



  • @Arc It's great! Thank you very much for this, I included it in my forum immediately 🙂


 

Suggested Topics

| |