leram84 / layer.Cake

layer.Cake is working to combine several OSS projects in the personal media server space into a single continuous uniform app.
MIT License
123 stars 19 forks source link

Option to hide home button when splash page is disabled #12

Closed Magic815 closed 6 years ago

Magic815 commented 6 years ago

Currently, I don't use the splash page as part of my Org setup. Because of this, I can't think of any use for the home button on the left side of the top bar.

Would there be any way that the home button could be hidden as an option? Or maybe it would make sense to have the "smarts" hardcoded in to always have it off if the splash page is not used?

leram84 commented 6 years ago

ugghh... when u first asked me this, i looked at it and saw #searchPlexRow {margin-left: 50px !important} and put this off thinking i would need to rework the base css to remove that !important line so i could make your home-free html... what i completely forgot is that i added that line TO the html specifically so that it would be easier to make exactly this kind of custom configuration possible/easy in the future... so yeah, could have done this a week ago by just deleting like 7 lines... my bad lol.

anyway, here's what u need:

<!--  _   _          ____  _             -->
<!-- | |_| |__   ___| __ )| |_   _ _ __  -->
<!-- | __| '_ \ / _ \  _ \| | | | | '__| -->
<!-- | |_| | | |  __/ |_) | | |_| | |    -->
<!--  \__|_| |_|\___|____/|_|\__,_|_|    -->
<div class="row-bblur">
    <div tab="chat" class="goto-chat col-sm-3 col-lg-3">
        <div class="content-box orange-bg chat" style="cursor: pointer;">
            <h1 style="margin: 10px" class="text-uppercase text-center">Chat</h1>
            <div class="clearfix"></div>
        </div>
    </div>
<!-- <<User Edit>> Replace ombi with the LOWERCASE name of this buttons destination tab -->
    <div tab="ombi" class="hp-link col-sm-3 col-lg-3">
        <div class="content-box orange-bg ombi" style="cursor: pointer;">
            <h1 style="margin: 10px" class="text-uppercase text-center">Ombi</h1>
            <div class="clearfix"></div>
        </div>
    </div>
<!-- <<User Edit>> Replace plex with the LOWERCASE name of this buttons destination tab -->
    <div tab="plex" class="hp-link col-sm-3 col-lg-3">
        <div class="content-box orange-bg plex" style="cursor: pointer;">
            <h1 style="margin: 10px" class="text-uppercase text-center">Plex</h1>
            <div class="clearfix"></div>
        </div>
    </div>
</div>
<script>
    $('.hp-link').click(function(e){
        window.parent.$("li[name='"+$(this).attr('tab')+"']").click();
        e.preventDefault();
    });
</script>
<script>
    $('.goto-splash').click(function(e){
        parent.$('.splash-modal').modal("show");
        e.preventDefault();
    });
</script>
<script>
    $('.goto-chat').click(function(e){
        parent.$('#main-chat').toggleClass('email-active');
        e.preventDefault();
    });
</script>
<style>
    @media (min-width: 800px) {
        #searchPlexRow {
            max-width: 530px;
        }
    }
</style>
<!--   ____        _   _                   -->
<!--  | __ ) _   _| |_| |_ ___  _ __  ___  -->
<!--  |  _ \| | | | __| __/ _ \| '_ \/ __| -->
<!--  | |_) | |_| | |_| || (_) | | | \__ \ -->
<!--  |____/ \__,_|\__|\__\___/|_| |_|___/ -->
Magic815 commented 6 years ago

Thanks! Just had to change Plex to Emby in a few places, but it works great!