From f1175f5149cb2f251268569111aaadacbf71122e Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Wed, 22 Feb 2012 23:47:05 +0100 Subject: [PATCH] More design changes. --- src/_h5ai/config.js | 51 ++++++++++++++++++++++----------- src/_h5ai/css/inc/extended.less | 13 ++++++--- src/_h5ai/css/inc/footer.less | 3 -- src/_h5ai/css/inc/nav.less | 41 +++++++++++++++++--------- src/_h5ai/js/inc/Extended.js | 1 + src/_h5ai/js/inc/Finder.js | 9 +++++- src/_h5ai/php/inc/Extended.php | 1 + 7 files changed, 81 insertions(+), 38 deletions(-) diff --git a/src/_h5ai/config.js b/src/_h5ai/config.js index 58029181..34733b34 100644 --- a/src/_h5ai/config.js +++ b/src/_h5ai/config.js @@ -214,7 +214,8 @@ var H5AI_CONFIG = { "empty": "empty", "folders": "folders", "files": "files", - "download": "download" + "download": "download", + "noMatch": "no match" }, "bg": { @@ -228,7 +229,8 @@ var H5AI_CONFIG = { "empty": "празно", "folders": "папки", "files": "файлове", - "download": "download" + "download": "download", + "noMatch": "no match" }, "cs": { @@ -242,7 +244,8 @@ var H5AI_CONFIG = { "empty": "prázdný", "folders": "složek", "files": "souborů", - "download": "download" + "download": "download", + "noMatch": "no match" }, "de": { @@ -256,7 +259,8 @@ var H5AI_CONFIG = { "empty": "leer", "folders": "Ordner", "files": "Dateien", - "download": "Download" + "download": "Download", + "noMatch": "keine Treffer" }, "es": { @@ -270,7 +274,8 @@ var H5AI_CONFIG = { "empty": "vacío", "folders": "Directorios", "files": "Archivos", - "download": "Descargar" + "download": "Descargar", + "noMatch": "no match" }, "fr": { @@ -284,7 +289,8 @@ var H5AI_CONFIG = { "empty": "vide", "folders": "Répertoires", "files": "Fichiers", - "download": "télécharger" + "download": "télécharger", + "noMatch": "no match" }, "it": { @@ -298,7 +304,8 @@ var H5AI_CONFIG = { "empty": "vuota", "folders": "cartelle", "files": "file", - "download": "download" + "download": "download", + "noMatch": "no match" }, "lv": { @@ -312,7 +319,8 @@ var H5AI_CONFIG = { "empty": "tukšs", "folders": "mapes", "files": "faili", - "download": "lejupielādēt" + "download": "lejupielādēt", + "noMatch": "no match" }, "nl": { @@ -326,7 +334,8 @@ var H5AI_CONFIG = { "empty": "lege", "folders": "folders", "files": "files", - "download": "download" + "download": "download", + "noMatch": "no match" }, "pl": { @@ -340,7 +349,8 @@ var H5AI_CONFIG = { "empty": "pusty", "folders": "foldery", "files": "pliki", - "download": "download" + "download": "download", + "noMatch": "no match" }, "pt": { @@ -354,7 +364,8 @@ var H5AI_CONFIG = { "empty": "vazio", "folders": "pastas", "files": "arquivos", - "download": "download" + "download": "download", + "noMatch": "no match" }, "ru": { @@ -368,7 +379,8 @@ var H5AI_CONFIG = { "empty": "пусто", "folders": "папки", "files": "файлы", - "download": "download" + "download": "download", + "noMatch": "no match" }, "sk": { @@ -382,7 +394,8 @@ var H5AI_CONFIG = { "empty": "prázdny", "folders": "priečinkov", "files": "súborov", - "download": "download" + "download": "download", + "noMatch": "no match" }, "sv": { @@ -396,7 +409,8 @@ var H5AI_CONFIG = { "empty": "tom", "folders": "folders", "files": "files", - "download": "download" + "download": "download", + "noMatch": "no match" }, "tr": { @@ -410,7 +424,8 @@ var H5AI_CONFIG = { "empty": "boş", "folders": "klasörler", "files": "dosyalar", - "download": "indir" + "download": "indir", + "noMatch": "no match" }, "zh-cn": { @@ -424,7 +439,8 @@ var H5AI_CONFIG = { "empty": "空文件夹", "folders": "文件夹", "files": "文件", - "download": "下载" + "download": "下载", + "noMatch": "no match" }, "zh-tw": { @@ -438,7 +454,8 @@ var H5AI_CONFIG = { "empty": "空資料夾", "folders": "資料夾", "files": "檔案", - "download": "下載" + "download": "下載", + "noMatch": "no match" } } }; diff --git a/src/_h5ai/css/inc/extended.less b/src/_h5ai/css/inc/extended.less index 733360a6..5ef2e69e 100644 --- a/src/_h5ai/css/inc/extended.less +++ b/src/_h5ai/css/inc/extended.less @@ -146,13 +146,16 @@ } } } - .empty { + .empty, .no-match { text-align: center; margin: 50px 0; color: #ddd; font-size: 5em; font-weight: bold; } + .no-match { + display: none; + } } @@ -170,8 +173,6 @@ #extended.icons-view { display: none; padding: 3px; - border: 1px solid #eee; - border-radius: 15px; ul { margin: 0; @@ -269,7 +270,8 @@ } } } - .empty { + .empty, .no-match { + margin: 0 120px; padding: 16px; height: 120px; text-align: center; @@ -277,4 +279,7 @@ font-size: 5em; font-weight: bold; } + .no-match { + display: none; + } } diff --git a/src/_h5ai/css/inc/footer.less b/src/_h5ai/css/inc/footer.less index 2e0498c9..02495140 100644 --- a/src/_h5ai/css/inc/footer.less +++ b/src/_h5ai/css/inc/footer.less @@ -102,9 +102,6 @@ body > footer { background-color: rgba(255,255,255,0.8); } } - li:nth-child(3n+1) { - - } } } } diff --git a/src/_h5ai/css/inc/nav.less b/src/_h5ai/css/inc/nav.less index 4a758693..c07bf3d4 100644 --- a/src/_h5ai/css/inc/nav.less +++ b/src/_h5ai/css/inc/nav.less @@ -1,4 +1,26 @@ +.nav-highlight { + background-color: rgba(255,255,255,0.5); + opacity: 1.0; +} + +.nav-hover { + .nav-highlight; + color: #e80; +} + +@nav-sep-border: 1px solid rgba(0,0,0,0.05); + +.nav-left { + float: left; + border-right: @nav-sep-border; +} + +.nav-right { + float: right; + border-left: @nav-sep-border; +} + body > nav { position: fixed; z-index: 5; @@ -29,15 +51,12 @@ body > nav { padding: 0 10px; &:hover, &.hover { - color: #e80; - background-color: rgba(255,255,255,0.5); - opacity: 1.0; + .nav-hover; } } .current { a, span.element { - background-color: rgba(255,255,255,0.5); - opacity: 1.0; + .nav-highlight; } } img { @@ -50,8 +69,7 @@ body > nav { margin-left: 6px; } .crumb { - float: left; - border-right: 1px solid rgba(0,0,0,0.05); + .nav-left; .hint { margin-left: 8px; font-style: italic; @@ -63,13 +81,11 @@ body > nav { } } .view { - float: right; - border-left: 1px solid rgba(0,0,0,0.05); + .nav-right; } #download { display: none; - float: right; - border-left: 1px solid rgba(0,0,0,0.05); + .nav-right; .transition(all 0.2s ease-in-out); &.zipping { @@ -80,8 +96,7 @@ body > nav { } } #filter { - float: right; - border-left: 1px solid rgba(0,0,0,0.05); + .nav-right; input { display: none; diff --git a/src/_h5ai/js/inc/Extended.js b/src/_h5ai/js/inc/Extended.js index ef12bf79..93fb62c0 100644 --- a/src/_h5ai/js/inc/Extended.js +++ b/src/_h5ai/js/inc/Extended.js @@ -49,6 +49,7 @@ if ($ul.children(".entry:not(.folder-parent)").size() === 0) { $("#extended").append($("
empty
")); } + $("#extended").append($("
no match
")); }, customize = function () { diff --git a/src/_h5ai/js/inc/Finder.js b/src/_h5ai/js/inc/Finder.js index e4aab214..62ea0107 100644 --- a/src/_h5ai/js/inc/Finder.js +++ b/src/_h5ai/js/inc/Finder.js @@ -23,6 +23,14 @@ match = $('#extended .entry'); } + if ($(match).length) { + $('#extended .no-match').hide(); + } else { + setTimeout(function () { + + $('#extended .no-match').show(); + }, 200); + } $(match).fadeIn(200); $(noMatch).fadeOut(200); }, @@ -84,7 +92,6 @@ .end() .appendTo($("#navbar")); } - }; diff --git a/src/_h5ai/php/inc/Extended.php b/src/_h5ai/php/inc/Extended.php index e8a47878..fd4ad5c0 100644 --- a/src/_h5ai/php/inc/Extended.php +++ b/src/_h5ai/php/inc/Extended.php @@ -131,6 +131,7 @@ class Extended { if (count($this->content) === 0) { $html .= "
empty
"; } + $html .= "
no match
"; $html .=""; return $html; }