├── .gitignore ├── README.md ├── my_blog ├── article │ ├── __init__.py │ ├── __init__.pyc │ ├── admin.py │ ├── admin.pyc │ ├── migrations │ │ ├── 0001_initial.py │ │ ├── 0001_initial.pyc │ │ ├── 0002_tag.py │ │ ├── 0002_tag.pyc │ │ ├── 0003_article_tag.py │ │ ├── 0003_article_tag.pyc │ │ ├── __init__.py │ │ └── __init__.pyc │ ├── models.py │ ├── models.pyc │ ├── templatetags │ │ ├── __init__.py │ │ ├── __init__.pyc │ │ ├── custom_markdown.py │ │ ├── custom_markdown.pyc │ │ ├── custom_markdown_BACKUP_80251.pyc │ │ ├── custom_markdown_BASE_80251.pyc │ │ ├── custom_markdown_LOCAL_80251.pyc │ │ └── custom_markdown_REMOTE_80251.pyc │ ├── tests.py │ ├── views.py │ └── views.pyc ├── db.sqlite3 ├── django.xml ├── manage.py ├── my_blog │ ├── __init__.py │ ├── __init__.pyc │ ├── settings.py │ ├── settings.pyc │ ├── urls.py │ ├── urls.pyc │ ├── wsgi.py │ └── wsgi.pyc ├── static │ ├── admin │ │ ├── css │ │ │ ├── base.css │ │ │ ├── changelists.css │ │ │ ├── dashboard.css │ │ │ ├── forms.css │ │ │ ├── ie.css │ │ │ ├── login.css │ │ │ ├── rtl.css │ │ │ └── widgets.css │ │ ├── img │ │ │ ├── changelist-bg.gif │ │ │ ├── changelist-bg_rtl.gif │ │ │ ├── default-bg-reverse.gif │ │ │ ├── default-bg.gif │ │ │ ├── deleted-overlay.gif │ │ │ ├── gis │ │ │ │ ├── move_vertex_off.png │ │ │ │ └── move_vertex_on.png │ │ │ ├── icon-no.gif │ │ │ ├── icon-unknown.gif │ │ │ ├── icon-yes.gif │ │ │ ├── icon_addlink.gif │ │ │ ├── icon_alert.gif │ │ │ ├── icon_calendar.gif │ │ │ ├── icon_changelink.gif │ │ │ ├── icon_clock.gif │ │ │ ├── icon_deletelink.gif │ │ │ ├── icon_error.gif │ │ │ ├── icon_searchbox.png │ │ │ ├── icon_success.gif │ │ │ ├── inline-delete-8bit.png │ │ │ ├── inline-delete.png │ │ │ ├── inline-restore-8bit.png │ │ │ ├── inline-restore.png │ │ │ ├── inline-splitter-bg.gif │ │ │ ├── nav-bg-grabber.gif │ │ │ ├── nav-bg-reverse.gif │ │ │ ├── nav-bg-selected.gif │ │ │ ├── nav-bg.gif │ │ │ ├── selector-icons.gif │ │ │ ├── selector-search.gif │ │ │ ├── sorting-icons.gif │ │ │ ├── tooltag-add.png │ │ │ └── tooltag-arrowright.png │ │ └── js │ │ │ ├── LICENSE-JQUERY.txt │ │ │ ├── SelectBox.js │ │ │ ├── SelectFilter2.js │ │ │ ├── actions.js │ │ │ ├── actions.min.js │ │ │ ├── admin │ │ │ ├── DateTimeShortcuts.js │ │ │ └── RelatedObjectLookups.js │ │ │ ├── calendar.js │ │ │ ├── collapse.js │ │ │ ├── collapse.min.js │ │ │ ├── core.js │ │ │ ├── inlines.js │ │ │ ├── inlines.min.js │ │ │ ├── jquery.init.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── prepopulate.js │ │ │ ├── prepopulate.min.js │ │ │ ├── timeparse.js │ │ │ └── urlify.js │ ├── bootstrap_admin │ │ ├── config.json │ │ ├── css │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ └── glyphicons-halflings-regular.woff │ │ ├── img │ │ │ └── logo-140x60.png │ │ └── js │ │ │ ├── base.js │ │ │ ├── bootstrap.min.js │ │ │ └── dashboard.js │ ├── css │ │ ├── 5grid │ │ │ ├── core-1000px.css │ │ │ ├── core-1200px.css │ │ │ ├── core-desktop.css │ │ │ ├── core-fluid.css │ │ │ ├── core-mobile.css │ │ │ ├── core-noscript.css │ │ │ ├── core.css │ │ │ ├── html5shiv.js │ │ │ ├── init.js │ │ │ ├── jquery.js │ │ │ ├── mobileUI-beveled.css │ │ │ ├── mobileUI-flat.css │ │ │ └── mobileUI-modern.css │ │ ├── images │ │ │ ├── bg1.png │ │ │ ├── bg2.png │ │ │ ├── mobileUI-site-nav-opener-bg.svg │ │ │ └── sprites.png │ │ ├── markdown.css │ │ ├── style-1000px.css │ │ ├── style-1200px.css │ │ ├── style-desktop.css │ │ ├── style-mobile.css │ │ └── style.css │ ├── css2 │ │ ├── font-awesome.min.css │ │ ├── ie │ │ │ ├── PIE.htc │ │ │ ├── html5shiv.js │ │ │ └── v8.css │ │ ├── skel.css │ │ ├── style-large.css │ │ ├── style-medium.css │ │ ├── style-small.css │ │ ├── style-xlarge.css │ │ ├── style-xsmall.css │ │ └── style.css │ ├── images │ │ ├── fotogrph-dark-stairwell.jpg │ │ └── n33-robot-invader.jpg │ └── js │ │ └── jquery-1.8.3.min.js ├── templates │ ├── aboutme.html │ ├── archives.html │ ├── base.html │ ├── duoshuo.html │ ├── home.html │ ├── post.html │ └── tag.html ├── test.py ├── uwsgi.ini ├── uwsgi.ini.save ├── var │ ├── log │ │ └── uwsgi.log │ └── run │ │ └── uwsgi.pid ├── wsgi.py └── wsgi.pyc └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- 1 | pyenv/ 2 | .pyc 3 | README.md 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blog 2 | 3 | Django + uwsgi + bootstrap + nginx 搭建自己的blog 4 | --- 5 | [DEMO](http://blog.samleslie.com) 6 | 7 | 8 | clone project 9 | 10 | ``` 11 | git clone git@github.com:sam408130/blog.git 12 | ``` 13 | 14 | 创建virtualenv环境 15 | 16 | ``` 17 | cd my_blog 18 | virtualenv pyenv 19 | source pyenv/bin/activate 20 | ``` 21 | 22 | 安装依赖 23 | 24 | ``` 25 | pip install -r requirement.txt (注意在virtualenv下,防止版本冲突) 26 | ``` 27 | 28 | 本地测试 29 | ``` 30 | cd my_blog 31 | python manage.py runserver 32 | ``` 33 | 查看效果:[http://127.0.0.1:8000](http://127.0.0.1:8000) 34 | 35 | 环境部署 36 | 37 | ``` 38 | uwsgi配置文件 39 | [uwsgi] 40 | # variables 41 | projectname = my_blog #项目名称 42 | projectdomain = samleslie.com #域名 43 | base = /home/dingsai/blog #项目地址 44 | 45 | # config 46 | plugins = python 47 | master = true 48 | protocol = uwsgi 49 | env = DJANGO_SETTINGS_MODULE=%(projectname).settings 50 | pythonpath = %(base)/%(projectname) 51 | module = %(projectname).wsgi 52 | socket = 127.0.0.1:8080 53 | ``` 54 | 55 | 配置nginx 56 | 57 | ``` 58 | server { 59 | listen 80; 60 | server_name blog.samleslie.com; 61 | root /path/to/your/app; 62 | 63 | location /static/{ 64 | alias /path/to/your/app/static/; #静态文件地址,js/css 65 | } 66 | location / { 67 | include uwsgi_params; 68 | uwsgi_pass 127.0.0.1:8080; 69 | } 70 | } 71 | ``` 72 | 73 | 启动uwsgi ,nginx 74 | ``` 75 | 在my_blog路径下 uwsgi uwsgi.ini 76 | 77 | reload nginx : sudo service nginx reload 78 | 79 | ``` 80 | 81 | 82 | -------------------------------------------------------------------------------- /my_blog/article/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/__init__.py -------------------------------------------------------------------------------- /my_blog/article/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/__init__.pyc -------------------------------------------------------------------------------- /my_blog/article/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from article.models import Article 3 | from article.models import Tag 4 | 5 | # Register your models here. 6 | class ArticleAdmin(admin.ModelAdmin): 7 | list_display = ('title', 'category', 'date_time') 8 | search_fields = ('title', 'category', 'tag', 'content') 9 | list_filter = ("date_time",) 10 | raw_id_fields = ('tag', ) 11 | date_hierarchy = 'date_time' 12 | 13 | 14 | admin.site.register(Article, ArticleAdmin) 15 | admin.site.register(Tag) -------------------------------------------------------------------------------- /my_blog/article/admin.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/admin.pyc -------------------------------------------------------------------------------- /my_blog/article/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ] 11 | 12 | operations = [ 13 | migrations.CreateModel( 14 | name='Article', 15 | fields=[ 16 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 17 | ('title', models.CharField(max_length=100)), 18 | ('category', models.CharField(max_length=50, blank=True)), 19 | ('date_time', models.DateTimeField(auto_now_add=True)), 20 | ('content', models.TextField(null=True, blank=True)), 21 | ], 22 | options={ 23 | 'ordering': ['-date_time'], 24 | }, 25 | bases=(models.Model,), 26 | ), 27 | ] 28 | -------------------------------------------------------------------------------- /my_blog/article/migrations/0001_initial.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/migrations/0001_initial.pyc -------------------------------------------------------------------------------- /my_blog/article/migrations/0002_tag.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('article', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Tag', 16 | fields=[ 17 | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), 18 | ('tag_name', models.CharField(max_length=64)), 19 | ], 20 | options={ 21 | }, 22 | bases=(models.Model,), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /my_blog/article/migrations/0002_tag.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/migrations/0002_tag.pyc -------------------------------------------------------------------------------- /my_blog/article/migrations/0003_article_tag.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('article', '0002_tag'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='article', 16 | name='tag', 17 | field=models.ManyToManyField(to='article.Tag', blank=True), 18 | preserve_default=True, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /my_blog/article/migrations/0003_article_tag.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/migrations/0003_article_tag.pyc -------------------------------------------------------------------------------- /my_blog/article/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/migrations/__init__.py -------------------------------------------------------------------------------- /my_blog/article/migrations/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/migrations/__init__.pyc -------------------------------------------------------------------------------- /my_blog/article/models.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.db import models 3 | from django.core.urlresolvers import reverse 4 | from django.contrib.sites.models import Site 5 | # Create your models here. 6 | 7 | class Tag(models.Model): 8 | tag_name = models.CharField(max_length=64) 9 | 10 | def __unicode__(self): 11 | return self.tag_name 12 | 13 | class Article(models.Model): 14 | title = models.CharField(max_length = 100) #博客题目 15 | category = models.CharField(max_length = 50, blank = True) #博客分类 可为空 16 | tag = models.ManyToManyField(Tag, blank=True) # 博客标签 可为空 17 | date_time = models.DateTimeField(auto_now_add = True) #博客日期 18 | content = models.TextField(blank = True, null = True) #博客文章正文 19 | 20 | def get_absolute_url(self): 21 | path = reverse('detail', kwargs={'id':self.id}) 22 | return "http://127.0.0.1:8000%s" % path 23 | 24 | #python3使用__str__ 25 | def __unicode__(self) : 26 | return self.title 27 | 28 | class Meta: 29 | ordering = ['-date_time'] 30 | 31 | -------------------------------------------------------------------------------- /my_blog/article/models.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/models.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/__init__.py -------------------------------------------------------------------------------- /my_blog/article/templatetags/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/__init__.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import markdown 3 | 4 | from django import template 5 | from django.template.defaultfilters import stringfilter 6 | from django.utils.encoding import force_text 7 | from django.utils.safestring import mark_safe 8 | 9 | register = template.Library() #自定义filter时必须加上 10 | 11 | 12 | @register.filter(is_safe=True) #注册template filter 13 | @stringfilter #希望字符串作为参数 14 | def custom_markdown(value): 15 | return mark_safe(markdown.markdown(value, 16 | extensions = ['markdown.extensions.fenced_code', 'markdown.extensions.codehilite'], 17 | safe_mode=True, 18 | enable_attributes=False)) -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/custom_markdown.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown_BACKUP_80251.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/custom_markdown_BACKUP_80251.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown_BASE_80251.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/custom_markdown_BASE_80251.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown_LOCAL_80251.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/custom_markdown_LOCAL_80251.pyc -------------------------------------------------------------------------------- /my_blog/article/templatetags/custom_markdown_REMOTE_80251.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/templatetags/custom_markdown_REMOTE_80251.pyc -------------------------------------------------------------------------------- /my_blog/article/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /my_blog/article/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from django.http import HttpResponse 4 | from django.shortcuts import render, redirect 5 | from django.http import Http404 6 | 7 | from django.contrib.syndication.views import Feed 8 | 9 | from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger 10 | 11 | from article.models import Article 12 | from article.models import Tag 13 | 14 | from datetime import datetime 15 | 16 | 17 | # Create your views here. 18 | def home(request): 19 | posts = Article.objects.all() #获取全部的Article对象 20 | paginator = Paginator(posts, 2) #每页显示两个 21 | page = request.GET.get('page') 22 | try : 23 | post_list = paginator.page(page) 24 | except PageNotAnInteger : 25 | post_list = paginator.page(1) 26 | except EmptyPage : 27 | post_list = paginator.paginator(paginator.num_pages) 28 | return render(request, 'home.html', {'post_list' : post_list}) 29 | 30 | def detail(request, id): 31 | try: 32 | post = Article.objects.get(id=str(id)) 33 | tags = Tag.objects.all() 34 | except Article.DoesNotExist: 35 | raise Http404 36 | return render(request, 'post.html', {'post' : post, 'tags': tags}) 37 | 38 | 39 | def archives(request) : 40 | try: 41 | post_list = Article.objects.all() 42 | except Article.DoesNotExist : 43 | raise Http404 44 | return render(request, 'archives.html', {'post_list' : post_list, 45 | 'error' : False}) 46 | 47 | def search_tag(request, tag) : 48 | try: 49 | post_list = Article.objects.filter(category__iexact = tag) #contains 50 | except Article.DoesNotExist : 51 | raise Http404 52 | return render(request, 'tag.html', {'post_list' : post_list}) 53 | 54 | def about_me(request) : 55 | return render(request, 'aboutme.html') 56 | 57 | # def blog_search(request): 58 | # tags = Tag.objects.all() 59 | # if 'search' in request.GET: 60 | # search = request.GET['search'] 61 | # blogs = Article.objects.filter(caption__icontains = search) 62 | # return render_to_response('blog_filter.html', 63 | # {"blogs": blogs, "tags": tags}, context_instance=RequestContext(request)) 64 | # else: 65 | # blogs = Blog.objects.order_by('-id') 66 | # return render_to_response("blog_list.html", {"blogs": blogs, "tags": tags}, 67 | # context_instance=RequestContext(request)) 68 | 69 | def blog_search(request): 70 | if 's' in request.GET: 71 | s = request.GET['s'] 72 | if not s: 73 | return render(request,'home.html') 74 | else: 75 | post_list = Article.objects.filter(title__icontains = s) 76 | if len(post_list) == 0 : 77 | return render(request,'archives.html', {'post_list' : post_list, 78 | 'error' : True}) 79 | else : 80 | return render(request,'archives.html', {'post_list' : post_list, 81 | 'error' : False}) 82 | return redirect('/') 83 | 84 | class RSSFeed(Feed) : 85 | title = "RSS feed - article" 86 | link = "feeds/posts/" 87 | description = "RSS feed - blog posts" 88 | 89 | def items(self): 90 | return Article.objects.order_by('-date_time') 91 | 92 | def item_title(self, item): 93 | return item.title 94 | 95 | def item_pubdate(self, item): 96 | return item.date_time 97 | 98 | def item_description(self, item): 99 | return item.content 100 | -------------------------------------------------------------------------------- /my_blog/article/views.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/article/views.pyc -------------------------------------------------------------------------------- /my_blog/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/db.sqlite3 -------------------------------------------------------------------------------- /my_blog/django.xml: -------------------------------------------------------------------------------- 1 | 2 | 127.0.0.1:8630 3 | /srv/www/blog/my_blog 4 | .. 5 | wsgi 6 | 7 | -------------------------------------------------------------------------------- /my_blog/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_blog.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /my_blog/my_blog/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/my_blog/__init__.py -------------------------------------------------------------------------------- /my_blog/my_blog/__init__.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/my_blog/__init__.pyc -------------------------------------------------------------------------------- /my_blog/my_blog/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for my_blog project. 3 | 4 | For more information on this file, see 5 | https://docs.djangoproject.com/en/1.7/topics/settings/ 6 | 7 | For the full list of settings and their values, see 8 | https://docs.djangoproject.com/en/1.7/ref/settings/ 9 | """ 10 | 11 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 12 | import os 13 | BASE_DIR = os.path.dirname(os.path.dirname(__file__)) 14 | 15 | 16 | # Quick-start development settings - unsuitable for production 17 | # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ 18 | 19 | # SECURITY WARNING: keep the secret key used in production secret! 20 | SECRET_KEY = 'd1_j)o&yu8++kr7p=p#m4)y3z%q67gce_+h!bh!fctwrw6j@ni' 21 | 22 | # SECURITY WARNING: don't run with debug turned on in production! 23 | DEBUG = True 24 | 25 | TEMPLATE_DEBUG = True 26 | 27 | ALLOWED_HOSTS = [] 28 | 29 | 30 | # Application definition 31 | 32 | INSTALLED_APPS = ( 33 | 'bootstrap_admin', 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'article', 41 | ) 42 | 43 | from django.conf import global_settings 44 | TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( 45 | 'django.core.context_processors.request', 46 | ) 47 | BOOTSTRAP_ADMIN_SIDEBAR_MENU = True 48 | 49 | 50 | MIDDLEWARE_CLASSES = ( 51 | 'django.contrib.sessions.middleware.SessionMiddleware', 52 | 'django.middleware.common.CommonMiddleware', 53 | 'django.middleware.csrf.CsrfViewMiddleware', 54 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 55 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 56 | 'django.contrib.messages.middleware.MessageMiddleware', 57 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 58 | ) 59 | 60 | ROOT_URLCONF = 'my_blog.urls' 61 | 62 | WSGI_APPLICATION = 'my_blog.wsgi.application' 63 | 64 | 65 | # Database 66 | # https://docs.djangoproject.com/en/1.7/ref/settings/#databases 67 | 68 | DATABASES = { 69 | 'default': { 70 | 'ENGINE': 'django.db.backends.sqlite3', 71 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 72 | } 73 | } 74 | 75 | # Internationalization 76 | # https://docs.djangoproject.com/en/1.7/topics/i18n/ 77 | 78 | LANGUAGE_CODE = 'en-us' 79 | 80 | TIME_ZONE = 'UTC' 81 | 82 | USE_I18N = True 83 | 84 | USE_L10N = True 85 | 86 | USE_TZ = True 87 | 88 | 89 | # Static files (CSS, JavaScript, Images) 90 | # https://docs.djangoproject.com/en/1.7/howto/static-files/ 91 | 92 | STATIC_URL = '/static/' 93 | #STATIC_ROOT = os.path.join(BASE_DIR, "static/") 94 | 95 | STATICFILES_DIRS = ( 96 | os.path.join(os.path.dirname(__file__), '../static/').replace('\\','/'), 97 | ) 98 | 99 | 100 | TEMPLATE_PATH = os.path.join(BASE_DIR, 'templates') 101 | TEMPLATE_DIRS = ( 102 | TEMPLATE_PATH, 103 | ) 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /my_blog/my_blog/settings.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/my_blog/settings.pyc -------------------------------------------------------------------------------- /my_blog/my_blog/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls import patterns, include, url 2 | from django.contrib import admin 3 | from article.views import RSSFeed 4 | from django.contrib.staticfiles.urls import staticfiles_urlpatterns 5 | import settings 6 | 7 | 8 | urlpatterns = patterns('', 9 | # Examples: 10 | # url(r'^$', 'my_blog.views.home', name='home'), 11 | # url(r'^blog/', include('blog.urls')), 12 | 13 | url(r'^admin/', include(admin.site.urls)), 14 | url(r'^$','article.views.home'), 15 | url(r'^(?P\d+)/$', 'article.views.detail', name='detail'), 16 | url(r'^archives/$', 'article.views.archives', name = 'archives'), 17 | url(r'^aboutme/$', 'article.views.about_me', name = 'about_me'), 18 | url(r'^tag(?P\w+)/$', 'article.views.search_tag', name = 'search_tag'), 19 | url(r'^search/$','article.views.blog_search', name = 'search'), 20 | url(r'^feed/$', RSSFeed(), name = "RSS"), 21 | url( r'^static/(?P.*)$', 'django.views.static.serve',{ 'document_root': settings.STATIC_URL }), 22 | ) 23 | 24 | -------------------------------------------------------------------------------- /my_blog/my_blog/urls.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/my_blog/urls.pyc -------------------------------------------------------------------------------- /my_blog/my_blog/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for my_blog project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "my_blog.settings") 12 | 13 | from django.core.wsgi import get_wsgi_application 14 | application = get_wsgi_application() 15 | -------------------------------------------------------------------------------- /my_blog/my_blog/wsgi.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/my_blog/wsgi.pyc -------------------------------------------------------------------------------- /my_blog/static/admin/css/base.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f5f5f5; 3 | } 4 | .main a { 5 | text-decoration: none; 6 | } 7 | .popup { 8 | padding-top: 10px; 9 | } 10 | .popup #content { 11 | width: 100%; 12 | margin-left: 0; 13 | } 14 | .popup .main-header, 15 | .popup .breadcrumb, 16 | .popup .show-hide-sidebar-menu { 17 | display: none; 18 | } 19 | .popup .main-header h1 { 20 | margin-left: 15px; 21 | padding-left: 0; 22 | } 23 | 24 | #overlay { 25 | background: #f5f5f5; 26 | width: 100%; 27 | position: fixed; 28 | z-index: 9999; 29 | height: 100%; 30 | } 31 | #overlay .spinner { 32 | margin: 100px auto 0; 33 | width: 70px; 34 | text-align: center; 35 | } 36 | #overlay .spinner > div { 37 | width: 18px; 38 | height: 18px; 39 | background-color: #333; 40 | 41 | border-radius: 100%; 42 | display: inline-block; 43 | -webkit-animation: bouncedelay 1.4s infinite ease-in-out; 44 | animation: bouncedelay 1.4s infinite ease-in-out; 45 | /* Prevent first frame from flickering when animation starts */ 46 | -webkit-animation-fill-mode: both; 47 | animation-fill-mode: both; 48 | } 49 | #overlay .spinner .bounce1 { 50 | -webkit-animation-delay: -0.32s; 51 | animation-delay: -0.32s; 52 | } 53 | #overlay .spinner .bounce2 { 54 | -webkit-animation-delay: -0.16s; 55 | animation-delay: -0.16s; 56 | } 57 | @-webkit-keyframes bouncedelay { 58 | 0%, 80%, 100% { -webkit-transform: scale(0.0) } 59 | 40% { -webkit-transform: scale(1.0) } 60 | } 61 | @keyframes bouncedelay { 62 | 0%, 80%, 100% { 63 | transform: scale(0.0); 64 | -webkit-transform: scale(0.0); 65 | } 40% { 66 | transform: scale(1.0); 67 | -webkit-transform: scale(1.0); 68 | } 69 | } 70 | 71 | 72 | /* 73 | * Global add-ons 74 | */ 75 | 76 | .sub-header { 77 | padding-bottom: 10px; 78 | border-bottom: 1px solid #eee; 79 | } 80 | 81 | /* 82 | * Top navigation 83 | * Hide default border to remove 1px line. 84 | */ 85 | .navbar-fixed-top { 86 | border: 0; 87 | } 88 | 89 | /* 90 | * Sidebar 91 | */ 92 | 93 | /* Hide for mobile, show later */ 94 | 95 | .sidebar-menu { 96 | background-color: #393939; 97 | bottom: 0; 98 | display: block; 99 | left: 0; 100 | overflow-x: hidden; 101 | overflow-y: auto; 102 | padding: 0 20px; 103 | position: fixed; 104 | top: 0; 105 | z-index: 1000; 106 | } 107 | .sidebar-menu .django-admin-logo { 108 | background: #282829; 109 | border-bottom: 1px solid #222; 110 | color: #fff; 111 | display: block; 112 | height: 61px; 113 | margin: 0 -20px; 114 | text-align: center; 115 | } 116 | .sidebar-menu .permission-warning { 117 | color: #fff; 118 | margin-top: 15px; 119 | } 120 | .sidebar-menu .nav-sidebar { 121 | margin-right: -21px; 122 | margin-left: -20px; 123 | transition: all .3s ease-in-out; 124 | } 125 | .sidebar-menu .nav-sidebar a { 126 | color: #ddd; 127 | overflow: hidden; 128 | padding-right: 20px; 129 | padding-left: 20px; 130 | text-overflow: ellipsis; 131 | transition: color .3s ease-in-out; 132 | white-space: nowrap; 133 | } 134 | .sidebar-menu .nav-sidebar a:hover, 135 | .sidebar-menu .nav-sidebar a:focus { 136 | background-color: transparent; 137 | color: #fff; 138 | } 139 | .sidebar-menu .nav-sidebar a { 140 | border-left: 2px solid #393939; 141 | color: #fff; 142 | height: 43px; 143 | padding: 12px 5px 12px 20px; 144 | transition: border 0.4s ease-in-out 0s, color 0.3s ease-in-out 0s, background-color 0.4s ease-in-out 0s; 145 | } 146 | .sidebar-menu .nav-sidebar a:hover { 147 | background: #333; 148 | color: #ccc; 149 | border-color: #428bca; 150 | } 151 | .sidebar-menu .nav-sidebar a.section { 152 | padding-left: 5px; 153 | text-transform: uppercase; 154 | } 155 | .sidebar-menu .nav-sidebar.has-active-menu { 156 | background: #333; 157 | border: 1px solid #444; 158 | } 159 | .sidebar-menu .nav-sidebar.has-active-menu a { 160 | border-left: 2px solid #333; 161 | } 162 | .sidebar-menu .active a:after { 163 | border-bottom: 10px solid transparent; 164 | border-right: 10px solid #f5f5f5; 165 | border-top: 10px solid transparent; 166 | content: ""; 167 | height: 0; 168 | position: absolute; 169 | right: 0; 170 | top: 11px; 171 | width: 0; 172 | } 173 | .sidebar-menu .nav-sidebar .active a { 174 | color: #428bca; 175 | border-color: #333; 176 | background-color: #333; 177 | } 178 | .sidebar-menu .nav-sidebar .active a:hover, 179 | .sidebar-menu .nav-sidebar.has-active-menu a:hover { 180 | border-color: #428bca; 181 | color: #428bca; 182 | } 183 | .sidebar-menu .nav-sidebar .padding-left a { 184 | padding-left: 24px; 185 | } 186 | 187 | .sidebar-menu .nav-sidebar li { 188 | display: none; 189 | } 190 | .sidebar-menu .nav-sidebar li:first-child, 191 | .sidebar-menu .nav-sidebar.show-models li { 192 | display: block; 193 | } 194 | 195 | .show-hide-sidebar-menu { 196 | background-color: transparent; 197 | border: 1px solid transparent; 198 | border-radius: 5px; 199 | left: 10px; 200 | margin: 2px 0; 201 | padding: 3px; 202 | position: absolute; 203 | transition: background-color 0.3s ease-in-out 0s, border 0.3s ease-in-out 0s; 204 | width: 31px; 205 | } 206 | .show-hide-sidebar-menu:hover { 207 | background-color: #dfdfdf; 208 | border: 1px solid #dfdfdf; 209 | } 210 | .show-hide-sidebar-menu .icon-bar { 211 | background: none repeat scroll 0 0 #333333; 212 | border: 1px solid #444444; 213 | border-radius: 1px; 214 | display: block; 215 | height: 2px; 216 | margin: 4px auto; 217 | width: 18px; 218 | } 219 | .hidden-menu { 220 | left: -25%; 221 | } 222 | .sidebar-menu { 223 | transition: left .3s ease-in-out; 224 | } 225 | 226 | /* 227 | * Main content 228 | */ 229 | 230 | .main-header { 231 | background: none repeat scroll 0 0 #efefef; 232 | border-bottom: 1px solid #dddddd; 233 | box-shadow: 0 1px 0 0 #dddddd; 234 | height: 35px; 235 | margin: 0 -15px; 236 | } 237 | .main-header h1 { 238 | font-size: 24px; 239 | line-height: 28px; 240 | margin: 0 0 0 40px; 241 | overflow: hidden; 242 | padding: 3px; 243 | text-overflow: ellipsis; 244 | white-space: nowrap; 245 | } 246 | .main-header h1 .django-admin-title { 247 | display: none; 248 | } 249 | .no-sidebar .main-header h1 { 250 | margin-left: 15px; 251 | } 252 | .no-sidebar h1 .django-admin-title { 253 | display: inline; 254 | } 255 | #user-tools { 256 | opacity: 0.7; 257 | position: absolute; 258 | right: 15px; 259 | top: -1px; 260 | transition: opacity 0.3s ease-in-out 0s; 261 | } 262 | #user-tools .btn { 263 | border-bottom: medium none; 264 | border-radius: 0; 265 | border-top: medium none; 266 | height: 35px; 267 | } 268 | #user-tools .glyphicon { 269 | margin-top: 4px; 270 | } 271 | #user-tools .dropdown-menu { 272 | border-color: #adadad; 273 | border-radius: 0; 274 | top: 32px; 275 | } 276 | #user-tools .dropdown-toggle { 277 | background: #ffffff; 278 | box-shadow: none; 279 | z-index: 1001; 280 | } 281 | .main-header:hover #user-tools { 282 | opacity: 1; 283 | } 284 | /* Some 3rd party packages will change the breadcrumbs, using the django 285 | default html. So, if we apply the style to .breadcrumbs, this will 286 | maximize the compatibility with bootstrap_admin */ 287 | .breadcrumbs, 288 | .breadcrumb { 289 | background: #efefef; 290 | border-bottom: 2px solid #e5e5e5; 291 | border-radius: 0; 292 | height: 26px; 293 | margin: 0 -15px 15px; 294 | overflow: hidden; 295 | padding: 3px 15px 0; 296 | text-overflow:ellipsis; 297 | white-space: nowrap; 298 | } 299 | .breadcrumb > li { 300 | float: left; 301 | } 302 | .breadcrumb > li.home { 303 | width: 20px; 304 | } 305 | .breadcrumb > li.active { 306 | display: inline; 307 | float: none; 308 | } 309 | .breadcrumb > li + li:before { 310 | padding:0 0 0 7px; 311 | } 312 | 313 | @media (max-width: 768px) { 314 | .breadcrumb > li { 315 | overflow: hidden; 316 | text-overflow:ellipsis; 317 | max-width: 150px; 318 | white-space: nowrap; 319 | } 320 | } 321 | 322 | @media (max-width: 767px) { 323 | .main-header h1 { 324 | font-size: 18px; 325 | } 326 | .breadcrumb > li { 327 | max-width: 100px; 328 | } 329 | } 330 | -------------------------------------------------------------------------------- /my_blog/static/admin/css/changelists.css: -------------------------------------------------------------------------------- 1 | .hiddenfields { 2 | display: none; 3 | } 4 | .object-tools { 5 | padding: 0; 6 | } 7 | .object-tools li { 8 | display: inline-block; 9 | margin-left: 5px; 10 | } 11 | 12 | #result_list { 13 | margin-bottom: 0; 14 | } 15 | #result_list thead a { 16 | color: #333; 17 | } 18 | #result_list td .vTextField { 19 | min-width: 100px; 20 | } 21 | #result_list .action-checkbox-column { 22 | width: 40px; 23 | } 24 | #result_list .action-checkbox-column, 25 | #result_list .action-checkbox { 26 | padding-left: 15px; 27 | } 28 | #result_list .errorlist { 29 | list-style: none; 30 | color: #a94442; 31 | padding: 0; 32 | } 33 | 34 | .sortable .text { 35 | float: left; 36 | } 37 | .sortoptions { 38 | float: right; 39 | font-size: 12px; 40 | position: relative; 41 | top: 2px; 42 | } 43 | .sortoptions .sortpriority { 44 | display: none; 45 | } 46 | 47 | #changelist { 48 | position: relative; 49 | } 50 | #changelist .actions span.all, 51 | #changelist .actions span.action-counter, 52 | #changelist .actions span.clear, 53 | #changelist .actions span.question { 54 | display: none; 55 | } 56 | #changelist .info-actions { 57 | margin: 5px 0 5px 0; 58 | } 59 | #changelist .actions-top, 60 | #changelist .actions-bottom { 61 | background: #f9f9f9; 62 | } 63 | #changelist .actions-bottom .info-actions .label, 64 | #changelist .actions-bottom .info-actions a { 65 | background: transparent; 66 | color: #333; 67 | } 68 | .place-info-actions { 69 | display: none; 70 | } 71 | .actions .label a { 72 | color: #fff; 73 | transition: color 0.3s ease-in-out 0s; 74 | } 75 | .actions .label a:hover { 76 | color: #eee; 77 | } 78 | #changelist .results { 79 | border-top: 1px solid #dddddd; 80 | width: 100%; 81 | } 82 | 83 | #changelist .toplinks { 84 | list-style: none; 85 | margin: 0; 86 | padding-left: 0; 87 | } 88 | #changelist .toplinks li { 89 | display: inline; 90 | } 91 | #changelist .toplinks > li + li:before { 92 | color: #cccccc; 93 | content: "/ "; 94 | padding: 0 5px; 95 | } 96 | 97 | #changelist-search .input-group { 98 | left: -16px; 99 | top: -11px; 100 | width: 250px; 101 | } 102 | #changelist-search .form-control { 103 | border-bottom-left-radius: 0; 104 | height: 42px; 105 | padding-left: 15px; 106 | text-overflow: ellipsis; 107 | } 108 | #changelist-search .input-group-btn .btn { 109 | border-radius: 0; 110 | height: 42px; 111 | } 112 | #changelist-search .tooltip { 113 | opacity: 1; 114 | top: -32px; 115 | z-index: 999; 116 | } 117 | #changelist-search .tooltip a { 118 | color: #5bc0de; 119 | font-weight: bold; 120 | } 121 | #changelist-search .tooltip a { 122 | color: #5bc0de; 123 | } 124 | #changelist-search .tooltip a:hover { 125 | color: #428bca; 126 | } 127 | 128 | .panel-heading, 129 | .panel-footer { 130 | height: 41px; 131 | overflow: hidden; 132 | position: relative; 133 | } 134 | .panel-heading .title { 135 | display: inline-block; 136 | max-width: 230px; 137 | overflow: hidden; 138 | text-overflow: ellipsis; 139 | white-space: nowrap; 140 | } 141 | .panel-footer .right-buttons { 142 | position: absolute; 143 | right: 15px; 144 | } 145 | .panel-footer .right-buttons .save { 146 | margin-left: 5px; 147 | } 148 | 149 | .paginator { 150 | margin: 0; 151 | } 152 | .paginator .info { 153 | font-weight: bold; 154 | } 155 | 156 | #changelist-filter { 157 | margin-left: -20px; 158 | margin-right: -21px; 159 | } 160 | #changelist-filter h2 { 161 | background: #333; 162 | border-bottom: 2px solid #428bca; 163 | color: #fff; 164 | margin: 0; 165 | padding: 5px; 166 | } 167 | #changelist-filter h3 { 168 | background: #333333; 169 | color: #5bc0de; 170 | margin: 0 0 5px; 171 | padding: 5px; 172 | } 173 | #changelist-filter .filter-list { 174 | list-style: none; 175 | margin: 0; 176 | padding: 0 0 5px 24px; 177 | } 178 | #changelist-filter .filter-list a { 179 | color: #ddd; 180 | } 181 | #changelist-filter .filter-list a:hover { 182 | color: #ccc; 183 | text-decoration: none; 184 | } 185 | #changelist-filter .selected { 186 | margin-left: -18px; 187 | } 188 | #changelist-filter .selected a { 189 | color: #fff; 190 | } 191 | 192 | /* Fields, Widgets */ 193 | p.datetime { 194 | display: inline-block; 195 | margin: -8px; 196 | padding: 8px; 197 | width: auto; 198 | } 199 | 200 | /* Responsive */ 201 | @media (max-width:1200px) { 202 | .pagination > li > a, .pagination > li > span { 203 | border-radius: 3px; 204 | margin: 4px 4px 0 0; 205 | } 206 | } 207 | 208 | @media (min-width: 768px) { 209 | .actions-top .select { 210 | left: 249px; 211 | margin: 0; 212 | padding: 0; 213 | position: absolute; 214 | top: 0; 215 | width: 250px; 216 | } 217 | .actions-top .select select { 218 | border-radius: 0; 219 | height: 42px; 220 | } 221 | .actions-top .select .btn { 222 | border-radius: 0; 223 | height: 42px; 224 | } 225 | .actions-top .date-hierarchy { 226 | width: 100% 227 | } 228 | #changelist .actions-top .info-actions { 229 | bottom: -26px; 230 | left: -248px; 231 | margin: 0; 232 | padding-left: 15px; 233 | position: absolute; 234 | white-space: nowrap; 235 | width: 100%; 236 | } 237 | .place-info-actions { 238 | display: block; 239 | height: 36px; 240 | width: 100%; 241 | } 242 | .place-info-actions .progressbar-selected-rows { 243 | border-bottom: 1px solid #f0ad4e; 244 | height: 36px; 245 | width: 0; 246 | transition: width 0.3s ease-in-out 0.3s; 247 | } 248 | .no-hierarchy-filters { 249 | height: 0; 250 | padding: 0; 251 | } 252 | } 253 | 254 | @media (max-width: 767px) { 255 | #changelist-search .input-group { 256 | width: 150px; 257 | } 258 | } 259 | -------------------------------------------------------------------------------- /my_blog/static/admin/css/dashboard.css: -------------------------------------------------------------------------------- 1 | #apps { 2 | overflow: hidden; 3 | } 4 | #apps .panel-heading { 5 | padding: 0; 6 | } 7 | #apps .search-apps-models { 8 | padding: 0; 9 | border: 0; 10 | } 11 | #apps .search-apps-models .wrapper { 12 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.125) inset; 13 | position: relative; 14 | } 15 | #apps .search-apps-models .glyphicon-search { 16 | position: absolute; 17 | top: 10px; 18 | left: 10px; 19 | } 20 | #apps .search-apps-models .remove-this { 21 | max-width: 45%; 22 | overflow: hidden; 23 | position: absolute; 24 | right: 10px; 25 | top: 10px; 26 | text-overflow: ellipsis; 27 | transition: background .3s ease-in-out; 28 | display: none; 29 | } 30 | #apps .search-apps-models .remove-this:hover { 31 | cursor: pointer; 32 | background: #bbb; 33 | text-decoration: line-through; 34 | } 35 | #apps .search { 36 | background: transparent; 37 | border: 0 none; 38 | border-radius: 0; 39 | box-shadow: none; 40 | height: 36px; 41 | padding-left: 35px; 42 | width: 100%; 43 | } 44 | #apps .bg-colored { 45 | background: #f9f9f9; 46 | } 47 | #apps .table { 48 | border-bottom: 2px solid #ddd; 49 | } 50 | #apps .model-name a { 51 | color: #333; 52 | } 53 | #apps .actions { 54 | padding: 0; 55 | vertical-align: middle; 56 | } 57 | #apps .btn-group-actions { 58 | display: block; 59 | max-width: 150px; 60 | margin: 0 auto; 61 | } 62 | #apps .btn-group .btn { 63 | background: transparent; 64 | border: 0 none; 65 | border-radius: 0; 66 | padding: 8px; 67 | transition: box-shadow .3s ease-in-out, color .3s ease-in-out; 68 | } 69 | #apps a.changelink:hover { 70 | color: #f0ad4e; 71 | } 72 | #apps a.search-in-model:hover { 73 | color: #5bc0de; 74 | } 75 | #apps th.title-head-actions { 76 | max-width: 150px; 77 | overflow: hidden; 78 | text-align: center; 79 | text-overflow: ellipsis; 80 | } 81 | #apps .app-name a, 82 | #apps .model-name a { 83 | display: block; 84 | } 85 | #apps .model-name .extra-app-name { 86 | color: #428bca; 87 | display: none; 88 | height: 20px; 89 | overflow: hidden; 90 | text-overflow: ellipsis; 91 | white-space: nowrap !important; 92 | } 93 | .showing-search-results .title-head-apps, 94 | .showing-search-results .app-name { 95 | display: none; 96 | } 97 | /*.showing-search-results .title-head-models,*/ 98 | .showing-search-results .model-name { 99 | border-left: 0 none; 100 | } 101 | 102 | @media (max-width: 768px) { 103 | #apps .app-name a, 104 | #apps .model-name a { 105 | display: block; 106 | white-space: normal; 107 | width: 200px; 108 | word-wrap: break-word; 109 | } 110 | } 111 | 112 | @media (max-width: 480px) { 113 | #apps .model-name a { 114 | width: 150px; 115 | } 116 | #apps .title-head-apps, 117 | #apps .app-name { 118 | display: none; 119 | } 120 | #apps .model-name { 121 | border-left: 0 none; 122 | } 123 | #apps .model-name .extra-app-name { 124 | display: block; 125 | } 126 | } 127 | 128 | #recent-actions-module .page-header { 129 | margin: 0; 130 | } 131 | #recent-actions-module h2 { 132 | margin-top: 0; 133 | } 134 | #recent-actions-module .none-available { 135 | margin-top: 10px; 136 | } 137 | 138 | /* 139 | Based on: http://bootsnipp.com/snippets/featured/timeline-responsive 140 | */ 141 | 142 | .timeline { 143 | list-style: none; 144 | padding: 20px 0 20px; 145 | position: relative; 146 | } 147 | .timeline:before { 148 | top: 0; 149 | bottom: 0; 150 | position: absolute; 151 | content: " "; 152 | width: 3px; 153 | background-color: #eeeeee; 154 | left: 50%; 155 | margin-left: -1.5px; 156 | } 157 | .timeline > li { 158 | margin-bottom: 20px; 159 | position: relative; 160 | } 161 | .timeline > li:before, 162 | .timeline > li:after { 163 | content: " "; 164 | display: table; 165 | } 166 | .timeline > li:after { 167 | clear: both; 168 | } 169 | .timeline > li:before, 170 | .timeline > li:after { 171 | content: " "; 172 | display: table; 173 | } 174 | .timeline > li:after { 175 | clear: both; 176 | } 177 | .timeline > li > .timeline-panel { 178 | width: 46%; 179 | float: left; 180 | border: 1px solid #d4d4d4; 181 | border-radius: 2px; 182 | padding: 20px; 183 | position: relative; 184 | box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175); 185 | } 186 | .timeline > li > .timeline-panel:before { 187 | position: absolute; 188 | top: 26px; 189 | right: -15px; 190 | display: inline-block; 191 | border-top: 15px solid transparent; 192 | border-left: 15px solid #ccc; 193 | border-right: 0 solid #ccc; 194 | border-bottom: 15px solid transparent; 195 | content: " "; 196 | } 197 | .timeline > li > .timeline-panel:after { 198 | position: absolute; 199 | top: 27px; 200 | right: -14px; 201 | display: inline-block; 202 | border-top: 14px solid transparent; 203 | border-left: 14px solid #fff; 204 | border-right: 0 solid #fff; 205 | border-bottom: 14px solid transparent; 206 | content: " "; 207 | } 208 | .timeline > li > .timeline-badge { 209 | border: 2px solid #eeeeee; 210 | border-radius: 50%; 211 | color: #ffffff; 212 | height: 38px; 213 | left: 50%; 214 | line-height: 36px; 215 | margin-left: -19px; 216 | position: absolute; 217 | text-align: center; 218 | top: 22px; 219 | width: 38px; 220 | z-index: 100; 221 | } 222 | .timeline > li.timeline-inverted > .timeline-panel { 223 | float: right; 224 | } 225 | .timeline > li.timeline-inverted > .timeline-panel:before { 226 | border-left-width: 0; 227 | border-right-width: 15px; 228 | left: -15px; 229 | right: auto; 230 | } 231 | .timeline > li.timeline-inverted > .timeline-panel:after { 232 | border-left-width: 0; 233 | border-right-width: 14px; 234 | left: -14px; 235 | right: auto; 236 | } 237 | .timeline-badge.add { 238 | background-color: #3f903f !important; 239 | } 240 | .timeline-badge.change { 241 | background-color: #f0ad4e !important; 242 | } 243 | .timeline-badge.delete { 244 | background-color: #d9534f !important; 245 | } 246 | .timeline-title { 247 | margin-top: 0; 248 | color: inherit; 249 | } 250 | .timeline-body > p, 251 | .timeline-body > ul { 252 | margin-bottom: 0; 253 | } 254 | 255 | @media (max-width: 767px) { 256 | ul.timeline:before { 257 | left: 40px; 258 | } 259 | ul.timeline > li > .timeline-panel { 260 | width: calc(100% - 75px); 261 | width: -moz-calc(100% - 75px); 262 | width: -webkit-calc(100% - 75px); 263 | } 264 | ul.timeline > li > .timeline-badge { 265 | left: 22px; 266 | margin-left: 0; 267 | top: 20px; 268 | } 269 | ul.timeline > li > .timeline-panel { 270 | float: right; 271 | } 272 | ul.timeline > li > .timeline-panel:before { 273 | border-left-width: 0; 274 | border-right-width: 15px; 275 | left: -15px; 276 | right: auto; 277 | } 278 | ul.timeline > li > .timeline-panel:after { 279 | border-left-width: 0; 280 | border-right-width: 14px; 281 | left: -14px; 282 | right: auto; 283 | } 284 | } -------------------------------------------------------------------------------- /my_blog/static/admin/css/ie.css: -------------------------------------------------------------------------------- 1 | /* IE 6 & 7 */ 2 | 3 | /* Proper fixed width for dashboard in IE6 */ 4 | 5 | .dashboard #content { 6 | *width: 768px; 7 | } 8 | 9 | .dashboard #content-main { 10 | *width: 535px; 11 | } 12 | 13 | /* IE 6 ONLY */ 14 | 15 | /* Keep header from flowing off the page */ 16 | 17 | #container { 18 | _position: static; 19 | } 20 | 21 | /* Put the right sidebars back on the page */ 22 | 23 | .colMS #content-related { 24 | _margin-right: 0; 25 | _margin-left: 10px; 26 | _position: static; 27 | } 28 | 29 | /* Put the left sidebars back on the page */ 30 | 31 | .colSM #content-related { 32 | _margin-right: 10px; 33 | _margin-left: -115px; 34 | _position: static; 35 | } 36 | 37 | .form-row { 38 | _height: 1%; 39 | } 40 | 41 | /* Fix right margin for changelist filters in IE6 */ 42 | 43 | #changelist-filter ul { 44 | _margin-right: -10px; 45 | } 46 | 47 | /* IE ignores min-height, but treats height as if it were min-height */ 48 | 49 | .change-list .filtered { 50 | _height: 400px; 51 | } 52 | 53 | /* IE doesn't know alpha transparency in PNGs */ 54 | 55 | .inline-deletelink { 56 | background: transparent url(../img/inline-delete-8bit.png) no-repeat; 57 | } 58 | 59 | /* IE7 doesn't support inline-block */ 60 | .change-list ul.toplinks li { 61 | zoom: 1; 62 | *display: inline; 63 | } -------------------------------------------------------------------------------- /my_blog/static/admin/css/login.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 120px; 3 | } 4 | #content-main { 5 | background: #272727; 6 | border-bottom: 2px solid #444; 7 | border-top: 2px solid #444; 8 | padding: 20px 0; 9 | } 10 | #login-form { 11 | display: block; 12 | margin: 0 auto; 13 | text-align: center; 14 | width: 600px; 15 | } 16 | .logo-admin { 17 | margin:0 auto 20px auto; 18 | display: block; 19 | } 20 | #login-form legend { 21 | border-color: transparent; 22 | color: #fff; 23 | } 24 | #login-form .btn { 25 | transition: background .3s ease-in-out; 26 | } 27 | .password-reset-link { 28 | margin-top: 20px; 29 | } 30 | .toggle-password:hover { 31 | cursor: pointer; 32 | background-color: #ddd; 33 | } 34 | .errornote { 35 | text-align: left; 36 | } 37 | 38 | @media (max-width: 767px) { 39 | body { 40 | padding-top: 60px; 41 | } 42 | .form-row .password { 43 | margin-top: 15px; 44 | } 45 | #login-form { 46 | margin: 0 30px; 47 | width: auto; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /my_blog/static/admin/css/rtl.css: -------------------------------------------------------------------------------- 1 | body { 2 | direction: rtl; 3 | } 4 | 5 | /* LOGIN */ 6 | 7 | .login .form-row { 8 | float: right; 9 | } 10 | 11 | .login .form-row label { 12 | float: right; 13 | padding-left: 0.5em; 14 | padding-right: 0; 15 | text-align: left; 16 | } 17 | 18 | .login .submit-row { 19 | clear: both; 20 | padding: 1em 9.4em 0 0; 21 | } 22 | 23 | /* GLOBAL */ 24 | 25 | th { 26 | text-align: right; 27 | } 28 | 29 | .module h2, .module caption { 30 | text-align: right; 31 | } 32 | 33 | .addlink, .changelink { 34 | padding-left: 0px; 35 | padding-right: 12px; 36 | background-position: 100% 0.2em; 37 | } 38 | 39 | .deletelink { 40 | padding-left: 0px; 41 | padding-right: 12px; 42 | background-position: 100% 0.25em; 43 | } 44 | 45 | .object-tools { 46 | float: left; 47 | } 48 | 49 | thead th:first-child, 50 | tfoot td:first-child { 51 | border-left: 1px solid #ddd !important; 52 | } 53 | 54 | /* LAYOUT */ 55 | 56 | #user-tools { 57 | right: auto; 58 | left: 0; 59 | text-align: left; 60 | } 61 | 62 | div.breadcrumbs { 63 | text-align: right; 64 | } 65 | 66 | #content-main { 67 | float: right; 68 | } 69 | 70 | #content-related { 71 | float: left; 72 | margin-left: -19em; 73 | margin-right: auto; 74 | } 75 | 76 | .colMS { 77 | margin-left: 20em !important; 78 | margin-right: 10px !important; 79 | } 80 | 81 | /* SORTABLE TABLES */ 82 | 83 | table thead th.sorted .sortoptions { 84 | float: left; 85 | } 86 | 87 | thead th.sorted .text { 88 | padding-right: 0; 89 | padding-left: 42px; 90 | } 91 | 92 | /* dashboard styles */ 93 | 94 | .dashboard .module table td a { 95 | padding-left: .6em; 96 | padding-right: 12px; 97 | } 98 | 99 | /* changelists styles */ 100 | 101 | .change-list .filtered { 102 | background: white url(../img/changelist-bg_rtl.gif) top left repeat-y !important; 103 | } 104 | 105 | .change-list .filtered table { 106 | border-left: 1px solid #ddd; 107 | border-right: 0px none; 108 | } 109 | 110 | #changelist-filter { 111 | right: auto; 112 | left: 0; 113 | border-left: 0px none; 114 | border-right: 1px solid #ddd; 115 | } 116 | 117 | .change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { 118 | margin-right: 0px !important; 119 | margin-left: 160px !important; 120 | } 121 | 122 | #changelist-filter li.selected { 123 | border-left: 0px none; 124 | padding-left: 0px; 125 | margin-left: 0; 126 | border-right: 5px solid #ccc; 127 | padding-right: 5px; 128 | margin-right: -10px; 129 | } 130 | 131 | .filtered .actions { 132 | border-left:1px solid #DDDDDD; 133 | margin-left:160px !important; 134 | border-right: 0 none; 135 | margin-right:0 !important; 136 | } 137 | 138 | #changelist table tbody td:first-child, #changelist table tbody th:first-child { 139 | border-right: 0; 140 | border-left: 1px solid #ddd; 141 | } 142 | 143 | /* FORMS */ 144 | 145 | .aligned label { 146 | padding: 0 0 3px 1em; 147 | float: right; 148 | } 149 | 150 | .submit-row { 151 | text-align: left 152 | } 153 | 154 | .submit-row p.deletelink-box { 155 | float: right; 156 | } 157 | 158 | .submit-row .deletelink { 159 | background: url(../img/icon_deletelink.gif) 0 50% no-repeat; 160 | padding-right: 14px; 161 | } 162 | 163 | .vDateField, .vTimeField { 164 | margin-left: 2px; 165 | } 166 | 167 | form ul.inline li { 168 | float: right; 169 | padding-right: 0; 170 | padding-left: 7px; 171 | } 172 | 173 | input[type=submit].default, .submit-row input.default { 174 | float: left; 175 | } 176 | 177 | fieldset .field-box { 178 | float: right; 179 | margin-left: 20px; 180 | margin-right: 0; 181 | } 182 | 183 | .errorlist li { 184 | background-position: 100% .3em; 185 | padding: 4px 25px 4px 5px; 186 | } 187 | 188 | .errornote { 189 | background-position: 100% .3em; 190 | padding: 4px 25px 4px 5px; 191 | } 192 | 193 | /* WIDGETS */ 194 | 195 | .calendarnav-previous { 196 | top: 0; 197 | left: auto; 198 | right: 0; 199 | } 200 | 201 | .calendarnav-next { 202 | top: 0; 203 | right: auto; 204 | left: 0; 205 | } 206 | 207 | .calendar caption, .calendarbox h2 { 208 | text-align: center; 209 | } 210 | 211 | .selector { 212 | float: right; 213 | } 214 | 215 | .selector .selector-filter { 216 | text-align: right; 217 | } 218 | 219 | .inline-deletelink { 220 | float: left; 221 | } 222 | 223 | /* MISC */ 224 | 225 | .inline-related h2, .inline-group h2 { 226 | text-align: right 227 | } 228 | 229 | .inline-related h3 span.delete { 230 | padding-right: 20px; 231 | padding-left: inherit; 232 | left: 10px; 233 | right: inherit; 234 | float:left; 235 | } 236 | 237 | .inline-related h3 span.delete label { 238 | margin-left: inherit; 239 | margin-right: 2px; 240 | } 241 | 242 | /* IE7 specific bug fixes */ 243 | 244 | div.colM { 245 | position: relative; 246 | } 247 | 248 | .submit-row input { 249 | float: left; 250 | } -------------------------------------------------------------------------------- /my_blog/static/admin/img/changelist-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/changelist-bg.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/changelist-bg_rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/changelist-bg_rtl.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/default-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/default-bg-reverse.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/default-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/default-bg.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/deleted-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/deleted-overlay.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/gis/move_vertex_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/gis/move_vertex_off.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/gis/move_vertex_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/gis/move_vertex_on.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon-no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon-no.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon-unknown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon-unknown.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon-yes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon-yes.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_addlink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_addlink.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_alert.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_alert.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_calendar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_calendar.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_changelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_changelink.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_clock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_clock.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_deletelink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_deletelink.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_error.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_error.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_searchbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_searchbox.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/icon_success.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/icon_success.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/inline-delete-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/inline-delete-8bit.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/inline-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/inline-delete.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/inline-restore-8bit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/inline-restore-8bit.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/inline-restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/inline-restore.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/inline-splitter-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/inline-splitter-bg.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/nav-bg-grabber.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/nav-bg-grabber.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/nav-bg-reverse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/nav-bg-reverse.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/nav-bg-selected.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/nav-bg-selected.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/nav-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/nav-bg.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/selector-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/selector-icons.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/selector-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/selector-search.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/sorting-icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/sorting-icons.gif -------------------------------------------------------------------------------- /my_blog/static/admin/img/tooltag-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/tooltag-add.png -------------------------------------------------------------------------------- /my_blog/static/admin/img/tooltag-arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/admin/img/tooltag-arrowright.png -------------------------------------------------------------------------------- /my_blog/static/admin/js/LICENSE-JQUERY.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010 John Resig, http://jquery.com/ 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /my_blog/static/admin/js/SelectBox.js: -------------------------------------------------------------------------------- 1 | var SelectBox = { 2 | cache: new Object(), 3 | init: function(id) { 4 | var box = document.getElementById(id); 5 | var node; 6 | SelectBox.cache[id] = new Array(); 7 | var cache = SelectBox.cache[id]; 8 | for (var i = 0; (node = box.options[i]); i++) { 9 | cache.push({value: node.value, text: node.text, displayed: 1}); 10 | } 11 | }, 12 | redisplay: function(id) { 13 | // Repopulate HTML select box from cache 14 | var box = document.getElementById(id); 15 | box.options.length = 0; // clear all options 16 | for (var i = 0, j = SelectBox.cache[id].length; i < j; i++) { 17 | var node = SelectBox.cache[id][i]; 18 | if (node.displayed) { 19 | var new_option = new Option(node.text, node.value, false, false); 20 | // Shows a tooltip when hovering over the option 21 | new_option.setAttribute("title", node.text); 22 | box.options[box.options.length] = new_option; 23 | } 24 | } 25 | }, 26 | filter: function(id, text) { 27 | // Redisplay the HTML select box, displaying only the choices containing ALL 28 | // the words in text. (It's an AND search.) 29 | var tokens = text.toLowerCase().split(/\s+/); 30 | var node, token; 31 | for (var i = 0; (node = SelectBox.cache[id][i]); i++) { 32 | node.displayed = 1; 33 | for (var j = 0; (token = tokens[j]); j++) { 34 | if (node.text.toLowerCase().indexOf(token) == -1) { 35 | node.displayed = 0; 36 | } 37 | } 38 | } 39 | SelectBox.redisplay(id); 40 | }, 41 | delete_from_cache: function(id, value) { 42 | var node, delete_index = null; 43 | for (var i = 0; (node = SelectBox.cache[id][i]); i++) { 44 | if (node.value == value) { 45 | delete_index = i; 46 | break; 47 | } 48 | } 49 | var j = SelectBox.cache[id].length - 1; 50 | for (var i = delete_index; i < j; i++) { 51 | SelectBox.cache[id][i] = SelectBox.cache[id][i+1]; 52 | } 53 | SelectBox.cache[id].length--; 54 | }, 55 | add_to_cache: function(id, option) { 56 | SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1}); 57 | }, 58 | cache_contains: function(id, value) { 59 | // Check if an item is contained in the cache 60 | var node; 61 | for (var i = 0; (node = SelectBox.cache[id][i]); i++) { 62 | if (node.value == value) { 63 | return true; 64 | } 65 | } 66 | return false; 67 | }, 68 | move: function(from, to) { 69 | var from_box = document.getElementById(from); 70 | var to_box = document.getElementById(to); 71 | var option; 72 | for (var i = 0; (option = from_box.options[i]); i++) { 73 | if (option.selected && SelectBox.cache_contains(from, option.value)) { 74 | SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); 75 | SelectBox.delete_from_cache(from, option.value); 76 | } 77 | } 78 | SelectBox.redisplay(from); 79 | SelectBox.redisplay(to); 80 | }, 81 | move_all: function(from, to) { 82 | var from_box = document.getElementById(from); 83 | var to_box = document.getElementById(to); 84 | var option; 85 | for (var i = 0; (option = from_box.options[i]); i++) { 86 | if (SelectBox.cache_contains(from, option.value)) { 87 | SelectBox.add_to_cache(to, {value: option.value, text: option.text, displayed: 1}); 88 | SelectBox.delete_from_cache(from, option.value); 89 | } 90 | } 91 | SelectBox.redisplay(from); 92 | SelectBox.redisplay(to); 93 | }, 94 | sort: function(id) { 95 | SelectBox.cache[id].sort( function(a, b) { 96 | a = a.text.toLowerCase(); 97 | b = b.text.toLowerCase(); 98 | try { 99 | if (a > b) return 1; 100 | if (a < b) return -1; 101 | } 102 | catch (e) { 103 | // silently fail on IE 'unknown' exception 104 | } 105 | return 0; 106 | } ); 107 | }, 108 | select_all: function(id) { 109 | var box = document.getElementById(id); 110 | for (var i = 0; i < box.options.length; i++) { 111 | box.options[i].selected = 'selected'; 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/SelectFilter2.js: -------------------------------------------------------------------------------- 1 | /* 2 | SelectFilter2 - Turns a multiple-select box into a filter interface. 3 | 4 | Requires core.js, SelectBox.js and addevent.js. 5 | */ 6 | (function($) { 7 | function findForm(node) { 8 | // returns the node of the form containing the given node 9 | if (node.tagName.toLowerCase() != 'form') { 10 | return findForm(node.parentNode); 11 | } 12 | return node; 13 | } 14 | 15 | window.SelectFilter = { 16 | init: function(field_id, field_name, is_stacked, admin_static_prefix) { 17 | if (field_id.match(/__prefix__/)){ 18 | // Don't intialize on empty forms. 19 | return; 20 | } 21 | var from_box = document.getElementById(field_id); 22 | from_box.id += '_from'; // change its ID 23 | from_box.className = 'filtered'; 24 | 25 | var ps = from_box.parentNode.getElementsByTagName('p'); 26 | for (var i=0; i, because it just gets in the way. 29 | from_box.parentNode.removeChild(ps[i]); 30 | } else if (ps[i].className.indexOf("help") != -1) { 31 | // Move help text up to the top so it isn't below the select 32 | // boxes or wrapped off on the side to the right of the add 33 | // button: 34 | from_box.parentNode.insertBefore(ps[i], from_box.parentNode.firstChild); 35 | } 36 | } 37 | 38 | //
or
39 | var selector_div = quickElement('div', from_box.parentNode); 40 | selector_div.className = is_stacked ? 'selector stacked' : 'selector'; 41 | 42 | //
43 | var selector_available = quickElement('div', selector_div); 44 | selector_available.className = 'selector-available'; 45 | var title_available = quickElement('h2', selector_available, interpolate(gettext('Available %s') + ' ', [field_name])); 46 | quickElement('img', title_available, '', 'src', admin_static_prefix + 'img/icon-unknown.gif', 'width', '10', 'height', '10', 'class', 'help help-tooltip', 'title', interpolate(gettext('This is the list of available %s. You may choose some by selecting them in the box below and then clicking the "Choose" arrow between the two boxes.'), [field_name])); 47 | 48 | var filter_p = quickElement('p', selector_available, '', 'id', field_id + '_filter'); 49 | filter_p.className = 'selector-filter'; 50 | 51 | var search_filter_label = quickElement('label', filter_p, '', 'for', field_id + "_input"); 52 | 53 | var search_selector_img = quickElement('img', search_filter_label, '', 'src', admin_static_prefix + 'img/selector-search.gif', 'class', 'help-tooltip', 'alt', '', 'title', interpolate(gettext("Type into this box to filter down the list of available %s."), [field_name])); 54 | 55 | filter_p.appendChild(document.createTextNode(' ')); 56 | 57 | var filter_input = quickElement('input', filter_p, '', 'type', 'text', 'placeholder', gettext("Filter")); 58 | filter_input.id = field_id + '_input'; 59 | 60 | selector_available.appendChild(from_box); 61 | var choose_all = quickElement('a', selector_available, gettext('Choose all'), 'title', interpolate(gettext('Click to choose all %s at once.'), [field_name]), 'href', 'javascript: (function(){ SelectBox.move_all("' + field_id + '_from", "' + field_id + '_to"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_add_all_link'); 62 | choose_all.className = 'selector-chooseall'; 63 | 64 | //
    65 | var selector_chooser = quickElement('ul', selector_div); 66 | selector_chooser.className = 'selector-chooser'; 67 | var add_link = quickElement('a', quickElement('li', selector_chooser), gettext('Choose'), 'title', gettext('Choose'), 'href', 'javascript: (function(){ SelectBox.move("' + field_id + '_from","' + field_id + '_to"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_add_link'); 68 | add_link.className = 'selector-add'; 69 | var remove_link = quickElement('a', quickElement('li', selector_chooser), gettext('Remove'), 'title', gettext('Remove'), 'href', 'javascript: (function(){ SelectBox.move("' + field_id + '_to","' + field_id + '_from"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_remove_link'); 70 | remove_link.className = 'selector-remove'; 71 | 72 | //
    73 | var selector_chosen = quickElement('div', selector_div); 74 | selector_chosen.className = 'selector-chosen'; 75 | var title_chosen = quickElement('h2', selector_chosen, interpolate(gettext('Chosen %s') + ' ', [field_name])); 76 | quickElement('img', title_chosen, '', 'src', admin_static_prefix + 'img/icon-unknown.gif', 'width', '10', 'height', '10', 'class', 'help help-tooltip', 'title', interpolate(gettext('This is the list of chosen %s. You may remove some by selecting them in the box below and then clicking the "Remove" arrow between the two boxes.'), [field_name])); 77 | 78 | var to_box = quickElement('select', selector_chosen, '', 'id', field_id + '_to', 'multiple', 'multiple', 'size', from_box.size, 'name', from_box.getAttribute('name')); 79 | to_box.className = 'filtered'; 80 | var clear_all = quickElement('a', selector_chosen, gettext('Remove all'), 'title', interpolate(gettext('Click to remove all chosen %s at once.'), [field_name]), 'href', 'javascript: (function() { SelectBox.move_all("' + field_id + '_to", "' + field_id + '_from"); SelectFilter.refresh_icons("' + field_id + '");})()', 'id', field_id + '_remove_all_link'); 81 | clear_all.className = 'selector-clearall'; 82 | 83 | from_box.setAttribute('name', from_box.getAttribute('name') + '_old'); 84 | 85 | // Set up the JavaScript event handlers for the select box filter interface 86 | addEvent(filter_input, 'keyup', function(e) { SelectFilter.filter_key_up(e, field_id); }); 87 | addEvent(filter_input, 'keydown', function(e) { SelectFilter.filter_key_down(e, field_id); }); 88 | addEvent(from_box, 'change', function(e) { SelectFilter.refresh_icons(field_id) }); 89 | addEvent(to_box, 'change', function(e) { SelectFilter.refresh_icons(field_id) }); 90 | addEvent(from_box, 'dblclick', function() { SelectBox.move(field_id + '_from', field_id + '_to'); SelectFilter.refresh_icons(field_id); }); 91 | addEvent(to_box, 'dblclick', function() { SelectBox.move(field_id + '_to', field_id + '_from'); SelectFilter.refresh_icons(field_id); }); 92 | addEvent(findForm(from_box), 'submit', function() { SelectBox.select_all(field_id + '_to'); }); 93 | SelectBox.init(field_id + '_from'); 94 | SelectBox.init(field_id + '_to'); 95 | // Move selected from_box options to to_box 96 | SelectBox.move(field_id + '_from', field_id + '_to'); 97 | 98 | if (!is_stacked) { 99 | // In horizontal mode, give the same height to the two boxes. 100 | var j_from_box = $(from_box); 101 | var j_to_box = $(to_box); 102 | var resize_filters = function() { j_to_box.height($(filter_p).outerHeight() + j_from_box.outerHeight()); } 103 | if (j_from_box.outerHeight() > 0) { 104 | resize_filters(); // This fieldset is already open. Resize now. 105 | } else { 106 | // This fieldset is probably collapsed. Wait for its 'show' event. 107 | j_to_box.closest('fieldset').one('show.fieldset', resize_filters); 108 | } 109 | } 110 | 111 | // Initial icon refresh 112 | SelectFilter.refresh_icons(field_id); 113 | }, 114 | refresh_icons: function(field_id) { 115 | var from = $('#' + field_id + '_from'); 116 | var to = $('#' + field_id + '_to'); 117 | var is_from_selected = from.find('option:selected').length > 0; 118 | var is_to_selected = to.find('option:selected').length > 0; 119 | // Active if at least one item is selected 120 | $('#' + field_id + '_add_link').toggleClass('active', is_from_selected); 121 | $('#' + field_id + '_remove_link').toggleClass('active', is_to_selected); 122 | // Active if the corresponding box isn't empty 123 | $('#' + field_id + '_add_all_link').toggleClass('active', from.find('option').length > 0); 124 | $('#' + field_id + '_remove_all_link').toggleClass('active', to.find('option').length > 0); 125 | }, 126 | filter_key_up: function(event, field_id) { 127 | var from = document.getElementById(field_id + '_from'); 128 | // don't submit form if user pressed Enter 129 | if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) { 130 | from.selectedIndex = 0; 131 | SelectBox.move(field_id + '_from', field_id + '_to'); 132 | from.selectedIndex = 0; 133 | return false; 134 | } 135 | var temp = from.selectedIndex; 136 | SelectBox.filter(field_id + '_from', document.getElementById(field_id + '_input').value); 137 | from.selectedIndex = temp; 138 | return true; 139 | }, 140 | filter_key_down: function(event, field_id) { 141 | var from = document.getElementById(field_id + '_from'); 142 | // right arrow -- move across 143 | if ((event.which && event.which == 39) || (event.keyCode && event.keyCode == 39)) { 144 | var old_index = from.selectedIndex; 145 | SelectBox.move(field_id + '_from', field_id + '_to'); 146 | from.selectedIndex = (old_index == from.length) ? from.length - 1 : old_index; 147 | return false; 148 | } 149 | // down arrow -- wrap around 150 | if ((event.which && event.which == 40) || (event.keyCode && event.keyCode == 40)) { 151 | from.selectedIndex = (from.length == from.selectedIndex + 1) ? 0 : from.selectedIndex + 1; 152 | } 153 | // up arrow -- wrap around 154 | if ((event.which && event.which == 38) || (event.keyCode && event.keyCode == 38)) { 155 | from.selectedIndex = (from.selectedIndex == 0) ? from.length - 1 : from.selectedIndex - 1; 156 | } 157 | return true; 158 | } 159 | } 160 | 161 | })(django.jQuery); 162 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/actions.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | var lastChecked; 3 | 4 | $.fn.actions = function(opts) { 5 | var options = $.extend({}, $.fn.actions.defaults, opts); 6 | var actionCheckboxes = $(this); 7 | var list_editable_changed = false; 8 | var checker = function(checked) { 9 | if (checked) { 10 | showQuestion(); 11 | } else { 12 | reset(); 13 | } 14 | $(actionCheckboxes).prop("checked", checked) 15 | .parent().parent().toggleClass(options.selectedClass, checked); 16 | }, 17 | updateCounter = function() { 18 | var sel = $(actionCheckboxes).filter(":checked").length; 19 | // _actions_icnt is defined in the generated HTML 20 | // and contains the total amount of objects in the queryset 21 | $(options.counterContainer).html(interpolate( 22 | ngettext('%(sel)s of %(cnt)s selected', '%(sel)s of %(cnt)s selected', sel), { 23 | sel: sel, 24 | cnt: _actions_icnt 25 | }, true)); 26 | $(options.allToggle).prop("checked", function() { 27 | var value; 28 | if (sel == actionCheckboxes.length) { 29 | value = true; 30 | showQuestion(); 31 | } else { 32 | value = false; 33 | clearAcross(); 34 | } 35 | return value; 36 | }); 37 | }, 38 | showQuestion = function() { 39 | $(options.acrossClears).hide(); 40 | $(options.acrossQuestions).show(); 41 | $(options.allContainer).hide(); 42 | }, 43 | showClear = function() { 44 | $(options.acrossClears).show(); 45 | $(options.acrossQuestions).hide(); 46 | $(options.actionContainer).toggleClass(options.selectedClass); 47 | $(options.allContainer).show(); 48 | $(options.counterContainer).hide(); 49 | }, 50 | reset = function() { 51 | $(options.acrossClears).hide(); 52 | $(options.acrossQuestions).hide(); 53 | $(options.allContainer).hide(); 54 | $(options.counterContainer).show(); 55 | }, 56 | clearAcross = function() { 57 | reset(); 58 | $(options.acrossInput).val(0); 59 | $(options.actionContainer).removeClass(options.selectedClass); 60 | }; 61 | // Show counter by default 62 | $(options.counterContainer).show(); 63 | // Check state of checkboxes and reinit state if needed 64 | $(this).filter(":checked").each(function(i) { 65 | $(this).parent().parent().toggleClass(options.selectedClass); 66 | updateCounter(); 67 | if ($(options.acrossInput).val() == 1) { 68 | showClear(); 69 | } 70 | }); 71 | $(options.allToggle).show().click(function() { 72 | checker($(this).prop("checked")); 73 | updateCounter(); 74 | }); 75 | $("a", options.acrossQuestions).click(function(event) { 76 | event.preventDefault(); 77 | $(options.acrossInput).val(1); 78 | showClear(); 79 | }); 80 | $("a", options.acrossClears).click(function(event) { 81 | event.preventDefault(); 82 | $(options.allToggle).prop("checked", false); 83 | clearAcross(); 84 | checker(0); 85 | updateCounter(); 86 | }); 87 | lastChecked = null; 88 | $(actionCheckboxes).click(function(event) { 89 | if (!event) { event = window.event; } 90 | var target = event.target ? event.target : event.srcElement; 91 | if (lastChecked && $.data(lastChecked) != $.data(target) && event.shiftKey === true) { 92 | var inrange = false; 93 | $(lastChecked).prop("checked", target.checked) 94 | .parent().parent().toggleClass(options.selectedClass, target.checked); 95 | $(actionCheckboxes).each(function() { 96 | if ($.data(this) == $.data(lastChecked) || $.data(this) == $.data(target)) { 97 | inrange = (inrange) ? false : true; 98 | } 99 | if (inrange) { 100 | $(this).prop("checked", target.checked) 101 | .parent().parent().toggleClass(options.selectedClass, target.checked); 102 | } 103 | }); 104 | } 105 | $(target).parent().parent().toggleClass(options.selectedClass, target.checked); 106 | lastChecked = target; 107 | updateCounter(); 108 | }); 109 | $('form#changelist-form table#result_list tr').find('td:gt(0) :input').change(function() { 110 | list_editable_changed = true; 111 | }); 112 | $('form#changelist-form button[name="index"]').click(function(event) { 113 | if (list_editable_changed) { 114 | return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost.")); 115 | } 116 | }); 117 | $('form#changelist-form input[name="_save"]').click(function(event) { 118 | var action_changed = false; 119 | $('select option:selected', options.actionContainer).each(function() { 120 | if ($(this).val()) { 121 | action_changed = true; 122 | } 123 | }); 124 | if (action_changed) { 125 | if (list_editable_changed) { 126 | return confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")); 127 | } else { 128 | return confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button.")); 129 | } 130 | } 131 | }); 132 | }; 133 | /* Setup plugin defaults */ 134 | $.fn.actions.defaults = { 135 | actionContainer: "div.actions", 136 | counterContainer: "span.action-counter", 137 | allContainer: "div.actions span.all", 138 | acrossInput: "div.actions input.select-across", 139 | acrossQuestions: "div.actions span.question", 140 | acrossClears: "div.actions span.clear", 141 | allToggle: "#action-toggle", 142 | selectedClass: "selected" 143 | }; 144 | })(django.jQuery); 145 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/actions.min.js: -------------------------------------------------------------------------------- 1 | (function(a){var f;a.fn.actions=function(q){var b=a.extend({},a.fn.actions.defaults,q),g=a(this),e=!1,m=function(c){c?k():l();a(g).prop("checked",c).parent().parent().toggleClass(b.selectedClass,c)},h=function(){var c=a(g).filter(":checked").length;a(b.counterContainer).html(interpolate(ngettext("%(sel)s of %(cnt)s selected","%(sel)s of %(cnt)s selected",c),{sel:c,cnt:_actions_icnt},!0));a(b.allToggle).prop("checked",function(){var a;c==g.length?(a=!0,k()):(a=!1,n());return a})},k=function(){a(b.acrossClears).hide(); 2 | a(b.acrossQuestions).show();a(b.allContainer).hide()},p=function(){a(b.acrossClears).show();a(b.acrossQuestions).hide();a(b.actionContainer).toggleClass(b.selectedClass);a(b.allContainer).show();a(b.counterContainer).hide()},l=function(){a(b.acrossClears).hide();a(b.acrossQuestions).hide();a(b.allContainer).hide();a(b.counterContainer).show()},n=function(){l();a(b.acrossInput).val(0);a(b.actionContainer).removeClass(b.selectedClass)};a(b.counterContainer).show();a(this).filter(":checked").each(function(c){a(this).parent().parent().toggleClass(b.selectedClass); 3 | h();1==a(b.acrossInput).val()&&p()});a(b.allToggle).show().click(function(){m(a(this).prop("checked"));h()});a("a",b.acrossQuestions).click(function(c){c.preventDefault();a(b.acrossInput).val(1);p()});a("a",b.acrossClears).click(function(c){c.preventDefault();a(b.allToggle).prop("checked",!1);n();m(0);h()});f=null;a(g).click(function(c){c||(c=window.event);var d=c.target?c.target:c.srcElement;if(f&&a.data(f)!=a.data(d)&&!0===c.shiftKey){var e=!1;a(f).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass, 4 | d.checked);a(g).each(function(){if(a.data(this)==a.data(f)||a.data(this)==a.data(d))e=e?!1:!0;e&&a(this).prop("checked",d.checked).parent().parent().toggleClass(b.selectedClass,d.checked)})}a(d).parent().parent().toggleClass(b.selectedClass,d.checked);f=d;h()});a("form#changelist-form table#result_list tr").find("td:gt(0) :input").change(function(){e=!0});a('form#changelist-form button[name="index"]').click(function(a){if(e)return confirm(gettext("You have unsaved changes on individual editable fields. If you run an action, your unsaved changes will be lost."))}); 5 | a('form#changelist-form input[name="_save"]').click(function(c){var d=!1;a("select option:selected",b.actionContainer).each(function(){a(this).val()&&(d=!0)});if(d)return e?confirm(gettext("You have selected an action, but you haven't saved your changes to individual fields yet. Please click OK to save. You'll need to re-run the action.")):confirm(gettext("You have selected an action, and you haven't made any changes on individual fields. You're probably looking for the Go button rather than the Save button."))})}; 6 | a.fn.actions.defaults={actionContainer:"div.actions",counterContainer:"span.action-counter",allContainer:"div.actions span.all",acrossInput:"div.actions input.select-across",acrossQuestions:"div.actions span.question",acrossClears:"div.actions span.clear",allToggle:"#action-toggle",selectedClass:"selected"}})(django.jQuery); 7 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/admin/RelatedObjectLookups.js: -------------------------------------------------------------------------------- 1 | // Handles related-objects functionality: lookup link for raw_id_fields 2 | // and Add Another links. 3 | 4 | function html_unescape(text) { 5 | // Unescape a string that was escaped using django.utils.html.escape. 6 | text = text.replace(/</g, '<'); 7 | text = text.replace(/>/g, '>'); 8 | text = text.replace(/"/g, '"'); 9 | text = text.replace(/'/g, "'"); 10 | text = text.replace(/&/g, '&'); 11 | return text; 12 | } 13 | 14 | // IE doesn't accept periods or dashes in the window name, but the element IDs 15 | // we use to generate popup window names may contain them, therefore we map them 16 | // to allowed characters in a reversible way so that we can locate the correct 17 | // element when the popup window is dismissed. 18 | function id_to_windowname(text) { 19 | text = text.replace(/\./g, '__dot__'); 20 | text = text.replace(/\-/g, '__dash__'); 21 | return text; 22 | } 23 | 24 | function windowname_to_id(text) { 25 | text = text.replace(/__dot__/g, '.'); 26 | text = text.replace(/__dash__/g, '-'); 27 | return text; 28 | } 29 | 30 | function showRelatedObjectLookupPopup(triggeringLink) { 31 | var name = triggeringLink.id.replace(/^lookup_/, ''); 32 | name = id_to_windowname(name); 33 | var href; 34 | if (triggeringLink.href.search(/\?/) >= 0) { 35 | href = triggeringLink.href + '&_popup=1'; 36 | } else { 37 | href = triggeringLink.href + '?_popup=1'; 38 | } 39 | var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 40 | win.focus(); 41 | return false; 42 | } 43 | 44 | function dismissRelatedLookupPopup(win, chosenId) { 45 | var name = windowname_to_id(win.name); 46 | var elem = document.getElementById(name); 47 | if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { 48 | elem.value += ',' + chosenId; 49 | } else { 50 | document.getElementById(name).value = chosenId; 51 | } 52 | win.close(); 53 | } 54 | 55 | function showAddAnotherPopup(triggeringLink) { 56 | var name = triggeringLink.id.replace(/^add_/, ''); 57 | name = id_to_windowname(name); 58 | var href = triggeringLink.href; 59 | if (href.indexOf('?') == -1) { 60 | href += '?_popup=1'; 61 | } else { 62 | href += '&_popup=1'; 63 | } 64 | var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); 65 | win.focus(); 66 | return false; 67 | } 68 | 69 | function dismissAddAnotherPopup(win, newId, newRepr) { 70 | // newId and newRepr are expected to have previously been escaped by 71 | // django.utils.html.escape. 72 | newId = html_unescape(newId); 73 | newRepr = html_unescape(newRepr); 74 | var name = windowname_to_id(win.name); 75 | var elem = document.getElementById(name); 76 | var o; 77 | if (elem) { 78 | var elemName = elem.nodeName.toUpperCase(); 79 | if (elemName == 'SELECT') { 80 | o = new Option(newRepr, newId); 81 | elem.options[elem.options.length] = o; 82 | o.selected = true; 83 | } else if (elemName == 'INPUT') { 84 | if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) { 85 | elem.value += ',' + newId; 86 | } else { 87 | elem.value = newId; 88 | } 89 | } 90 | } else { 91 | var toId = name + "_to"; 92 | o = new Option(newRepr, newId); 93 | SelectBox.add_to_cache(toId, o); 94 | SelectBox.redisplay(toId); 95 | } 96 | win.close(); 97 | } 98 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/calendar.js: -------------------------------------------------------------------------------- 1 | /* 2 | calendar.js - Calendar functions by Adrian Holovaty 3 | depends on core.js for utility functions like removeChildren or quickElement 4 | */ 5 | 6 | // CalendarNamespace -- Provides a collection of HTML calendar-related helper functions 7 | var CalendarNamespace = { 8 | monthsOfYear: gettext('January February March April May June July August September October November December').split(' '), 9 | daysOfWeek: gettext('S M T W T F S').split(' '), 10 | firstDayOfWeek: parseInt(get_format('FIRST_DAY_OF_WEEK')), 11 | isLeapYear: function(year) { 12 | return (((year % 4)==0) && ((year % 100)!=0) || ((year % 400)==0)); 13 | }, 14 | getDaysInMonth: function(month,year) { 15 | var days; 16 | if (month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12) { 17 | days = 31; 18 | } 19 | else if (month==4 || month==6 || month==9 || month==11) { 20 | days = 30; 21 | } 22 | else if (month==2 && CalendarNamespace.isLeapYear(year)) { 23 | days = 29; 24 | } 25 | else { 26 | days = 28; 27 | } 28 | return days; 29 | }, 30 | draw: function(month, year, div_id, callback, selected) { // month = 1-12, year = 1-9999 31 | var today = new Date(); 32 | var todayDay = today.getDate(); 33 | var todayMonth = today.getMonth()+1; 34 | var todayYear = today.getFullYear(); 35 | var todayClass = ''; 36 | 37 | // Use UTC functions here because the date field does not contain time 38 | // and using the UTC function variants prevent the local time offset 39 | // from altering the date, specifically the day field. For example: 40 | // 41 | // ``` 42 | // var x = new Date('2013-10-02'); 43 | // var day = x.getDate(); 44 | // ``` 45 | // 46 | // The day variable above will be 1 instead of 2 in, say, US Pacific time 47 | // zone. 48 | var isSelectedMonth = false; 49 | if (typeof selected != 'undefined') { 50 | isSelectedMonth = (selected.getUTCFullYear() == year && (selected.getUTCMonth()+1) == month); 51 | } 52 | 53 | month = parseInt(month); 54 | year = parseInt(year); 55 | var calDiv = document.getElementById(div_id); 56 | removeChildren(calDiv); 57 | var calTable = document.createElement('table'); 58 | quickElement('caption', calTable, CalendarNamespace.monthsOfYear[month-1] + ' ' + year); 59 | var tableBody = quickElement('tbody', calTable); 60 | 61 | // Draw days-of-week header 62 | var tableRow = quickElement('tr', tableBody); 63 | for (var i = 0; i < 7; i++) { 64 | quickElement('th', tableRow, CalendarNamespace.daysOfWeek[(i + CalendarNamespace.firstDayOfWeek) % 7]); 65 | } 66 | 67 | var startingPos = new Date(year, month-1, 1 - CalendarNamespace.firstDayOfWeek).getDay(); 68 | var days = CalendarNamespace.getDaysInMonth(month, year); 69 | 70 | // Draw blanks before first of month 71 | tableRow = quickElement('tr', tableBody); 72 | for (var i = 0; i < startingPos; i++) { 73 | var _cell = quickElement('td', tableRow, ' '); 74 | _cell.className = "nonday"; 75 | } 76 | 77 | // Draw days of month 78 | var currentDay = 1; 79 | for (var i = startingPos; currentDay <= days; i++) { 80 | if (i%7 == 0 && currentDay != 1) { 81 | tableRow = quickElement('tr', tableBody); 82 | } 83 | if ((currentDay==todayDay) && (month==todayMonth) && (year==todayYear)) { 84 | todayClass='today'; 85 | } else { 86 | todayClass=''; 87 | } 88 | 89 | // use UTC function; see above for explanation. 90 | if (isSelectedMonth && currentDay == selected.getUTCDate()) { 91 | if (todayClass != '') todayClass += " "; 92 | todayClass += "selected"; 93 | } 94 | 95 | var cell = quickElement('td', tableRow, '', 'class', todayClass); 96 | 97 | quickElement('a', cell, currentDay, 'href', 'javascript:void(' + callback + '('+year+','+month+','+currentDay+'));'); 98 | currentDay++; 99 | } 100 | 101 | // Draw blanks after end of month (optional, but makes for valid code) 102 | while (tableRow.childNodes.length < 7) { 103 | var _cell = quickElement('td', tableRow, ' '); 104 | _cell.className = "nonday"; 105 | } 106 | 107 | calDiv.appendChild(calTable); 108 | } 109 | } 110 | 111 | // Calendar -- A calendar instance 112 | function Calendar(div_id, callback, selected) { 113 | // div_id (string) is the ID of the element in which the calendar will 114 | // be displayed 115 | // callback (string) is the name of a JavaScript function that will be 116 | // called with the parameters (year, month, day) when a day in the 117 | // calendar is clicked 118 | this.div_id = div_id; 119 | this.callback = callback; 120 | this.today = new Date(); 121 | this.currentMonth = this.today.getMonth() + 1; 122 | this.currentYear = this.today.getFullYear(); 123 | if (typeof selected != 'undefined') { 124 | this.selected = selected; 125 | } 126 | } 127 | Calendar.prototype = { 128 | drawCurrent: function() { 129 | CalendarNamespace.draw(this.currentMonth, this.currentYear, this.div_id, this.callback, this.selected); 130 | }, 131 | drawDate: function(month, year, selected) { 132 | this.currentMonth = month; 133 | this.currentYear = year; 134 | 135 | if(selected) { 136 | this.selected = selected; 137 | } 138 | 139 | this.drawCurrent(); 140 | }, 141 | drawPreviousMonth: function() { 142 | if (this.currentMonth == 1) { 143 | this.currentMonth = 12; 144 | this.currentYear--; 145 | } 146 | else { 147 | this.currentMonth--; 148 | } 149 | this.drawCurrent(); 150 | }, 151 | drawNextMonth: function() { 152 | if (this.currentMonth == 12) { 153 | this.currentMonth = 1; 154 | this.currentYear++; 155 | } 156 | else { 157 | this.currentMonth++; 158 | } 159 | this.drawCurrent(); 160 | }, 161 | drawPreviousYear: function() { 162 | this.currentYear--; 163 | this.drawCurrent(); 164 | }, 165 | drawNextYear: function() { 166 | this.currentYear++; 167 | this.drawCurrent(); 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/collapse.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $(document).ready(function() { 3 | // Add anchor tag for Show/Hide link 4 | $("fieldset.collapse").each(function(i, elem) { 5 | // Don't hide if fields in this fieldset have errors 6 | if ($(elem).find("div.errors").length == 0) { 7 | $(elem).addClass("collapsed").find("h2").first().append(' (' + gettext("Show") + 9 | ')'); 10 | } 11 | }); 12 | // Add toggle to anchor tag 13 | $("fieldset.collapse a.collapse-toggle").click(function(ev) { 14 | if ($(this).closest("fieldset").hasClass("collapsed")) { 15 | // Show 16 | $(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset", [$(this).attr("id")]); 17 | } else { 18 | // Hide 19 | $(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", [$(this).attr("id")]); 20 | } 21 | return false; 22 | }); 23 | }); 24 | })(django.jQuery); 25 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/collapse.min.js: -------------------------------------------------------------------------------- 1 | (function(a){a(document).ready(function(){a("fieldset.collapse").each(function(c,b){a(b).find("div.errors").length==0&&a(b).addClass("collapsed").find("h2").first().append(' ('+gettext("Show")+")")});a("fieldset.collapse a.collapse-toggle").click(function(){a(this).closest("fieldset").hasClass("collapsed")?a(this).text(gettext("Hide")).closest("fieldset").removeClass("collapsed").trigger("show.fieldset",[a(this).attr("id")]):a(this).text(gettext("Show")).closest("fieldset").addClass("collapsed").trigger("hide.fieldset", 2 | [a(this).attr("id")]);return false})})})(django.jQuery); 3 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/core.js: -------------------------------------------------------------------------------- 1 | // Core javascript helper functions 2 | 3 | // basic browser identification & version 4 | var isOpera = (navigator.userAgent.indexOf("Opera")>=0) && parseFloat(navigator.appVersion); 5 | var isIE = ((document.all) && (!isOpera)) && parseFloat(navigator.appVersion.split("MSIE ")[1].split(";")[0]); 6 | 7 | // Cross-browser event handlers. 8 | function addEvent(obj, evType, fn) { 9 | if (obj.addEventListener) { 10 | obj.addEventListener(evType, fn, false); 11 | return true; 12 | } else if (obj.attachEvent) { 13 | var r = obj.attachEvent("on" + evType, fn); 14 | return r; 15 | } else { 16 | return false; 17 | } 18 | } 19 | 20 | function removeEvent(obj, evType, fn) { 21 | if (obj.removeEventListener) { 22 | obj.removeEventListener(evType, fn, false); 23 | return true; 24 | } else if (obj.detachEvent) { 25 | obj.detachEvent("on" + evType, fn); 26 | return true; 27 | } else { 28 | return false; 29 | } 30 | } 31 | 32 | function cancelEventPropagation(e) { 33 | if (!e) e = window.event; 34 | e.cancelBubble = true; 35 | if (e.stopPropagation) e.stopPropagation(); 36 | } 37 | 38 | // quickElement(tagType, parentReference [, textInChildNode, attribute, attributeValue ...]); 39 | function quickElement() { 40 | var obj = document.createElement(arguments[0]); 41 | if (arguments[2]) { 42 | var textNode = document.createTextNode(arguments[2]); 43 | obj.appendChild(textNode); 44 | } 45 | var len = arguments.length; 46 | for (var i = 3; i < len; i += 2) { 47 | obj.setAttribute(arguments[i], arguments[i+1]); 48 | } 49 | arguments[1].appendChild(obj); 50 | return obj; 51 | } 52 | 53 | // "a" is reference to an object 54 | function removeChildren(a) { 55 | while (a.hasChildNodes()) a.removeChild(a.lastChild); 56 | } 57 | 58 | // ---------------------------------------------------------------------------- 59 | // Cross-browser xmlhttp object 60 | // from http://jibbering.com/2002/4/httprequest.html 61 | // ---------------------------------------------------------------------------- 62 | var xmlhttp; 63 | /*@cc_on @*/ 64 | /*@if (@_jscript_version >= 5) 65 | try { 66 | xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 67 | } catch (e) { 68 | try { 69 | xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 70 | } catch (E) { 71 | xmlhttp = false; 72 | } 73 | } 74 | @else 75 | xmlhttp = false; 76 | @end @*/ 77 | if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 78 | xmlhttp = new XMLHttpRequest(); 79 | } 80 | 81 | // ---------------------------------------------------------------------------- 82 | // Find-position functions by PPK 83 | // See http://www.quirksmode.org/js/findpos.html 84 | // ---------------------------------------------------------------------------- 85 | function findPosX(obj) { 86 | var curleft = 0; 87 | if (obj.offsetParent) { 88 | while (obj.offsetParent) { 89 | curleft += obj.offsetLeft - ((isOpera) ? 0 : obj.scrollLeft); 90 | obj = obj.offsetParent; 91 | } 92 | // IE offsetParent does not include the top-level 93 | if (isIE && obj.parentElement){ 94 | curleft += obj.offsetLeft - obj.scrollLeft; 95 | } 96 | } else if (obj.x) { 97 | curleft += obj.x; 98 | } 99 | return curleft; 100 | } 101 | 102 | function findPosY(obj) { 103 | var curtop = 0; 104 | if (obj.offsetParent) { 105 | while (obj.offsetParent) { 106 | curtop += obj.offsetTop - ((isOpera) ? 0 : obj.scrollTop); 107 | obj = obj.offsetParent; 108 | } 109 | // IE offsetParent does not include the top-level 110 | if (isIE && obj.parentElement){ 111 | curtop += obj.offsetTop - obj.scrollTop; 112 | } 113 | } else if (obj.y) { 114 | curtop += obj.y; 115 | } 116 | return curtop; 117 | } 118 | 119 | //----------------------------------------------------------------------------- 120 | // Date object extensions 121 | // ---------------------------------------------------------------------------- 122 | 123 | Date.prototype.getTwelveHours = function() { 124 | hours = this.getHours(); 125 | if (hours == 0) { 126 | return 12; 127 | } 128 | else { 129 | return hours <= 12 ? hours : hours-12 130 | } 131 | } 132 | 133 | Date.prototype.getTwoDigitMonth = function() { 134 | return (this.getMonth() < 9) ? '0' + (this.getMonth()+1) : (this.getMonth()+1); 135 | } 136 | 137 | Date.prototype.getTwoDigitDate = function() { 138 | return (this.getDate() < 10) ? '0' + this.getDate() : this.getDate(); 139 | } 140 | 141 | Date.prototype.getTwoDigitTwelveHour = function() { 142 | return (this.getTwelveHours() < 10) ? '0' + this.getTwelveHours() : this.getTwelveHours(); 143 | } 144 | 145 | Date.prototype.getTwoDigitHour = function() { 146 | return (this.getHours() < 10) ? '0' + this.getHours() : this.getHours(); 147 | } 148 | 149 | Date.prototype.getTwoDigitMinute = function() { 150 | return (this.getMinutes() < 10) ? '0' + this.getMinutes() : this.getMinutes(); 151 | } 152 | 153 | Date.prototype.getTwoDigitSecond = function() { 154 | return (this.getSeconds() < 10) ? '0' + this.getSeconds() : this.getSeconds(); 155 | } 156 | 157 | Date.prototype.getHourMinute = function() { 158 | return this.getTwoDigitHour() + ':' + this.getTwoDigitMinute(); 159 | } 160 | 161 | Date.prototype.getHourMinuteSecond = function() { 162 | return this.getTwoDigitHour() + ':' + this.getTwoDigitMinute() + ':' + this.getTwoDigitSecond(); 163 | } 164 | 165 | Date.prototype.strftime = function(format) { 166 | var fields = { 167 | c: this.toString(), 168 | d: this.getTwoDigitDate(), 169 | H: this.getTwoDigitHour(), 170 | I: this.getTwoDigitTwelveHour(), 171 | m: this.getTwoDigitMonth(), 172 | M: this.getTwoDigitMinute(), 173 | p: (this.getHours() >= 12) ? 'PM' : 'AM', 174 | S: this.getTwoDigitSecond(), 175 | w: '0' + this.getDay(), 176 | x: this.toLocaleDateString(), 177 | X: this.toLocaleTimeString(), 178 | y: ('' + this.getFullYear()).substr(2, 4), 179 | Y: '' + this.getFullYear(), 180 | '%' : '%' 181 | }; 182 | var result = '', i = 0; 183 | while (i < format.length) { 184 | if (format.charAt(i) === '%') { 185 | result = result + fields[format.charAt(i + 1)]; 186 | ++i; 187 | } 188 | else { 189 | result = result + format.charAt(i); 190 | } 191 | ++i; 192 | } 193 | return result; 194 | } 195 | 196 | // ---------------------------------------------------------------------------- 197 | // String object extensions 198 | // ---------------------------------------------------------------------------- 199 | String.prototype.pad_left = function(pad_length, pad_string) { 200 | var new_string = this; 201 | for (var i = 0; new_string.length < pad_length; i++) { 202 | new_string = pad_string + new_string; 203 | } 204 | return new_string; 205 | } 206 | 207 | // ---------------------------------------------------------------------------- 208 | // Get the computed style for and element 209 | // ---------------------------------------------------------------------------- 210 | function getStyle(oElm, strCssRule){ 211 | var strValue = ""; 212 | if(document.defaultView && document.defaultView.getComputedStyle){ 213 | strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule); 214 | } 215 | else if(oElm.currentStyle){ 216 | strCssRule = strCssRule.replace(/\-(\w)/g, function (strMatch, p1){ 217 | return p1.toUpperCase(); 218 | }); 219 | strValue = oElm.currentStyle[strCssRule]; 220 | } 221 | return strValue; 222 | } 223 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/inlines.min.js: -------------------------------------------------------------------------------- 1 | (function(a){a.fn.formset=function(g){var b=a.extend({},a.fn.formset.defaults,g),i=a(this);g=i.parent();var m=function(e,k,h){var j=RegExp("("+k+"-(\\d+|__prefix__))");k=k+"-"+h;a(e).prop("for")&&a(e).prop("for",a(e).prop("for").replace(j,k));if(e.id)e.id=e.id.replace(j,k);if(e.name)e.name=e.name.replace(j,k)},l=a("#id_"+b.prefix+"-TOTAL_FORMS").prop("autocomplete","off"),d=parseInt(l.val(),10),c=a("#id_"+b.prefix+"-MAX_NUM_FORMS").prop("autocomplete","off");l=c.val()===""||c.val()-l.val()>0;i.each(function(){a(this).not("."+ 2 | b.emptyCssClass).addClass(b.formCssClass)});if(i.length&&l){var f;if(i.prop("tagName")=="TR"){i=this.eq(-1).children().length;g.append(''+b.addText+"");f=g.find("tr:last a")}else{i.filter(":last").after('");f=i.filter(":last").next().find("a")}f.click(function(e){e.preventDefault();var k=a("#id_"+b.prefix+"-TOTAL_FORMS");e=a("#"+ 3 | b.prefix+"-empty");var h=e.clone(true);h.removeClass(b.emptyCssClass).addClass(b.formCssClass).attr("id",b.prefix+"-"+d);if(h.is("tr"))h.children(":last").append('");else h.is("ul")||h.is("ol")?h.append('
  • '+b.deleteText+"
  • "):h.children(":first").append(''+b.deleteText+""); 4 | h.find("*").each(function(){m(this,b.prefix,k.val())});h.insertBefore(a(e));a(k).val(parseInt(k.val(),10)+1);d+=1;c.val()!==""&&c.val()-k.val()<=0&&f.parent().hide();h.find("a."+b.deleteCssClass).click(function(j){j.preventDefault();j=a(this).parents("."+b.formCssClass);j.remove();d-=1;b.removed&&b.removed(j);j=a("."+b.formCssClass);a("#id_"+b.prefix+"-TOTAL_FORMS").val(j.length);if(c.val()===""||c.val()-j.length>0)f.parent().show();for(var n=0,o=j.length;n 0) { 23 | values.push(field.val()); 24 | } 25 | }); 26 | prepopulatedField.val(URLify(values.join(' '), maxLength)); 27 | }; 28 | 29 | prepopulatedField.data('_changed', false); 30 | prepopulatedField.change(function() { 31 | prepopulatedField.data('_changed', true); 32 | }); 33 | 34 | if (!prepopulatedField.val()) { 35 | $(dependencies.join(',')).keyup(populate).change(populate).focus(populate); 36 | } 37 | }); 38 | }; 39 | })(django.jQuery); 40 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/prepopulate.min.js: -------------------------------------------------------------------------------- 1 | (function(b){b.fn.prepopulate=function(e,g){return this.each(function(){var a=b(this),d=function(){if(!a.data("_changed")){var f=[];b.each(e,function(h,c){c=b(c);c.val().length>0&&f.push(c.val())});a.val(URLify(f.join(" "),g))}};a.data("_changed",false);a.change(function(){a.data("_changed",true)});a.val()||b(e.join(",")).keyup(d).change(d).focus(d)})}})(django.jQuery); 2 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/timeparse.js: -------------------------------------------------------------------------------- 1 | var timeParsePatterns = [ 2 | // 9 3 | { re: /^\d{1,2}$/i, 4 | handler: function(bits) { 5 | if (bits[0].length == 1) { 6 | return '0' + bits[0] + ':00'; 7 | } else { 8 | return bits[0] + ':00'; 9 | } 10 | } 11 | }, 12 | // 13:00 13 | { re: /^\d{2}[:.]\d{2}$/i, 14 | handler: function(bits) { 15 | return bits[0].replace('.', ':'); 16 | } 17 | }, 18 | // 9:00 19 | { re: /^\d[:.]\d{2}$/i, 20 | handler: function(bits) { 21 | return '0' + bits[0].replace('.', ':'); 22 | } 23 | }, 24 | // 3 am / 3 a.m. / 3am 25 | { re: /^(\d+)\s*([ap])(?:.?m.?)?$/i, 26 | handler: function(bits) { 27 | var hour = parseInt(bits[1]); 28 | if (hour == 12) { 29 | hour = 0; 30 | } 31 | if (bits[2].toLowerCase() == 'p') { 32 | if (hour == 12) { 33 | hour = 0; 34 | } 35 | return (hour + 12) + ':00'; 36 | } else { 37 | if (hour < 10) { 38 | return '0' + hour + ':00'; 39 | } else { 40 | return hour + ':00'; 41 | } 42 | } 43 | } 44 | }, 45 | // 3.30 am / 3:15 a.m. / 3.00am 46 | { re: /^(\d+)[.:](\d{2})\s*([ap]).?m.?$/i, 47 | handler: function(bits) { 48 | var hour = parseInt(bits[1]); 49 | var mins = parseInt(bits[2]); 50 | if (mins < 10) { 51 | mins = '0' + mins; 52 | } 53 | if (hour == 12) { 54 | hour = 0; 55 | } 56 | if (bits[3].toLowerCase() == 'p') { 57 | if (hour == 12) { 58 | hour = 0; 59 | } 60 | return (hour + 12) + ':' + mins; 61 | } else { 62 | if (hour < 10) { 63 | return '0' + hour + ':' + mins; 64 | } else { 65 | return hour + ':' + mins; 66 | } 67 | } 68 | } 69 | }, 70 | // noon 71 | { re: /^no/i, 72 | handler: function(bits) { 73 | return '12:00'; 74 | } 75 | }, 76 | // midnight 77 | { re: /^mid/i, 78 | handler: function(bits) { 79 | return '00:00'; 80 | } 81 | } 82 | ]; 83 | 84 | function parseTimeString(s) { 85 | for (var i = 0; i < timeParsePatterns.length; i++) { 86 | var re = timeParsePatterns[i].re; 87 | var handler = timeParsePatterns[i].handler; 88 | var bits = re.exec(s); 89 | if (bits) { 90 | return handler(bits); 91 | } 92 | } 93 | return s; 94 | } 95 | -------------------------------------------------------------------------------- /my_blog/static/admin/js/urlify.js: -------------------------------------------------------------------------------- 1 | var LATIN_MAP = { 2 | 'À': 'A', 'Á': 'A', 'Â': 'A', 'Ã': 'A', 'Ä': 'A', 'Å': 'A', 'Æ': 'AE', 'Ç': 3 | 'C', 'È': 'E', 'É': 'E', 'Ê': 'E', 'Ë': 'E', 'Ì': 'I', 'Í': 'I', 'Î': 'I', 4 | 'Ï': 'I', 'Ð': 'D', 'Ñ': 'N', 'Ò': 'O', 'Ó': 'O', 'Ô': 'O', 'Õ': 'O', 'Ö': 5 | 'O', 'Ő': 'O', 'Ø': 'O', 'Ù': 'U', 'Ú': 'U', 'Û': 'U', 'Ü': 'U', 'Ű': 'U', 6 | 'Ý': 'Y', 'Þ': 'TH', 'Ÿ': 'Y', 'ß': 'ss', 'à':'a', 'á':'a', 'â': 'a', 'ã': 7 | 'a', 'ä': 'a', 'å': 'a', 'æ': 'ae', 'ç': 'c', 'è': 'e', 'é': 'e', 'ê': 'e', 8 | 'ë': 'e', 'ì': 'i', 'í': 'i', 'î': 'i', 'ï': 'i', 'ð': 'd', 'ñ': 'n', 'ò': 9 | 'o', 'ó': 'o', 'ô': 'o', 'õ': 'o', 'ö': 'o', 'ő': 'o', 'ø': 'o', 'ù': 'u', 10 | 'ú': 'u', 'û': 'u', 'ü': 'u', 'ű': 'u', 'ý': 'y', 'þ': 'th', 'ÿ': 'y' 11 | }; 12 | var LATIN_SYMBOLS_MAP = { 13 | '©':'(c)' 14 | }; 15 | var GREEK_MAP = { 16 | 'α':'a', 'β':'b', 'γ':'g', 'δ':'d', 'ε':'e', 'ζ':'z', 'η':'h', 'θ':'8', 17 | 'ι':'i', 'κ':'k', 'λ':'l', 'μ':'m', 'ν':'n', 'ξ':'3', 'ο':'o', 'π':'p', 18 | 'ρ':'r', 'σ':'s', 'τ':'t', 'υ':'y', 'φ':'f', 'χ':'x', 'ψ':'ps', 'ω':'w', 19 | 'ά':'a', 'έ':'e', 'ί':'i', 'ό':'o', 'ύ':'y', 'ή':'h', 'ώ':'w', 'ς':'s', 20 | 'ϊ':'i', 'ΰ':'y', 'ϋ':'y', 'ΐ':'i', 21 | 'Α':'A', 'Β':'B', 'Γ':'G', 'Δ':'D', 'Ε':'E', 'Ζ':'Z', 'Η':'H', 'Θ':'8', 22 | 'Ι':'I', 'Κ':'K', 'Λ':'L', 'Μ':'M', 'Ν':'N', 'Ξ':'3', 'Ο':'O', 'Π':'P', 23 | 'Ρ':'R', 'Σ':'S', 'Τ':'T', 'Υ':'Y', 'Φ':'F', 'Χ':'X', 'Ψ':'PS', 'Ω':'W', 24 | 'Ά':'A', 'Έ':'E', 'Ί':'I', 'Ό':'O', 'Ύ':'Y', 'Ή':'H', 'Ώ':'W', 'Ϊ':'I', 25 | 'Ϋ':'Y' 26 | }; 27 | var TURKISH_MAP = { 28 | 'ş':'s', 'Ş':'S', 'ı':'i', 'İ':'I', 'ç':'c', 'Ç':'C', 'ü':'u', 'Ü':'U', 29 | 'ö':'o', 'Ö':'O', 'ğ':'g', 'Ğ':'G' 30 | }; 31 | var RUSSIAN_MAP = { 32 | 'а':'a', 'б':'b', 'в':'v', 'г':'g', 'д':'d', 'е':'e', 'ё':'yo', 'ж':'zh', 33 | 'з':'z', 'и':'i', 'й':'j', 'к':'k', 'л':'l', 'м':'m', 'н':'n', 'о':'o', 34 | 'п':'p', 'р':'r', 'с':'s', 'т':'t', 'у':'u', 'ф':'f', 'х':'h', 'ц':'c', 35 | 'ч':'ch', 'ш':'sh', 'щ':'sh', 'ъ':'', 'ы':'y', 'ь':'', 'э':'e', 'ю':'yu', 36 | 'я':'ya', 37 | 'А':'A', 'Б':'B', 'В':'V', 'Г':'G', 'Д':'D', 'Е':'E', 'Ё':'Yo', 'Ж':'Zh', 38 | 'З':'Z', 'И':'I', 'Й':'J', 'К':'K', 'Л':'L', 'М':'M', 'Н':'N', 'О':'O', 39 | 'П':'P', 'Р':'R', 'С':'S', 'Т':'T', 'У':'U', 'Ф':'F', 'Х':'H', 'Ц':'C', 40 | 'Ч':'Ch', 'Ш':'Sh', 'Щ':'Sh', 'Ъ':'', 'Ы':'Y', 'Ь':'', 'Э':'E', 'Ю':'Yu', 41 | 'Я':'Ya' 42 | }; 43 | var UKRAINIAN_MAP = { 44 | 'Є':'Ye', 'І':'I', 'Ї':'Yi', 'Ґ':'G', 'є':'ye', 'і':'i', 'ї':'yi', 'ґ':'g' 45 | }; 46 | var CZECH_MAP = { 47 | 'č':'c', 'ď':'d', 'ě':'e', 'ň': 'n', 'ř':'r', 'š':'s', 'ť':'t', 'ů':'u', 48 | 'ž':'z', 'Č':'C', 'Ď':'D', 'Ě':'E', 'Ň': 'N', 'Ř':'R', 'Š':'S', 'Ť':'T', 49 | 'Ů':'U', 'Ž':'Z' 50 | }; 51 | var POLISH_MAP = { 52 | 'ą':'a', 'ć':'c', 'ę':'e', 'ł':'l', 'ń':'n', 'ó':'o', 'ś':'s', 'ź':'z', 53 | 'ż':'z', 'Ą':'A', 'Ć':'C', 'Ę':'E', 'Ł':'L', 'Ń':'N', 'Ó':'O', 'Ś':'S', 54 | 'Ź':'Z', 'Ż':'Z' 55 | }; 56 | var LATVIAN_MAP = { 57 | 'ā':'a', 'č':'c', 'ē':'e', 'ģ':'g', 'ī':'i', 'ķ':'k', 'ļ':'l', 'ņ':'n', 58 | 'š':'s', 'ū':'u', 'ž':'z', 'Ā':'A', 'Č':'C', 'Ē':'E', 'Ģ':'G', 'Ī':'I', 59 | 'Ķ':'K', 'Ļ':'L', 'Ņ':'N', 'Š':'S', 'Ū':'U', 'Ž':'Z' 60 | }; 61 | var ARABIC_MAP = { 62 | 'أ':'a', 'ب':'b', 'ت':'t', 'ث': 'th', 'ج':'g', 'ح':'h', 'خ':'kh', 'د':'d', 63 | 'ذ':'th', 'ر':'r', 'ز':'z', 'س':'s', 'ش':'sh', 'ص':'s', 'ض':'d', 'ط':'t', 64 | 'ظ':'th', 'ع':'aa', 'غ':'gh', 'ف':'f', 'ق':'k', 'ك':'k', 'ل':'l', 'م':'m', 65 | 'ن':'n', 'ه':'h', 'و':'o', 'ي':'y' 66 | }; 67 | var LITHUANIAN_MAP = { 68 | 'ą':'a', 'č':'c', 'ę':'e', 'ė':'e', 'į':'i', 'š':'s', 'ų':'u', 'ū':'u', 69 | 'ž':'z', 70 | 'Ą':'A', 'Č':'C', 'Ę':'E', 'Ė':'E', 'Į':'I', 'Š':'S', 'Ų':'U', 'Ū':'U', 71 | 'Ž':'Z' 72 | }; 73 | var SERBIAN_MAP = { 74 | 'ђ':'dj', 'ј':'j', 'љ':'lj', 'њ':'nj', 'ћ':'c', 'џ':'dz', 'đ':'dj', 75 | 'Ђ':'Dj', 'Ј':'j', 'Љ':'Lj', 'Њ':'Nj', 'Ћ':'C', 'Џ':'Dz', 'Đ':'Dj' 76 | }; 77 | var AZERBAIJANI_MAP = { 78 | 'ç':'c', 'ə':'e', 'ğ':'g', 'ı':'i', 'ö':'o', 'ş':'s', 'ü':'u', 79 | 'Ç':'C', 'Ə':'E', 'Ğ':'G', 'İ':'I', 'Ö':'O', 'Ş':'S', 'Ü':'U' 80 | }; 81 | 82 | var ALL_DOWNCODE_MAPS = [ 83 | LATIN_MAP, 84 | LATIN_SYMBOLS_MAP, 85 | GREEK_MAP, 86 | TURKISH_MAP, 87 | RUSSIAN_MAP, 88 | UKRAINIAN_MAP, 89 | CZECH_MAP, 90 | POLISH_MAP, 91 | LATVIAN_MAP, 92 | ARABIC_MAP, 93 | LITHUANIAN_MAP, 94 | SERBIAN_MAP, 95 | AZERBAIJANI_MAP 96 | ]; 97 | 98 | var Downcoder = { 99 | 'Initialize': function() { 100 | if (Downcoder.map) { // already made 101 | return; 102 | } 103 | Downcoder.map = {}; 104 | Downcoder.chars = []; 105 | for (var i=0; in;n++){var p=m[n].split("="),q=c(p.shift()),r=p.join("=");if(e&&e===q){l=f(r,g);break}e||void 0===(r=f(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); 26 | 27 | (function ($) { 28 | $(document).ready(function(){ 29 | var show_hide_sidebar_menu = function () { 30 | hidden_menu = $('#sidebar-menu').data('hidden'); 31 | main_classes = 'col-xs-6 col-xs-offset-6 col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2'; 32 | if (hidden_menu) { 33 | $('.main').addClass(main_classes).removeClass('col-sm-12'); 34 | $('.sidebar-menu').css('left', '0').data('hidden', false); 35 | $('.django-admin-title').hide(); 36 | $.removeCookie('hidden_sidebar_menu', {path: '/'}); 37 | } else { 38 | $('.main').removeClass(main_classes).addClass('col-sm-12'); 39 | $('.sidebar-menu').css('left', '-50%').data('hidden', true); 40 | $('.django-admin-title').fadeIn(); 41 | $.cookie('hidden_sidebar_menu', true, {path: '/'}); 42 | } 43 | }; 44 | if (!$('body').hasClass('popup')) { 45 | if ($.cookie('hidden_sidebar_menu')) { 46 | /* always show on change_list.html */ 47 | if (!$('body').hasClass('change-list')) { 48 | show_hide_sidebar_menu(); 49 | } 50 | } 51 | $('.show-hide-sidebar-menu').on('click', function(e){ 52 | show_hide_sidebar_menu(); 53 | e.preventDefault(); 54 | }); 55 | } 56 | // list models 57 | $('.nav-sidebar li:first-child a').on('click', function () { 58 | var $nav_sidebar = $(this).closest('.nav-sidebar'); 59 | if ($nav_sidebar.hasClass('show-models')) { 60 | $nav_sidebar.removeClass('show-models'); 61 | } else { 62 | $nav_sidebar.addClass('show-models'); 63 | } 64 | return false; 65 | }); 66 | }); 67 | })(django.jQuery); 68 | -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-1000px.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core-1000px.css: 1000px */ 4 | /*****************************************************************/ 5 | 6 | /*********************/ 7 | /* 1000px */ 8 | /*********************/ 9 | 10 | .\35 grid-layout { 11 | width: 1000px; 12 | margin: 0 auto; 13 | } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-1200px.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core-1200px.css: 1200px */ 4 | /*****************************************************************/ 5 | 6 | /*********************/ 7 | /* 1200px */ 8 | /*********************/ 9 | 10 | .\35 grid-layout { 11 | width: 1200px; 12 | margin: 0 auto; 13 | } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-desktop.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core-desktop.css: Core (desktop) stylesheet */ 4 | /*****************************************************************/ 5 | 6 | .\35 grid .row:after { content: ''; display: block; clear: both; height: 0; } 7 | .\35 grid .row > :first-child { margin-left: 0; } 8 | .\35 grid .row:first-child > * { margin-top: 0; } 9 | .\35 grid .row:last-child > * { margin-bottom: 0; } 10 | .\35 grid .offset-1u:first-child { margin-left: 8.5% !important; } 11 | .\35 grid .offset-2u:first-child { margin-left: 17% !important; } 12 | .\35 grid .offset-3u:first-child { margin-left: 25.5% !important; } 13 | .\35 grid .offset-4u:first-child { margin-left: 34% !important; } 14 | .\35 grid .offset-5u:first-child { margin-left: 42.5% !important; } 15 | .\35 grid .offset-6u:first-child { margin-left: 51% !important; } 16 | .\35 grid .offset-7u:first-child { margin-left: 59.5% !important; } 17 | .\35 grid .offset-8u:first-child { margin-left: 68% !important; } 18 | .\35 grid .offset-9u:first-child { margin-left: 76.5% !important; } 19 | .\35 grid .offset-10u:first-child { margin-left: 85% !important; } 20 | .\35 grid .offset-11u:first-child { margin-left: 93.5% !important; } 21 | .\35 grid .offset-1u { margin-left: 10.5% !important; } 22 | .\35 grid .offset-2u { margin-left: 19% !important; } 23 | .\35 grid .offset-3u { margin-left: 27.5% !important; } 24 | .\35 grid .offset-4u { margin-left: 36% !important; } 25 | .\35 grid .offset-5u { margin-left: 44.5% !important; } 26 | .\35 grid .offset-6u { margin-left: 53% !important; } 27 | .\35 grid .offset-7u { margin-left: 61.5% !important; } 28 | .\35 grid .offset-8u { margin-left: 70% !important; } 29 | .\35 grid .offset-9u { margin-left: 78.5% !important; } 30 | .\35 grid .offset-10u { margin-left: 87% !important; } 31 | .\35 grid .offset-11u { margin-left: 95.5% !important; } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-fluid.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core-fluid.css: Fluid */ 4 | /*****************************************************************/ 5 | 6 | /*********************/ 7 | /* Fluid */ 8 | /*********************/ 9 | 10 | .\35 grid-layout { 11 | width: 100%; 12 | } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-mobile.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core-mobile.css: Core (mobile) stylesheet */ 4 | /*****************************************************************/ 5 | 6 | body { -webkit-text-size-adjust: none; } 7 | .\35 grid .\31 u, .\35 grid .\32 u, .\35 grid .\33 u, .\35 grid .\34 u, .\35 grid .\35 u, .\35 grid .\36 u, .\35 grid .\37 u, .\35 grid .\38 u, .\35 grid .\39 u, .\35 grid .\31 0u, .\35 grid .\31 1u, .\35 grid .\31 2u { float: none !important; width: 100% !important; margin: 1% 0 1% 0 !important; } 8 | .\35 grid { width: 100%; margin: 0; } 9 | .\35 grid .row:first-child > :first-child { margin-top: 0; } 10 | .\35 grid .row:last-child > :last-child { margin-bottom: 0; } 11 | .do-5grid .do-1u, .do-5grid .do-2u, .do-5grid .do-3u, .do-5grid .do-4u, .do-5grid .do-5u, .do-5grid .do-6u, .do-5grid .do-7u, .do-5grid .do-8u, .do-5grid .do-9u, .do-5grid .do-10u, .do-5grid .do-11u, .do-5grid .do-12u { margin: 0.5% 0 0.5% 1%; } 12 | .\35 grid-flush .\31 u, .\35 grid-flush .\32 u, .\35 grid-flush .\33 u, .\35 grid-flush .\34 u, .\35 grid-flush .\35 u, .\35 grid-flush .\36 u, .\35 grid-flush .\37 u, .\35 grid-flush .\38 u, .\35 grid-flush .\39 u, .\35 grid-flush .\31 0u, .\35 grid-flush .\31 1u, .\35 grid-flush .\31 2u { float: none !important; width: 100% !important; margin: 1% 0 1% 0 !important; } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core-noscript.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* noscript-1000px.css: Kludgey noscript stylesheet */ 4 | /*****************************************************************/ 5 | 6 | /*********************/ 7 | /* Base Grid */ 8 | /*********************/ 9 | 10 | .\35 grid-layout .\31 2u { width: 100%; } 11 | .\35 grid-layout .\31 1u { width: 91.5%; } 12 | .\35 grid-layout .\31 0u { width: 83%; } 13 | .\35 grid-layout .\39 u { width: 74.5%; } 14 | .\35 grid-layout .\38 u { width: 66%; } 15 | .\35 grid-layout .\37 u { width: 57.5%; } 16 | .\35 grid-layout .\36 u { width: 49%; } 17 | .\35 grid-layout .\35 u { width: 40.5%; } 18 | .\35 grid-layout .\34 u { width: 32%; } 19 | .\35 grid-layout .\33 u { width: 23.5%; } 20 | .\35 grid-layout .\32 u { width: 15%; } 21 | .\35 grid-layout .\31 u { width: 6.5%; } 22 | 23 | .\35 grid-layout .\31 u, .\35 grid-layout .\32 u, .\35 grid-layout .\33 u, .\35 grid-layout .\34 u, .\35 grid-layout .\35 u, .\35 grid-layout .\36 u, .\35 grid-layout .\37 u, .\35 grid-layout .\38 u, .\35 grid-layout .\39 u, .\35 grid-layout .\31 0u, .\35 grid-layout .\31 1u, .\35 grid-layout .\31 2u { 24 | margin: 1% 0 1% 2%; 25 | float: left; 26 | } 27 | 28 | .\35 grid-layout:after { 29 | content: ''; 30 | display: block; 31 | clear: both; 32 | height: 0; 33 | } 34 | 35 | /*********************/ 36 | /* Desktop */ 37 | /*********************/ 38 | 39 | .\35 grid-layout .row:after { content: ''; display: block; clear: both; height: 0; } 40 | .\35 grid-layout .row > :first-child { margin-left: 0; } 41 | .\35 grid-layout .row:first-child > * { margin-top: 0; } 42 | .\35 grid-layout .row:last-child > * { margin-bottom: 0; } 43 | .\35 grid-layout .offset-1u:first-child { margin-left: 8.5% !important; } 44 | .\35 grid-layout .offset-2u:first-child { margin-left: 17% !important; } 45 | .\35 grid-layout .offset-3u:first-child { margin-left: 25.5% !important; } 46 | .\35 grid-layout .offset-4u:first-child { margin-left: 34% !important; } 47 | .\35 grid-layout .offset-5u:first-child { margin-left: 42.5% !important; } 48 | .\35 grid-layout .offset-6u:first-child { margin-left: 51% !important; } 49 | .\35 grid-layout .offset-7u:first-child { margin-left: 59.5% !important; } 50 | .\35 grid-layout .offset-8u:first-child { margin-left: 68% !important; } 51 | .\35 grid-layout .offset-9u:first-child { margin-left: 76.5% !important; } 52 | .\35 grid-layout .offset-10u:first-child { margin-left: 85% !important; } 53 | .\35 grid-layout .offset-11u:first-child { margin-left: 93.5% !important; } 54 | .\35 grid-layout .offset-1u { margin-left: 10.5% !important; } 55 | .\35 grid-layout .offset-2u { margin-left: 19% !important; } 56 | .\35 grid-layout .offset-3u { margin-left: 27.5% !important; } 57 | .\35 grid-layout .offset-4u { margin-left: 36% !important; } 58 | .\35 grid-layout .offset-5u { margin-left: 44.5% !important; } 59 | .\35 grid-layout .offset-6u { margin-left: 53% !important; } 60 | .\35 grid-layout .offset-7u { margin-left: 61.5% !important; } 61 | .\35 grid-layout .offset-8u { margin-left: 70% !important; } 62 | .\35 grid-layout .offset-9u { margin-left: 78.5% !important; } 63 | .\35 grid-layout .offset-10u { margin-left: 87% !important; } 64 | .\35 grid-layout .offset-11u { margin-left: 95.5% !important; } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/core.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* core.css: Core stylesheet */ 4 | /*****************************************************************/ 5 | 6 | /**************************************************/ 7 | /* Resets (by meyerweb.com/eric/tools/css/reset/) */ 8 | /**************************************************/ 9 | 10 | html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { 11 | margin: 0; 12 | padding: 0; 13 | border: 0; 14 | font-size: 100%; 15 | font: inherit; 16 | vertical-align: baseline; 17 | } 18 | 19 | article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { 20 | display: block; 21 | } 22 | 23 | body { 24 | line-height: 1; 25 | } 26 | 27 | ol, ul { 28 | list-style: none; 29 | } 30 | 31 | blockquote, q { 32 | quotes: none; 33 | } 34 | 35 | blockquote:before, blockquote:after, q:before, q:after { 36 | content: ''; 37 | content: none; 38 | } 39 | 40 | table { 41 | border-collapse: collapse; 42 | border-spacing: 0; 43 | } 44 | 45 | /*********************/ 46 | /* Grid */ 47 | /*********************/ 48 | 49 | .\35 grid .\31 2u { width: 100%; } .\35 grid .\31 1u { width: 91.5%; } .\35 grid .\31 0u { width: 83%; } .\35 grid .\39 u { width: 74.5%; } .\35 grid .\38 u { width: 66%; } .\35 grid .\37 u { width: 57.5%; } .\35 grid .\36 u { width: 49%; } .\35 grid .\35 u { width: 40.5%; } .\35 grid .\34 u { width: 32%; } .\35 grid .\33 u { width: 23.5%; } .\35 grid .\32 u { width: 15%; } .\35 grid .\31 u { width: 6.5%; } 50 | 51 | .\35 grid .\31 u, .\35 grid .\32 u, .\35 grid .\33 u, .\35 grid .\34 u, .\35 grid .\35 u, .\35 grid .\36 u, .\35 grid .\37 u, .\35 grid .\38 u, .\35 grid .\39 u, .\35 grid .\31 0u, .\35 grid .\31 1u, .\35 grid .\31 2u { 52 | margin: 1% 0 1% 2%; 53 | float: left; 54 | } 55 | 56 | .\35 grid:after { 57 | content: ''; 58 | display: block; 59 | clear: both; 60 | height: 0; 61 | } 62 | 63 | .\35 grid-flush .\31 2u { width: 100% !important; } .\35 grid-flush .\31 1u { width: 91.6666666667% !important; } .\35 grid-flush .\31 0u { width: 83.3333333333% !important; } .\35 grid-flush .\39 u { width: 75% !important; } .\35 grid-flush .\38 u { width: 66.6666666667% !important; } .\35 grid-flush .\37 u { width: 58.3333333333% !important; } .\35 grid-flush .\36 u { width: 50% !important; } .\35 grid-flush .\35 u { width: 41.6666666667% !important; } .\35 grid-flush .\34 u { width: 33.3333333333% !important; } .\35 grid-flush .\33 u { width: 25% !important; } .\35 grid-flush .\32 u { width: 16.6666666667% !important; } .\35 grid-flush .\31 u { width: 8.3333333333% !important; } 64 | 65 | .\35 grid-flush .\31 u, .\35 grid-flush .\32 u, .\35 grid-flush .\33 u, .\35 grid-flush .\34 u, .\35 grid-flush .\35 u, .\35 grid-flush .\36 u, .\35 grid-flush .\37 u, .\35 grid-flush .\38 u, .\35 grid-flush .\39 u, .\35 grid-flush .\31 0u, .\35 grid-flush .\31 1u, .\35 grid-flush .\31 2u { 66 | margin: 0 !important; 67 | } 68 | 69 | .do-5grid .do-12u { width: 100%; } .do-5grid .do-11u { width: 91.5%; } .do-5grid .do-10u { width: 83%; } .do-5grid .do-9u { width: 74.5%; } .do-5grid .do-8u { width: 66%; } .do-5grid .do-7u { width: 57.5%; } .do-5grid .do-6u { width: 49%; } .do-5grid .do-5u { width: 40.5%; } .do-5grid .do-4u { width: 32%; } .do-5grid .do-3u { width: 23.5%; } .do-5grid .do-2u { width: 15%; } .do-5grid .do-1u { width: 6.5%; } 70 | 71 | .do-5grid .do-1u, .do-5grid .do-2u, .do-5grid .do-3u, .do-5grid .do-4u, .do-5grid .do-5u, .do-5grid .do-6u, .do-5grid .do-7u, .do-5grid .do-8u, .do-5grid .do-9u, .do-5grid .do-10u, .do-5grid .do-11u, .do-5grid .do-12u { 72 | margin: 1% 0 1% 2%; 73 | float: left; 74 | } 75 | 76 | .do-5grid:after { 77 | content: ''; 78 | display: block; 79 | clear: both; 80 | height: 0; 81 | } 82 | 83 | .do-5grid-flush .do-12u { width: 100%; } .do-5grid-flush .do-11u { width: 91.6666666667%; } .do-5grid-flush .do-10u { width: 83.3333333333%; } .do-5grid-flush .do-9u { width: 75%; } .do-5grid-flush .do-8u { width: 66.6666666667%; } .do-5grid-flush .do-7u { width: 58.3333333333%; } .do-5grid-flush .do-6u { width: 50%; } .do-5grid-flush .do-5u { width: 41.6666666667%; } .do-5grid-flush .do-4u { width: 33.3333333333%; } .do-5grid-flush .do-3u { width: 25%; } .do-5grid-flush .do-2u { width: 16.6666666667%; } .do-5grid-flush .do-1u { width: 8.3333333333%; } 84 | 85 | .do-5grid-flush .do-1u, .do-5grid-flush .do-2u, .do-5grid-flush .do-3u, .do-5grid-flush .do-4u, .do-5grid-flush .do-5u, .do-5grid-flush .do-6u, .do-5grid-flush .do-7u, .do-5grid-flush .do-8u, .do-5grid-flush .do-9u, .do-5grid-flush .do-10u, .do-5grid-flush .do-11u, .do-5grid-flush .do-12u { 86 | margin: 0 !important; 87 | } 88 | 89 | /*********************/ 90 | /* Mobile */ 91 | /*********************/ 92 | 93 | #mobileUI-site-titlebar { 94 | text-align: center; 95 | } 96 | 97 | #mobileUI-site-nav-opener { 98 | top: 0; 99 | left: 0; 100 | } 101 | 102 | #mobileUI-site-nav { 103 | } 104 | 105 | #mobileUI-site-nav-inner { 106 | } 107 | 108 | .mobileUI-site-nav-link { 109 | display: block; 110 | } 111 | 112 | .mobileUI-site-nav-link .indent-1 { display: inline-block; width: 1em; } 113 | .mobileUI-site-nav-link .indent-2 { display: inline-block; width: 2em; } 114 | .mobileUI-site-nav-link .indent-3 { display: inline-block; width: 3em; } 115 | .mobileUI-site-nav-link .indent-4 { display: inline-block; width: 4em; } 116 | .mobileUI-site-nav-link .indent-5 { display: inline-block; width: 5em; } 117 | .mobileUI-site-nav-link .indent-6 { display: inline-block; width: 6em; } 118 | .mobileUI-site-nav-link .indent-7 { display: inline-block; width: 7em; } 119 | .mobileUI-site-nav-link .indent-8 { display: inline-block; width: 8em; } 120 | .mobileUI-site-nav-link .indent-9 { display: inline-block; width: 9em; } 121 | .mobileUI-site-nav-link .indent-10 { display: inline-block; width: 10em; } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/html5shiv.js: -------------------------------------------------------------------------------- 1 | // HTML5 Shiv vpre3.6 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 2 | (function(g,b){function k(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function l(a){var c={},f=a.createElement,b=a.createDocumentFragment,d=b();a.createElement=function(a){if(!e.shivMethods)return f(a);var b;b=c[a]?c[a].cloneNode():m.test(a)?(c[a]=f(a)).cloneNode():f(a);return b.canHaveChildren&&!n.test(a)?d.appendChild(b):b};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+k().join().replace(/\w+/g,function(a){f(a); 3 | d.createElement(a);return'c("'+a+'")'})+");return n}")(e,d)}function h(a){var c;if(a.documentShived)return a;if(e.shivCSS&&!i){c=a.createElement("p");var b=a.getElementsByTagName("head")[0]||a.documentElement;c.innerHTML="x";c=!!b.insertBefore(c.lastChild,b.firstChild)}j||(c=!l(a));if(c)a.documentShived=c;return a}var d=g.html5||{},n=/^<|^(?:button|form|map|select|textarea|object|iframe|option|optgroup)$/i, 4 | m=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,i,j;(function(){var a=b.createElement("a");a.innerHTML="";i="hidden"in a;if(!(a=1==a.childNodes.length))a:{try{b.createElement("a")}catch(c){a=!0;break a}a=b.createDocumentFragment();a="undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}j= 5 | a})();var e={elements:d.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==d.shivCSS,shivMethods:!1!==d.shivMethods,type:"default",shivDocument:h};g.html5=e;h(b)})(this,document); -------------------------------------------------------------------------------- /my_blog/static/css/5grid/mobileUI-beveled.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* mobileUI-beveled.css: Beveled mobile UI theme */ 4 | /*****************************************************************/ 5 | 6 | #mobileUI-site-titlebar { 7 | text-align: center; 8 | background: #444; 9 | color: #fff; 10 | text-shadow: -1px -1px 0px rgba(0,0,0,0.9); 11 | font-weight: bold; 12 | box-shadow: inset 0px -1px 0px 0px rgba(0,0,0,0.75), inset 0px 22px 0px 0px rgba(255,255,255,0.08), inset 0px 8px 45px 0px rgba(255,255,255,0.3); 13 | line-height: 46px !important; 14 | } 15 | 16 | #mobileUI-site-title { 17 | } 18 | 19 | #mobileUI-site-nav-opener { 20 | width: 60px; 21 | height: 44px; 22 | top: 0; 23 | left: 0; 24 | text-indent: -9999em; 25 | overflow: hidden; 26 | } 27 | 28 | #mobileUI-site-nav-opener:before { 29 | content: ''; 30 | display: block; 31 | position: absolute; 32 | top: 7px; 33 | left: 6px; 34 | width: 45px; 35 | height: 30px; 36 | color: #fff; 37 | text-align: center; 38 | line-height: 30px; 39 | font-size: 0.8em; 40 | border-radius: 5px; 41 | text-shadow: -1px -1px 0px rgba(0,0,0,0.9); 42 | box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,0.25), inset 0px 1px 2px 0px rgba(0,0,0,0.5), inset 0px 6px 13px 0px rgba(255,255,255,0.2), 0px 2px 2px 0px rgba(255,255,255,0.1); 43 | text-indent: -9999em; 44 | /**/ 45 | background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNDVweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgNDUgMjkiIHpvb21BbmRQYW49ImRpc2FibGUiPjxyZWN0IHg9IjkiIHk9IjgiIHdpZHRoPSIyNSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHN0eWxlPSJmaWxsOnJnYmEoMCwwLDAsMC45KTsiIC8+PHJlY3QgeD0iOSIgeT0iMTMiIHdpZHRoPSIyNSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjE0IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjE4IiB3aWR0aD0iMjUiIGhlaWdodD0iMSIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwwLjkpOyIgLz48cmVjdCB4PSI5IiB5PSIxOSIgd2lkdGg9IjEiIGhlaWdodD0iMSIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwwLjkpOyIgLz48cmVjdCB4PSIxMCIgeT0iOSIgd2lkdGg9IjI1IiBoZWlnaHQ9IjIiIHN0eWxlPSJmaWxsOnJnYmEoMjU1LDI1NSwyNTUsMC41KTsiIC8+PHJlY3QgeD0iMTAiIHk9IjE0IiB3aWR0aD0iMjUiIGhlaWdodD0iMiIgc3R5bGU9ImZpbGw6cmdiYSgyNTUsMjU1LDI1NSwwLjUpOyIgLz48cmVjdCB4PSIxMCIgeT0iMTkiIHdpZHRoPSIyNSIgaGVpZ2h0PSIyIiBzdHlsZT0iZmlsbDpyZ2JhKDI1NSwyNTUsMjU1LDAuNSk7IiAvPjwvc3ZnPg=='); 46 | background-position: center center; 47 | } 48 | 49 | #mobileUI-site-nav-opener:active:before { 50 | background-color: rgba(0,0,0,0.4); 51 | } 52 | 53 | #mobileUI-site-nav { 54 | background: #444; 55 | color: #fff; 56 | box-shadow: inset -10px 0px 40px 0px rgba(0,0,0,0.5); 57 | } 58 | 59 | #mobileUI-site-nav-inner { 60 | } 61 | 62 | .mobileUI-site-nav-link { 63 | display: block; 64 | color: #fff; 65 | border-top: solid 1px rgba(255,255,255,0.1); 66 | border-bottom: solid 1px rgba(0,0,0,0.2); 67 | text-decoration: none; 68 | text-shadow: -1px -1px 0px #000; 69 | height: 43px; 70 | line-height: 43px; 71 | padding: 0 10px 0 10px; 72 | } 73 | 74 | .mobileUI-site-nav-link:first-child { 75 | border-top: 0; 76 | } 77 | 78 | .mobileUI-site-nav-link:last-child { 79 | border-bottom: 0; 80 | } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/mobileUI-flat.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* mobileUI-flat.css: Flat mobile UI theme */ 4 | /*****************************************************************/ 5 | 6 | #mobileUI-site-titlebar { 7 | text-align: center; 8 | background: #444; 9 | color: #fff; 10 | line-height: 46px !important; 11 | } 12 | 13 | #mobileUI-site-title { 14 | } 15 | 16 | #mobileUI-site-nav-opener { 17 | width: 45px; 18 | height: 44px; 19 | color: #fff; 20 | text-align: center; 21 | line-height: 44px; 22 | font-size: 0.8em; 23 | top: 0; 24 | left: 0; 25 | text-indent: -9999em; 26 | background: rgba(0,0,0,0.15); 27 | /* */ 28 | background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNDVweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgNDUgMzAiIHpvb21BbmRQYW49ImRpc2FibGUiPjxyZWN0IHg9IjEwIiB5PSI5IiB3aWR0aD0iMjUiIGhlaWdodD0iMiIgc3R5bGU9ImZpbGw6cmdiYSgyNTUsMjU1LDI1NSwwLjUpOyIgLz48cmVjdCB4PSIxMCIgeT0iMTQiIHdpZHRoPSIyNSIgaGVpZ2h0PSIyIiBzdHlsZT0iZmlsbDpyZ2JhKDI1NSwyNTUsMjU1LDAuNSk7IiAvPjxyZWN0IHg9IjEwIiB5PSIxOSIgd2lkdGg9IjI1IiBoZWlnaHQ9IjIiIHN0eWxlPSJmaWxsOnJnYmEoMjU1LDI1NSwyNTUsMC41KTsiIC8+PC9zdmc+'); 29 | background-position: center center; 30 | } 31 | 32 | #mobileUI-site-nav-opener:active { 33 | background-color: rgba(0,0,0,0.4); 34 | } 35 | 36 | #mobileUI-site-nav { 37 | background: #272727; 38 | color: #fff; 39 | } 40 | 41 | #mobileUI-site-nav-inner { 42 | } 43 | 44 | .mobileUI-site-nav-link { 45 | display: block; 46 | color: #fff; 47 | padding: 0 10px 0 10px; 48 | height: 43px; 49 | line-height: 43px; 50 | text-decoration: none; 51 | border-top: solid 1px rgba(255,255,255,0.1); 52 | } 53 | 54 | .mobileUI-site-nav-link:first-child { 55 | border-top: 0; 56 | } 57 | 58 | .mobileUI-site-nav-link:last-child { 59 | border-bottom: 0; 60 | } -------------------------------------------------------------------------------- /my_blog/static/css/5grid/mobileUI-modern.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************/ 2 | /* 5grid 0.4.3 by n33.co | MIT+GPLv2 license licensed */ 3 | /* mobileUI-beveled.css: Beveled mobile UI theme */ 4 | /*****************************************************************/ 5 | 6 | #mobileUI-site-titlebar { 7 | text-align: center; 8 | background: #444; 9 | background-image: -webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.35)); 10 | background-image: -moz-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.35)); 11 | background-image: -ms-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.35)); 12 | background-image: -o-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.35)); 13 | background-image: linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,0.35)); 14 | color: #fff; 15 | text-shadow: -1px -1px 0px rgba(0,0,0,0.9); 16 | font-weight: bold; 17 | box-shadow: inset 0px -1px 0px 0px rgba(0,0,0,0.75), 0px 0px 3px 1px rgba(0,0,0,0.25); 18 | line-height: 46px !important; 19 | font-size: 1.1em; 20 | } 21 | 22 | #mobileUI-site-title { 23 | } 24 | 25 | #mobileUI-site-nav-opener { 26 | width: 60px; 27 | height: 44px; 28 | top: 0; 29 | left: 0; 30 | text-indent: -9999em; 31 | overflow: hidden; 32 | } 33 | 34 | #mobileUI-site-nav-opener:before { 35 | content: ''; 36 | display: block; 37 | position: absolute; 38 | top: 7px; 39 | left: 6px; 40 | width: 45px; 41 | height: 30px; 42 | color: #fff; 43 | text-align: center; 44 | line-height: 30px; 45 | font-size: 0.8em; 46 | border-radius: 4px; 47 | text-shadow: -1px -1px 0px rgba(0,0,0,0.9); 48 | box-shadow: inset 0px 0px 0px 1px rgba(0,0,0,0.25), inset 0px 1px 2px 0px rgba(0,0,0,0.5), inset 0px -10px 10px 0px rgba(0,0,0,0.15), 0px 1px 1px 0px rgba(255,255,255,0.1); 49 | text-indent: -9999em; 50 | /**/ 51 | background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iNDVweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgNDUgMjkiIHpvb21BbmRQYW49ImRpc2FibGUiPjxyZWN0IHg9IjkiIHk9IjgiIHdpZHRoPSIyNSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjkiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHN0eWxlPSJmaWxsOnJnYmEoMCwwLDAsMC45KTsiIC8+PHJlY3QgeD0iOSIgeT0iMTMiIHdpZHRoPSIyNSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjE0IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBzdHlsZT0iZmlsbDpyZ2JhKDAsMCwwLDAuOSk7IiAvPjxyZWN0IHg9IjkiIHk9IjE4IiB3aWR0aD0iMjUiIGhlaWdodD0iMSIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwwLjkpOyIgLz48cmVjdCB4PSI5IiB5PSIxOSIgd2lkdGg9IjEiIGhlaWdodD0iMSIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwwLjkpOyIgLz48cmVjdCB4PSIxMCIgeT0iOSIgd2lkdGg9IjI1IiBoZWlnaHQ9IjIiIHN0eWxlPSJmaWxsOnJnYmEoMjU1LDI1NSwyNTUsMC41KTsiIC8+PHJlY3QgeD0iMTAiIHk9IjE0IiB3aWR0aD0iMjUiIGhlaWdodD0iMiIgc3R5bGU9ImZpbGw6cmdiYSgyNTUsMjU1LDI1NSwwLjUpOyIgLz48cmVjdCB4PSIxMCIgeT0iMTkiIHdpZHRoPSIyNSIgaGVpZ2h0PSIyIiBzdHlsZT0iZmlsbDpyZ2JhKDI1NSwyNTUsMjU1LDAuNSk7IiAvPjwvc3ZnPg=='); 52 | background-position: center center; 53 | } 54 | 55 | #mobileUI-site-nav-opener:active { 56 | } 57 | 58 | #mobileUI-site-nav-opener:active:before { 59 | background-color: rgba(0,0,0,0.4); 60 | } 61 | 62 | #mobileUI-site-nav { 63 | background: #444; 64 | color: #fff; 65 | box-shadow: inset -3px 0px 10px 0px rgba(0,0,0,0.35); 66 | } 67 | 68 | #mobileUI-site-nav-inner { 69 | } 70 | 71 | .mobileUI-site-nav-link { 72 | display: block; 73 | color: #fff; 74 | border-top: solid 1px rgba(255,255,255,0.1); 75 | border-bottom: solid 1px rgba(0,0,0,0.2); 76 | text-decoration: none; 77 | text-shadow: -1px -1px 0px #000; 78 | height: 43px; 79 | line-height: 43px; 80 | padding: 0 10px 0 10px; 81 | } 82 | 83 | .mobileUI-site-nav-link:first-child { 84 | border-top: 0; 85 | } 86 | 87 | .mobileUI-site-nav-link:last-child { 88 | border-bottom: 0; 89 | } -------------------------------------------------------------------------------- /my_blog/static/css/images/bg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/css/images/bg1.png -------------------------------------------------------------------------------- /my_blog/static/css/images/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/css/images/bg2.png -------------------------------------------------------------------------------- /my_blog/static/css/images/mobileUI-site-nav-opener-bg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /my_blog/static/css/images/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/css/images/sprites.png -------------------------------------------------------------------------------- /my_blog/static/css/markdown.css: -------------------------------------------------------------------------------- 1 | .codehilite code, .codehilite pre{color:#fdce93;background-color:#3f3f3f} 2 | .codehilite .hll{background-color:#222} 3 | .codehilite .c{color:#7f9f7f} 4 | .codehilite .err{color:#e37170;background-color:#3d3535} 5 | .codehilite .g{color:#7f9f7f} 6 | .codehilite .k{color:#f0dfaf} 7 | .codehilite .l{color:#ccc} 8 | .codehilite .n{color:#dcdccc} 9 | .codehilite .o{color:#f0efd0} 10 | .codehilite .x{color:#ccc} 11 | .codehilite .p{color:#41706f} 12 | .codehilite .cm{color:#7f9f7f} 13 | .codehilite .cp{color:#7f9f7f} 14 | .codehilite .c1{color:#7f9f7f} 15 | .codehilite .cs{color:#cd0000;font-weight:bold} 16 | .codehilite .gd{color:#cd0000} 17 | .codehilite .ge{color:#ccc;font-style:italic} 18 | .codehilite .gr{color:red} 19 | .codehilite .gh{color:#dcdccc;font-weight:bold} 20 | .codehilite .gi{color:#00cd00} 21 | .codehilite .go{color:gray} 22 | .codehilite .gp{color:#dcdccc;font-weight:bold} 23 | .codehilite .gs{color:#ccc;font-weight:bold} 24 | .codehilite .gu{color:purple;font-weight:bold} 25 | .codehilite .gt{color:#0040D0} 26 | .codehilite .kc{color:#dca3a3} 27 | .codehilite .kd{color:#ffff86} 28 | .codehilite .kn{color:#dfaf8f;font-weight:bold} 29 | .codehilite .kp{color:#cdcf99} 30 | .codehilite .kr{color:#cdcd00} 31 | .codehilite .kt{color:#00cd00} 32 | .codehilite .ld{color:#cc9393} 33 | .codehilite .m{color:#8cd0d3} 34 | .codehilite .s{color:#cc9393} 35 | .codehilite .na{color:#9ac39f} 36 | .codehilite .nb{color:#efef8f} 37 | .codehilite .nc{color:#efef8f} 38 | .codehilite .no{color:#ccc} 39 | .codehilite .nd{color:#ccc} 40 | .codehilite .ni{color:#c28182} 41 | .codehilite .ne{color:#c3bf9f;font-weight:bold} 42 | .codehilite .nf{color:#efef8f} 43 | .codehilite .nl{color:#ccc} 44 | .codehilite .nn{color:#8fbede} 45 | .codehilite .nx{color:#ccc} 46 | .codehilite .py{color:#ccc} 47 | .codehilite .nt{color:#9ac39f} 48 | .codehilite .nv{color:#dcdccc} 49 | .codehilite .ow{color:#f0efd0} 50 | .codehilite .w{color:#ccc} 51 | .codehilite .mf{color:#8cd0d3} 52 | .codehilite .mh{color:#8cd0d3} 53 | .codehilite .mi{color:#8cd0d3} 54 | .codehilite .mo{color:#8cd0d3} 55 | .codehilite .sb{color:#cc9393} 56 | .codehilite .sc{color:#cc9393} 57 | .codehilite .sd{color:#cc9393} 58 | .codehilite .s2{color:#cc9393} 59 | .codehilite .se{color:#cc9393} 60 | .codehilite .sh{color:#cc9393} 61 | .codehilite .si{color:#cc9393} 62 | .codehilite .sx{color:#cc9393} 63 | .codehilite .sr{color:#cc9393} 64 | .codehilite .s1{color:#cc9393} 65 | .codehilite .ss{color:#cc9393} 66 | .codehilite .bp{color:#efef8f} 67 | .codehilite .vc{color:#efef8f} 68 | .codehilite .vg{color:#dcdccc} 69 | .codehilite .vi{color:#ffffc7} 70 | .codehilite .il{color:#8cd0d3} -------------------------------------------------------------------------------- /my_blog/static/css/style-1000px.css: -------------------------------------------------------------------------------- 1 | /* 2 | Striped 1.0 3 | */ 4 | 5 | /*********************************************************************************/ 6 | /* Basic */ 7 | /*********************************************************************************/ 8 | 9 | body 10 | { 11 | min-width: 1000px; 12 | } 13 | 14 | input, textarea 15 | { 16 | font-size: 10.5pt; 17 | } 18 | 19 | body 20 | { 21 | font-size: 11pt; 22 | } 23 | 24 | /*********************************************************************************/ 25 | /* Section/Article Types */ 26 | /*********************************************************************************/ 27 | 28 | .is-post 29 | { 30 | } 31 | 32 | .is-post h2 33 | { 34 | font-size: 3.25em; 35 | line-height: 1.25em; 36 | } 37 | 38 | .is-post header 39 | { 40 | padding: 1.5em 0 0 0; 41 | margin: 0 0 3em 0; 42 | } 43 | 44 | .is-post .byline 45 | { 46 | font-size: 1.75em; 47 | line-height: 1.5em; 48 | position: relative; 49 | top: -0.75em; 50 | margin-bottom: -0.75em; 51 | } 52 | 53 | .is-post .info 54 | { 55 | width: 100%; 56 | padding: 1em 0 0 0; 57 | position: relative; 58 | top: -2em; 59 | } 60 | 61 | .is-post .info .date 62 | { 63 | display: inline; 64 | } 65 | 66 | .is-post .info .stats 67 | { 68 | display: inline; 69 | border-left: solid 1px #ddd; 70 | margin-left: 1.15em; 71 | padding-left: 0.25em; 72 | } 73 | 74 | .is-post .info .stats li 75 | { 76 | display: inline-block; 77 | margin-left: 0.75em; 78 | } 79 | 80 | .is-post .info .stats li a 81 | { 82 | display: inline-block; 83 | padding-right: 0.5em; 84 | } 85 | 86 | /*********************************************************************************/ 87 | /* Content */ 88 | /*********************************************************************************/ 89 | 90 | #content 91 | { 92 | padding: 2em 3em 6em 3em; 93 | } 94 | 95 | body.left-sidebar #content 96 | { 97 | margin-left: 14em; /* = sidebar width */ 98 | } 99 | 100 | body.right-sidebar #content 101 | { 102 | margin-right: 14em; /* = sidebar width */ 103 | } -------------------------------------------------------------------------------- /my_blog/static/css/style-1200px.css: -------------------------------------------------------------------------------- 1 | /* 2 | Striped 1.0 3 | */ 4 | 5 | /*********************************************************************************/ 6 | /* Basic */ 7 | /*********************************************************************************/ 8 | 9 | body 10 | { 11 | min-width: 1200px; 12 | } 13 | 14 | input, textarea 15 | { 16 | font-size: 11pt; 17 | } 18 | 19 | body 20 | { 21 | font-size: 12pt; 22 | } 23 | 24 | /*********************************************************************************/ 25 | /* Section/Article Types */ 26 | /*********************************************************************************/ 27 | 28 | .is-post 29 | { 30 | } 31 | 32 | .is-post h2 33 | { 34 | font-size: 3.25em; 35 | line-height: 1.25em; 36 | } 37 | 38 | .is-post header 39 | { 40 | padding: 2.75em 0 0 0; 41 | margin: 0 0 3em 0; 42 | } 43 | 44 | .is-post .byline 45 | { 46 | font-size: 2.25em; 47 | line-height: 1.5em; 48 | position: relative; 49 | top: -0.65em; 50 | margin-bottom: -0.65em; 51 | } 52 | 53 | .is-post .info 54 | { 55 | position: absolute; 56 | width: 5.5em; 57 | overflow: hidden; 58 | background-color: #fff; 59 | left: -10.5em; 60 | top: 0; 61 | padding: 1.5em 1em 1.5em 1em; 62 | border-top-left-radius: 0.4em; 63 | border-bottom-left-radius: 0.4em; 64 | box-shadow: 0.25em 0 0 0 #fbfbfb, 0 0 0.25em 0em rgba(0,0,0,0.25); 65 | } 66 | 67 | .is-post .info:after 68 | { 69 | content: ''; 70 | display: block; 71 | position: absolute; 72 | left: 0; 73 | top: 0; 74 | width: 100%; 75 | height: 100%; 76 | background-image: url('images/bg2.png'); 77 | opacity: 0.5; 78 | z-index: 0; 79 | } 80 | 81 | .is-post .info .date 82 | { 83 | position: relative; 84 | z-index: 1; 85 | font-family: 'Open Sans Condensed', sans-serif; 86 | font-weight: 400; 87 | text-align: center; 88 | display: block; 89 | font-size: 1.5em; 90 | color: #999; 91 | border-bottom: solid 1px #ddd; 92 | padding: 0 0 1em 0; 93 | margin: 0 0 0.75em 0; 94 | } 95 | 96 | .is-post .info .date .year, 97 | .is-post .info .date .month span 98 | { 99 | display: none; 100 | } 101 | 102 | .is-post .info .date .day 103 | { 104 | display: block; 105 | margin: 0.25em 0 0 0; 106 | font-size: 1.5em; 107 | font-weight: 700; 108 | color: #1b252a; 109 | } 110 | 111 | .is-post .info .stats 112 | { 113 | position: relative; 114 | z-index: 1; 115 | } 116 | 117 | .is-post .info .stats li 118 | { 119 | margin: 0.35em 0 0 0; 120 | } 121 | 122 | .is-post .info .stats li a 123 | { 124 | display: block; 125 | text-align: right; 126 | padding: 0 0.5em 0 0.5em; 127 | } 128 | 129 | /*********************************************************************************/ 130 | /* Content */ 131 | /*********************************************************************************/ 132 | 133 | #content 134 | { 135 | padding: 3em 5em 8em 5em; 136 | } 137 | 138 | body.left-sidebar #content 139 | { 140 | margin-left: 21em; /* = sidebar width + 7 */ 141 | } 142 | 143 | body.right-sidebar #content 144 | { 145 | margin-right: 14em; /* = sidebar width */ 146 | margin-left: 7em; 147 | } -------------------------------------------------------------------------------- /my_blog/static/css/style-desktop.css: -------------------------------------------------------------------------------- 1 | /* 2 | Striped 1.0 3 | */ 4 | 5 | /*********************************************************************************/ 6 | /* Basic */ 7 | /*********************************************************************************/ 8 | 9 | html 10 | { 11 | height: 100%; 12 | } 13 | 14 | input, textarea 15 | { 16 | } 17 | 18 | body 19 | { 20 | line-height: 1.75em; 21 | height: 100%; 22 | } 23 | 24 | h2 25 | { 26 | font-size: 1.2em; 27 | } 28 | 29 | h3, h4, h5, h6 30 | { 31 | font-size: 1em; 32 | } 33 | 34 | .button 35 | { 36 | display: inline-block; 37 | padding: 0.5em 2em 0.5em 2em; 38 | } 39 | 40 | .button-small 41 | { 42 | font-size: 0.85em; 43 | padding: 0.35em 1.5em 0.35em 1.5em; 44 | } 45 | 46 | .button-big 47 | { 48 | font-size: 1.25em; 49 | padding: 0.75em 2em 0.75em 2em; 50 | } 51 | 52 | .button-huge 53 | { 54 | font-size: 1.5em; 55 | padding: 0.75em 2em 0.75em 2em; 56 | } 57 | 58 | .pager 59 | { 60 | padding: 3em 0 0 0; 61 | } 62 | 63 | .pager .pages 64 | { 65 | } 66 | 67 | .pager .previous 68 | { 69 | margin-right: 0.6em; 70 | } 71 | 72 | .pager .next 73 | { 74 | margin-left: 0.2em; 75 | } 76 | 77 | .pager .pages a 78 | { 79 | width: 2.75em; 80 | height: 2.75em; 81 | line-height: 2.75em; 82 | } 83 | 84 | .pager .button 85 | { 86 | height: 2.75em; 87 | padding-top: 0; 88 | padding-bottom: 0; 89 | line-height: 2.75em; 90 | } 91 | 92 | /*********************************************************************************/ 93 | /* Section/Article Types */ 94 | /*********************************************************************************/ 95 | 96 | .is-post 97 | { 98 | } 99 | 100 | .is-post .info 101 | { 102 | } 103 | 104 | .is-post .info .stats 105 | { 106 | } 107 | 108 | .is-post .info .stats li a 109 | { 110 | border-radius: 0.4em; 111 | opacity: 0.5; 112 | -moz-transition: opacity .25s ease-in-out, background-color .25s ease-in-out; 113 | -webkit-transition: opacity .25s ease-in-out, background-color .25s ease-in-out; 114 | -o-transition: opacity .25s ease-in-out, background-color .25s ease-in-out; 115 | -ms-transition: opacity .25s ease-in-out, background-color .25s ease-in-out; 116 | transition: opacity .25s ease-in-out, background-color .25s ease-in-out; 117 | } 118 | 119 | .is-post .info .stats li:hover a 120 | { 121 | background-color: #f4f4f4; 122 | opacity: 1.0; 123 | } 124 | 125 | /*********************************************************************************/ 126 | /* Logo */ 127 | /*********************************************************************************/ 128 | 129 | #logo 130 | { 131 | background-color: #c94663; 132 | background-image: url('images/bg1.png'); 133 | padding: 1.75em 0.5em 1.75em 0.5em; 134 | border-radius: 0.4em; 135 | text-align: center; 136 | box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,0.15), 0 0.025em 0.15em 0em rgba(0,0,0,0.25); 137 | } 138 | 139 | #logo h1 140 | { 141 | font-family: 'Open Sans Condensed', sans-serif; 142 | font-weight: 700; 143 | color: #fff; 144 | font-size: 2em; 145 | letter-spacing: 0.1em; 146 | } 147 | 148 | /*********************************************************************************/ 149 | /* Nav */ 150 | /*********************************************************************************/ 151 | 152 | #nav 153 | { 154 | } 155 | 156 | #nav > ul > li > ul 157 | { 158 | display: none; 159 | } 160 | 161 | #nav ul 162 | { 163 | margin: 0; 164 | } 165 | 166 | #nav li 167 | { 168 | border-top: solid 1px rgba(0,0,0,0.25); 169 | box-shadow: inset 0px 1px 0px 0px rgba(255,255,255,0.075); 170 | padding: 0.5em 0 0.5em 0; 171 | } 172 | 173 | #nav li:first-child 174 | { 175 | border: 0; 176 | box-shadow: none; 177 | padding-top: 0; 178 | } 179 | 180 | #nav li:last-child 181 | { 182 | padding-bottom: 0; 183 | } 184 | 185 | #nav li a 186 | { 187 | display: block; 188 | padding: 0.4em 1em 0.4em 1em; 189 | text-decoration: none; 190 | border-radius: 0.4em; 191 | outline: 0; 192 | -moz-transition: background-color .25s ease-in-out, color .25s ease-in-out; 193 | -webkit-transition: background-color .25s ease-in-out, color .25s ease-in-out; 194 | -o-transition: background-color .25s ease-in-out, color .25s ease-in-out; 195 | -ms-transition: background-color .25s ease-in-out, color .25s ease-in-out; 196 | transition: background-color .25s ease-in-out, color .25s ease-in-out; 197 | } 198 | 199 | #nav li.current_page_item a 200 | { 201 | background-color: #272E39 !important; 202 | background-color: rgba(0,0,0,0.15) !important; 203 | box-shadow: 0 0 0 1px rgba(255,255,255,0.05), inset 0 0 0.25em 0 rgba(0,0,0,0.25); 204 | font-weight: 700; 205 | color: #fff; 206 | } 207 | 208 | #nav li:hover a 209 | { 210 | background-color: rgba(200,225,255,0.1); 211 | color: #fff; 212 | } 213 | 214 | /*********************************************************************************/ 215 | /* Sidebar */ 216 | /*********************************************************************************/ 217 | 218 | #sidebar 219 | { 220 | position: absolute; 221 | top: 0; 222 | width: 14em; /* = whatever you want */ 223 | padding: 3em 1.35em 1em 1.15em; 224 | box-shadow: inset -0.1em 0em 0.35em 0em rgba(0,0,0,0.15); 225 | height: 100%; 226 | } 227 | 228 | body.left-sidebar #sidebar 229 | { 230 | left: 0; 231 | } 232 | 233 | body.right-sidebar #sidebar 234 | { 235 | right: 0; 236 | } 237 | 238 | #sidebar header 239 | { 240 | margin: 0 0 1.25em 0; 241 | } 242 | 243 | #sidebar section, 244 | #sidebar nav 245 | { 246 | margin: 2em 0 0 0; 247 | font-size: 0.9em; 248 | } 249 | 250 | #sidebar section:before, 251 | #sidebar nav:before 252 | { 253 | height: 0.5em; 254 | margin: 0 0 2em 0; 255 | } 256 | 257 | /*********************************************************************************/ 258 | /* Content */ 259 | /*********************************************************************************/ 260 | 261 | #content 262 | { 263 | height: 100%; 264 | box-shadow: 0 0 0.25em 0em rgba(0,0,0,0.25); 265 | } 266 | 267 | #content-inner 268 | { 269 | /* 270 | This sets an upper limit to the width of your page content. Prevents 271 | it from looking insane on super wide displays. By default I've set it 272 | to the width of the sample post images, but you can change it to 273 | whatever you like (or remote it entirely). 274 | */ 275 | max-width: 1038px; 276 | } 277 | 278 | /*********************************************************************************/ 279 | /* Copyright */ 280 | /*********************************************************************************/ 281 | 282 | #copyright 283 | { 284 | margin: 2em 0 0 0; 285 | text-align: center; 286 | } 287 | 288 | #copyright p 289 | { 290 | font-size: 0.8em; 291 | line-height: 2em; 292 | } 293 | 294 | #copyright:before 295 | { 296 | height: 0.5em; 297 | margin: 0 0 2em 0; 298 | } -------------------------------------------------------------------------------- /my_blog/static/css/style-mobile.css: -------------------------------------------------------------------------------- 1 | /* 2 | Striped 1.0 3 | */ 4 | 5 | /*********************************************************************************/ 6 | /* Basic */ 7 | /*********************************************************************************/ 8 | 9 | body, input, textarea 10 | { 11 | line-height: 1.75em; 12 | font-size: 11pt; 13 | letter-spacing: 0; 14 | } 15 | 16 | h2, h3, h4, h5, h6 17 | { 18 | font-size: 1.5em; 19 | } 20 | 21 | section, 22 | article 23 | { 24 | clear: both; 25 | } 26 | 27 | .button 28 | { 29 | display: block; 30 | width: 100%; 31 | font-size: 1.25em; 32 | padding: 0.75em 0 0.75em 0; 33 | margin: 0.5em 0 0.5em 0; 34 | } 35 | 36 | .pager 37 | { 38 | } 39 | 40 | .pager .pages 41 | { 42 | display: none; 43 | } 44 | 45 | /*********************************************************************************/ 46 | /* Mobile UI */ 47 | /*********************************************************************************/ 48 | 49 | #mobileUI-site-titlebar 50 | { 51 | background: #364050 url('images/bg1.png'); 52 | } 53 | 54 | #mobileUI-site-title 55 | { 56 | color: #fff; 57 | line-height: 44px; 58 | font-size: 1.25em; 59 | font-family: 'Open Sans Condensed', sans-serif; 60 | font-weight: 700; 61 | letter-spacing: 0.1em; 62 | text-shadow: -1px -1px 0px rgba(0,0,0,0.5); 63 | box-shadow: 0px 1px 4px 0px rgba(0,0,0,0.25); 64 | } 65 | 66 | #mobileUI-site-nav-opener 67 | { 68 | text-indent: -9999em; 69 | width: 70px; 70 | height: 44px; 71 | } 72 | 73 | #mobileUI-site-nav-opener:before 74 | { 75 | content: ''; 76 | display: block; 77 | position: absolute; 78 | left: 7px; 79 | top: 7px; 80 | width: 50px; 81 | height: 30px; 82 | background: #c94663 url('images/bg1.png'); 83 | border-radius: 5px; 84 | box-shadow: inset 0px 0px 0px 1px rgba(255,255,255,0.15), 0 0.025em 0.15em 0em rgba(0,0,0,0.25); 85 | } 86 | 87 | #mobileUI-site-nav-opener:after 88 | { 89 | content: ''; 90 | display: block; 91 | position: absolute; 92 | left: 22px; 93 | top: 15px; 94 | width: 50px; 95 | height: 30px; 96 | background: url('images/mobileUI-site-nav-opener-bg.svg') 0 0 no-repeat; 97 | opacity: 0.75; 98 | } 99 | 100 | #mobileUI-site-nav-opener:active 101 | { 102 | } 103 | 104 | #mobileUI-site-nav-opener:active:before 105 | { 106 | background-color: #d95673; 107 | } 108 | 109 | #mobileUI-site-nav-opener:active:after 110 | { 111 | opacity: 1.0; 112 | } 113 | 114 | #mobileUI-site-nav 115 | { 116 | background: #303844 url('images/bg1.png'); 117 | color: #a8b0b3; 118 | text-shadow: -1px -1px 0px rgba(0,0,0,0.5); 119 | box-shadow: inset -0.15em 0em 0.75em 0em rgba(0,0,0,0.15); 120 | } 121 | 122 | #mobileUI-site-nav-inner 123 | { 124 | } 125 | 126 | .mobileUI-site-nav-link 127 | { 128 | display: block; 129 | color: #929da4; 130 | text-decoration: none; 131 | height: 44px; 132 | line-height: 44px; 133 | padding: 0 1em 0 1em; 134 | border-top: solid 1px rgba(0,0,0,0.25); 135 | box-shadow: inset 0px 1px 0px 0px rgba(255,255,255,0.075); 136 | } 137 | 138 | .mobileUI-site-nav-link:first-child 139 | { 140 | border-top: 0; 141 | box-shadow: none; 142 | } 143 | 144 | .mobileUI-site-nav-link-depth-0 145 | { 146 | color: #fff; 147 | } 148 | 149 | /*********************************************************************************/ 150 | /* Section/Article Types */ 151 | /*********************************************************************************/ 152 | 153 | .is-first 154 | { 155 | margin-top: 0 !important; 156 | } 157 | 158 | .is-first:before 159 | { 160 | display: none !important; 161 | } 162 | 163 | .is-post 164 | { 165 | padding-bottom: 5em; 166 | margin-bottom: 6em; 167 | } 168 | 169 | .is-post .byline 170 | { 171 | font-size: 1em; 172 | font-family: 'Source Sans Pro', sans-serif; 173 | line-height: 1.5em; 174 | } 175 | 176 | .is-post .info 177 | { 178 | width: 100%; 179 | position: absolute; 180 | bottom: 0; 181 | left: 0; 182 | border-top: solid 1px #ddd; 183 | padding-top: 0.5em; 184 | } 185 | 186 | .is-post .info .date 187 | { 188 | display: inline; 189 | } 190 | 191 | .is-post .info .date .year 192 | { 193 | display: none; 194 | } 195 | 196 | .is-post .info .date .month span 197 | { 198 | display: none; 199 | } 200 | 201 | .is-post .info .stats 202 | { 203 | display: inline; 204 | border-left: solid 1px #ddd; 205 | margin-left: 0.5em; 206 | padding-left: 0em; 207 | } 208 | 209 | .is-post .info .stats li 210 | { 211 | display: inline-block; 212 | margin-right: 0.25em; 213 | } 214 | 215 | .is-post .info .stats li a 216 | { 217 | display: inline-block; 218 | opacity: 0.5; 219 | } 220 | 221 | .is-post .info .stats li a:active 222 | { 223 | opacity: 1.0; 224 | } 225 | 226 | /*********************************************************************************/ 227 | /* Logo */ 228 | /*********************************************************************************/ 229 | 230 | #logo 231 | { 232 | display: none; 233 | } 234 | 235 | /*********************************************************************************/ 236 | /* Nav */ 237 | /*********************************************************************************/ 238 | 239 | #nav 240 | { 241 | display: none; 242 | } 243 | 244 | /*********************************************************************************/ 245 | /* Sidebar */ 246 | /*********************************************************************************/ 247 | 248 | #sidebar 249 | { 250 | padding: 3em 20px 2em 20px; 251 | -webkit-transform: translateZ(0); 252 | } 253 | 254 | #sidebar h2 255 | { 256 | -webkit-transform: translateZ(0); 257 | } 258 | 259 | #sidebar section 260 | { 261 | margin: 2em 0 0 0; 262 | } 263 | 264 | #sidebar section:before 265 | { 266 | height: 0.5em; 267 | margin: 0 0 1.5em 0; 268 | } 269 | 270 | /*********************************************************************************/ 271 | /* Content */ 272 | /*********************************************************************************/ 273 | 274 | #content 275 | { 276 | padding: 3em 20px 2em 20px; 277 | } 278 | 279 | /*********************************************************************************/ 280 | /* Copyright */ 281 | /*********************************************************************************/ 282 | 283 | #copyright 284 | { 285 | margin: 2em 0 0 0; 286 | text-align: center; 287 | } 288 | 289 | #copyright p 290 | { 291 | font-size: 0.9em; 292 | line-height: 2em; 293 | } 294 | 295 | #copyright:before 296 | { 297 | height: 0.5em; 298 | margin: 0 0 2em 0; 299 | } -------------------------------------------------------------------------------- /my_blog/static/css2/ie/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d * { 67 | float: left; 68 | } 69 | 70 | .row:after, .row:before { 71 | content: ''; 72 | display: block; 73 | clear: both; 74 | height: 0; 75 | } 76 | 77 | .row.uniform > * > :first-child { 78 | margin-top: 0; 79 | } 80 | 81 | .row.uniform > * > :last-child { 82 | margin-bottom: 0; 83 | } 84 | 85 | /* Gutters */ 86 | 87 | /* Normal */ 88 | 89 | .row > * { 90 | /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ 91 | padding: 0 0 0 2em; 92 | } 93 | 94 | .row { 95 | /* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */ 96 | margin: 0 0 -1px -2em; 97 | } 98 | 99 | .row.uniform > * { 100 | /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ 101 | padding: 2em 0 0 2em; 102 | } 103 | 104 | .row.uniform { 105 | /* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */ 106 | margin: -2em 0 -1px -2em; 107 | } 108 | 109 | /* 200% */ 110 | 111 | .row.\32 00\25 > * { 112 | /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ 113 | padding: 0 0 0 4em; 114 | } 115 | 116 | .row.\32 00\25 { 117 | /* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */ 118 | margin: 0 0 -1px -4em; 119 | } 120 | 121 | .row.uniform.\32 00\25 > * { 122 | /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ 123 | padding: 4em 0 0 4em; 124 | } 125 | 126 | .row.uniform.\32 00\25 { 127 | /* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */ 128 | margin: -4em 0 -1px -4em; 129 | } 130 | 131 | /* 150% */ 132 | 133 | .row.\31 50\25 > * { 134 | /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ 135 | padding: 0 0 0 1.5em; 136 | } 137 | 138 | .row.\31 50\25 { 139 | /* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */ 140 | margin: 0 0 -1px -1.5em; 141 | } 142 | 143 | .row.uniform.\31 50\25 > * { 144 | /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ 145 | padding: 1.5em 0 0 1.5em; 146 | } 147 | 148 | .row.uniform.\31 50\25 { 149 | /* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */ 150 | margin: -1.5em 0 -1px -1.5em; 151 | } 152 | 153 | /* 50% */ 154 | 155 | .row.\35 0\25 > * { 156 | /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ 157 | padding: 0 0 0 1em; 158 | } 159 | 160 | .row.\35 0\25 { 161 | /* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */ 162 | margin: 0 0 -1px -1em; 163 | } 164 | 165 | .row.uniform.\35 0\25 > * { 166 | /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ 167 | padding: 1em 0 0 1em; 168 | } 169 | 170 | .row.uniform.\35 0\25 { 171 | /* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */ 172 | margin: -1em 0 -1px -1em; 173 | } 174 | 175 | /* 25% */ 176 | 177 | .row.\32 5\25 > * { 178 | /* padding: (gutters.horizontal) 0 0 (gutters.vertical) */ 179 | padding: 0 0 0 0.5em; 180 | } 181 | 182 | .row.\32 5\25 { 183 | /* margin: -(gutters.horizontal) 0 -1px -(gutters.vertical) */ 184 | margin: 0 0 -1px -0.5em; 185 | } 186 | 187 | .row.uniform.\32 5\25 > * { 188 | /* padding: (gutters.vertical) 0 0 (gutters.vertical) */ 189 | padding: 0.5em 0 0 0.5em; 190 | } 191 | 192 | .row.uniform.\32 5\25 { 193 | /* margin: -(gutters.vertical) 0 -1px -(gutters.vertical) */ 194 | margin: -0.5em 0 -1px -0.5em; 195 | } 196 | 197 | /* 0% */ 198 | 199 | .row.\30 \25 > * { 200 | padding: 0; 201 | } 202 | 203 | .row.\30 \25 { 204 | margin: 0 0 -1px 0; 205 | } 206 | 207 | /* Cells */ 208 | 209 | .\31 2u, .\31 2u\24, .\31 2u\28 1\29, .\31 2u\24\28 1\29 { width: 100%; clear: none; } 210 | .\31 1u, .\31 1u\24, .\31 1u\28 1\29, .\31 1u\24\28 1\29 { width: 91.6666666667%; clear: none; } 211 | .\31 0u, .\31 0u\24, .\31 0u\28 1\29, .\31 0u\24\28 1\29 { width: 83.3333333333%; clear: none; } 212 | .\39 u, .\39 u\24, .\39 u\28 1\29, .\39 u\24\28 1\29 { width: 75%; clear: none; } 213 | .\38 u, .\38 u\24, .\38 u\28 1\29, .\38 u\24\28 1\29 { width: 66.6666666667%; clear: none; } 214 | .\37 u, .\37 u\24, .\37 u\28 1\29, .\37 u\24\28 1\29 { width: 58.3333333333%; clear: none; } 215 | .\36 u, .\36 u\24, .\36 u\28 1\29, .\36 u\24\28 1\29 { width: 50%; clear: none; } 216 | .\35 u, .\35 u\24, .\35 u\28 1\29, .\35 u\24\28 1\29 { width: 41.6666666667%; clear: none; } 217 | .\34 u, .\34 u\24, .\34 u\28 1\29, .\34 u\24\28 1\29 { width: 33.3333333333%; clear: none; } 218 | .\33 u, .\33 u\24, .\33 u\28 1\29, .\33 u\24\28 1\29 { width: 25%; clear: none; } 219 | .\32 u, .\32 u\24, .\32 u\28 1\29, .\32 u\24\28 1\29 { width: 16.6666666667%; clear: none; } 220 | .\31 u, .\31 u\24, .\31 u\28 1\29, .\31 u\24\28 1\29 { width: 8.3333333333%; clear: none; } 221 | 222 | .\31 2u\24 + *, .\31 2u\24\28 1\29 + *, 223 | .\31 1u\24 + *, .\31 1u\24\28 1\29 + *, 224 | .\31 0u\24 + *, .\31 0u\24\28 1\29 + *, 225 | .\39 u\24 + *, .\39 u\24\28 1\29 + *, 226 | .\38 u\24 + *, .\38 u\24\28 1\29 + *, 227 | .\37 u\24 + *, .\37 u\24\28 1\29 + *, 228 | .\36 u\24 + *, .\36 u\24\28 1\29 + *, 229 | .\35 u\24 + *, .\35 u\24\28 1\29 + *, 230 | .\34 u\24 + *, .\34 u\24\28 1\29 + *, 231 | .\33 u\24 + *, .\33 u\24\28 1\29 + *, 232 | .\32 u\24 + *, .\32 u\24\28 1\29 + *, 233 | .\31 u\24 + *, .\31 u\24\28 1\29 + * { 234 | clear: left; 235 | } 236 | 237 | .\-11u { margin-left: 91.6666666667% } 238 | .\-10u { margin-left: 83.3333333333% } 239 | .\-9u { margin-left: 75% } 240 | .\-8u { margin-left: 66.6666666667% } 241 | .\-7u { margin-left: 58.3333333333% } 242 | .\-6u { margin-left: 50% } 243 | .\-5u { margin-left: 41.6666666667% } 244 | .\-4u { margin-left: 33.3333333333% } 245 | .\-3u { margin-left: 25% } 246 | .\-2u { margin-left: 16.6666666667% } 247 | .\-1u { margin-left: 8.3333333333% } -------------------------------------------------------------------------------- /my_blog/static/css2/style-large.css: -------------------------------------------------------------------------------- 1 | /* 2 | Read Only by HTML5 UP 3 | html5up.net | @n33co 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | body, input, select, textarea { 10 | font-size: 11pt; 11 | } 12 | 13 | /* Header */ 14 | 15 | #header { 16 | width: 20em; 17 | } 18 | 19 | /* Wrapper */ 20 | 21 | #wrapper { 22 | padding-right: 20em; 23 | } -------------------------------------------------------------------------------- /my_blog/static/css2/style-medium.css: -------------------------------------------------------------------------------- 1 | /* 2 | Read Only by HTML5 UP 3 | html5up.net | @n33co 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | body, input, select, textarea { 10 | font-size: 12pt; 11 | } 12 | 13 | /* Image */ 14 | 15 | .image.left, .image.right { 16 | max-width: 40%; 17 | } 18 | 19 | .image.left img, .image.right img { 20 | width: 100%; 21 | } 22 | 23 | /* Header */ 24 | 25 | #skel-layers-wrapper { 26 | padding-top: 44px; 27 | } 28 | 29 | #header { 30 | background: none; 31 | bottom: auto; 32 | left: auto; 33 | position: relative; 34 | right: auto; 35 | top: auto; 36 | width: 100%; 37 | } 38 | 39 | #header > footer { 40 | bottom: auto; 41 | left: auto; 42 | margin: 1em 0 0 0; 43 | position: relative; 44 | right: auto; 45 | top: auto; 46 | } 47 | 48 | /* Wrapper */ 49 | 50 | #wrapper { 51 | padding: 0; 52 | } 53 | 54 | /* One */ 55 | 56 | #one:before { 57 | height: 10em; 58 | } 59 | 60 | /* Layers */ 61 | 62 | #titleBar { 63 | background: #222; 64 | color: #fff; 65 | min-width: 320px; 66 | } 67 | 68 | #titleBar .title { 69 | color: #fff; 70 | display: block; 71 | font-weight: 700; 72 | height: 44px; 73 | line-height: 44px; 74 | padding: 0 1em; 75 | width: 100%; 76 | text-align: left; 77 | } 78 | 79 | #titleBar .toggle { 80 | text-decoration: none; 81 | height: 4em; 82 | position: absolute; 83 | top: 0; 84 | width: 6em; 85 | right: 0; 86 | } 87 | 88 | #titleBar .toggle:before { 89 | -moz-osx-font-smoothing: grayscale; 90 | -webkit-font-smoothing: antialiased; 91 | font-family: FontAwesome; 92 | font-style: normal; 93 | font-weight: normal; 94 | text-transform: none !important; 95 | } 96 | 97 | #titleBar .toggle:before { 98 | background: #4acaa8; 99 | color: #ffffff; 100 | content: '\f0c9'; 101 | display: block; 102 | font-size: 18px; 103 | height: 44px; 104 | line-height: 44px; 105 | position: absolute; 106 | text-align: center; 107 | top: 0; 108 | width: 64px; 109 | right: 0; 110 | } 111 | 112 | #sidePanel { 113 | background: #4acaa8; 114 | color: #d1f1e9; 115 | } -------------------------------------------------------------------------------- /my_blog/static/css2/style-small.css: -------------------------------------------------------------------------------- 1 | /* 2 | Read Only by HTML5 UP 3 | html5up.net | @n33co 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | body, input, select, textarea { 10 | font-size: 12pt; 11 | } 12 | 13 | h1 br, h2 br, h3 br, h4 br, h5 br, h6 br { 14 | display: none; 15 | } 16 | 17 | h2 { 18 | font-size: 1.75em; 19 | } 20 | 21 | h3 { 22 | font-size: 1.5em; 23 | } 24 | 25 | h4 { 26 | font-size: 1em; 27 | } 28 | 29 | /* Image */ 30 | 31 | .image.left { 32 | margin: 0 1.5em 1em 0; 33 | } 34 | 35 | .image.right { 36 | margin: 0 0 1em 1.5em; 37 | } 38 | 39 | /* Section/Article */ 40 | 41 | header br { 42 | display: none; 43 | } 44 | 45 | header.major h2 { 46 | font-size: 2.5em; 47 | } 48 | 49 | header.major h2 + p { 50 | font-size: 1.5em; 51 | } 52 | 53 | /* Features */ 54 | 55 | .features article .image { 56 | display: block; 57 | margin: 0 0 2.25em 0; 58 | padding-right: 0; 59 | width: 100%; 60 | } 61 | 62 | .features article .inner { 63 | display: block; 64 | width: 100%; 65 | } 66 | 67 | /* Header */ 68 | 69 | #header > header { 70 | padding: 2em; 71 | } 72 | 73 | #header > header .avatar { 74 | margin: 0 auto 1.6875em auto; 75 | width: 6em; 76 | } 77 | 78 | #header > header h1 { 79 | font-size: 1.5em; 80 | } 81 | 82 | #header > header p { 83 | margin: 1em 0 0 0; 84 | } 85 | 86 | #header > footer { 87 | padding: 1.5em; 88 | } 89 | 90 | /* Main */ 91 | 92 | #main > section > .container { 93 | padding: 2em 0 0 0; 94 | } 95 | 96 | /* One */ 97 | 98 | #one:before { 99 | height: 7em; 100 | } 101 | 102 | /* Footer */ 103 | 104 | #footer { 105 | text-align: center; 106 | } 107 | 108 | #footer .copyright li { 109 | border-left: 0; 110 | display: block; 111 | line-height: 1.75em; 112 | margin: 0.75em 0 0 0; 113 | padding-left: 0; 114 | } 115 | 116 | #footer .copyright li:first-child { 117 | margin-top: 0; 118 | } 119 | 120 | /* Layers */ 121 | 122 | #titleBar .toggle { 123 | height: 4em; 124 | width: 6em; 125 | } 126 | 127 | #titleBar .toggle:before { 128 | font-size: 14px; 129 | width: 44px; 130 | } -------------------------------------------------------------------------------- /my_blog/static/css2/style-xlarge.css: -------------------------------------------------------------------------------- 1 | /* 2 | Read Only by HTML5 UP 3 | html5up.net | @n33co 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | body, input, select, textarea { 10 | font-size: 13pt; 11 | } 12 | 13 | /* Header */ 14 | 15 | #header { 16 | width: 21em; 17 | } 18 | 19 | #header > header { 20 | padding: 2em; 21 | } 22 | 23 | #header > footer { 24 | padding: 1.5em; 25 | } 26 | 27 | /* Wrapper */ 28 | 29 | #wrapper { 30 | padding-right: 21em; 31 | } 32 | 33 | /* Main */ 34 | 35 | #main > section > .container { 36 | padding: 4em 0 2em 0; 37 | } -------------------------------------------------------------------------------- /my_blog/static/css2/style-xsmall.css: -------------------------------------------------------------------------------- 1 | /* 2 | Read Only by HTML5 UP 3 | html5up.net | @n33co 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | html, body { 10 | min-width: 320px; 11 | } 12 | 13 | body, input, select, textarea { 14 | font-size: 12pt; 15 | } 16 | 17 | /* List */ 18 | 19 | ul.actions { 20 | margin: 0 0 2.25em 0; 21 | } 22 | 23 | ul.actions li { 24 | display: block; 25 | padding: 1.125em 0 0 0; 26 | text-align: center; 27 | width: 100%; 28 | } 29 | 30 | ul.actions li:first-child { 31 | padding-top: 0; 32 | } 33 | 34 | ul.actions li > * { 35 | width: 100%; 36 | margin: 0 !important; 37 | } 38 | 39 | ul.actions li > *.icon:before { 40 | margin-left: -2em; 41 | } 42 | 43 | ul.actions.small li { 44 | padding: 0.5625em 0 0 0; 45 | } 46 | 47 | ul.actions.small li:first-child { 48 | padding-top: 0; 49 | } 50 | 51 | ul.feature-icons li { 52 | display: block; 53 | width: 100%; 54 | } 55 | 56 | /* Button */ 57 | 58 | input[type="submit"], 59 | input[type="reset"], 60 | input[type="button"], 61 | .button { 62 | padding: 0; 63 | } -------------------------------------------------------------------------------- /my_blog/static/images/fotogrph-dark-stairwell.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/images/fotogrph-dark-stairwell.jpg -------------------------------------------------------------------------------- /my_blog/static/images/n33-robot-invader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/static/images/n33-robot-invader.jpg -------------------------------------------------------------------------------- /my_blog/templates/aboutme.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load custom_markdown %} 3 | 4 | {% block content %} 5 | 6 | 7 | 8 |
    9 |
    10 | 11 | 12 |
    13 |
    14 | 19 |

    正在建设中

    20 |
    21 |
    22 |
    23 |
    24 |
    25 |
    26 |
    27 |
    28 |
    29 |
    30 |
    31 |
    32 |
    33 |
    34 | 35 | 36 |
    37 | 38 | 39 |
    40 |
    41 | 42 | 43 | 44 | {% endblock %} -------------------------------------------------------------------------------- /my_blog/templates/archives.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block content %} 4 | 5 |
    6 |
    7 | 8 | {% for post in post_list %} 9 | 10 | 45 | 46 | {% endfor %} 47 | 48 | 49 | 50 | 51 |
    52 |
    53 | {% endblock %} -------------------------------------------------------------------------------- /my_blog/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {% block title %} SamDing Blog {% endblock %} 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 | 30 |
    31 | {% block content %} 32 | {% endblock %} 33 | 34 | 35 | 36 | 65 | 66 |
    67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /my_blog/templates/duoshuo.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /my_blog/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load custom_markdown %} 3 | {% block content %} 4 | 5 |
    6 |
    7 | 8 | {% for post in post_list %} 9 | 10 | 47 | 48 | {% endfor %} 49 | 50 | 51 | {% if post_list.object_list and post_list.paginator.num_pages > 1 %} 52 |
    53 |
    54 | {% if post_list.has_previous %} 55 | pre 56 | {% endif %} 57 | 58 | {% if post_list.has_next %} 59 | next 60 | {% endif %} 61 |
    62 |
    63 | {% endif %} 64 | 65 | 66 |
    67 |
    68 | {% endblock %} 69 | -------------------------------------------------------------------------------- /my_blog/templates/post.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% load custom_markdown %} 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 | 9 | 10 |
    11 |
    12 | 17 |

    {{ post.title }}

    18 | 26 |
    27 |
    28 | 36 | {{post.date_time.month}}uary {{post.date_time.day}} 37 | 40 |
    41 | 42 |

    43 | {{ post.content|custom_markdown}} 44 |

    45 | {% include "duoshuo.html" %} 46 | 47 |
    48 | 49 | 50 |
    51 |
    52 | 53 | {% endblock %} -------------------------------------------------------------------------------- /my_blog/templates/tag.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block pagetitle %} 4 | {% for post in post_list %} 5 | {{ post.category }} 6 | {% endfor %} 7 | {% endblock %} 8 | 9 | {% block content %} 10 |
    11 | {% for post in post_list %} 12 |

    {{ post.title }}

    13 | 20 | {% endfor %} 21 |

    22 |
    23 | {% endfor %} 24 |
    25 | {% endblock %} -------------------------------------------------------------------------------- /my_blog/test.py: -------------------------------------------------------------------------------- 1 | 2 | def application(env, start_response): 3 | start_response('200 OK', [('Content-Type','text/html')]) 4 | return ["Hello World"] 5 | -------------------------------------------------------------------------------- /my_blog/uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # variables 3 | projectname = my_blog 4 | projectdomain = samleslie.com 5 | base = /home/dingsai/blog 6 | 7 | # config 8 | plugins = python 9 | master = true 10 | protocol = uwsgi 11 | env = DJANGO_SETTINGS_MODULE=%(projectname).settings 12 | pythonpath = %(base)/%(projectname) 13 | module = %(projectname).wsgi 14 | socket = 127.0.0.1:8080 15 | -------------------------------------------------------------------------------- /my_blog/uwsgi.ini.save: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | # variables 3 | projectname = my_blog 4 | projectdomain = samleslie.com 5 | base = /srv/www/blog 6 | 7 | # config 8 | plugins = python 9 | master = true 10 | protocol = uwsgi 11 | env = DJANGO_SETTINGS_MODULE=%(projectname).settings 12 | pythonpath = %(base)/%(projectname) 13 | module = %(projectname).wsgi 14 | socket = 127.0.0.1:8889 15 | -------------------------------------------------------------------------------- /my_blog/var/log/uwsgi.log: -------------------------------------------------------------------------------- 1 | *** Starting uWSGI 2.0.11.2 (64bit) on [Thu Nov 19 12:30:54 2015] *** 2 | compiled with version: 4.9.2 on 19 November 2015 11:59:55 3 | os: Linux-4.1.0-0.bpo.2-amd64 #1 SMP Debian 4.1.6-1~bpo8+1 (2015-09-09) 4 | nodename: s0 5 | machine: x86_64 6 | clock source: unix 7 | detected number of CPU cores: 2 8 | current working directory: /srv/www/blog/my_blog 9 | writing pidfile to /srv/www/blog/my_blog//var/run/uwsgi.pid 10 | detected binary path: /srv/www/blog/pyenv/bin/uwsgi 11 | !!! no internal routing support, rebuild with pcre support !!! 12 | chdir() to /srv/www/blog/my_blog/ 13 | your processes number limit is 3918 14 | your memory page size is 4096 bytes 15 | *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 16 | detected max file descriptor number: 65536 17 | lock engine: pthread robust mutexes 18 | thunder lock: disabled (you can enable it with --thunder-lock) 19 | uwsgi socket 0 bound to UNIX address /srv/www/blog/my_blog//var/run/uwsgi.sock fd 6 20 | Python version: 2.7.9 (default, Mar 1 2015, 13:01:26) [GCC 4.9.2] 21 | Set PythonHome to /srv/www/blog/pyenv 22 | *** Python threads support is disabled. You can enable it with --enable-threads *** 23 | Python main interpreter initialized at 0x22eb470 24 | your server socket listen backlog is limited to 100 connections 25 | your mercy for graceful operations on workers is 60 seconds 26 | mapped 436608 bytes (426 KB) for 5 cores 27 | *** Operational MODE: preforking *** 28 | ImportError: No module named menke.wsgi 29 | unable to load app 0 (mountpoint='') (callable not found or import error) 30 | *** no app loaded. going in full dynamic mode *** 31 | *** uWSGI is running in multiple interpreter mode *** 32 | spawned uWSGI master process (pid: 23958) 33 | spawned uWSGI worker 1 (pid: 23959, cores: 1) 34 | spawned uWSGI worker 2 (pid: 23960, cores: 1) 35 | spawned uWSGI worker 3 (pid: 23961, cores: 1) 36 | spawned uWSGI worker 4 (pid: 23962, cores: 1) 37 | spawned uWSGI worker 5 (pid: 23963, cores: 1) 38 | unable to stat() /srv/www/blog/my_blog//var/log/touch-me-to-rotate-uwsgi-log, events will be triggered as soon as the file is created 39 | *** Starting uWSGI 2.0.11.2 (64bit) on [Thu Nov 19 12:31:21 2015] *** 40 | compiled with version: 4.9.2 on 19 November 2015 11:59:55 41 | os: Linux-4.1.0-0.bpo.2-amd64 #1 SMP Debian 4.1.6-1~bpo8+1 (2015-09-09) 42 | nodename: s0 43 | machine: x86_64 44 | clock source: unix 45 | detected number of CPU cores: 2 46 | current working directory: /srv/www/blog/my_blog 47 | writing pidfile to /srv/www/blog/my_blog//var/run/uwsgi.pid 48 | detected binary path: /srv/www/blog/pyenv/bin/uwsgi 49 | !!! no internal routing support, rebuild with pcre support !!! 50 | chdir() to /srv/www/blog/my_blog/ 51 | your processes number limit is 3918 52 | your memory page size is 4096 bytes 53 | *** WARNING: you have enabled harakiri without post buffering. Slow upload could be rejected on post-unbuffered webservers *** 54 | detected max file descriptor number: 65536 55 | lock engine: pthread robust mutexes 56 | thunder lock: disabled (you can enable it with --thunder-lock) 57 | uwsgi socket 0 bound to UNIX address /srv/www/blog/my_blog//var/run/uwsgi.sock fd 6 58 | Python version: 2.7.9 (default, Mar 1 2015, 13:01:26) [GCC 4.9.2] 59 | Set PythonHome to /srv/www/blog/pyenv 60 | *** Python threads support is disabled. You can enable it with --enable-threads *** 61 | Python main interpreter initialized at 0x9c6470 62 | your server socket listen backlog is limited to 100 connections 63 | your mercy for graceful operations on workers is 60 seconds 64 | mapped 436608 bytes (426 KB) for 5 cores 65 | *** Operational MODE: preforking *** 66 | ImportError: No module named menke.wsgi 67 | unable to load app 0 (mountpoint='') (callable not found or import error) 68 | *** no app loaded. going in full dynamic mode *** 69 | *** uWSGI is running in multiple interpreter mode *** 70 | spawned uWSGI master process (pid: 23967) 71 | spawned uWSGI worker 1 (pid: 23968, cores: 1) 72 | spawned uWSGI worker 2 (pid: 23969, cores: 1) 73 | spawned uWSGI worker 3 (pid: 23970, cores: 1) 74 | spawned uWSGI worker 4 (pid: 23971, cores: 1) 75 | spawned uWSGI worker 5 (pid: 23972, cores: 1) 76 | unable to stat() /srv/www/blog/my_blog//var/log/touch-me-to-rotate-uwsgi-log, events will be triggered as soon as the file is created 77 | -------------------------------------------------------------------------------- /my_blog/var/run/uwsgi.pid: -------------------------------------------------------------------------------- 1 | 23967 2 | -------------------------------------------------------------------------------- /my_blog/wsgi.py: -------------------------------------------------------------------------------- 1 | import os,sys 2 | 3 | if not os.path.dirname(__file__) in sys.path[:1]: 4 | sys.path.insert(0, os.path.dirname(__file__)) 5 | os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 6 | 7 | from django.core.handlers.wsgi import WSGIHandler 8 | application = WSGIHandler() 9 | -------------------------------------------------------------------------------- /my_blog/wsgi.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sam408130/blog/c1983e000916ad9d2ab9055945bf9f227e69172e/my_blog/wsgi.pyc -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.7.1 2 | bootstrap-admin 3 | markdown 4 | pygments 5 | uwsgi --------------------------------------------------------------------------------