You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pixiv/PixivSearch/templates/index.html

63 lines
2.2 KiB

<html xmlns="http://www.w3.org/1999/html">
<head>
<style>
div{
text-align:center;
}
ol{list-style-type:demical;}
ol li{ list-style-position:outside;}
</style>
{% load staticfiles %}
<script src="{% static "js/jquery-3.2.1.min.js"%}"></script>
<script>
$(function () {
});
function check() {
$("[name=pageSize],[name=order]").each(function () {
if($(this).val()!=''&&$(this).val()<=0){
$(this).val('');
alert($(this).parent().text()+'不能小于等于0');
$(this).focus();
}
});
}
</script>
</head>
<body>
<form action="/pixiv/search" method="post" onsubmit="check()">
{% csrf_token %}
<label>关键字<input name="word" placeholder="R-18"/></label>
<label>页数<input name="pageSize" type="number" placeholder="10"/></label>
<label>排行数<input name="order" type="number" placeholder="10"/></label>
<label>结果显示类型:文本信息<input type="radio" value="" name="type" checked/></label>
<label>图文信息<input type="radio" value="img" name="type"/></label>
<input type="submit" />
{% if download %}
<a href="{% static "/download/" %}{{download}}">图包提取(文件大小:{{ size}})</a>
{# <button id="download" onclick="window.open('{% static "/download/" %}{{download}}')">图包提取(文件大小:{{ size}})</button>#}
{% endif %}
</form>
<div>
<h1>{{ msg}}</h1>
</div>
<ol>
{% for imageNode in imageNodes %}
<li>
<div>
<h1>标题:<a href="https://www.pixiv.net/member_illust.php?mode=medium&illust_id={{imageNode.illustId}}" target="_blank">{{imageNode.illustTitle}}</a>,画师:<a href="https://www.pixiv.net/member.php?id={{ imageNode.userId}}">{{imageNode.userName}}</a>,收藏数:{{imageNode.bookmarkCount}}</h1>
{% if imageNode.localName %}
<img src="{% static "images/"%}{{imageNode.localName}}">
{% endif %}
</div>
</li>
{% empty %}
<p>{{tip}}</p>
{% endfor %}
</ol>
</body>
</html>