ahamilton9
6/30/2014 - 4:38 PM

Adminer configuration tweaks

Adminer configuration tweaks

Adminer Tweaks

CSS/JS tweaks to make Adminer just a bit better. Requires pepa-linha CSS theme.

adminer.css

Style Improvements

Add to the end to condense spacing, and improve table readability:

/**
 * Modifications
 */

/* Sidebar */
#menu h1 {margin: 15px 0 0 5px;}
#tables {top: 190px;}

/* Header */
#breadcrumb {
    left: 360px;
    padding-top: 15px;
}
.logout, .rtl .logout {
    right: 30px;
    top: 15px;
}

/* Content */
#content {
    margin-left: 360px;
    margin-right: 15px;
    padding-top: 40px;
}
#content > h2 {
    margin-bottom: 20px;
}
input.size {width: 50px;}
table {border-collapse: collapse;}
td, th {
    border: 1px solid #ccc;
    padding: 2px 4px;
}

adminer.php

Table Autoscroll

Tack this right below the <body class="... tag in the immediate script block:

window.onload = function() {document.getElementById('tables').scrollTop = document.getElementById('tables').getElementsByClassName('active')[0].offsetTop;};
Dev Background

Tack this below <meta name="referrer" content="origin-when-crossorigin"> as the next full line:

' . ($_SERVER['SERVER_ADDR'] == '10.0.1.195' ? '<style>#menu {background: #FCFBF1 !important; border-right: 1px solid #ddd !important;} #menu #dbs, #menu p.links {border: 1px solid #ddd !important;} #menu #dbs {border-bottom: 0 !important;} #menu p.links {border-top: 0 !important;}</style>' : '') . '