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 {
font-size: 0.8em;
padding: 0.5em;

View File

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

View File

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