add iqdb preview
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
|
||||
Danbooru.Post.initialize_similar = function() {
|
||||
$("#similar-button").click(function(e) {
|
||||
$.post("/iqdb_queries", {"url": $("#post_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
$.get("/iqdb_queries/preview", {"url": $("#post_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
Danbooru.Upload.initialize_iqdb_source = function() {
|
||||
if (/^https?:\/\//.test($("#normalized_url").val())) {
|
||||
$.post("/iqdb_queries", {"url": $("#normalized_url").val()}).done(function(html) {$("#iqdb-similar").html(html)});
|
||||
$.get("/iqdb_queries/preview", {"url": $("#normalized_url").val()}).done(function(html) {$("#iqdb-similar").html(html)});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
|
||||
Danbooru.Upload.initialize_similar = function() {
|
||||
$("#similar-button").click(function(e) {
|
||||
$.post("/iqdb_queries", {"url": $("#upload_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
$.get("/iqdb_queries/preview", {"url": $("#upload_source").val()}).done(function(html) {$("#iqdb-similar").html(html).show()});
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,24 +138,34 @@
|
||||
|
||||
article.post-preview {
|
||||
margin: 0.5vw;
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
width: 48vw;
|
||||
height: 48vw;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
|
||||
&.cropped {
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
}
|
||||
|
||||
a {
|
||||
//width: 48.5vw;
|
||||
//display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
img.cropped {
|
||||
|
||||
img {
|
||||
//object-fit: contain;
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
margin: 0 auto;
|
||||
border: none !important;
|
||||
|
||||
&.cropped {
|
||||
width: 32vw;
|
||||
height: 32vw;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-tags~=animated]:before, &[data-file-ext=swf]:before, &[data-file-ext=webm]:before, &[data-file-ext=mp4]:before, &[data-file-ext=zip]:before {
|
||||
@include animated-icon;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user