pull/49/head
parent
bee4b85946
commit
edebb44d84
@ -0,0 +1,30 @@
|
||||
{% extends 'share_layout/base_account.html' %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<h2 class="form-signin-heading text-center">{% trans 'forget the password' %}</h2>
|
||||
|
||||
<div class="card card-signin">
|
||||
<img class="img-circle profile-img" src="{% static 'blog/img/avatar.png' %}" alt="">
|
||||
<form class="form-signin" action="{% url 'account:forget_password' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
{% endfor %}
|
||||
<input type="button" class="button" id="btn" value="{% trans 'get verification code' %}">
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">{% trans 'submit' %}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="/">Home Page</a>
|
||||
|
|
||||
<a href="{% url "account:login" %}">login page</a>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
{% endblock %}
|
||||
@ -0,0 +1,46 @@
|
||||
{% extends 'share_layout/base_account.html' %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<h2 class="form-signin-heading text-center">Sign in with your Account</h2>
|
||||
|
||||
<div class="card card-signin">
|
||||
<img class="img-circle profile-img" src="{% static 'blog/img/avatar.png' %}" alt="">
|
||||
<form class="form-signin" action="{% url 'account:login' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
{% endfor %}
|
||||
|
||||
<input type="hidden" name="next" value="{{ redirect_to }}">
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
|
||||
|
||||
<div class="checkbox">
|
||||
{% comment %}<a class="pull-right">Need help?</a>{% endcomment %}
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me" name="remember"> Stay signed in
|
||||
</label>
|
||||
</div>
|
||||
{% load oauth_tags %}
|
||||
{% load_oauth_applications request%}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="{% url "account:register" %}">
|
||||
{% trans 'Create Account' %}
|
||||
</a>
|
||||
|
|
||||
<a href="/">Home Page</a>
|
||||
|
|
||||
<a href="{% url "account:forget_password" %}">
|
||||
{% trans 'Forget Password' %}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
{% endblock %}
|
||||
@ -0,0 +1,29 @@
|
||||
{% extends 'share_layout/base_account.html' %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<h2 class="form-signin-heading text-center">Create Your Account</h2>
|
||||
|
||||
<div class="card card-signin">
|
||||
<img class="img-circle profile-img" src="{% static 'blog/img/avatar.png' %}" alt="">
|
||||
<form class="form-signin" action="{% url 'account:register' %}" method="post">
|
||||
{% csrf_token %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">Create Your Account</button>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="{% url "account:login" %}">Sign In</a>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
{% endblock %}
|
||||
@ -0,0 +1,27 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load i18n %}
|
||||
{% block header %}
|
||||
<title> {{ title }}</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
|
||||
<header class="archive-header">
|
||||
|
||||
<h2 class="archive-title"> {{ content }}</h2>
|
||||
</header><!-- .archive-header -->
|
||||
<br/>
|
||||
<header class="archive-header" style="text-align: center">
|
||||
|
||||
<a href="{% url "account:login" %}">
|
||||
{% trans 'login' %}
|
||||
</a>
|
||||
|
|
||||
<a href="/">
|
||||
{% trans 'back to the homepage' %}
|
||||
</a>
|
||||
</header><!-- .archive-header -->
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -0,0 +1,60 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load blog_tags %}
|
||||
{% load cache %}
|
||||
{% load i18n %}
|
||||
{% block header %}
|
||||
|
||||
<title>{% trans 'article archive' %} | {{ SITE_DESCRIPTION }}</title>
|
||||
|
||||
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
|
||||
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITE_NAME }}"/>
|
||||
<meta property="og:description" content="{{ SITE_DESCRIPTION }}"/>
|
||||
<meta property="og:url" content="{{ SITE_BASE_URL }}"/>
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}"/>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
|
||||
<header class="archive-header">
|
||||
|
||||
<p class="archive-title">{% trans 'article archive' %}</p>
|
||||
</header><!-- .archive-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
|
||||
{% regroup article_list by pub_time.year as year_post_group %}
|
||||
<ul>
|
||||
{% for year in year_post_group %}
|
||||
<li>{{ year.grouper }} {% trans 'year' %}
|
||||
{% regroup year.list by pub_time.month as month_post_group %}
|
||||
<ul>
|
||||
{% for month in month_post_group %}
|
||||
<li>{{ month.grouper }} {% trans 'month' %}
|
||||
<ul>
|
||||
{% for article in month.list %}
|
||||
<li><a href="{{ article.get_absolute_url }}">{{ article.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% load_sidebar user 'i' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load blog_tags %}
|
||||
|
||||
{% block header %}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
{% load_article_detail article False user %}
|
||||
|
||||
{% if article.type == 'a' %}
|
||||
<nav class="nav-single">
|
||||
<h3 class="assistive-text">文章导航</h3>
|
||||
{% if next_article %}
|
||||
|
||||
<span class="nav-previous"><a href="{{ next_article.get_absolute_url }}" rel="prev"><span
|
||||
class="meta-nav">←</span> {{ next_article.title }}</a></span>
|
||||
{% endif %}
|
||||
{% if prev_article %}
|
||||
<span class="nav-next"><a href="{{ prev_article.get_absolute_url }}"
|
||||
rel="next">{{ prev_article.title }} <span
|
||||
class="meta-nav">→</span></a></span>
|
||||
{% endif %}
|
||||
</nav><!-- .nav-single -->
|
||||
{% endif %}
|
||||
|
||||
</div><!-- #content -->
|
||||
{% if article.comment_status == "o" and OPEN_SITE_COMMENT %}
|
||||
|
||||
|
||||
{% include 'comments/tags/comment_list.html' %}
|
||||
{% if user.is_authenticated %}
|
||||
{% include 'comments/tags/post_comment.html' %}
|
||||
{% else %}
|
||||
<div class="comments-area">
|
||||
<h3 class="comment-meta">您还没有登录,请您<a
|
||||
href="{% url "account:login" %}?next={{ request.get_full_path }}" rel="nofollow">登录</a>后发表评论。
|
||||
</h3>
|
||||
|
||||
{% load oauth_tags %}
|
||||
{% load_oauth_applications request %}
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div><!-- #primary -->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% load_sidebar user "p" %}
|
||||
{% endblock %}
|
||||
@ -0,0 +1,45 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load blog_tags %}
|
||||
{% load cache %}
|
||||
{% block header %}
|
||||
{% if tag_name %}
|
||||
{% if statuscode == '404' %}
|
||||
<title>404 NotFound</title>
|
||||
{% elif statuscode == '403' %}
|
||||
<title>Permission Denied</title>
|
||||
{% elif statuscode == '500' %}
|
||||
<title>500 Error</title>
|
||||
{% else %}
|
||||
<title></title>
|
||||
{% endif %}
|
||||
{% comment %}<meta name="description" content="{{ page_type }}:{{ tag_name }}"/>{% endcomment %}
|
||||
{% else %}
|
||||
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title>
|
||||
{% endif %}
|
||||
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
|
||||
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITE_NAME }}"/>
|
||||
<meta property="og:description" content="{{ SITE_DESCRIPTION }}"/>
|
||||
<meta property="og:url" content="{{ SITE_BASE_URL }}"/>
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
|
||||
<header class="archive-header">
|
||||
<h1 class="archive-title">{{ message }}</h1>
|
||||
</header><!-- .archive-header -->
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% load_sidebar user 'i' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load blog_tags %}
|
||||
{% load cache %}
|
||||
{% block header %}
|
||||
|
||||
<title>友情链接 | {{ SITE_DESCRIPTION }}</title>
|
||||
|
||||
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
|
||||
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITE_NAME }}"/>
|
||||
<meta property="og:description" content="{{ SITE_DESCRIPTION }}"/>
|
||||
<meta property="og:url" content="{{ SITE_BASE_URL }}"/>
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}"/>
|
||||
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
|
||||
<header class="archive-header">
|
||||
|
||||
<p class="archive-title">友情链接</p>
|
||||
</header><!-- .archive-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<ul>
|
||||
{% for obj in object_list %}
|
||||
<li>
|
||||
<a href="{{ obj.link }}">{{ obj.name }}</a>
|
||||
</li>
|
||||
{% endfor %} </ul>
|
||||
</div>
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% load_sidebar user 'i' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
{% load i18n %}
|
||||
{% load blog_tags %}
|
||||
|
||||
|
||||
<footer class="entry-meta">
|
||||
{% trans 'posted in' %}
|
||||
<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>
|
||||
|
||||
|
||||
</a>
|
||||
{% if article.type == 'a' %}
|
||||
{% if article.tags.all %}
|
||||
|
||||
{% trans 'and tagged' %}
|
||||
{% for t in article.tags.all %}
|
||||
<a href="{{ t.get_absolute_url }}" rel="tag">{{ t.name }}</a>
|
||||
{% if t != article.tags.all.last %}
|
||||
,
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
.{% trans 'by ' %}
|
||||
<span class="by-author">
|
||||
<span class="author vcard">
|
||||
<a class="url fn n" href="{{ article.author.get_absolute_url }}"
|
||||
{% blocktranslate %}
|
||||
title="View all articles published by {{ article.author.username }}"
|
||||
{% endblocktranslate %}
|
||||
rel="author">
|
||||
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||||
|
||||
<span itemprop="name" itemprop="publisher">
|
||||
|
||||
{{ article.author.username }}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
|
||||
</span>
|
||||
{% trans 'on' %}
|
||||
<a href="{{ article.get_absolute_url }}"
|
||||
title="{% datetimeformat article.pub_time %}"
|
||||
itemprop="datePublished" content="{% datetimeformat article.pub_time %}"
|
||||
rel="bookmark">
|
||||
|
||||
<time class="entry-date updated"
|
||||
datetime="{{ article.pub_time }}">
|
||||
{% datetimeformat article.pub_time %}</time>
|
||||
{% if user.is_superuser %}
|
||||
<a href="{{ article.get_admin_url }}">{% trans 'edit' %}</a>
|
||||
{% endif %}
|
||||
</span>
|
||||
</footer><!-- .entry-meta -->
|
||||
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
{% load i18n %}
|
||||
<nav id="nav-below" class="navigation" role="navigation">
|
||||
<h3 class="assistive-text">
|
||||
{% trans 'article navigation' %}
|
||||
</h3>
|
||||
{% if page_obj.has_next and next_url%}
|
||||
<div class="nav-previous"><a
|
||||
href="{{ next_url }}"><span
|
||||
class="meta-nav">←</span> {% trans 'earlier articles' %}</a></div>
|
||||
{% endif %}
|
||||
{% if page_obj.has_previous and previous_url %}
|
||||
<div class="nav-next"><a href="{{ previous_url }}">{% trans 'newer articles' %}
|
||||
<span
|
||||
class="meta-nav">→</span></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav><!-- .navigation -->
|
||||
@ -0,0 +1,19 @@
|
||||
{% load i18n %}
|
||||
{% if article_tags_list %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{% trans 'tags' %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
{% for url,count,tag,color in article_tags_list %}
|
||||
<a class="label label-{{ color }}" style="display: inline-block;" href="{{ url }}"
|
||||
title="{{ tag.name }}">
|
||||
{{ tag.name }}
|
||||
<span class="badge">{{ count }}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -0,0 +1,19 @@
|
||||
<ul itemscope itemtype="https://schema.org/BreadcrumbList" class="breadcrumb">
|
||||
|
||||
{% for name,url in names %}
|
||||
<li itemprop="itemListElement" itemscope
|
||||
itemtype="https://schema.org/ListItem">
|
||||
<a href="{{ url }}" itemprop="item" >
|
||||
<span itemprop="name">{{ name }}</span></a>
|
||||
<meta itemprop="position" content="{{ forloop.counter }}"/>
|
||||
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li class="active" itemprop="itemListElement" itemscope
|
||||
itemtype="https://schema.org/ListItem">
|
||||
<span itemprop="name">{{ title }}</span>
|
||||
<meta itemprop="position" content="{{ count }}"/>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
{% load blog_tags %}
|
||||
<li class="comment even thread-even depth-{{ depth }} parent" id="comment-{{ comment_item.pk }}">
|
||||
<div id="div-comment-{{ comment_item.pk }}" class="comment-body">
|
||||
<div class="comment-author vcard">
|
||||
<img alt="{{ comment_item.author.username }}的头像"
|
||||
src="{{ comment_item.author.email|gravatar_url:150 }}"
|
||||
srcset="{{ comment_item.author.email|gravatar_url:150 }}"
|
||||
class="avatar avatar-96 photo"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
style="max-width:100%;height:auto;">
|
||||
<cite class="fn">
|
||||
<a rel="nofollow"
|
||||
{% if comment_item.author.is_superuser %}
|
||||
href="{{ comment_item.author.get_absolute_url }}"
|
||||
{% else %}
|
||||
href="#"
|
||||
{% endif %}
|
||||
rel="external nofollow"
|
||||
class="url">{{ comment_item.author.username }}
|
||||
</a>
|
||||
</cite>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-meta commentmetadata">
|
||||
<div>{{ comment_item.creation_time }}</div>
|
||||
<div>回复给:@{{ comment_item.author.parent_comment.username }}</div>
|
||||
</div>
|
||||
<p>{{ comment_item.body|escape|comment_markdown }}</p>
|
||||
<div class="reply"><a rel="nofollow" class="comment-reply-link"
|
||||
href="javascript:void(0)"
|
||||
onclick="do_reply({{ comment_item.pk }})"
|
||||
aria-label="回复给{{ comment_item.author.username }}">回复</a></div>
|
||||
</div>
|
||||
|
||||
</li><!-- #comment-## -->
|
||||
@ -0,0 +1,57 @@
|
||||
{% load blog_tags %}
|
||||
<li class="comment even thread-even depth-{{ depth }} parent" id="comment-{{ comment_item.pk }}"
|
||||
style="margin-left: {% widthratio depth 1 3 %}rem">
|
||||
<div id="div-comment-{{ comment_item.pk }}" class="comment-body">
|
||||
<div class="comment-author vcard">
|
||||
<img alt="{{ comment_item.author.username }}的头像"
|
||||
src="{{ comment_item.author.email|gravatar_url:150 }}"
|
||||
srcset="{{ comment_item.author.email|gravatar_url:150 }}"
|
||||
class="avatar avatar-96 photo"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
style="max-width:100%;height:auto;">
|
||||
<cite class="fn">
|
||||
<a rel="nofollow"
|
||||
{% if comment_item.author.is_superuser %}
|
||||
href="{{ comment_item.author.get_absolute_url }}"
|
||||
{% else %}
|
||||
href="#"
|
||||
{% endif %}
|
||||
rel="external nofollow"
|
||||
class="url">{{ comment_item.author.username }}
|
||||
</a>
|
||||
</cite>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="comment-meta commentmetadata">
|
||||
{{ comment_item.creation_time }}
|
||||
</div>
|
||||
<p>
|
||||
{% if comment_item.parent_comment %}
|
||||
<div>回复 <a
|
||||
href="#comment-{{ comment_item.parent_comment.pk }}">@{{ comment_item.parent_comment.author.username }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<p>{{ comment_item.body|escape|comment_markdown }}</p>
|
||||
|
||||
<div class="reply"><a rel="nofollow" class="comment-reply-link"
|
||||
href="javascript:void(0)" data-pk="{{ comment_item.pk }}"
|
||||
aria-label="回复给{{ comment_item.author.username }}">回复</a></div>
|
||||
</div>
|
||||
|
||||
</li><!-- #comment-## -->
|
||||
{% query article_comments parent_comment=comment_item as cc_comments %}
|
||||
{% for cc in cc_comments %}
|
||||
{% with comment_item=cc template_name="comments/tags/comment_item_tree.html" %}
|
||||
{% if depth >= 1 %}
|
||||
{% include template_name %}
|
||||
{% else %}
|
||||
{% with depth=depth|add:1 %}
|
||||
{% include template_name %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
@ -0,0 +1,45 @@
|
||||
<dev>
|
||||
<section id="comments" class="themeform">
|
||||
{% load blog_tags %}
|
||||
{% load comments_tags %}
|
||||
{% load cache %}
|
||||
|
||||
<ul class="comment-tabs group">
|
||||
<li class="active"><a href="#commentlist-container"><i
|
||||
class="fa fa-comments-o"></i>评论<span>{{ comment_count }}</span></a></li>
|
||||
|
||||
</ul>
|
||||
{% if article_comments %}
|
||||
<div id="commentlist-container" class="comment-tab" style="display: block;">
|
||||
<ol class="commentlist">
|
||||
{# {% query article_comments parent_comment=None as parent_comments %}#}
|
||||
{% for comment_item in p_comments %}
|
||||
|
||||
{% with 0 as depth %}
|
||||
{% include "comments/tags/comment_item_tree.html" %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
</ol><!--/.commentlist-->
|
||||
<div class="navigation">
|
||||
<nav class="nav-single">
|
||||
{% if comment_prev_page_url %}
|
||||
<div class="nav-previous">
|
||||
<span><a href="{{ comment_prev_page_url }}" rel="prev"><span
|
||||
class="meta-nav">←</span> 上一页</a></span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if comment_next_page_url %}
|
||||
<div class="nav-next">
|
||||
<span><a href="{{ comment_next_page_url }}" rel="next">下一页 <span
|
||||
class="meta-nav">→</span></a></span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
</dev>
|
||||
@ -0,0 +1,22 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% block header %}
|
||||
<title> {{ title }}</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
|
||||
<header class="archive-header">
|
||||
|
||||
<h2 class="archive-title"> {{ content }}</h2>
|
||||
</header><!-- .archive-header -->
|
||||
<br/>
|
||||
<header class="archive-header" style="text-align: center">
|
||||
|
||||
<a href="{% url "account:login" %}">登录</a>
|
||||
|
|
||||
<a href="/">回到首页</a>
|
||||
</header><!-- .archive-header -->
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@ -0,0 +1,13 @@
|
||||
{% load i18n %}
|
||||
<div class="widget-login">
|
||||
{% if apps %}
|
||||
<small>
|
||||
{% trans 'quick login' %}:
|
||||
</small>
|
||||
{% for icon,url in apps %}
|
||||
<a href="{{ url }}" rel="nofollow">
|
||||
<span class="icon-sn-{{ icon }}"></span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
@ -0,0 +1,46 @@
|
||||
{% extends 'share_layout/base_account.html' %}
|
||||
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
|
||||
<h2 class="form-signin-heading text-center">绑定您的邮箱账号</h2>
|
||||
|
||||
<div class="card card-signin">
|
||||
{% if picture %}
|
||||
<img class="img-circle profile-img" src="{{ picture }}" alt="">
|
||||
{% else %}
|
||||
<img class="img-circle profile-img" src="{% static 'blog/img/avatar.png' %}" alt="">
|
||||
{% endif %}
|
||||
<form class="form-signin" action="" method="post">
|
||||
{% csrf_token %}
|
||||
{% comment %}<label for="inputEmail" class="sr-only">Email address</label>
|
||||
<input type="email" id="inputEmail" class="form-control" placeholder="Email" required autofocus>
|
||||
<label for="inputPassword" class="sr-only">Password</label>
|
||||
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required>{% endcomment %}
|
||||
{{ form.non_field_errors }}
|
||||
{% for field in form %}
|
||||
{{ field }}
|
||||
{{ field.errors }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">提交</button>
|
||||
|
||||
{% comment %}
|
||||
<div class="checkbox">
|
||||
<a class="pull-right">Need help?</a>
|
||||
<label>
|
||||
<input type="checkbox" value="remember-me"> Stay signed in
|
||||
</label>
|
||||
</div>
|
||||
{% endcomment %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="{% url "account:login" %}">登录</a>
|
||||
</p>
|
||||
|
||||
</div> <!-- /container -->
|
||||
{% endblock %}
|
||||
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>记录日期</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul>
|
||||
{% for date in results %}
|
||||
<li>
|
||||
<a href="{% url 'owntracks:show_maps' %}?date={{ date }}" target="_blank">{{ date }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,3 @@
|
||||
{{ object.title }}
|
||||
{{ object.author.username }}
|
||||
{{ object.body }}
|
||||
@ -0,0 +1,66 @@
|
||||
{% extends 'share_layout/base.html' %}
|
||||
{% load blog_tags %}
|
||||
{% block header %}
|
||||
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title>
|
||||
<meta name="description" content="{{ SITE_SEO_DESCRIPTION }}"/>
|
||||
<meta name="keywords" content="{{ SITE_KEYWORDS }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITE_NAME }}"/>
|
||||
<meta property="og:description" content="{{ SITE_DESCRIPTION }}"/>
|
||||
<meta property="og:url" content="{{ SITE_BASE_URL }}"/>
|
||||
<meta property="og:site_name" content="{{ SITE_NAME }}"/>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="primary" class="site-content">
|
||||
<div id="content" role="main">
|
||||
{% if query %}
|
||||
<header class="archive-header">
|
||||
{% if suggestion %}
|
||||
<h2 class="archive-title">
|
||||
已显示<span style="color: red"> “{{ suggestion }}” </span>的搜索结果。
|
||||
仍然搜索:<a style="text-transform: none;" href="/search/?q={{ query }}&is_suggest=no">{{ query }}</a> <br>
|
||||
</h2>
|
||||
{% else %}
|
||||
<h2 class="archive-title">
|
||||
搜索:<span style="color: red">{{ query }} </span>
|
||||
</h2>
|
||||
{% endif %}
|
||||
</header><!-- .archive-header -->
|
||||
{% endif %}
|
||||
{% if query and page.object_list %}
|
||||
{% for article in page.object_list %}
|
||||
{% load_article_detail article.object True user %}
|
||||
{% endfor %}
|
||||
{% if page.has_previous or page.has_next %}
|
||||
<nav id="nav-below" class="navigation" role="navigation">
|
||||
<h3 class="assistive-text">文章导航</h3>
|
||||
{% if page.has_previous %}
|
||||
<div class="nav-previous"><a
|
||||
href="?q={{ query }}&page={{ page.previous_page_number }}"><span
|
||||
class="meta-nav">←</span> 早期文章</a></div>
|
||||
{% endif %}
|
||||
{% if page.has_next %}
|
||||
<div class="nav-next"><a href="?q={{ query }}&page={{ page.next_page_number }}">较新文章
|
||||
<span
|
||||
class="meta-nav">→</span></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</nav><!-- .navigation -->
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<header class="archive-header">
|
||||
|
||||
<h1 class="archive-title">哎呀,关键字:<span>{{ query }}</span>没有找到结果,要不换个词再试试?</h1>
|
||||
</header><!-- .archive-header -->
|
||||
{% endif %}
|
||||
</div><!-- #content -->
|
||||
</div><!-- #primary -->
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% load_sidebar request.user 'i' %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
<aside id="text-2" class="widget widget_text"><h3 class="widget-title">Google AdSense</h3>
|
||||
<div class="textwidget">
|
||||
|
||||
{{ GOOGLE_ADSENSE_CODES }}
|
||||
</div>
|
||||
</aside>
|
||||
@ -0,0 +1,109 @@
|
||||
{% load static %}
|
||||
{% load cache %}
|
||||
{% load i18n %}
|
||||
{% load compress %}
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 7]>
|
||||
<html class="ie ie7" lang="zh-CN"
|
||||
prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
|
||||
<![endif]-->
|
||||
<!--[if IE 8]>
|
||||
<html class="ie ie8" lang="zh-CN"
|
||||
prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
|
||||
<![endif]-->
|
||||
<!--[if !(IE 7) & !(IE 8)]><!-->
|
||||
<html lang="zh-CN" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
|
||||
<!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="format-detection" content="telephone=no"/>
|
||||
<meta name="theme-color" content="#21759b"/>
|
||||
{% load blog_tags %}
|
||||
{% head_meta %}
|
||||
{% block header %}
|
||||
<!-- SEO插件会自动生成title、description、keywords等标签 -->
|
||||
{% endblock %}
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11"/>
|
||||
|
||||
<!-- DNS预解析 -->
|
||||
<link rel="dns-prefetch" href="//cdn.mathjax.org"/>
|
||||
<link rel="dns-prefetch" href="//cdn.jsdelivr.net"/>
|
||||
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin/>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="{% static 'blog/js/html5.js' %}" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
|
||||
<!-- RSS和图标 -->
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ SITE_NAME }} » Feed" href="/feed"/>
|
||||
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="apple-touch-icon" href="/favicon.ico"/>
|
||||
|
||||
<!-- 本地字体加载 -->
|
||||
<link rel="stylesheet" href="{% static 'blog/fonts/open-sans.css' %}">
|
||||
{% compress css %}
|
||||
|
||||
<link rel='stylesheet' id='twentytwelve-style-css' href='{% static 'blog/css/style.css' %}' type='text/css'
|
||||
media='all'/>
|
||||
<link href="{% static 'blog/css/oauth_style.css' %}" rel="stylesheet">
|
||||
{% comment %}<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>{% endcomment %}
|
||||
<!--[if lt IE 9]>
|
||||
<link rel='stylesheet' id='twentytwelve-ie-css' href='{% static 'blog/css/ie.css' %}' type='text/css' media='all' />
|
||||
<![endif]-->
|
||||
<link rel="stylesheet" href="{% static 'pygments/default.css' %}"/>
|
||||
<link rel="stylesheet" href="{% static 'blog/css/nprogress.css' %}">
|
||||
{% block compress_css %}
|
||||
{% endblock %}
|
||||
{% endcompress %}
|
||||
|
||||
{% if GLOBAL_HEADER %}
|
||||
{{ GLOBAL_HEADER|safe }}
|
||||
{% endif %}
|
||||
</head>
|
||||
|
||||
<body class="home blog custom-font-enabled">
|
||||
<div id="page" class="hfeed site">
|
||||
<header id="masthead" class="site-header" role="banner">
|
||||
<hgroup>
|
||||
<h1 class="site-title"><a href="/" title="{{ SITE_NAME }}" rel="home">{{ SITE_NAME }}</a>
|
||||
</h1>
|
||||
<h2 class="site-description">{{ SITE_DESCRIPTION }}</h2>
|
||||
</hgroup>
|
||||
{% load i18n %}
|
||||
{% include 'share_layout/nav.html' %}
|
||||
|
||||
|
||||
</header><!-- #masthead -->
|
||||
<div id="main" class="wrapper">
|
||||
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block sidebar %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
</div><!-- #main .wrapper -->
|
||||
{% include 'share_layout/footer.html' %}
|
||||
</div><!-- #page -->
|
||||
|
||||
<!-- JavaScript资源 -->
|
||||
{% compress js %}
|
||||
<script src="{% static 'blog/js/jquery-3.6.0.min.js' %}"></script>
|
||||
<script src="{% static 'blog/js/nprogress.js' %}"></script>
|
||||
<script src="{% static 'blog/js/blog.js' %}"></script>
|
||||
<script src="{% static 'blog/js/navigation.js' %}"></script>
|
||||
{% block compress_js %}
|
||||
{% endblock %}
|
||||
{% endcompress %}
|
||||
|
||||
<!-- MathJax智能加载器 -->
|
||||
<script src="{% static 'blog/js/mathjax-loader.js' %}" async defer></script>
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% load static %}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link rel="icon" href="../../favicon.ico">
|
||||
<meta name="robots" content="noindex">
|
||||
<title>{{ SITE_NAME }} | {{ SITE_DESCRIPTION }}</title>
|
||||
<link href="{% static 'account/css/account.css' %}" rel="stylesheet">
|
||||
{% load compress %}
|
||||
{% compress css %}
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{% static 'assets/css/bootstrap.min.css' %}" rel="stylesheet">
|
||||
<link href="{% static 'blog/css/oauth_style.css' %}" rel="stylesheet">
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{% static 'assets/css/ie10-viewport-bug-workaround.css' %}" rel="stylesheet">
|
||||
<!-- TODC Bootstrap core CSS -->
|
||||
<link href="{% static 'assets/css/todc-bootstrap.min.css' %}" rel="stylesheet">
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{% static 'assets/css/signin.css' %}" rel="stylesheet">
|
||||
{% endcompress %}
|
||||
{% compress js %}
|
||||
<script src="{% static 'assets/js/ie10-viewport-bug-workaround.js' %}"></script>
|
||||
<script src="{% static 'assets/js/ie-emulation-modes-warning.js' %}"></script>
|
||||
{% endcompress %}
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
|
||||
</body>
|
||||
<script type="text/javascript" src="{% static 'blog/js/jquery-3.6.0.min.js' %}"></script>
|
||||
<script src="{% static 'account/js/account.js' %}" type="text/javascript"></script>
|
||||
</html>
|
||||
@ -0,0 +1,56 @@
|
||||
<footer id="colophon" role="contentinfo">
|
||||
<div class="site-info" style="text-align: center">
|
||||
Copyright© {{ CURRENT_YEAR }}
|
||||
<a href="/" target="blank">{{ SITE_NAME }}</a>
|
||||
|
|
||||
|
||||
<a href="/sitemap.xml" title="SiteMap" target="_blank">
|
||||
SiteMap
|
||||
</a>
|
||||
|
|
||||
<a href="/feed" title="RSS Feed" target="_blank">
|
||||
RSS Feed
|
||||
</a>
|
||||
|
|
||||
<a href="/links.html" title="友情链接" rel="nofollow" target="_blank">
|
||||
友情链接
|
||||
</a>
|
||||
| Hosting On
|
||||
<a href="https://www.linode.com/?r=b0d38794d05ef8816b357a929106e89b7c6452f9" target="blank" rel="nofollow">Linode</a>
|
||||
|
||||
|
|
||||
<a href="https://tongji.baidu.com/sc-web/3478620/home/ico?siteId=11261596" target="_blank"
|
||||
rel="nofollow">百度统计</a>
|
||||
|
||||
</div>
|
||||
<div class="site-info" style="text-align: center">
|
||||
Powered by
|
||||
<a href="https://www.djangoproject.com/" rel="nofollow" target="blank">Django</a>
|
||||
|
|
||||
<a href="https://github.com/liangliangyy/DjangoBlog" rel="nofollow" target="blank">liangliangyy</a>
|
||||
|
|
||||
<a href="https://www.lylinux.net" target="blank">lylinux</a>
|
||||
|
|
||||
本页面加载耗时:<!!LOAD_TIMES!!>s
|
||||
</div>
|
||||
{% if BEIAN_CODE %}
|
||||
<div class="site-info" style="text-align: center">
|
||||
<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">
|
||||
<p style=" height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">
|
||||
{{ BEIAN_CODE }}
|
||||
</p>
|
||||
</a>
|
||||
{% if BEIAN_CODE_GONGAN and SHOW_GONGAN_CODE %}
|
||||
{{ BEIAN_CODE_GONGAN |safe }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if ANALYTICS_CODE %}
|
||||
{{ ANALYTICS_CODE| safe }}
|
||||
{% endif %}
|
||||
{% if GLOBAL_FOOTER %}
|
||||
{{ GLOBAL_FOOTER|safe }}
|
||||
{% endif %}
|
||||
</footer><!-- #colophon -->
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
{% load i18n %}
|
||||
|
||||
<nav id="site-navigation" class="main-navigation" role="navigation">
|
||||
<div class="menu-%e8%8f%9c%e5%8d%95-container">
|
||||
<ul id="menu-%e8%8f%9c%e5%8d%95" class="nav-menu">
|
||||
<li id="menu-item-3498"
|
||||
class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-3498">
|
||||
<a href="/">{% trans 'index' %}</a></li>
|
||||
|
||||
{% load blog_tags %}
|
||||
{% query nav_category_list parent_category=None as root_categorys %}
|
||||
{% for node in root_categorys %}
|
||||
{% include 'share_layout/nav_node.html' %}
|
||||
{% endfor %}
|
||||
{% if nav_pages %}
|
||||
{% for node in nav_pages %}
|
||||
|
||||
<li id="menu-item-{{ node.pk }}"
|
||||
class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-{{ node.pk }}">
|
||||
<a href="{{ node.get_absolute_url }}">{{ node.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children">
|
||||
|
||||
<a href="{% url "blog:archives" %}">{% trans 'Article archive' %}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav><!-- #site-navigation -->
|
||||
@ -0,0 +1,19 @@
|
||||
<li id="menu-item-{{ node.pk }}"
|
||||
class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-{{ node.pk }}">
|
||||
<a href="{{ node.get_absolute_url }}">{{ node.name }}</a>
|
||||
{% load blog_tags %}
|
||||
{% query nav_category_list parent_category=node as child_categorys %}
|
||||
{% if child_categorys %}
|
||||
|
||||
<ul class="sub-menu">
|
||||
{% for child in child_categorys %}
|
||||
{% with node=child template_name="share_layout/nav_node.html" %}
|
||||
{% include template_name %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
|
||||
Loading…
Reference in new issue