Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hunter-ht.cn
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘莹莹
hunter-ht.cn
Commits
9ea59919
Commit
9ea59919
authored
Apr 27, 2020
by
liuyingying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
胜利就在眼前啦!
parent
40241747
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
185 additions
and
29 deletions
+185
-29
models.py
Hunter_ht/hunter/models.py
+3
-0
detail.css
Hunter_ht/hunter/static/hunter/detail.css
+115
-0
style.css
Hunter_ht/hunter/static/hunter/style.css
+2
-2
detail.html
Hunter_ht/hunter/templates/hunter/detail.html
+48
-22
index.html
Hunter_ht/hunter/templates/hunter/index.html
+4
-4
views.py
Hunter_ht/hunter/views.py
+13
-1
No files found.
Hunter_ht/hunter/models.py
View file @
9ea59919
...
...
@@ -12,14 +12,17 @@ class User(models.Model):
name
=
models
.
CharField
(
max_length
=
50
)
pwd
=
models
.
CharField
(
max_length
=
100
)
name_hanzi
=
models
.
CharField
(
max_length
=
100
)
name_eng
=
models
.
CharField
(
max_length
=
100
,
default
=
name
)
member_type
=
models
.
IntegerField
(
default
=
2
)
isCurrent
=
models
.
IntegerField
(
default
=
1
)
identity
=
models
.
CharField
(
max_length
=
1
,
default
=
'0'
)
introduction
=
models
.
TextField
(
default
=
"No Information"
)
score
=
models
.
IntegerField
(
default
=
0
)
scoreUsed
=
models
.
IntegerField
(
default
=
0
)
personal_website
=
models
.
CharField
(
max_length
=
1000
,
default
=
''
)
mailAddress
=
models
.
CharField
(
max_length
=
100
,
default
=
'mail@example.com'
)
def
is_admin
(
self
):
return
self
.
identity
...
...
Hunter_ht/hunter/static/hunter/detail.css
View file @
9ea59919
...
...
@@ -7,6 +7,13 @@
margin
:
0
;
padding
:
0
;
}
html
,
body
{
width
:
100%
;
font-family
:
-webkit-pictograph
;
}
div
{
width
:
100%
;
}
body
{
background-color
:
rgba
(
253
,
253
,
253
,
.3
);
width
:
100%
;
...
...
@@ -23,3 +30,111 @@ select{
a
{
text-decoration
:
none
;
}
span
{
display
:
block
;
}
#resume
{
width
:
800px
;
min-height
:
1000px
;
background-color
:
white
;
margin
:
10px
auto
;
padding
:
50px
;
box-shadow
:
-1px
-1px
3px
#cec9c9
inset
;
-moz-box-shadow
:
-1px
-1px
3px
#cec9c9
inset
;
-webkit-box-shadow
:
-1px
-1px
3px
#cec9c9
inset
;
}
#top
,
#wrap
{
width
:
100%
;
}
#top
p
{
height
:
100%
;
line-height
:
50px
;
font-size
:
28px
;
font-weight
:
600
;
}
#top
div
{
width
:
100%
;
}
#top
span
,
#top
a
{
width
:
100%
;
text-align
:
right
;
display
:
block
;
height
:
30px
;
line-height
:
30px
;
font-size
:
16px
;
font-weight
:
200
;
}
.wrap
{
width
:
100%
;
}
.section
>
span
:first-child
{
width
:
100%
;
display
:
block
;
font-size
:
20px
;
font-weight
:
600
;
border-bottom
:
solid
3px
black
;
}
.content
{
width
:
100%
;
}
.content
>
ul
{
width
:
100%
;
height
:
50px
;
padding-left
:
40px
;
}
.content
>
ul
>
li
{
width
:
100%
;
height
:
22px
;
}
.content
>
ul
,
.content
>
ul
>
li
:first-child
{
list-style-type
:
disc
;
font-size
:
14px
;
font-weight
:
400
;
}
.content
>
ul
>
li
:last-child
{
list-style-type
:
none
;
font-size
:
14px
;
font-weight
:
400
;
color
:
dimgrey
;
}
.content
span
{
height
:
100%
;
float
:
left
;
margin-right
:
20px
;
}
.content
>
div
{
width
:
100%
;
height
:
40px
;
}
.content
>
div
>
span
{
height
:
35px
;
line-height
:
35px
;
font-size
:
18px
;
font-style
:
italic
;
font-weight
:
bold
;
}
.ul_list
{
width
:
100%
;
}
.ul_list
>
ul
{
width
:
100%
;
padding-left
:
40px
;
}
.ul_list
ul
>
li
{
width
:
100%
;
height
:
25px
;
display
:
block
;
float
:
left
;
margin-right
:
10px
;
list-style-type
:
none
;
}
.ul_list
span
{
font-size
:
15px
;
font-weight
:
400
;
}
.section
{
margin-bottom
:
10px
;
}
Hunter_ht/hunter/static/hunter/style.css
View file @
9ea59919
...
...
@@ -268,8 +268,8 @@ nav>div{
}
.new_list
{
width
:
100%
;
height
:
3
0px
;
padding
:
0
20px
;
height
:
5
0px
;
padding
:
5px
20px
;
}
.new_list
span
{
display
:
block
;
...
...
Hunter_ht/hunter/templates/hunter/detail.html
View file @
9ea59919
...
...
@@ -9,48 +9,73 @@
<script
src=
"{% static 'hunter/jquery-1.9.1.min.js' %}"
></script>
</head>
<body>
<nav>
<div
id=
"resume"
>
<div
id=
"top"
>
<p>
{{ user.name }}
</p>
<div>
<div
id=
"hunter"
>
<span><a
href=
"/"
>
HUNTER
</a></span>
</div>
<div
id=
"bar"
class=
""
>
{% if user.mailAddress %}
<span>
{{ user.mailAddress }}
</span>
{% endif %}
{% if user.personal_website %}
<a
href=
"{{ user.personal_website }}"
target=
"_blank"
>
{{ user.personal_website }}
</a>
{% endif %}
</div>
</div>
</nav>
<div>
<div
class=
"wrap"
>
<div
class=
"section"
>
<span>
PUBLICATIONS
</span>
{% for year,publications in publication_year_list.items %}
<blockquote><p>
{{ year }}
</p></blockquote>
<div
class=
"content"
>
<div>
<span>
{{ year }}
</span>
</div>
{% if publications %}
{% for publication in publications %}
<ul>
<li><a
href=
"{% static 'hunter/publications/' %}{{ publication.link }}"
target=
"_blank"
>
{{ publication.title }}
</a></li>
<li>
{{ publication.date }}
</li>
<li>
{{ publication.journalname }}
</li>
<li>
{{ publication.publishType }}
</li>
<li>
{{ publication.authors }}
</li>
<li>
<span>
{{ publication.date }}
</span>
<span>
{{ publication.title }}
</span>
</li>
<li>
<span>
{{ publication.authors }}
</span>
<span>
{{ publication.publishType }}
</span>
<span>
{{ publication.journalname }}
</span>
</li>
</ul>
{% endfor %}
{% endif %}
</div>
{% endfor %}
</div>
<div
class=
"wrap"
>
<div
class=
"section"
>
<span>
MY-CVE
</span>
{% for year, cves in cve_year_list.items %}
<blockquote
><p>
{{ year }}
</p></blockquote>
<div
class=
"content"
>
<div>
<span>
{{ year }}
</span>
</div>
<div
class=
"ul_list"
>
{% if cves %}
{% for cve in cves %}
<ul>
<li
class=
"cve_big_text"
><a
href=
"{{ cve.url }}"
target=
"_blank"
>
{{ cve.identifier }}
</a></li>
<li
class=
"li_right"
>
{{ cve.datetime }}
</li>
<li
class=
"li_right"
>
{{ cve.software }}
</li>
<li
class=
"li_right"
>
{{ cve.bugType }}
</li>
<li
class=
"li_long li_small_text"
>
{{ cve.description }}
</li>
</ul>
{% for cve in cves %}
<li>
<span
>
{{ cve.datetime }}
</span>
<span
><a
href=
"{{ cve.url }}"
target=
"_blank"
>
{{ cve.identifier }}
</a></span>
<span
>
{{ cve.software }}
</span>
<span
>
{{ cve.bugType }}
</span>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
Hunter_ht/hunter/templates/hunter/index.html
View file @
9ea59919
...
...
@@ -67,9 +67,9 @@
<span>
{{ it.author }}发布了
</span>
{% endif %}
{% if key == 'cve' %}
<span><a
href=
"{{ it.url }}"
>
{{ it.title }}
</a></span>
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
{{ it.title }}
</a></span>
{% else %}
<span><a
href=
"{{ it.url }}"
>
《{{ it.title }}》
</a></span>
<span><a
target=
"_blank"
href=
"{{ it.url }}"
>
《{{ it.title }}》
</a></span>
{% endif %}
</div>
...
...
@@ -277,14 +277,14 @@
{% if bug_list %}
<ul>
{% for bug in bug_list %}
<li><a
href=
"{{ bug.url }}"
>
{{ bug.identifier }}
</a></li>
<li><a
href=
"{{ bug.url }}"
target=
"_blank"
>
{{ bug.identifier }}
</a></li>
{% endfor %}
</ul>
{% endif %}
</section>
<footer>
<div
class=
"w-1000 copyright"
>
Copyright © 2013-2020
<strong><a
href=
"//www.
runoob.com
/"
target=
"_blank"
>
野旷天低树天清月近人
</a></strong>
Copyright © 2013-2020
<strong><a
href=
"//www.
hunter-ht.cn
/"
target=
"_blank"
>
野旷天低树天清月近人
</a></strong>
<strong><a
href=
"//www.hunter-ht.cn/"
target=
"_blank"
>
hunter-ht.cn
</a></strong>
All Rights Reserved. 备案号:
<a
target=
"_blank"
rel=
"nofollow"
href=
"http://www.beian.miit.gov.cn"
>
湘ICP备18008562号
</a>
</div>
</footer>
...
...
Hunter_ht/hunter/views.py
View file @
9ea59919
...
...
@@ -95,7 +95,7 @@ def index(request):
newest_publication
=
Publications
.
objects
.
filter
(
date__gte
=
start
)
.
order_by
(
'-date'
)
for
pub
in
newest_publication
:
pub
.
author
=
pub
.
uploadByUser
pub
.
url
=
'/static/hunter/publications/'
+
pub
.
link
pub
.
url
=
'/static/hunter/publications/'
+
pub
.
link
.
split
(
'/'
)[
-
1
]
pub
.
date
=
str
(
pub
.
date
)[
5
:
10
]
newest_article
=
Articles
.
objects
.
filter
(
editDateTime__gte
=
start
)
.
order_by
(
'-editDateTime'
)
for
art
in
newest_article
:
...
...
@@ -215,8 +215,20 @@ def detail(request, user_id):
my_cve_year_list
[
year
]
.
append
(
cve
)
else
:
my_cve_year_list
[
year
]
=
[
cve
]
my_article_list
=
Articles
.
objects
.
filter
(
authorID
=
user_id
)
.
order_by
(
'-editDateTime'
)
my_article_year_list
=
{}
for
art
in
my_article_list
:
year
=
str
(
art
.
editDateTime
)[
0
:
4
]
art
.
editDateTime
=
str
(
art
.
editDateTime
)[
5
:
10
]
art
.
authorID
=
username
if
year
in
my_article_year_list
.
keys
():
my_article_year_list
[
year
]
.
append
(
art
)
else
:
my_article_year_list
[
year
]
=
[
art
]
context
=
{
'user'
:
usr
,
'art_year_list'
:
my_article_year_list
,
'publication_year_list'
:
my_publication_year_list
,
'cve_year_list'
:
my_cve_year_list
,
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment