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.
 
 
 
 

98 lines
3.3 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 static %}
<link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}">
<script src="{% static 'js/jquery-3.4.1.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script>
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 %}
<div class="form-inline">
<div class="form-group">
<label for="word">关键字</label>
<input type="text" class="form-control" id="word" name="word" value="{{ word }}" placeholder="R-18">
</div>
<div class="form-group">
<label for="word">页数</label>
<input type="number" class="form-control" id="pageSize" name="pageSize" value="{{ pageSize }}" placeholder="10">
</div>
<div class="form-group">
<label for="word">统计数</label>
<input type="number" class="form-control" id="order" name="order" value="{{ order }}" placeholder="10">
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadio1" name="type" value="text" class="custom-control-input" {% if type == 'text' or type is None %}checked{% endif %}>
<label class="custom-control-label" for="customRadio1">不显示大图</label>
</div>
<div class="custom-control custom-radio custom-control-inline">
<input type="radio" id="customRadio2" name="type" value="img" class="custom-control-input" {% ifequal type 'img' %}checked{% endifequal %}>
<label class="custom-control-label" for="customRadio2">显示大图</label>
</div>
</div>
<div class="form-inline">
<button class="btn btn-primary offset-md-3" id="button" type="submit">查询</button>
{% if download %}
<a href="{% static "/download/" %}{{ download }}">图包提取(文件大小:{{ size }})</a>
{% endif %}
</div>
</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>