完成侧边栏及面包屑等功能,待完善..

master
车亮亮 9 years ago
parent 4fda5eb342
commit d2aa71b9ea

@ -35,6 +35,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'pagedown',
'blog',
'accounts',
'comments'
@ -85,7 +86,7 @@ DATABASES = {
'NAME': 'djangoblog',
'USER': 'root',
'PASSWORD': 'root',
'HOST': '127.0.0.1',
'HOST': '192.168.33.10',
'PORT': 3306,
}
}

@ -1,8 +1,24 @@
from django.contrib import admin
# Register your models here.
from .models import Article,Category,Tag
from .models import Article, Category, Tag, Links
from pagedown.widgets import AdminPagedownWidget
from django import forms
admin.site.register(Article)
class ArticleForm(forms.ModelForm):
body = forms.CharField(widget=AdminPagedownWidget())
class Meta:
model = Article
fields = '__all__'
class ArticlelAdmin(admin.ModelAdmin):
form = ArticleForm
admin.site.register(Article, ArticlelAdmin)
admin.site.register(Category)
admin.site.register(Tag)
admin.site.register(Links)

@ -19,5 +19,6 @@ from django.conf import settings
def seo_processor(requests):
return {
'SITE_NAME': settings.SITE_NAME,
'SITE_DESCRIPTION': settings.SITE_DESCRIPTION
'SITE_DESCRIPTION': settings.SITE_DESCRIPTION,
'SITE_BASE_URL':'http://'+ requests.get_host() + '/',
}

@ -4,18 +4,23 @@ from django.conf import settings
class Article(models.Model):
"""文章"""
STATUS_CHOICES = (
('d', '草稿'),
('p', '发表'),
)
COMMENT_STATUS = (
('o', '打开'),
('c', '关闭'),
)
title = models.CharField('标题', max_length=200)
body = models.TextField('正文')
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
pub_time = models.DateTimeField('发布时间', blank=True, null=True,
help_text="不指定发布时间则视为草稿,可以指定未来时间,到时将自动发布。")
status = models.CharField('文章状态', max_length=1, choices=STATUS_CHOICES)
status = models.CharField('文章状态', max_length=1, choices=STATUS_CHOICES, default='o')
commentstatus = models.CharField('评论状态', max_length=1, choices=COMMENT_STATUS)
summary = models.CharField('摘要', max_length=200, blank=True, help_text="可选若为空将摘取正文的前300个字符。")
views = models.PositiveIntegerField('浏览量', default=0)
author = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='作者', on_delete=models.CASCADE)
@ -55,6 +60,7 @@ class Article(models.Model):
class Category(models.Model):
"""文章分类"""
name = models.CharField('分类名', max_length=30)
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
@ -73,6 +79,7 @@ class Category(models.Model):
class Tag(models.Model):
"""文章标签"""
name = models.CharField('标签名', max_length=30)
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
@ -90,3 +97,20 @@ class Tag(models.Model):
ordering = ['name']
verbose_name = "标签"
verbose_name_plural = verbose_name
class Links(models.Model):
"""友情链接"""
name = models.CharField('链接名称', max_length=30)
link = models.URLField('链接地址')
sequence = models.IntegerField('排序', unique=True)
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
class Meta:
ordering = ['sequence']
verbose_name = '友情链接'
verbose_name_plural = verbose_name
def __str__(self):
return self.name

File diff suppressed because it is too large Load Diff

@ -19,7 +19,7 @@ import markdown2
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
import random
from blog.models import Article, Category, Tag
from blog.models import Article, Category, Tag, Links
from django.utils.encoding import force_text
register = template.Library()
@ -58,18 +58,21 @@ def custom_markdown(content):
"""
@register.inclusion_tag('blog/breadcrumb.html')
def parsecategoryname(article):
@register.inclusion_tag('blog/tags/breadcrumb.html')
def load_breadcrumb(article):
names = article.get_category_tree()
names.append((settings.SITE_NAME, 'http://127.0.0.1:8000'))
names = names[::-1]
print(names)
return {'names': names}
return {
'names': names,
'title': article.title
}
@register.inclusion_tag('blog/articletaglist.html')
def loadarticletags(article):
@register.inclusion_tag('blog/tags/articletaglist.html')
def load_articletags(article):
tags = article.tags.all()
tags_list = []
for tag in tags:
@ -83,24 +86,25 @@ def loadarticletags(article):
}
@register.inclusion_tag('blog/sidebar.html')
def loadsidebartags():
@register.inclusion_tag('blog/tags/sidebar.html')
def load_sidebar():
recent_articles = Article.objects.filter(status='p')[:settings.SIDEBAR_ARTICLE_COUNT]
sidebar_categorys = Category.objects.all()
most_read_articles = Article.objects.filter(status='p').order_by('-views')[:settings.SIDEBAR_ARTICLE_COUNT]
dates = Article.objects.datetimes('created_time', 'month', order='DESC')
print(dates)
links = Links.objects.all()
# tags=
return {
'recent_articles': recent_articles,
'sidebar_categorys': sidebar_categorys,
'most_read_articles': most_read_articles,
'article_dates': dates
'article_dates': dates,
'sidabar_links': links
}
@register.inclusion_tag('blog/tags/article_meta_info.html')
def loadarticlemetas(article):
def load_article_metas(article):
return {
'article': article
}

@ -10,6 +10,7 @@ from django.conf import settings
import markdown
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django.core.exceptions import ObjectDoesNotExist
class ArticleListView(ListView):
@ -19,8 +20,8 @@ class ArticleListView(ListView):
# context_object_name属性用于给上下文变量取名在模板中使用该名字
context_object_name = 'article_list'
def __init__(self):
self.page_description = ''
# 页面类型,分类目录或标签列表等
page_type = ''
class IndexView(ArticleListView):
@ -46,36 +47,56 @@ class ArticleDetailView(DetailView):
# obj.body = markdown2.markdown(obj.body)
return obj
def get_context_data(self, **kwargs):
articleid = int(self.kwargs['article_id'])
def get_article(id):
try:
return Article.objects.get(pk=id)
except ObjectDoesNotExist:
return None
next_article = get_article(articleid + 1)
prev_article = get_article(articleid - 1)
kwargs['next_article'] = next_article
kwargs['prev_article'] = prev_article
return super(ArticleDetailView, self).get_context_data(**kwargs)
class CategoryDetailView(ArticleListView):
# template_name = 'index.html'
# context_object_name = 'article_list'
# pk_url_kwarg = 'article_name'
page_type = "分类目录归档"
def get_queryset(self):
categoryname = self.kwargs['category_name']
# print(categoryname)
self.page_description = '分类目录归档: %s ' % categoryname
article_list = Article.objects.filter(category__name=categoryname, status='p')
return article_list
def get_context_data(self, **kwargs):
# 增加额外的数据
kwargs['page_description'] = self.page_description
categoryname = self.kwargs['category_name']
kwargs['page_type'] = CategoryDetailView.page_type
kwargs['tag_name'] = categoryname
return super(CategoryDetailView, self).get_context_data(**kwargs)
class AuthorDetailView(ArticleListView):
page_type = '作者文章归档'
def get_queryset(self):
author_name = self.kwargs['author_name']
self.page_description = '作者文章归档: %s ' % author_name
article_list = Article.objects.filter(author__username=author_name)
return article_list
def get_context_data(self, **kwargs):
kwargs['page_description'] = self.page_description
author_name = self.kwargs['author_name']
kwargs['page_type'] = AuthorDetailView.page_type
kwargs['tag_name'] = author_name
return super(AuthorDetailView, self).get_context_data(**kwargs)
@ -91,12 +112,16 @@ class TagListView(ListView):
class TagDetailView(ArticleListView):
page_type = '分类标签归档'
def get_queryset(self):
tag_name = self.kwargs['tag_name']
self.page_description = '分类标签: %s ' % tag_name
article_list = Article.objects.filter(tags__name=tag_name)
return article_list
def get_context_data(self, **kwargs):
kwargs['page_description'] = self.page_description
tag_name = self.kwargs['tag_name']
kwargs['page_type'] = TagDetailView.page_type
kwargs['tag_name'] = tag_name
return super(TagDetailView, self).get_context_data(**kwargs)

@ -11,8 +11,8 @@ class Comment(models.Model):
created_time = models.DateTimeField('创建时间', auto_now_add=True)
last_mod_time = models.DateTimeField('修改时间', auto_now=True)
author = models.ForeignKey(settings.AUTH_USER_MODEL, verbose_name='作者', on_delete=models.CASCADE)
article = models.ForeignKey(Article, verbose_name='文章', on_delete=models.CASCADE)
parant_comment = models.ForeignKey('self', verbose_name="上级评论", blank=True, null=True)
class Meta:
ordering = ['created_time']

@ -25,3 +25,10 @@ register = template.Library()
def GetCommentCount(parser, token):
commentcount = Comment.objects.filter(article__author_id=token).count()
return "0" if commentcount == 0 else str(commentcount) + " comments"
@register.inclusion_tag('comments/tags/post_comment.html')
def load_post_comment(article):
return {
'article': article
}

@ -39,14 +39,14 @@
<script type='text/javascript' src='{% static 'blog/js/jquery.js' %}' defer='defer'></script>
<script type='text/javascript' src='{% static 'blog/js/jquery-migrate.min.js' %}' defer='defer'></script>
<style type="text/css" id="syntaxhighlighteranchor"></style>
</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="https://www.lylinux.org/" title="逝去日子的博客" rel="home">逝去日子的博客</a></h1>
<h1 class="site-title"><a href="{{ SITE_BASE_URL }}" title="{{ SITE_NAME }}" rel="home">{{ SITE_NAME }}</a></h1>
<h2 class="site-description">大巧无工,重剑无锋</h2>
</hgroup>
@ -145,101 +145,12 @@
</div>
<script> var commentPositionId = '.ds-comments:last';
var wpAutoTopSpeed = 1;</script>
<style>
#wp-auto-top {
position: fixed;
top: 45%;
right: 50%;
display: block;
margin-right: -540px;
z-index: 9999;
}
#wp-auto-top-top, #wp-auto-top-comment, #wp-auto-top-bottom {
background: url(https://www.lylinux.org/wp-content/plugins/wp-auto-top/img/1.png) no-repeat;
position: relative;
cursor: pointer;
height: 25px;
width: 29px;
margin: 10px 0 0;
}
#wp-auto-top-comment {
background-position: left -30px;
height: 32px;
}
#wp-auto-top-bottom {
background-position: left -68px;
}
#wp-auto-top-comment:hover {
background-position: right -30px;
}
#wp-auto-top-top:hover {
background-position: right 0;
}
#wp-auto-top-bottom:hover {
background-position: right -68px;
}
</style>
<div id="su-footer-links" style="text-align: center;"></div>
<link rel='stylesheet' id='wp-markdown-prettify-css'
href='https://www.lylinux.org/wp-content/plugins/wp-markdown/css/prettify.css?ver=1.5.1' type='text/css'
media='all'/>
<script type='text/javascript'>
/* <![CDATA[ */
var JQLBSettings = {
"fitToScreen": "1",
"resizeSpeed": "400",
"displayDownloadLink": "0",
"navbarOnTop": "0",
"loopImages": "",
"resizeCenter": "",
"marginSize": "0",
"linkTarget": "_self",
"help": "",
"prevLinkTitle": "previous image",
"nextLinkTitle": "next image",
"prevLinkText": "\u00ab Previous",
"nextLinkText": "Next \u00bb",
"closeTitle": "close image gallery",
"image": "Image ",
"of": " of ",
"download": "Download",
"jqlb_overlay_opacity": "80",
"jqlb_overlay_color": "#000000",
"jqlb_overlay_close": "1",
"jqlb_border_width": "10",
"jqlb_border_color": "#ffffff",
"jqlb_border_radius": "0",
"jqlb_image_info_background_transparency": "100",
"jqlb_image_info_bg_color": "#ffffff",
"jqlb_image_info_text_color": "#000000",
"jqlb_image_info_text_fontsize": "10",
"jqlb_show_text_for_image": "1",
"jqlb_next_image_title": "next image",
"jqlb_previous_image_title": "previous image",
"jqlb_next_button_image": "https:\/\/www.lylinux.org\/wp-content\/plugins\/wp-lightbox-2\/styles\/images\/next.gif",
"jqlb_previous_button_image": "https:\/\/www.lylinux.org\/wp-content\/plugins\/wp-lightbox-2\/styles\/images\/prev.gif",
"jqlb_maximum_width": "",
"jqlb_maximum_height": "",
"jqlb_show_close_button": "1",
"jqlb_close_image_title": "close image gallery",
"jqlb_close_image_max_heght": "22",
"jqlb_image_for_close_lightbox": "https:\/\/www.lylinux.org\/wp-content\/plugins\/wp-lightbox-2\/styles\/images\/closelabel.gif",
"jqlb_keyboard_navigation": "1",
"jqlb_popup_size_fix": "0"
};
/* ]]> */
</script>
<script type='text/javascript'
src='https://www.lylinux.org/wp-content/themes/twentytwelve/js/navigation.js?ver=20140711'
defer='defer'></script>
<script type="application/javascript" src="{% static 'blog/js/navigation.js' %}" defer="defer"></script>
<link href="{% static 'highlight/styles/github-gist.css' %}" rel="stylesheet">
<script type="application/javascript" src="{% static 'highlight/highlight.pack.js' %}"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>

@ -6,21 +6,37 @@
<div id="content" role="main">
{% load_article_detail article False %}
<nav id="nav-below" class="navigation" role="navigation">
{% comment %}<nav id="nav-below" class="navigation" role="navigation">
<h3 class="assistive-text">文章导航</h3>
<div class="nav-previous"><a href="https://www.lylinux.org/page/2"><span
class="meta-nav">&larr;</span> 早期文章</a></div>
<div class="nav-next"></div>
</nav><!-- .navigation -->
</nav><!-- .navigation -->{% endcomment %}
<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">&larr;</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">&rarr;</span></a></span>
{% endif %}
</nav><!-- .nav-single -->
{% if article.commentstatus == "o" %}
{% load comments_tags %}
{% load_post_comment article %}
{% endif %}
</div><!-- #content -->
</div><!-- #primary -->
{% endblock %}
{% block sidebar %}
{% loadsidebartags %}
{% load_sidebar %}
{% endblock %}

@ -1,11 +0,0 @@
<ol class="breadcrumb">
{% for name,url in names %}
<li>
<a href="{{ url }}">
{{ name }}
</a>
</li>
{% endfor %}
</ol>

@ -4,51 +4,17 @@
{% block content %}
<div id="primary" class="site-content">
<div id="content" role="main">
{% for article in article_list %}
{% load_article_detail article True %}
{% comment %} <article id="post-{{ article.pk }}"
class="post-3815 post type-post status-publish format-standard hentry category-python tag-python">
<header class="entry-header">
<h1 class="entry-title">
<a href="{{ article.get_absolute_url }}"
rel="bookmark">{{ article.title }}</a>
</h1>
<div class="comments-link">
<a href="{{ article.get_absolute_url }}"
class="ds-thread-count" data-thread-key="3815" rel="nofollow"><span class="leave-reply">发表评论</span></a>
<div style="float:right">
{{ article.views }} views
</div>
</div><!-- .comments-link -->
<br/>
<style type="text/css">
.breadcrumb
div {
display: inline;
font-size: 13px;
margin-left: -3px;
}
</style>
{% if page_type and tag_name %}
<header class="archive-header">
</header><!-- .entry-header -->
<h1 class="archive-title">{{ page_type }}<span>{{ tag_name }}</span></h1>
</header><!-- .archive-header -->
{% endif %}
<div class="entry-content">
{{ article.summary|custom_markdown }}
<p class='read-more'><a
href=' {{ article.get_absolute_url }}'>Read more</a></p>
</div><!-- .entry-content -->
{% loadarticlemetas article %}
</article><!-- #post -->{% endcomment %}
{% for article in article_list %}
{% load_article_detail article True %}
{% endfor %}
<nav id="nav-below" class="navigation" role="navigation">
<h3 class="assistive-text">文章导航</h3>
<div class="nav-previous"><a href="https://www.lylinux.org/page/2"><span
@ -63,7 +29,7 @@
{% block sidebar %}
{% loadsidebartags %}
{% load_sidebar %}
{% endblock %}

@ -1,136 +0,0 @@
<div id="secondary" class="widget-area" role="complementary">
<aside id="search-2" class="widget widget_search">
<form role="search" method="get" id="searchform" class="searchform" action="https://www.lylinux.org/">
<div>
<label class="screen-reader-text" for="s">搜索</label>
<input type="text" value="" name="s" id="s"/>
<input type="submit" id="searchsubmit" value="搜索"/>
</div>
</form>
</aside>
<aside id="views-4" class="widget widget_views"><h3 class="widget-title">Views</h3>
<ul>
<li>
<a href="https://www.lylinux.org/%e4%bd%bf%e7%94%a8chromegoagent-switchysharp%e7%bf%bb%e5%a2%99%e8%af%a6%e7%bb%86%e8%ae%b2%e8%a7%a3.html"
title="使用chrome+goagent+ SwitchySharp翻墙详细讲解">使用chrome+goagent+ SwitchySharp翻墙详细讲解</a> -
30,226 views
</li>
<li>
<a href="https://www.lylinux.org/ubuntu-12-04-server-installation-the-vsftpd-tips-530-login-incorrect.html"
title="ubuntu 12.04 server 安装vsftpd提示530 Login incorrect">ubuntu 12.04 server 安装vsftpd提示530
Login incorrect</a> - 22,367 views
</li>
<li><a href="https://www.lylinux.org/android-phones-goagent-agent-scientific-internet.html"
title="安卓手机使用goagent代理科学上网">安卓手机使用goagent代理科学上网</a> - 19,344 views
</li>
<li>
<a href="https://www.lylinux.org/ubuntu-12-04%e4%b8%ad%e5%8d%95%e7%bd%91%e5%8d%a1%e9%83%a8%e7%bd%b2openstack.html"
title="ubuntu 12.04中单网卡部署openstack">ubuntu 12.04中单网卡部署openstack</a> - 19,086 views
</li>
<li>
<a href="https://www.lylinux.org/%e6%9c%80%e6%96%b0hosts%e4%b8%8b%e8%bd%bd-%e4%ba%b2%e6%b5%8b%e5%8f%af%e4%bb%a5%e8%a7%82%e7%9c%8byoutube%ef%bc%8c%e7%99%bb%e9%99%86facebook.html"
title="最新hosts下载 亲测可以观看youtube登陆facebook">最新hosts下载 亲测可以观看youtube登陆facebook</a> - 18,138
views
</li>
<li>
<a href="https://www.lylinux.org/ubuntu12-04%e4%b8%ad%e6%90%ad%e5%bb%bamail%e9%82%ae%e4%bb%b6%e6%9c%8d%e5%8a%a1%e5%99%a8.html"
title="ubuntu12.04中搭建mail邮件服务器">ubuntu12.04中搭建mail邮件服务器</a> - 15,584 views
</li>
<li><a href="https://www.lylinux.org/delete.html" title="delete *.*">delete *.*</a> - 15,136 views
</li>
<li>
<a href="https://www.lylinux.org/article-views-of-the-wp-postviews-blog-statistics-plug-ins.html"
title="WP-PostViews 博客文章浏览数统计插件">WP-PostViews 博客文章浏览数统计插件</a> - 15,066 views
</li>
<li>
<a href="https://www.lylinux.org/ubuntu12-04%e6%9c%ac%e5%9c%b0%e6%90%ad%e5%bb%baubuntu%e6%9b%b4%e6%96%b0%e6%ba%90.html"
title="ubuntu12.04本地搭建ubuntu更新源">ubuntu12.04本地搭建ubuntu更新源</a> - 14,652 views
</li>
<li>
<a href="https://www.lylinux.org/spring%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e4%b8%adbean%e5%b1%9e%e6%80%a7%e9%85%8d%e7%bd%ae.html"
title="Spring配置文件中bean属性配置">Spring配置文件中bean属性配置</a> - 13,831 views
</li>
</ul>
</aside>
<aside id="su_siloed_terms-2" class="widget widget_su_siloed_terms"><h3 class="widget-title">分类目录</h3>
<ul>
<li class="cat-item cat-item-2"><a href="https://www.lylinux.org/category/linux">linux</a>
</li>
<li class="cat-item cat-item-184"><a href="https://www.lylinux.org/category/mac">Mac</a>
</li>
<li class="cat-item cat-item-3"><a href="https://www.lylinux.org/category/wordpress">wordpress</a>
</li>
<li class="cat-item cat-item-6"><a
href="https://www.lylinux.org/category/%e7%a8%8b%e5%ba%8f%e7%8c%bf%e4%b9%8b%e8%b7%af">程序猿之路</a>
</li>
<li class="cat-item cat-item-7"><a
href="https://www.lylinux.org/category/%e9%9a%8f%e7%ac%94%e6%9d%82%e8%b0%88">随笔杂谈</a>
</li>
</ul>
</aside>
<aside id="ds-recent-comments-4" class="widget ds-widget-recent-comments"><h3 class="widget-title">近期评论</h3>
<ul class="ds-recent-comments" data-num-items="5" data-show-avatars="1" data-show-time="1"
data-show-title="1" data-show-admin="1" data-avatar-size="30" data-excerpt-length="70"></ul>
</aside>
<script>
if (typeof DUOSHUO !== 'undefined')
DUOSHUO.RecentComments && DUOSHUO.RecentComments('.ds-recent-comments');
</script>
<script type="text/javascript">
var duoshuoQuery = {
"short_name": "mylylinux1",
"sso": {
"login": "https:\/\/www.lylinux.org\/wp-login.php?action=duoshuo_login",
"logout": "https:\/\/www.lylinux.org\/wp-login.php?action=logout&_wpnonce=eb081a0158"
},
"theme": "default",
"stylePatch": "wordpress\/Twenty_Twelve"
};
duoshuoQuery.sso.login += '&redirect_to=' + encodeURIComponent(window.location.href);
duoshuoQuery.sso.logout += '&redirect_to=' + encodeURIComponent(window.location.href);
(function () {
var ds = document.createElement('script');
ds.type = 'text/javascript';
ds.async = true;
ds.charset = 'UTF-8';
ds.src = 'https://www.lylinux.org/duoshuo/embed.php';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<aside id="recent-posts-2" class="widget widget_recent_entries"><h3 class="widget-title">近期文章</h3>
<ul>
<li>
<a href="https://www.lylinux.org/%e4%bd%bf%e7%94%a8python%e7%88%ac%e5%8f%96%e6%9c%ac%e5%9c%b0%e9%9f%b3%e4%b9%90%e4%b8%8b%e8%bd%bd%e6%ad%8c%e8%af%8d%e5%b5%8c%e5%85%a5%e9%9f%b3%e4%b9%90.html">使用python爬取本地音乐下载歌词嵌入音乐</a>
</li>
<li>
<a href="https://www.lylinux.org/ubuntu%e6%9b%b4%e6%96%b0%e6%8f%90%e7%a4%bakey%e9%94%99%e8%af%af%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95.html">ubuntu更新提示key错误解决办法</a>
</li>
<li>
<a href="https://www.lylinux.org/ubuntu%e5%ae%89%e8%a3%85ngrok%e5%b9%b6%e4%bd%bf%e7%94%a8nginx%e4%bb%a3%e7%90%86.html">ubuntu安装ngrok并使用nginx代理</a>
</li>
<li>
<a href="https://www.lylinux.org/c%e4%bd%bf%e7%94%a8rsa%e7%ad%be%e5%90%8d%e4%b8%8e%e9%aa%8c%e7%ad%be.html">C#使用RSA签名与验签</a>
</li>
<li>
<a href="https://www.lylinux.org/ubuntu%e4%b8%8b%e7%bc%96%e8%af%91nginx%e7%9a%84rtmp%e7%9b%b4%e6%92%ad%e6%a8%a1%e5%9d%97.html">Ubuntu下编译Nginx的RTMP直播模块</a>
</li>
</ul>
</aside>
<aside id="linkcat-0" class="widget widget_links"><h3 class="widget-title">书签</h3>
<ul class='xoxo blogroll'>
<li><a href="http://www.db89.org/" target="_blank">DuBin&#039;s Blog</a></li>
<li><a href="http://jovesky.com/" target="_blank">Jove</a></li>
<li><a href="http://20xue.com/" target="_blank">Quicl&#8217;s Blog</a></li>
<li><a href="http://www.infxa.com/" target="_blank">光明家具官网</a></li>
<li><a href="http://www.xboyang.com/" target="_blank">博洋家纺</a></li>
<li><a href="http://www.ningdetang.com/" target="_blank">宁德堂</a></li>
<li><a href="http://www.mannifen.net/" target="_blank">曼妮芬旗舰店</a></li>
<li><a href="http://www.duoladuoshang.net/" target="_blank">朵拉朵尚旗舰店</a></li>
<li><a href="http://www.erro.cn/" target="_blank">爱的回归线</a></li>
<li><a href="http://www.s0nnet.com/" target="_blank">独木の白帆</a></li>
<li><a href="http://www.ishengyu.com/" target="_blank">盛宇家纺旗舰店</a></li>
</ul>
</aside>
</div><!-- #secondary -->

@ -15,18 +15,9 @@
</div>
</div><!-- .comments-link -->
<br/>
<style type="text/css">
.breadcrumb
div {
display: inline;
font-size: 13px;
margin-left: -3px;
}
</style>
{% if not isindex %}
{% load_breadcrumb article %}
{% endif %}
</header><!-- .entry-header -->
<div class="entry-content">
@ -39,5 +30,5 @@
{% endif %}
</div><!-- .entry-content -->
{% loadarticlemetas article %}
{% load_article_metas article %}
</article><!-- #post -->

@ -9,7 +9,7 @@
属于<a href="{{ article.category.get_absolute_url }}" rel="category tag">{{ article.category.name }}</a>分类
{% if article.tags.all %}
被贴了
{% comment %}<a href="https://www.lylinux.org/tag/python" rel="tag">python</a>{% endcomment %}
{% for t in article.tags.all %}
<a href="#" rel="tag">{{ t.name }}</a>
{% if t != article.tags.all.last %}
@ -20,7 +20,7 @@
标签
{% endif %}
<span class="by-author">作者是<span class="author vcard"><a class="url fn n"
href="https://www.lylinux.org/author/admin"
href="#"
title="查看所有由{{ article.author.username }}发布的文章"
rel="author">
{{ article.author.username }}

@ -0,0 +1,14 @@
<div class="breadcrumb">
{% for name,url in names %}
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="{{ url }}" itemprop="url">
<span itemprop="title"> {{ name }}</span>
</a>&nbsp;&rsaquo;
</div>
{% endfor %}
{{ title }}
</div>

@ -0,0 +1,65 @@
<div id="secondary" class="widget-area" role="complementary">
<aside id="search-2" class="widget widget_search">
<form role="search" method="get" id="searchform" class="searchform" action="https://www.lylinux.org/">
<div>
<label class="screen-reader-text" for="s">搜索</label>
<input type="text" value="" name="s" id="s"/>
<input type="submit" id="searchsubmit" value="搜索"/>
</div>
</form>
</aside>
{% if most_read_articles %}
<aside id="views-4" class="widget widget_views"><h3 class="widget-title">Views</h3>
<ul>
{% for a in most_read_articles %}
<li>
<a href="{{ a.get_absolute_url }}" title="{{ a.title }}">
{{ a.title }}
</a> - {{ a.views }} views
</li>
{% endfor %}
</ul>
</aside>
{% endif %}
{% if sidebar_categorys %}
<aside id="su_siloed_terms-2" class="widget widget_su_siloed_terms"><h3 class="widget-title">分类目录</h3>
<ul>
{% for c in sidebar_categorys %}
<li class="cat-item cat-item-184"><a href={{ c.get_absolute_url }}>{{ c.name }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endif %}
<aside id="ds-recent-comments-4" class="widget ds-widget-recent-comments"><h3 class="widget-title">近期评论</h3>
{% comment %}<ul class="ds-recent-comments" data-num-items="5" data-show-avatars="1" data-show-time="1"
data-show-title="1" data-show-admin="1" data-avatar-size="30" data-excerpt-length="70"></ul>{% endcomment %}
</aside>
{% if recent_articles %}
<aside id="recent-posts-2" class="widget widget_recent_entries"><h3 class="widget-title">近期文章</h3>
<ul>
{% for a in recent_articles %}
<li><a href="{{ a.get_absolute_url }}" title="{{ a.title }}">
{{ a.title }}
</a></li>
{% endfor %}
</ul>
</aside>
{% endif %}
{% if sidabar_links %}
<aside id="linkcat-0" class="widget widget_links"><h3 class="widget-title">书签</h3>
<ul class='xoxo blogroll'>
{% for l in sidabar_links %}
<li>
<a href="{{ l.link }}" target="_blank" title="{{ l.name }}">{{ l.name }}</a>
</li>
{% endfor %}
</ul>
</aside>
{% endif %}
</div><!-- #secondary -->

@ -0,0 +1,35 @@
<div id="comments" class="comments-area">
<div id="respond" class="comment-respond">
<h3 id="reply-title" class="comment-reply-title">发表评论
<small><a rel="nofollow" id="cancel-comment-reply-link" href="/wordpress/?p=3786#respond"
style="display:none;">取消回复</a></small>
</h3>
<form action="#" method="post" id="commentform"
class="comment-form">
<p class="comment-notes"><span id="email-notes">电子邮件地址不会被公开</span> 必填项已用<span class="required">*</span>标注
</p>
<p class="comment-form-comment"><label for="comment">评论</label> <textarea id="comment" name="comment"
cols="45" rows="8"
maxlength="65525"
aria-required="true"
required="required"></textarea>
</p>
<p class="comment-form-author"><label for="author">姓名 <span class="required">*</span></label> <input
id="author" name="author" type="text" value="" size="30" maxlength="245" aria-required='true'
required='required'/></p>
<p class="comment-form-email"><label for="email">电子邮件 <span class="required">*</span></label> <input
id="email" name="email" type="text" value="" size="30" maxlength="100"
aria-describedby="email-notes" aria-required='true' required='required'/></p>
<p class="comment-form-url"><label for="url">站点</label> <input id="url" name="url" type="text" value=""
size="30" maxlength="200"/></p>
<p class="form-submit"><input name="submit" type="submit" id="submit" class="submit" value="发表评论"/> <input
type='hidden' name='comment_post_ID' value='3786' id='comment_post_ID'/>
<input type='hidden' name='comment_parent' id='comment_parent' value='0'/>
</p>
<p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce"
value="0767785ef9"/></p>
<p style="display: none;"><input type="hidden" id="ak_js" name="ak_js" value="238"/></p></form>
</div><!-- #respond -->
</div><!-- #comments .comments-area -->
Loading…
Cancel
Save