From 9cfadcefbbe620f701abdfb6cd2f47a3a87fd794 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Tue, 29 Dec 2015 14:57:22 +1000 Subject: [PATCH] * sync design with static part --- public/css/default.css | 70 --------------- public/theme/css/default.css | 126 +++++++++++++++++++++++++++ public/{ => theme}/css/zerobin.css | 0 public/{ => theme}/img/favicon.png | Bin public/{ => theme}/img/headbg.jpg | Bin public/{ => theme}/img/images.png | Bin public/{ => theme}/img/logo.png | Bin public/{ => theme}/img/pcreate.png | Bin public/{ => theme}/img/pdownload.png | Bin public/{ => theme}/img/upload.png | Bin public/{ => theme}/js/highlight.js | 0 public/{ => theme}/js/jquery.js | 0 public/{ => theme}/js/zerobin.js | 0 templates/layouts/default.html.ep | 14 +-- 14 files changed, 134 insertions(+), 76 deletions(-) delete mode 100644 public/css/default.css create mode 100644 public/theme/css/default.css rename public/{ => theme}/css/zerobin.css (100%) rename public/{ => theme}/img/favicon.png (100%) rename public/{ => theme}/img/headbg.jpg (100%) rename public/{ => theme}/img/images.png (100%) rename public/{ => theme}/img/logo.png (100%) rename public/{ => theme}/img/pcreate.png (100%) rename public/{ => theme}/img/pdownload.png (100%) rename public/{ => theme}/img/upload.png (100%) rename public/{ => theme}/js/highlight.js (100%) rename public/{ => theme}/js/jquery.js (100%) rename public/{ => theme}/js/zerobin.js (100%) diff --git a/public/css/default.css b/public/css/default.css deleted file mode 100644 index d024444..0000000 --- a/public/css/default.css +++ /dev/null @@ -1,70 +0,0 @@ -html, body { - margin: 0px; - padding: 0px; - border: 0px; - font-family: sans-serif; - font-size: 10pt; -} - -body { - background-color: #F9F9F9; - background-image: url('/img/headbg.jpg'); - background-clip: border-box; - background-attachment: scroll; - background-repeat: no-repeat; -} - -div#main { - position: relative; - width: 100%; - padding: 10px 0px; -} - -div#sidebar { - position: absolute; - top: 0px; - bottom: 0px; - left: 0px; - width: 150px; - max-width: 170px; - padding: 2px; -} - -div#content { - position: relative; - margin-left: 175px; - margin-top: 10px; - padding: 10px 10px; - min-height: 400px; -} - -.ui-block { - background-color: #FFFFFF; - border: 1px solid #AAAAAA; - margin-bottom: 10px; -} - -/* headers */ -h1, h2, h3, h4, h5 { - margin: 0px; - font-weight: normal; - margin-bottom: 0.6em; -} - -h1 { - font-size: 160%; - border-bottom: 1px solid #AAAAAA; -} -h2 { font-size: 130%; } - -ul { - margin: 0px; - padding: 3px 20px; - list-style: square; - color: #999999; -} - -a { - text-decoration: none; - color: #002BB8; -} diff --git a/public/theme/css/default.css b/public/theme/css/default.css new file mode 100644 index 0000000..d5c4f83 --- /dev/null +++ b/public/theme/css/default.css @@ -0,0 +1,126 @@ +html, body { + margin: 0px; + padding: 0px; + border: 0px; + font-family: sans-serif; + font-size: 10pt; +} + +body { + background-color: #F9F9F9; + background-image: url('/theme/img/headbg.jpg'); + background-clip: border-box; + background-attachment: scroll; + background-repeat: no-repeat; +} + +/* main layout parts */ +div#main { + position: relative; + width: 100%; + padding: 10px 0px; +} + +div#sidebar { + position: absolute; + top: 0px; + bottom: 0px; + left: 0px; + width: 150px; + max-width: 170px; + padding: 2px; +} + +div#content { + position: relative; + margin-left: 175px; + margin-top: 10px; + padding: 10px 10px; + min-height: 400px; +} + +ul#sidenav { + margin: 0px; +} + +/* articles */ +div.article { + margin-bottom: 20px; +} + +div.article span.tags { float: right; } +div.article span.tags a { background: url('/theme/img/tag.png') no-repeat center left; padding-left: 18px; } +div.article span.date { background: url('/theme/img/time.png') no-repeat center left; padding-left: 18px; } +div.article span.user { background: url('/theme/img/user.png') no-repeat center left; padding-left: 18px; } + +div.article div.bottom_bar { + border-top: 1px dashed #A0B0C0; +} + +div.feeds a { + background: url('/theme/img/rss.png') no-repeat scroll 0px 0px; + padding-left: 18px; + color: orange; +} + +/* headers */ +h1, h2, h3, h4, h5 { + margin: 5px 0px; + font-weight: normal; + margin-bottom: 0.6em; +} + +h1, h2 { + border-bottom: 1px dashed #506070; +} + +h1 { + font-size: 160%; + border-bottom: 1px solid #AAAAAA; +} + +h2 { font-size: 130%; } + +/* common page parts */ +.ui-block { + background-color: #FFFFFF; + border: 1px solid #AAAAAA; + margin-bottom: 10px; +} + +div.pager { + text-align: center; +} + +a { + text-decoration: none; + color: #506070; +} + +a.disabled { + cursor: default; + pointer-events: none; +} + +ul { + margin: 10px 0px; + padding: 3px 20px; + list-style: square; +} + +p { + margin: 10px 0px; +} + +pre { + margin-left: 10px; + padding: 5px; + background-color: #EEEEEE; + border: 1px dotted #AAAAAA; +} + +hr { + color: white; + border-style: dashed; + background-color: #A0B0C0; +} diff --git a/public/css/zerobin.css b/public/theme/css/zerobin.css similarity index 100% rename from public/css/zerobin.css rename to public/theme/css/zerobin.css diff --git a/public/img/favicon.png b/public/theme/img/favicon.png similarity index 100% rename from public/img/favicon.png rename to public/theme/img/favicon.png diff --git a/public/img/headbg.jpg b/public/theme/img/headbg.jpg similarity index 100% rename from public/img/headbg.jpg rename to public/theme/img/headbg.jpg diff --git a/public/img/images.png b/public/theme/img/images.png similarity index 100% rename from public/img/images.png rename to public/theme/img/images.png diff --git a/public/img/logo.png b/public/theme/img/logo.png similarity index 100% rename from public/img/logo.png rename to public/theme/img/logo.png diff --git a/public/img/pcreate.png b/public/theme/img/pcreate.png similarity index 100% rename from public/img/pcreate.png rename to public/theme/img/pcreate.png diff --git a/public/img/pdownload.png b/public/theme/img/pdownload.png similarity index 100% rename from public/img/pdownload.png rename to public/theme/img/pdownload.png diff --git a/public/img/upload.png b/public/theme/img/upload.png similarity index 100% rename from public/img/upload.png rename to public/theme/img/upload.png diff --git a/public/js/highlight.js b/public/theme/js/highlight.js similarity index 100% rename from public/js/highlight.js rename to public/theme/js/highlight.js diff --git a/public/js/jquery.js b/public/theme/js/jquery.js similarity index 100% rename from public/js/jquery.js rename to public/theme/js/jquery.js diff --git a/public/js/zerobin.js b/public/theme/js/zerobin.js similarity index 100% rename from public/js/zerobin.js rename to public/theme/js/zerobin.js diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index 3e7eee2..05bc040 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -4,19 +4,20 @@ - + + <%= title %> - Linux во Владивостоке -% my @styles = qw(default); +% my @styles = (); % push @styles, split(/\s+/, stash('styles') || ''); % % my @scripts = (); % push @scripts, split(/\s+/, stash('scripts') || ''); % % foreach my $style (@styles) { - <%= stylesheet "/css/$style.css" %> + <%= stylesheet "/theme/css/$style.css" %> % } % foreach my $script (@scripts) { - <%= javascript "/js/$script.js" %> + <%= javascript "/theme/js/$script.js" %> % } @@ -24,10 +25,10 @@