fixes to mobile responsive view
This commit is contained in:
@@ -4,9 +4,23 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
#desktop-version-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 660px) {
|
||||
#desktop-version-link {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#responsive-tag-list {
|
||||
display: block;
|
||||
font-size: 18pt;
|
||||
font-weight: bold;
|
||||
|
||||
.post-count, .wiki-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
width: 75%;
|
||||
@@ -37,8 +51,11 @@
|
||||
|
||||
input[type=text], input[type=submit] {
|
||||
font-size: 18pt;
|
||||
border-color: default;
|
||||
border-style: solid;
|
||||
border-width: .1rem;
|
||||
}
|
||||
|
||||
|
||||
div#page section#content {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
@@ -56,8 +73,6 @@
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
background-color: #F7F7FF;
|
||||
border-radius: 15%;
|
||||
padding: 3pt;
|
||||
|
||||
li {
|
||||
@@ -66,7 +81,7 @@
|
||||
|
||||
a, span {
|
||||
padding: 3px 18px;
|
||||
margin: 0 3px;
|
||||
margin: 6px 3px;
|
||||
display: inline-block;
|
||||
border-radius: 15%;
|
||||
}
|
||||
@@ -131,6 +146,7 @@
|
||||
float: right;
|
||||
font-size: 1.125em;
|
||||
width: 100%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#nav {
|
||||
@@ -139,10 +155,7 @@
|
||||
|
||||
header#top menu.main {
|
||||
background-color: lighten($link_color, 25%);
|
||||
}
|
||||
|
||||
header#top menu {
|
||||
width: 100%;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@@ -175,6 +188,10 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
input#expand-search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ class ApplicationController < ActionController::Base
|
||||
before_filter :set_started_at_session
|
||||
before_filter :api_check
|
||||
before_filter :set_safe_mode
|
||||
before_filter :check_desktop_mode
|
||||
# before_filter :secure_cookies_check
|
||||
layout "default"
|
||||
force_ssl :if => :ssl_login?
|
||||
@@ -20,6 +21,13 @@ class ApplicationController < ActionController::Base
|
||||
rescue_from Danbooru::Paginator::PaginationError, :with => :render_pagination_limit
|
||||
|
||||
protected
|
||||
|
||||
def check_desktop_mode
|
||||
if params[:dm]
|
||||
cookies[:dm] = "1"
|
||||
end
|
||||
end
|
||||
|
||||
def show_moderation_notice?
|
||||
CurrentUser.can_approve_posts? && (cookies[:moderated].blank? || Time.at(cookies[:moderated].to_i) < 20.hours.ago)
|
||||
end
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
|
||||
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
|
||||
<%= csrf_meta_tag %>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<% unless cookies[:dm] %>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<% end %>
|
||||
<meta name="current-user-name" content="<%= CurrentUser.name %>">
|
||||
<meta name="current-user-id" content="<%= CurrentUser.id %>">
|
||||
<meta name="current-user-can-approve-posts" content="<%= CurrentUser.can_approve_posts? %>">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<% end %>
|
||||
<%= hidden_field_tag "ms", "1" %>
|
||||
<%= submit_tag "Go", :name => nil %>
|
||||
<%= submit_tag "+", "data-jq-dropdown" => "#search-dropdown" %>
|
||||
<%= submit_tag "+", :id => "expand-search", "data-jq-dropdown" => "#search-dropdown" %>
|
||||
<div id="search-dropdown" class="jq-dropdown jq-dropdown-tip">
|
||||
<ul class="jq-dropdown-menu">
|
||||
<% if SavedSearch.enabled? && CurrentUser.show_saved_searches? %>
|
||||
|
||||
@@ -8,4 +8,8 @@
|
||||
<% if CurrentUser.user.enable_post_navigation %>
|
||||
– <%= link_to "Keyboard shortcuts available", keyboard_shortcuts_path %>
|
||||
<% end %>
|
||||
<span id="desktop-version-link">
|
||||
–
|
||||
<%= link_to "Desktop version", posts_path(:dm => "1"), :rel => "nofollow" %>
|
||||
</span>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user