Commit 9ea59919 by liuyingying

胜利就在眼前啦!

parent 40241747
......@@ -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
......
......@@ -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%;
......@@ -22,4 +29,112 @@ select{
}
a{
text-decoration: none;
}
\ No newline at end of file
}
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;
}
......@@ -268,8 +268,8 @@ nav>div{
}
.new_list{
width:100%;
height:30px;
padding:0 20px;
height:50px;
padding:5px 20px;
}
.new_list span{
display: block;
......
......@@ -9,47 +9,72 @@
<script src="{% static 'hunter/jquery-1.9.1.min.js' %}"></script>
</head>
<body>
<nav>
<div>
<div id="hunter">
<span><a href="/">HUNTER</a></span>
</div>
<div id="bar" class="">
<div id="resume">
<div id="top">
<p>{{ user.name }}</p>
<div>
{% 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>
{% if publications %}
{% for publication in publications %}
<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 %}
{% endfor %}
{% endif %}
</div>
{% endfor %}
</div>
<div class="wrap">
{% for year, cves in cve_year_list.items %}
<blockquote ><p>{{ year }}</p></blockquote>
{% 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>
</div>
<div class="section">
<span>MY-CVE</span>
{% for year, cves in cve_year_list.items %}
<div class="content">
<div>
<span>
{{ year }}
</span>
</div>
<div class="ul_list">
{% if cves %}
<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 %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</body>
......
......@@ -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>&nbsp;
Copyright © 2013-2020 <strong><a href="//www.hunter-ht.cn/" target="_blank">野旷天低树天清月近人</a></strong>&nbsp;
<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>
......
......@@ -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,
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment