From 710d584ec6b9bda6929c3e5d54e9e994b249d1ee Mon Sep 17 00:00:00 2001 From: albert Date: Tue, 15 Nov 2011 18:08:01 -0500 Subject: [PATCH] style fixes --- app/assets/javascripts/common.js | 2 +- .../stylesheets/common/000_vars.css.scss | 12 ++--- .../stylesheets/common/paginator.css.scss | 54 ++++++++++--------- .../stylesheets/mobile/000_vars.css.scss | 7 +++ .../stylesheets/mobile/010_reset.css.scss | 10 ++++ .../stylesheets/mobile/page_header.css.scss | 3 -- .../stylesheets/mobile/paginator.css.scss | 1 - app/assets/stylesheets/mobile/posts.css.scss | 31 ++++++----- app/views/layouts/default.html.erb | 3 +- app/views/wiki_pages/edit.html.erb | 2 +- app/views/wiki_pages/index.html.erb | 2 +- 11 files changed, 72 insertions(+), 55 deletions(-) create mode 100644 app/assets/stylesheets/mobile/000_vars.css.scss create mode 100644 app/assets/stylesheets/mobile/010_reset.css.scss diff --git a/app/assets/javascripts/common.js b/app/assets/javascripts/common.js index 841046273..864546ef0 100644 --- a/app/assets/javascripts/common.js +++ b/app/assets/javascripts/common.js @@ -16,7 +16,7 @@ $(document).ready(function() { e.stopPropagation(); }); - $("#more-links").hide().offset({top: $("#site-map-link").offset().top + $("#site-map-link").height() + 10, left: $("#site-map-link").offset().left}); + $("#more-links").hide().offset({top: $("#site-map-link").offset().top, left: $("#site-map-link").offset().left + 10}); $(document).click(function(e) { $("#more-links").hide(); diff --git a/app/assets/stylesheets/common/000_vars.css.scss b/app/assets/stylesheets/common/000_vars.css.scss index ef4626626..a25a5e76b 100644 --- a/app/assets/stylesheets/common/000_vars.css.scss +++ b/app/assets/stylesheets/common/000_vars.css.scss @@ -27,12 +27,12 @@ $baseline: 1em; box-shadow: $x $y $blur $color; } -@mixin text-shadow($x, $y, $blur, $color) { - -moz-text-shadow: $x $y $blur $color; - -webkit-text-shadow: $x $y $blur $color; - -ms-text-shadow: $x $y $blur $color; - -o-text-shadow: $x $y $blur $color; - text-shadow: $x $y $blur $color; +@mixin text-shadow($val) { + -moz-text-shadow: $val; + -webkit-text-shadow: $val; + -ms-text-shadow: $val; + -o-text-shadow: $val; + text-shadow: $val; } @mixin transparency($value) { diff --git a/app/assets/stylesheets/common/paginator.css.scss b/app/assets/stylesheets/common/paginator.css.scss index fbc90d9b7..c0d88d9ad 100644 --- a/app/assets/stylesheets/common/paginator.css.scss +++ b/app/assets/stylesheets/common/paginator.css.scss @@ -1,38 +1,44 @@ +@import "000_vars.css.scss"; + div.paginator { display: block; padding: 2em 0 1em 0; - font-size: 1em; + font-size: 1.2em; text-align: center; font-weight: bold; clear: both; - a { - margin: 0 3px; - padding: 2px 6px; - font-weight: normal; - border: 1px solid #EAEAEA; - } + li { + font-weight: bold; + + a { + margin: 0 0.25em; + padding: 0.25em 0.75em; + border: 1px solid #EAEAEA; + @include border-radius(0.5em); + } - a.arrow { - border: none; - } + a.arrow { + border: none; + } - a.arrow:hover { - background: white; - color: #9093FF; - } + a.arrow:hover { + background: white; + color: $link_color; + } - a.current { - border: 1px solid #AAA; - } + a.current { + border: 1px solid #AAA; + } - a:hover { - background: rgb(60, 60, 220); - color: white; - } + a:hover { + background: $link_color; + color: white; + } - span { - margin: 0 3px; - padding: 2px 6px; + span { + margin: 0 0.25em; + padding: 0.25em 0.75em + } } } diff --git a/app/assets/stylesheets/mobile/000_vars.css.scss b/app/assets/stylesheets/mobile/000_vars.css.scss new file mode 100644 index 000000000..8a672afce --- /dev/null +++ b/app/assets/stylesheets/mobile/000_vars.css.scss @@ -0,0 +1,7 @@ +$h1_size: 4em; +$h2_size: 3em; +$h3_size: 2em; +$h1_padding: 1.25em 0; +$h2_padding: 1.45833em 0; +$h3_padding: 1.51785em 0; +$baseline: 1em; diff --git a/app/assets/stylesheets/mobile/010_reset.css.scss b/app/assets/stylesheets/mobile/010_reset.css.scss new file mode 100644 index 000000000..e1fe83b45 --- /dev/null +++ b/app/assets/stylesheets/mobile/010_reset.css.scss @@ -0,0 +1,10 @@ +h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; +/* font-weight: normal;*/ + font-style: normal; + font-size: 130%; + line-height: 1.25em; + font-family: inherit; +} diff --git a/app/assets/stylesheets/mobile/page_header.css.scss b/app/assets/stylesheets/mobile/page_header.css.scss index a501088b4..10b384f42 100644 --- a/app/assets/stylesheets/mobile/page_header.css.scss +++ b/app/assets/stylesheets/mobile/page_header.css.scss @@ -2,13 +2,10 @@ header#top { h1 { - font-size: 2.5em; margin: 5px 30px 0 30px; } menu { - font-size: $h1_size; - li.nonessential { display: none; } diff --git a/app/assets/stylesheets/mobile/paginator.css.scss b/app/assets/stylesheets/mobile/paginator.css.scss index c3abf50c2..72c5117ab 100644 --- a/app/assets/stylesheets/mobile/paginator.css.scss +++ b/app/assets/stylesheets/mobile/paginator.css.scss @@ -1,7 +1,6 @@ @import "../common/000_vars.css.scss"; div.paginator { - font-size: $h1_size; font-weight: bold; li { diff --git a/app/assets/stylesheets/mobile/posts.css.scss b/app/assets/stylesheets/mobile/posts.css.scss index 586d40f99..300c821a1 100644 --- a/app/assets/stylesheets/mobile/posts.css.scss +++ b/app/assets/stylesheets/mobile/posts.css.scss @@ -7,27 +7,26 @@ div#c-posts { section#tag-box { ul { - font-size: $h1_size; font-weight: bold; li { margin: 0.5em 0; } } - - a.search-tag { - } - - a.search-inc-tag { - display: none; - } - - a.search-exl-tag { - display: none; - } - - span.post-count { - display: none; - } + } + + a.search-tag { + } + + a.search-inc-tag { + display: none; + } + + a.search-exl-tag { + display: none; + } + + span.post-count { + display: none; } } \ No newline at end of file diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 1c959db9b..37af29878 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -16,8 +16,7 @@ <% end %> <%= auto_discovery_link_tag :atom, posts_path(:format => "atom", :tags => params[:tags]) %> - <%#= stylesheet_link_tag "application", :media => "screen" %> - <%= stylesheet_link_tag "mobile", :media => "screen" %> + <%= stylesheet_link_tag "application", :media => "screen" %> <%#= stylesheet_link_tag "mobile", :media => "only screen and (max-device-width:480px)" %> <%= javascript_include_tag "application" %> <%= Danbooru.config.custom_html_header_content %> diff --git a/app/views/wiki_pages/edit.html.erb b/app/views/wiki_pages/edit.html.erb index e2a5c6309..3fc666768 100644 --- a/app/views/wiki_pages/edit.html.erb +++ b/app/views/wiki_pages/edit.html.erb @@ -3,7 +3,7 @@ <%= render "sidebar" %>
-

Edit Wiki Page

+

Edit Wiki

<%= render "form" %>
diff --git a/app/views/wiki_pages/index.html.erb b/app/views/wiki_pages/index.html.erb index 06619a75c..318f0ef0c 100644 --- a/app/views/wiki_pages/index.html.erb +++ b/app/views/wiki_pages/index.html.erb @@ -3,7 +3,7 @@ <%= render "sidebar" %>
-

Wiki Pages

+

Wiki