tweak responsive css

This commit is contained in:
r888888888
2017-09-06 18:36:39 -07:00
parent b38789a875
commit 137296f4de
3 changed files with 47 additions and 20 deletions

View File

@@ -238,6 +238,10 @@ div#c-posts {
} }
} }
.outer-recent-searches {
overflow: hidden;
}
div.notice { div.notice {
font-size: 0.8em; font-size: 0.8em;
padding: 0.5em; padding: 0.5em;

View File

@@ -70,42 +70,56 @@
} }
div.paginator { div.paginator {
font-size: 16pt; font-size: 20pt;
font-weight: bold; font-weight: bold;
text-align: left; text-align: left;
padding: 3pt; width: 100%;
padding: 0;
margin: 0;
margin-top: 1em;
li { li {
display: inline; width: 30vw;
line-height: 1.4em; display: inline-block;
a, span { a, span {
padding: 3px 18px; margin: 0;
margin: 6px 3px; padding: 0;
display: inline-block; border: none;
border-radius: 15%; }
&.current-page {
text-align: center;
}
&.arrow:last-child {
text-align: right;
}
&.numbered-page {
display: none;
} }
} }
} }
article.post-preview { article.post-preview {
margin: 0 0 0.5vw 0; margin: 0.5vw;
width: 49.5vw; width: 32vw;
height: 48.5vw; height: 32vw;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
display: inline-block; display: inline-block;
a { a {
width: 49vw; width: 32vw;
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
img { img {
object-fit: contain; object-fit: contain;
width: 48.5vw; width: 32vw;
height: 48.5vw; height: 32vw;
margin: 0 auto; margin: 0 auto;
border: none;
} }
img.cropped-true { img.cropped-true {
object-fit: cover; object-fit: cover;

View File

@@ -29,7 +29,9 @@ module PaginationHelper
window = 4 window = 4
if records.current_page >= 2 if records.current_page >= 2
html << "<li>" + link_to("<<", params.merge(:page => records.current_page - 1), :rel => "prev") + "</li>" html << "<li class='arrow'>" + link_to("<<", params.merge(:page => records.current_page - 1), :rel => "prev") + "</li>"
else
html << "<li class='arrow'><span>" + "&lt;&lt;" + "</span></li>"
end end
if records.total_pages <= (window * 2) + 5 if records.total_pages <= (window * 2) + 5
@@ -67,7 +69,9 @@ module PaginationHelper
end end
if records.current_page < records.total_pages && records.size > 0 if records.current_page < records.total_pages && records.size > 0
html << "<li>" + link_to(">>", params.merge(:page => records.current_page + 1), :rel => "next") + "</li>" html << "<li class='arrow'>" + link_to(">>", params.merge(:page => records.current_page + 1), :rel => "next") + "</li>"
else
html << "<li class='arrow'><span>" + "&gt;&gt;" + "</span></li>"
end end
html << "</menu></div>" html << "</menu></div>"
@@ -85,15 +89,20 @@ module PaginationHelper
def numbered_paginator_item(page, current_page) def numbered_paginator_item(page, current_page)
return "" if page.to_i > Danbooru.config.max_numbered_pages return "" if page.to_i > Danbooru.config.max_numbered_pages
html = "<li>" html = []
if page == "..." if page == "..."
html << "<li class='more'>"
html << "..." html << "..."
html << "</li>"
elsif page == current_page elsif page == current_page
html << "<li class='current-page'>"
html << '<span>' + page.to_s + '</span>' html << '<span>' + page.to_s + '</span>'
html << "</li>"
else else
html << "<li class='numbered-page'>"
html << link_to(page, params.merge(:page => page)) html << link_to(page, params.merge(:page => page))
html << "</li>"
end end
html << "</li>" html.join.html_safe
html.html_safe
end end
end end