Skip to content

Catálogo das bibliotecas de Lisboa by aaubry

Screenshot of Catálogo das bibliotecas de Lisboa

Details

Authoraaubry

LicenseGPLv3

Categorycatalogolx.cm-lisboa.pt

Created

Updated

Size12 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Estilos para tornar o site minimimamente usável no telemóvel.

Notes

Userstyle doesn't have notes.

Source code

Source code has over 10K characters, so we truncated it. You can inspect the full source code on install link.
/* ==UserStyle==
@name           Catálogo das bibliotecas de Lisboa
@namespace      https://aaubry.net
@version        1.0.0
@description    Estilos para tornar o site minimimamente usável no telemóvel.
@author         Antoine Aubry
@preprocessor   less
==/UserStyle== */
@-moz-document domain("catalogolx.cm-lisboa.pt") {
    * {
        font-size: 3vw !important;
        height: fit-content;
    }

    body {
        width: 100vw !important;
        overflow-x: hidden;
        padding: 1em;
    }

    table {
        max-width: 100% !important;
        width: 100%;
        display: block;

        > tbody {
            max-width: 100vw !important;
            display: flex;
            flex-direction: column;

            > tr {
                display: flex;

                > td {
                    display: block;
                }
            }
        }
    }

    td[bgcolor='#e9f0f9'] {
        flex: 1;
        margin-top: 1em;
    }

    table[background='/hipres/images/tab_mt.gif'] {
        display: none;
    }

    /* Header */
    body > table > tbody > tr:nth-of-type(1) > td table[xmlns\:urlencoder]:nth-of-type(1) > tbody > tr {
        flex-direction: column;
        align-items: center;
    }

    .globalLinks {
        display: contents;

        > table > tbody {
            align-items: center;
            margin-bottom: 1em;

            a {
                display: flex;
                align-items: center;

                img {
                    height: 1em;
                    width: auto;
                }
            }

            > tr {
                gap: 1em;

                > td {
                    display: contents;
                }

                > td:nth-of-type(3) > a {
                    margin-right: -0.5em;

                    > img {
                        transform: scale(1.5);
                        position: relative;
                        margin-top: 0.5em;
                    }
                }

                > td:nth-of-type(4) > a > img {
                    transform: scale(1.5);
                    position: relative;
                    margin: 0.5em 0.2em 0 0.5em;
                }
            }
        }
    }


    /* Main menu */
    body > table > tbody > tr:nth-of-type(1) > td table[xmlns\:urlencoder]:nth-of-type(1) > tbody > tr:nth-of-type(2) {

        > td:nth-of-type(1) > table > tbody > tr {
            justify-content: center;
            
            > td > table {
                border: solid black 2px;
                border-bottom: none;
                border-radius: 1vw 1vw 0 0;
            }
        }
        
        > td:nth-of-type(2),
        > td:nth-of-type(1) > table > tbody > tr > td:nth-of-type(1),
        > td:nth-of-type(1) > table > tbody > tr > td:nth-last-of-type(1),
        > td:nth-of-type(1) > table > tbody > tr > td:nth-last-of-type(2) > table > tbody > tr:nth-last-of-type(1),
        > td:nth-of-type(1) > table > tbody > tr td:nth-of-type(1),
        > td:nth-of-type(1) > table > tbody > tr td:nth-last-of-type(1),
        > td:nth-of-type(1) > table > tbody > tr td[background] {
            display: none;
        }
    }

    /* Second level menu */
    body > table > tbody > tr:nth-of-type(1) > td table[xmlns\:urlencoder]:nth-of-type(2) > tbody > tr > td > table > tbody > tr {
        justify-content: center;
        
        > td {
            display: none;
        }
        
        > td[align] {
            display: block;
            padding: 0.5em;
        }
    }

    /* Content */
    body > table > tbody > tr > td {
        width: 100%;
    }
    
    input[type='text'] {
        border: none;
        box-shadow: inset 0 0 0 1px black;
    }

    /* My account */
    form[name='ipac'] {
        display: flex;
        flex-direction: column;
    }

    input[type='submit'] {
        padding: 0.2em 0.5em;
        background: #e9f0f9;
    }

    table.tableBackgroundHighlight[cellpadding='1'] {
        border-top: solid black 1px;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr:nth-of-type(1) {
        display: none;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody {
        display: grid;
        grid-template-columns: 2em 1fr 10em;
        background: #fff;
        border: solid black 1px;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr {
        display: grid;
        grid-template-columns: subgrid;
        grid-column: 1 / -1;
        grid-auto-rows: max-content;
        border-bottom: solid black 1px;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(1) {
        grid-row: 1;
        grid-column: 1;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(2) {
        grid-row: 1 / 5;
        padding-right: 1em;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(3) {
        grid-row: 1;
        grid-column: 3;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
        padding-bottom: 1em;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(3)::before {
        content: "Emprestado:";
        font-weight: bold;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(4) {
        grid-row: 2;
        grid-column: 3;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
        padding-bottom: 1em;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(4)::before {
        content: "Data Devolução:";
        font-weight: bold;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(5) {
        grid-row: 3;
        grid-column: 3;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
    }

    table.tableBackgroundHighlight[cellpadding='1'] > tbody > tr > td:nth-of-type(5)::before {
        content: "N.º renovações:";
        font-weight: bold;
    }

    input[type='checkbox'] {
        width: 1em;
        height: 1em;
        margin: 0.5em;
    }

    option {
        font-size: 1.3vw !important;
    }

    /* Início */
    body:has(input[alt='Pesquisar']) td[style] {
        height: auto !important;
    }


    body:has(input[alt='Pesquisar']) > table > tbody > tr:nth-child(1) > td > form > center > table > tbody > tr > td > table {
        width: 100vw;
    }

    body:has(input[alt='Pesquisar']) > table > tbody > tr:nth-child(1) > td > form > center > table > tbody > tr > td > table > tbody > tr {
        flex-direction: column;
    }

    body:has(input[alt='Pesquisar']) > table > tbody > tr:nth-child(1) > td > form > center > table > tbody > tr > td > table > tbody > tr > td {
        width: 100%
    }

    body:has(input[alt='Pesquisar']) > table > tbody > tr:nth-child(1) > td > form > center > table > tbody > tr > td > table > tbody > tr > td br {
        display: none;
    }

    body:has(input[alt='Pesquisar']) input[type='image'] {
        width: 1.5em;
        height: 1.5em;
    }


    /* Pesquisa avançada */
    /* Footer */
    body > table > tbody > tr:nth-child(2) {
        flex-direction: column;
    }

    body > table > tbody > tr:nth-child(2) > td > center > table > tbody > tr > td > table > tbody > tr {
        flex-direction: column;
        align-items: stretch;
    }

    body > table > tbody > tr:nth-child(2) > td > center > table > tbody > tr > td > table > tbody > tr > td {
        display: flex;
        width: auto;
        justify-content: space-around;
    }
}
@-moz-document regexp("^https://catalogolx.cm-lisboa.pt/.*&menu=account&submenu=info&.*") {
    body > table > tbody > tr:nth-child(1) > td > form > center > table > tbody > tr > td > table > tbody {
        display: grid;
        grid-template-columns: 1fr 2fr;
        width: 100vw;
        
        > tr {
            display: grid;
            grid-column: 1 / -1;
            grid-template-columns: subgrid;
            
            > td {
                width: auto;
            }
        }
    }
    
    tr:has(> td > input[type='submit']) {
        justify-content: flex-end;
    }
}

@-moz-document regexp("^https://catalogolx.cm-lisboa.pt/.*&menu=account&submenu=itemsout&.*") {
    tr:has(> td > input[type='checkbox']:checked) {
        &, * {
            background-color: #e9f0f9;
        }
    }
}

@-moz-document regexp("^https://catalogolx.cm-lisboa.pt/.*&menu=search&aspect=(basic_search|subtab11|subtab15)&.*"), regexp("^https://catalogolx.cm-lisboa.pt/.*&aspect=(basic_search|subtab11)&menu=search&.*") {
    table:has(> tbody > tr > td > input[type='image']) > tbody {
        > tr {
            flex-wrap: wrap;
            padding: 0.5em;
            
            > td {
                display: contents;
            }
            
            .boldBlackFont2 {
                display: none;
            }
            
            select {
                width: 100%;
                margin-bottom: 0.5em;
            }
        }
    }
    
    table:has(> tbody > tr > td > form[name='sort_limit']) > tbody {
        > tr:nth-of-type(1) {
            display: none;
        }
        
        > tr {
            flex-direction: column;
        }
    }
    
    center:has(form[name='summary']) > table > tbody > tr > td {
        
        > hr {
            border-bottom: solid #7AA6CE 2px;
        }
        
        > table > tbody {
            display: grid;
            grid-template-columns: 1fr 1fr 12fr;

            > tr {
                display: grid;
                grid-column: 1 / -1;
                grid-template-columns: subgrid;
                grid-template-rows: 2em auto;

                td:not(:has(*)) {
                    display: none !important;
                }

                > td:nth-of-type(2) img {
                    width: 1.5em
                }

                > td:has(input[typ...

Reviews

No reviews yet.