Commit 9ea59919 by liuyingying

胜利就在眼前啦!

parent 40241747
...@@ -12,14 +12,17 @@ class User(models.Model): ...@@ -12,14 +12,17 @@ class User(models.Model):
name = models.CharField(max_length=50) name = models.CharField(max_length=50)
pwd = models.CharField(max_length=100) pwd = models.CharField(max_length=100)
name_hanzi = 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) member_type = models.IntegerField(default=2)
isCurrent = models.IntegerField(default=1) isCurrent = models.IntegerField(default=1)
identity = models.CharField(max_length=1, default='0') identity = models.CharField(max_length=1, default='0')
introduction = models.TextField(default="No Information") introduction = models.TextField(default="No Information")
score = models.IntegerField(default=0) score = models.IntegerField(default=0)
scoreUsed = 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') mailAddress = models.CharField(max_length=100, default='mail@example.com')
def is_admin(self): def is_admin(self):
return self.identity return self.identity
......
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
margin:0; margin:0;
padding: 0; padding: 0;
} }
html,body{
width:100%;
font-family: -webkit-pictograph;
}
div{
width:100%;
}
body{ body{
background-color: rgba(253, 253, 253, .3); background-color: rgba(253, 253, 253, .3);
width:100%; width:100%;
...@@ -23,3 +30,111 @@ select{ ...@@ -23,3 +30,111 @@ select{
a{ a{
text-decoration: none; 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;
}
...@@ -268,8 +268,8 @@ nav>div{ ...@@ -268,8 +268,8 @@ nav>div{
} }
.new_list{ .new_list{
width:100%; width:100%;
height:30px; height:50px;
padding:0 20px; padding:5px 20px;
} }
.new_list span{ .new_list span{
display: block; display: block;
......
...@@ -9,48 +9,73 @@ ...@@ -9,48 +9,73 @@
<script src="{% static 'hunter/jquery-1.9.1.min.js' %}"></script> <script src="{% static 'hunter/jquery-1.9.1.min.js' %}"></script>
</head> </head>
<body> <body>
<nav> <div id="resume">
<div id="top">
<p>{{ user.name }}</p>
<div> <div>
<div id="hunter"> {% if user.mailAddress %}
<span><a href="/">HUNTER</a></span> <span>{{ user.mailAddress }} </span>
</div> {% endif %}
<div id="bar" class=""> {% if user.personal_website %}
<a href="{{ user.personal_website }}" target="_blank">{{ user.personal_website }}</a>
{% endif %}
</div> </div>
</div> </div>
</nav>
<div>
<div class="wrap"> <div class="wrap">
<div class="section">
<span>PUBLICATIONS</span>
{% for year,publications in publication_year_list.items %} {% for year,publications in publication_year_list.items %}
<blockquote><p>{{ year }}</p></blockquote> <div class="content">
<div>
<span>
{{ year }}
</span>
</div>
{% if publications %} {% if publications %}
{% for publication in publications %} {% for publication in publications %}
<ul> <ul>
<li><a href="{% static 'hunter/publications/' %}{{ publication.link }}" target="_blank">{{ publication.title }}</a></li> <li>
<li>{{ publication.date }}</li> <span>{{ publication.date }}</span>
<li>{{ publication.journalname }}</li> <span>{{ publication.title }}</span>
<li>{{ publication.publishType }}</li> </li>
<li>{{ publication.authors }}</li> <li>
<span>{{ publication.authors }}</span>
<span>{{ publication.publishType }}</span>
<span>{{ publication.journalname }}</span>
</li>
</ul> </ul>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
</div>
{% endfor %} {% endfor %}
</div> </div>
<div class="wrap"> <div class="section">
<span>MY-CVE</span>
{% for year, cves in cve_year_list.items %} {% 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 %} {% if cves %}
{% for cve in cves %}
<ul> <ul>
<li class="cve_big_text"><a href="{{ cve.url }}" target="_blank">{{ cve.identifier }}</a></li> {% for cve in cves %}
<li class="li_right">{{ cve.datetime }}</li> <li>
<li class="li_right">{{ cve.software }}</li> <span >{{ cve.datetime }}</span>
<li class="li_right">{{ cve.bugType }}</li> <span ><a href="{{ cve.url }}" target="_blank">{{ cve.identifier }}</a></span>
<li class="li_long li_small_text">{{ cve.description }}</li> <span >{{ cve.software }}</span>
</ul> <span >{{ cve.bugType }}</span>
</li>
{% endfor %} {% endfor %}
</ul>
{% endif %} {% endif %}
</div>
{% endfor %} {% endfor %}
</div> </div>
</div>
</div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -67,9 +67,9 @@ ...@@ -67,9 +67,9 @@
<span>{{ it.author }}发布了</span> <span>{{ it.author }}发布了</span>
{% endif %} {% endif %}
{% if key == 'cve' %} {% if key == 'cve' %}
<span><a href="{{ it.url }}">{{ it.title }}</a></span> <span><a target="_blank" href="{{ it.url }}">{{ it.title }}</a></span>
{% else %} {% else %}
<span><a href="{{ it.url }}">《{{ it.title }}》</a></span> <span><a target="_blank" href="{{ it.url }}">《{{ it.title }}》</a></span>
{% endif %} {% endif %}
</div> </div>
...@@ -277,14 +277,14 @@ ...@@ -277,14 +277,14 @@
{% if bug_list %} {% if bug_list %}
<ul> <ul>
{% for bug in bug_list %} {% 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 %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</section> </section>
<footer> <footer>
<div class="w-1000 copyright"> <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> <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> </div>
</footer> </footer>
......
...@@ -95,7 +95,7 @@ def index(request): ...@@ -95,7 +95,7 @@ def index(request):
newest_publication = Publications.objects.filter(date__gte=start).order_by('-date') newest_publication = Publications.objects.filter(date__gte=start).order_by('-date')
for pub in newest_publication: for pub in newest_publication:
pub.author = pub.uploadByUser 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] pub.date = str(pub.date)[5:10]
newest_article = Articles.objects.filter(editDateTime__gte=start).order_by('-editDateTime') newest_article = Articles.objects.filter(editDateTime__gte=start).order_by('-editDateTime')
for art in newest_article: for art in newest_article:
...@@ -215,8 +215,20 @@ def detail(request, user_id): ...@@ -215,8 +215,20 @@ def detail(request, user_id):
my_cve_year_list[year].append(cve) my_cve_year_list[year].append(cve)
else: else:
my_cve_year_list[year] = [cve] 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 = { context = {
'user': usr, 'user': usr,
'art_year_list':my_article_year_list,
'publication_year_list': my_publication_year_list, 'publication_year_list': my_publication_year_list,
'cve_year_list': my_cve_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