diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 78cbb07..242612f 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -1,6 +1,7 @@ /* - *= require_tree . + *= require select2 *= require_self + *= require mobile */ @@ -188,6 +189,7 @@ div#wrapper { margin-left: auto; margin-right: auto; padding-bottom: 1em; + min-width: 800px; max-width: 1000px; } div#inside { @@ -205,6 +207,10 @@ div#inside { margin-bottom: 0.75em; } +#headerleft { + float: left; +} + #l_holder { background-color: #ee0000; float: left; @@ -242,7 +248,7 @@ div#inside { text-decoration: none; } -#headerlinks a { +.headerlinks a { color: #666; text-decoration: none; padding-right: 0.75em; @@ -254,12 +260,8 @@ div#inside { text-align: right; } -#headerright a { - color: #666; - text-decoration: none; -} - -#headerright.loggedin a { +#headerright .headerlinks a { + padding-right: 0; padding-left: 0.75em; } @@ -401,12 +403,14 @@ ol.stories a.tag { vertical-align: middle; } +li .tags { + margin-right: 0.25em; +} + li .domain { color: #888; font-style: italic; font-size: 8.5pt; - margin-left: 0.5em; - margin-right: 0.25em; vertical-align: middle; } diff --git a/app/assets/stylesheets/mobile.css b/app/assets/stylesheets/mobile.css new file mode 100644 index 0000000..f9e226b --- /dev/null +++ b/app/assets/stylesheets/mobile.css @@ -0,0 +1,80 @@ +@media only screen and (max-device-width: 480px) { + html { + -webkit-text-size-adjust: none; + } + + body { + margin: 0; + padding: 0; + } + + div#header { + margin: 0 0 0.25em 0; + padding: 0.5em 0.4em; + background-color: #eee; + border-bottom: 1px solid #ccc; + } + + div#wrapper { + padding: 0; + margin: 0; + min-width: 100%; + max-width: 100%; + } + + div#headerleft { + float: none; + } + div#headerright { + float: none; + text-align: left; + margin-left: 34px; + margin-top: 0.25em; + clear: both; + } + + .headerlinks a, + #headerright .headerlinks a { + padding-right: 0.25em; + padding-left: 0; + } + + .box { + margin: 0 8px; + } + + div.voters { + width: 30px; + margin-top: 0px; + } + div.voters a.upvoter { + margin-top: -5px; + } + + div.voters a.upvoter, + div.voters a.downvoter { + margin-left: 5px; + border-width: 10px; + } + + li div.details, + div.story_content { + margin-left: 35px; + margin-right: 20px; + } + li.story div.byline { + font-size: 10pt; + } + + div.box label { + display: block; + } + + div#story_box input, + div#story_box textarea, + div#story_box #story_tags_a, + div#story_box div.markdown_help_toggler { + margin: 0 !important; + width: 100% !important; + } +} diff --git a/app/views/global/_header.html.erb b/app/views/global/_header.html.erb index 5efe656..5aa7efc 100644 --- a/app/views/global/_header.html.erb +++ b/app/views/global/_header.html.erb @@ -1,5 +1,28 @@
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2958cf7..09196a1 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,6 +4,7 @@ + <%= @page_title ? "#{@page_title} | Lobsters" : "Lobsters" %> <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %>