Skip to content

Commit 46185b3

Browse files
author
root
committed
My Blog
1 parent 74a9a01 commit 46185b3

File tree

26 files changed

+8320
-7083
lines changed

26 files changed

+8320
-7083
lines changed

selfblog/blog/templates/base.html

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,86 +2,78 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>{% block title %}{% endblock %}the5fire的技术博客</title>
5+
<title>{% block title %}{% endblock %} Vampire Diaries</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<meta name="description" content="{% block desc %}关于编程(java,python,js等)、设计模式、系统(linux)、开源、学习心得、工作经验–人生苦短,我用python{% endblock %}">
8-
<meta name="keywords" content="{% block keywords %}python,linux,vim,web开发,工作经验,项目实战,教程{% endblock %}">
9-
<meta name="author" content="the5fire">
7+
<meta name="description" content="{% block desc %}关于编程python心得、工作经验–人生苦短,我用python{% endblock %}">
8+
<meta name="keywords" content="{% block keywords %}python,linux,vim,web开发{% endblock %}">
9+
<meta name="author" content="Memory">
1010
<meta name="baidu-site-verification" content="L1tGNksWV2rt8zho" />
1111
<meta name="google-site-verification" content="DBmuxv3lJezFBdzrzoueLXVbY6gJ6cdbR1mroGVRiNQ" />
1212
<link rel="pingback" href="/xmlrpc/" />
13-
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
13+
<link rel="shortcut icon" href="/static/icon2.jpg" type="image/x-icon" />
1414

15-
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
15+
<link href="/static/bootstrap/css/bootstrap3.0.min.css" rel="stylesheet">
1616
<link href="/static/bootstrap/css/docs.css" rel="stylesheet">
1717
<link href="/static/blog/css/style.css" rel="stylesheet">
1818
{% block extend_style %}{% endblock %}
1919
</head>
20-
<body>
21-
<div class="navbar navbar-inverse navbar-fixed-top">
22-
<div class="navbar-inner">
20+
<body style="position: static;" data-twttr-rendered="true">
21+
<div class="navbar navbar-inverse navbar-fixed-top">
2322
<div class="container">
24-
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
23+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".bs-navbar-collapse">
2524
<span class="icon-bar"></span>
2625
<span class="icon-bar"></span>
2726
<span class="icon-bar"></span>
2827
</button>
29-
<div class="nav-collapse collapse">
30-
<ul class="nav">
31-
<li class="">
28+
<div class="collapse navbar-collapse">
29+
<ul class="nav navbar-nav">
30+
<li class="mm">
3231
<a href="/">首页</a>
3332
</li>
3433
{% for page in pages %}
35-
<li class="">
34+
<li class="mm">
3635
{% if page.link %}
3736
<a href="{{ page.link }}">{{ page.title }}</a>
3837
{% else %}
3938
<a href="/{{ page.alias }}/">{{ page.title }}</a>
4039
{% endif %}
4140
</li>
4241
{% endfor %}
43-
</ul>
42+
</ul>
43+
<form class="navbar-form pull-right" method="get" action="/">
44+
<input class="form-control" name="s" id="s" style="width: 200px;" type="text">
45+
<button type="submit" class="btn btn-default" style="color:#00bfff; font-weight:bold;">Search</button> </form>
4446
</div>
45-
<a class="brand" href="/">the5fire</a>
4647
</div>
47-
</div>
48+
<div class="nn">
49+
<a target="_blank" href="/rss"><img src="/static/feed.png"></a>
50+
<a target="_blank" href="http://weibo.com/u/2748900435"><img src="/static/weibo.png"></a>
51+
<a target="_blank" href="http://www.douban.com/people/83262705"><img src="/static/douban.png"></a>
52+
53+
<a target="_blank" href="http://www.guokr.com/i/1350953994"><img src="/static/guoke.png"></a>
54+
</div>
4855
</div>
56+
<div class="bs-header">
57+
<div class="container mylogo">
58+
<h1><a href="/">Vampire</a></h1>
59+
<h5 style="color:black;">人 生 苦 短, 我 用 <strong>Python</strong>.</h5>
4960

50-
<div class="container" id="content">
51-
<header class="" id="overview">
52-
<div class="row">
53-
<div class="span9">
54-
<h1><a href="/">the5fire的技术博客</a></h1>
55-
<div id="blogdesc">关注python、vim、linux、web开发和互联网--life is short, we need python.</div>
56-
</div>
57-
58-
<div class="span3">
59-
<div id="search_box">
60-
<form class="form-search" method="get" action="/">
61-
<input type="text" class="input-medium search-query" value="" name="s" id="s">
62-
<button type="submit" class="btn">搜索</button>
63-
</form>
64-
</div>
65-
</div>
66-
</div>
67-
</header>
68-
69-
<div class="subnav under_line">
70-
<ul class="nav nav-pills">
71-
{% for category in categories %}
72-
{% if category.is_nav %}
73-
<li><a href="/category/{{ category.alias }}/">{{ category.name }}</a></li>
74-
{% endif %}
75-
{% endfor %}
76-
</ul>
61+
<ul class="nav nav-tabs" style="margin-left:40px;">
62+
{% for category in categories %}
63+
{% if category.is_nav %}
64+
<li class="dropdown"><a href="/category/{{ category.alias }}/">{{ category.name }}</a></li>
65+
{% endif %}
66+
{% endfor %}
67+
</ul>
7768
</div>
78-
69+
</div>
70+
<div id="content" class="container">
7971
<div class="row">
80-
<div id="main" class="span9">
72+
<div id="main" class="col-lg-9">
8173
{% block main %}{% endblock %}
8274
</div>
8375

84-
<div class="sidebar span3">
76+
<div class="sidebar col-lg-3">
8577
{% include "includes/sidebar.html" %}
8678
</div>
8779
</div>

selfblog/blog/templates/detail.html

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ <h2 class="under_line">
2020
{% autoescape off %}
2121
<span>{{ post.title }}</span>
2222
{% endautoescape %}
23-
</h2>
23+
<span class="badge" style=" background:#01dfd7;">{{post.view_times}}°C</span>
24+
</h2>
2425

2526
{% if post %}
2627

@@ -31,14 +32,9 @@ <h2 class="under_line">
3132
{% for tag in post.tags_list %}
3233
<a href="/tag/{{ tag }}" rel="tag">{{ tag }}</a>&nbsp;
3334
{% endfor %}
34-
| 阅读 {{ post.view_times }} 次
3535
| 发布:{{ post.pub_time|date:"Y-m-d P" }}
36-
{% if user.is_authenticated %}
37-
<a href="/admin/blog/post/{{post.id}}/" target="_blank">edit</a>
38-
{% endif %}
3936
</div>
4037

41-
{% include 'includes/share.html' %}
4238

4339
<div class="clear"></div>
4440

@@ -54,15 +50,15 @@ <h2 class="under_line">
5450

5551
<div class="box">
5652
<div class="row">
57-
<div class="span4">
53+
<div class="col-lg-5">
5854
<b>相关文章</b>
5955
<ul>
6056
{% for item in related_posts %}
6157
<li><a href="/{{ item.alias }}.html">{{ item.title }}</a></li>
6258
{% endfor %}
6359
</ul>
6460
</div>
65-
<div class="span4">
61+
<div class="col-lg-5">
6662
<b>别人正在读</b>
6763
<ul>
6864
{% for ip, post in lru_views %}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
<footer class="footer">
2-
<div class="container">
3-
<p>版权所有 © 2010-2013 the5fire.com </p>
1+
<footer class="bs-footer">
2+
<div class="container" style="color:#aeb404;">
3+
<p>本 博 客 基 于 <a target="_blank" href="http://www.the5fire.com"><strong>the5fire</strong></a></p>
44
<p>CC BY-NC-SA 3.0</p>
55
<p>
66
Powered by <a href="http://www.djangoproject.com" target="_blank">Django</a>.
7-
Host on <a href="http://www.webfaction.com?affiliate=the5fire" target="_blank">WebFaction</a>.
87
</p>
98
<p>
10-
当前{{ online_num }}人在线,表示毫无压力
9+
当 前{{ online_num }} 人 在 线, 表 示 毫 无 压 力
1110
{% if online_num > 50 %}
1211
<strong>囧~</strong>
1312
{% endif %}
1413
{% if online_num < 10 %}
1514
<strong>汗~</strong>
1615
{% endif %}
1716
</p>
18-
<p>本页面加载耗时:<!!LOAD_TIMES!!>s</p>
17+
<p>本 页 面 加 载 耗 时 :<!!LOAD_TIMES!!>s</p>
1918
<p>
20-
<a href="/sitemap.xml">网站地图</a>
19+
<a href="/sitemap.xml">网 站 地 图</a>
2120
</p>
2221
</div>
2322
</footer>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<div class="row">
2-
<div class="btn-group span3 pull-right">
3-
<button style="height: 24px; margin-top: 4px; font-size:14px" class="btn btn-info dropdown-toggle pull-right tohide" data-toggle="dropdown"><i class="icon icon-share-alt icon-white"></i> 分享到 <span class="caret"></span></button>
4-
<ul class="dropdown-menu">
2+
<div class="bs-callout bs-callout-info">
3+
<font color="red"> 分享到: </font>
4+
<ul class="nav nav-pills">
55
<li><a target="blank" href="http://share.baidu.com/s?type=text&amp;searchPic=0&amp;sign=on&amp;to=tsina&amp;url={{ post.get_absolute_url }}&amp;title={{ post.title }}">新浪微博</a></li>
66
<li><a target="blank" href="http://share.baidu.com/s?type=text&amp;searchPic=0&amp;sign=on&amp;to=tqq&amp;url={{ post.get_absolute_url }}&amp;title={{ post.title }}">腾讯微博</a></li>
77
<li><a target="blank" href="http://s.evernote.com/grclip?url={{ post.get_absolute_url }}&amp;title={{ post.title }}">印象笔记</a></li>
88
<li><a target="blank" href="http://share.baidu.com/s?type=text&amp;searchPic=0&amp;sign=on&amp;to=douban&amp;url={{ post.get_absolute_url }}&amp;title={{ post.title }}">豆瓣</a></li>
99
<li><a target="blank" href="http://share.baidu.com/s?type=text&amp;searchPic=0&amp;sign=on&amp;to=renren&amp;url={{ post.get_absolute_url }}&amp;title={{ post.title }}">人人网</a></li>
1010
<li><a target="blank" href="http://share.baidu.com/s?type=text&amp;searchPic=0&amp;sign=on&amp;to=qzone&amp;url={{ post.get_absolute_url }}&amp;title={{ post.title }}">QQ空间</a></li>
1111
<li class="divider"></li>
12-
<li><a href="mailto:?subject=[the5fire]好文分享:{{ post.title }}&amp;body={{ post.get_absolute_url }}">E-Mail</a></li>
12+
<li><a href="mailto:?subject=[Memory]好文分享:{{ post.title }}&amp;body={{ post.get_absolute_url }}">E-Mail</a></li>
1313
</ul>
1414
</div>
1515
</div>

selfblog/blog/templates/includes/sidebar.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<div class="widget">
1+
<div class="widget bs-sidebar">
22
{% for widget in widgets %}
33
{% if widget.content == 'recently_post'%}
44
<h3 class="under_line">{{ widget.title }}</h3>
5-
<div class="textwidget">
6-
<ul>
5+
<div class="textwidget">
6+
<ul class="links">
77
{% with r_posts=recently_posts %}
88
{% if r_posts %}
99
{% for post in r_posts %}
@@ -14,11 +14,11 @@ <h3 class="under_line">{{ widget.title }}</h3>
1414
{% endif %}
1515
{% endwith %}
1616
</ul>
17-
</div>
17+
</div>
1818
{% else %}{% if widget.content == 'hot_post' %}
1919
<h3 class="under_line">{{ widget.title }}</h3>
2020
<div class="textwidget">
21-
<ul>
21+
<ul class="links">
2222
{% with h_posts=hot_posts %}
2323
{% if h_posts %}
2424
{% for post in h_posts %}

selfblog/blog/templates/index.html

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,21 @@
99
{% with post_list=posts.object_list %}
1010
{% if post_list %}
1111
{% for post in post_list %}
12-
<div class="article">
13-
<h2 class='under_line'>
14-
<a href="{{ post.get_absolute_url }}" rel="bookmark" title="详细阅读 {{ post.title }}">
15-
{% autoescape off %}{{ post.title }}{% endautoescape %}
16-
</a>
17-
</h2>
12+
<div class="caption" style="margin-left:-70px;">
13+
<h3 class='under_line'>
14+
<a href="{{ post.get_absolute_url }}" rel="bookmark" title="详细阅读 {{ post.title }}" >{% autoescape off %}{{ post.title }}{% endautoescape %}</a>
15+
<span class="badge" style=" background:#01dfd7;">{{post.view_times}}°C</span>
16+
</h3>
1817
<div class="info">
19-
作者:the5fire
20-
| 分类:<a href="/category/{{ post.category.alias }}" title="查看 post.category.name 中的全部文章" rel="category tag">{{ post.category.name }}</a>
18+
分类:<a href="/category/{{ post.category.alias }}" title="查看 post.category.name 中的全部文章" rel="category tag">{{ post.category.name }}</a>
2119
| 标签:
2220
{% for tag in post.tags_list %}
2321
<a href="/tag/{{ tag }}" rel="tag">{{ tag.strip }}</a>&nbsp;
2422
{% endfor %}
25-
| 阅读 {{ post.view_times }} 次
2623
| 发布:{{ post.pub_time|date:"Y-m-d P" }}
27-
{% if user.is_authenticated %}
28-
<a href="/admin/blog/post/{{post.id}}/" target="_blank">edit</a>
29-
{% endif %}
3024
</div>
31-
3225
<div class="clear"></div>
33-
26+
<br >
3427
<div class="entry_post">
3528
<span>
3629
<p>
@@ -39,18 +32,16 @@ <h2 class='under_line'>
3932
{% endautoescape %}
4033
</p>
4134
</span>
42-
<span class="pull-right"><a href="{{ post.get_absolute_url }}" title="{{ post.title }}" rel="bookmark">阅读全文</a></span>
4335
</div>
44-
45-
<div class="clear"></div>
46-
</div>
47-
<div class="clear"></div>
36+
<div class="clear"></div>
37+
</div>
38+
<div class="clear"></div>
4839
{% endfor %}
4940
{% endif %}
5041
{% endwith %}
5142
<hr/>
5243
<div class="pagination pagination-centered pagination-small">
53-
<ul>
44+
<ul class="pagination">
5445
{% if posts.number <= 1 %}
5546
<li class="disabled"><a>上一页</a></li>
5647
{% else %}

selfblog/feeds.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class LatestEntriesFeed(Feed):
2424
feed_type = ExtendedRSSFeed
2525

2626
# Elements for the top-level, channel.
27-
title = u"the5fire的技术博客"
28-
link = "http://www.the5fire.com"
29-
author = 'the5fire'
30-
description = u"关注python、vim、linux、web开发和互联网--life is short, we need python."
27+
title = u"Vampire Diaries"
28+
link = "http://www.virtualenv.net"
29+
author = 'Vampire'
30+
description = u"life is short, we need python."
3131

3232
def items(self):
3333
return Post.objects.filter(status=0).order_by('-create_time')[:10]

selfblog/selfblog/settings.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
11
#coding:utf-8
22
# Django settings for selfblog project.
33
from os import path
4-
from platform import platform
5-
if 'centos' in platform():
6-
DEBUG = False
7-
else:
8-
DEBUG = True
4+
DEBUG = True
95
TEMPLATE_DEBUG = DEBUG
106

117
ROOT_PATH = path.abspath(path.join(path.dirname('settings.py'), path.pardir))
128

139
ADMINS = (
14-
('the5fire', 'thefivefire@gmail.com'),
10+
('thetwenty', 'thetwenty@163.com'),
1511
)
16-
ALLOWED_HOSTS = ['localhost', '.the5fire.com']
12+
ALLOWED_HOSTS = ['localhost', '.virtualenv.net']
1713

1814
MANAGERS = ADMINS
1915

2016
if DEBUG:
2117
DOMAIN = 'http://localhost:8000'
22-
DB_NAME = 'selfblog.sqlite3'
18+
DB_NAME = 'mydb'
2319
DB_USER = 'root'
24-
DB_PWD = 'root'
20+
DB_PWD = 'huyiyang'
2521
else:
26-
DOMAIN = 'http://www.the5fire.com'
22+
DOMAIN = 'http://www.virtualenv.net'
2723
DB_NAME = 'mydb'
28-
DB_USER = 'the5fire'
29-
DB_PWD = 'the5fire'
24+
DB_USER = 'thetwenty'
25+
DB_PWD = 'huyiyang'
3026

3127
DATABASES = {
3228
'default': {
33-
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
29+
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
3430
'NAME': DB_NAME, # Or path to database file if using sqlite3.
3531
'USER': DB_USER, # Not used with sqlite3.
3632
'PASSWORD': DB_PWD, # Not used with sqlite3.
@@ -151,7 +147,7 @@
151147
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ('debug_toolbar.middleware.DebugToolbarMiddleware', )
152148
LOG_FILE = '/tmp/blog.log'
153149
else:
154-
LOG_FILE = '/home/the5fire/virtualenvs/bloga/logs/all.log'
150+
LOG_FILE = '/home/thetwenty/virtualenvs/bloga/logs/all.log'
155151

156152
LOGGING = {
157153
'version': 1,
@@ -243,5 +239,5 @@
243239
FIF_MIN = 15 * 60
244240
FIVE_MIN = 5 * 60
245241

246-
DUOSHUO_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxx'
247-
DUOSHUO_SHORT_NAME = 'xxxxxxxx'
242+
DUOSHUO_SECRET = '7b49d27c2a8b5dcae2fe9a56fcbbf940'
243+
DUOSHUO_SHORT_NAME = 'virtualenv'

selfblog/static/QQ.gif

2.15 KB
Loading

0 commit comments

Comments
 (0)