Skip to content

Commit

Permalink
upload avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
gothack329 committed Mar 5, 2018
1 parent 1cf8297 commit 062eb3b
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions article/templates/article/detail.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load timetonow %}
{% block header %}
<title>{{art.title}} - 物志</title>
<title>{% ifnotequal user.unread 0%} ({{user.unread}}) {% endifnotequal %} 物志 › {{art.title}} </title>

<script type="text/javascript" src="/static/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
Expand Down Expand Up @@ -42,7 +42,7 @@ <h1>{% if art %}{{art.title}}{% endif %} </h1>

{% block content %}
<div class="card margintop article-content">
<span class="fad">作者:<a href="/userpage/member/{{art.author_id}}/"><img src="/{{art.author_id.avatar}}" class="avatar-img">&nbsp;{{art.author}}</a> </span>
<span class="fad">作者:<a href="/userpage/member/{{art.author_id}}/"><img src="/{{art.author_id.avatar}}" class="avatar-img">&nbsp;{{art.author_id}}</a> </span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span class="fad">阅读数:{{art.readtime}}</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Expand Down
Binary file modified db.sqlite3
Binary file not shown.
Binary file added static/avatar/Snipaste_2018-03-05_21-28-39.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/avatar/a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions static/bootstrap/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ img.avatar-img {
.banner {
top:0;
width:100%;
height:400px;
height:500px;
min-height:50px;
box-shadow: 0 0 12px 0 #25292e inset;
box-shadow: 0 0 20px 0 #f6f8fa inset;
}

.banner h1 {
Expand Down
Binary file added static/upload/injustice-2-powergirl-995531.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script type="text/javascript" src="/static/bootstrap/js/bootstrap-notify.js"></script>
<link href='http://cdn.webfont.youziku.com/webfonts/nomal/114602/46453/5a919786f629d911e0099415.css' rel='stylesheet' type='text/css' />
{% block header %}
<title>{% if title %}{{title}} - {% endif %}物志</title>
<title>{% ifnotequal user.unread 0%} ({{user.unread}}) {% endifnotequal %} 物志 {% if title %}{{title}} {% endif %} </title>
{% endblock %}
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h1>{% if title %}{{title}}{% endif %} </h1>
<p></p>
<span class="glyphicon glyphicon-time fad"> </span>&nbsp;<span class="fad">{{i.publish_time|timetonow}}</span>
&nbsp;&nbsp;&nbsp;
<a href="/userpage/member/{{i.author_id}}/"><img src="/{{i.author_id.avatar}}" class="avatar-img">&nbsp;<span class="fad">{{i.author}}</span></a>
<a href="/userpage/member/{{i.author_id}}/"><img src="/{{i.author_id.avatar}}" class="avatar-img">&nbsp;<span class="fad">{{i.author_id}}</span></a>
&nbsp;&nbsp;&nbsp;
<span class="glyphicon glyphicon-th-list fad"> </span>&nbsp;<a href="/?catalog={{i.section}}"><span class="fad">{{i.section}}</span></a>
&nbsp;&nbsp;&nbsp;
Expand Down
Binary file modified userpage/__pycache__/views.cpython-36.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion userpage/templates/userpage/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load displayName %}

{% block header %}
<title> 物志 › {{request.user}} </title>
<title> {% ifnotequal user.unread 0%} ({{user.unread}}) {% endifnotequal %} 物志 › {{request.user}} </title>
<script type="text/javascript">
$(function(){
$(".detail-tab").find(".profile-tab:first").show();
Expand Down
2 changes: 1 addition & 1 deletion userpage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def profile(request, username):
def userlogin(request):

if request.method == 'POST':
# print(request.POST)
print(request.POST['referer'])
username = request.POST['username']
password = request.POST['password']
errors = []
Expand Down

0 comments on commit 062eb3b

Please sign in to comment.