Skip to content

Instantly share code, notes, and snippets.

@moqmar
Last active June 14, 2022 03:29
Show Gist options
  • Save moqmar/6c45c469cc7e8294f6cf1bcef9802331 to your computer and use it in GitHub Desktop.
Save moqmar/6c45c469cc7e8294f6cf1bcef9802331 to your computer and use it in GitHub Desktop.
Minimal nginx Fancyindex Theme
/*
A modern look for the nginx fancyindex module (https://github.com/aperezdc/ngx-fancyindex)
[[ SCREENSHOT ]]
https://static.mo-mar.de/fancyindex-screenshot.jpg
[[ USAGE ]]
fancyindex on;
fancyindex_exact_size off;
fancyindex_css_href https://cdn.rawgit.com/moqmar/6c45c469cc7e8294f6cf1bcef9802331/raw/fancyindex.css;
*/
body, html { margin: 0; padding: 0; font-family: Open Sans, sans-serif; background: #fff }
h1 { background: #eee; font-size: 1.5em; margin: 0; padding: 20px; font-weight: normal }
table, tr, td, th, #list { border: none; background: transparent; }
th, td { padding: 10px 20px; font-weight: normal; }
th { background: #eee; border-bottom: 2px solid #ddd; }
tr.e { background: #f4f4f4; }
[href^="../"], th a:nth-child(2) { color: transparent !important; }
[href^="../"]:before { content: ".."; color: #08f !important; text-decoration: inherit; }
th a:nth-child(2):before { content: "➜"; color: #aaa !important; text-decoration: none; font-size: 10px; position: relative; top: -1px; display: inline-block; transform: rotate(90deg) }
td a { display: block; overflow: hidden; text-overflow: ellipsis; }
a, a:hover { color: #08f; text-decoration: none }
a:hover { text-decoration: underline; }
th a { color: #222; font-weight: bold; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment