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