├── 001.png ├── 002.png ├── 003.png ├── __pycache__ └── config.cpython-36.pyc ├── apps ├── __init__.py ├── __pycache__ │ ├── __init__.cpython-36.pyc │ ├── models.cpython-36.pyc │ └── modelview.cpython-36.pyc ├── blog │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-36.pyc │ │ ├── forms.cpython-36.pyc │ │ └── views.cpython-36.pyc │ ├── forms.py │ └── views.py ├── models.py ├── modelview.py ├── static │ ├── dist │ │ ├── css │ │ │ ├── sb-admin-2.css │ │ │ └── sb-admin-2.min.css │ │ └── js │ │ │ ├── sb-admin-2.js │ │ │ └── sb-admin-2.min.js │ ├── favicon.ico │ ├── js │ │ └── sb-admin-2.js │ ├── login │ │ ├── css │ │ │ └── style.css │ │ └── images │ │ │ ├── Thumbs.db │ │ │ ├── adm.png │ │ │ ├── avtar.png │ │ │ ├── bg1.jpg │ │ │ ├── close.png │ │ │ ├── key.png │ │ │ └── pass.png │ ├── theme │ │ ├── bootstrap │ │ │ ├── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ ├── css │ │ │ ├── clean-blog.css │ │ │ └── clean-blog.min.css │ │ ├── img │ │ │ ├── about-bg.jpg │ │ │ ├── contact-bg.jpg │ │ │ ├── home-bg.jpg │ │ │ ├── post-bg.jpg │ │ │ └── post-sample-image.jpg │ │ ├── js │ │ │ ├── clean-blog.js │ │ │ ├── clean-blog.min.js │ │ │ ├── contact_me.js │ │ │ └── jqBootstrapValidation.js │ │ └── tether │ │ │ ├── tether.js │ │ │ └── tether.min.js │ ├── uploadfile │ │ ├── 1231.png │ │ └── 1231_thumb.png │ └── vendor │ │ ├── bootstrap-social │ │ ├── bootstrap-social.css │ │ ├── bootstrap-social.less │ │ └── bootstrap-social.scss │ │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ └── bootstrap.min.css │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ │ ├── datatables-plugins │ │ ├── dataTables.bootstrap.css │ │ ├── dataTables.bootstrap.js │ │ ├── dataTables.bootstrap.min.js │ │ └── index.html │ │ ├── datatables-responsive │ │ ├── dataTables.responsive.css │ │ ├── dataTables.responsive.js │ │ └── dataTables.responsive.scss │ │ ├── datatables │ │ ├── css │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.min.css │ │ │ ├── dataTables.bootstrap4.css │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ ├── dataTables.foundation.css │ │ │ ├── dataTables.foundation.min.css │ │ │ ├── dataTables.jqueryui.css │ │ │ ├── dataTables.jqueryui.min.css │ │ │ ├── dataTables.material.css │ │ │ ├── dataTables.material.min.css │ │ │ ├── dataTables.semanticui.css │ │ │ ├── dataTables.semanticui.min.css │ │ │ ├── dataTables.uikit.css │ │ │ ├── dataTables.uikit.min.css │ │ │ ├── jquery.dataTables.css │ │ │ ├── jquery.dataTables.min.css │ │ │ └── jquery.dataTables_themeroller.css │ │ ├── images │ │ │ ├── Sorting icons.psd │ │ │ ├── favicon.ico │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ │ └── js │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ ├── dataTables.bootstrap4.js │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ ├── dataTables.foundation.js │ │ │ ├── dataTables.foundation.min.js │ │ │ ├── dataTables.jqueryui.js │ │ │ ├── dataTables.jqueryui.min.js │ │ │ ├── dataTables.material.js │ │ │ ├── dataTables.material.min.js │ │ │ ├── dataTables.semanticui.js │ │ │ ├── dataTables.semanticui.min.js │ │ │ ├── dataTables.uikit.js │ │ │ ├── dataTables.uikit.min.js │ │ │ ├── jquery.dataTables.js │ │ │ ├── jquery.dataTables.min.js │ │ │ └── jquery.js │ │ ├── flot-tooltip │ │ ├── jquery.flot.tooltip.js │ │ ├── jquery.flot.tooltip.min.js │ │ └── jquery.flot.tooltip.source.js │ │ ├── flot │ │ ├── excanvas.js │ │ ├── excanvas.min.js │ │ ├── jquery.colorhelpers.js │ │ ├── jquery.flot.canvas.js │ │ ├── jquery.flot.categories.js │ │ ├── jquery.flot.crosshair.js │ │ ├── jquery.flot.errorbars.js │ │ ├── jquery.flot.fillbetween.js │ │ ├── jquery.flot.image.js │ │ ├── jquery.flot.js │ │ ├── jquery.flot.navigate.js │ │ ├── jquery.flot.pie.js │ │ ├── jquery.flot.resize.js │ │ ├── jquery.flot.selection.js │ │ ├── jquery.flot.stack.js │ │ ├── jquery.flot.symbol.js │ │ ├── jquery.flot.threshold.js │ │ ├── jquery.flot.time.js │ │ └── jquery.js │ │ ├── font-awesome │ │ ├── HELP-US-OUT.txt │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ ├── font-awesome.css.map │ │ │ └── font-awesome.min.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── animated.less │ │ │ ├── bordered-pulled.less │ │ │ ├── core.less │ │ │ ├── extras.less │ │ │ ├── fixed-width.less │ │ │ ├── font-awesome.less │ │ │ ├── icons.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── mixins.less │ │ │ ├── path.less │ │ │ ├── rotated-flipped.less │ │ │ ├── screen-reader.less │ │ │ ├── spinning.less │ │ │ ├── stacked.less │ │ │ └── variables.less │ │ └── scss │ │ │ ├── _animated.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _core.scss │ │ │ ├── _extras.scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _icons.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _mixins.scss │ │ │ ├── _path.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _spinning.scss │ │ │ ├── _stacked.scss │ │ │ ├── _variables.scss │ │ │ └── font-awesome.scss │ │ ├── jquery │ │ ├── jquery.js │ │ └── jquery.min.js │ │ ├── metisMenu │ │ ├── metisMenu.css │ │ ├── metisMenu.js │ │ ├── metisMenu.min.css │ │ └── metisMenu.min.js │ │ ├── morrisjs │ │ ├── morris.css │ │ ├── morris.js │ │ └── morris.min.js │ │ └── raphael │ │ ├── raphael.js │ │ └── raphael.min.js ├── templates │ ├── about.html │ ├── admin │ │ ├── index.html │ │ ├── index2.html │ │ ├── mybase.html │ │ └── mylayout.html │ ├── article.html │ ├── baseindex.html │ ├── index.html │ └── login.html └── util │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-36.pyc │ └── common.cpython-36.pyc │ ├── common.py │ ├── imageUtil.py │ ├── jwt_utils.py │ └── logger.py ├── config.py ├── gendb.py ├── migrations ├── README ├── alembic.ini ├── env.py └── script.py.mako ├── readme.md ├── requirements.txt └── xiaoblog.py /001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/001.png -------------------------------------------------------------------------------- /002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/002.png -------------------------------------------------------------------------------- /003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/003.png -------------------------------------------------------------------------------- /__pycache__/config.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/__pycache__/config.cpython-36.pyc -------------------------------------------------------------------------------- /apps/__init__.py: -------------------------------------------------------------------------------- 1 | # coding:utf-8 2 | from flask import Flask 3 | import config 4 | from flask_sqlalchemy import SQLAlchemy 5 | from flask_admin import Admin 6 | from flask_login import LoginManager 7 | 8 | db=SQLAlchemy() 9 | 10 | login_manager= LoginManager() 11 | login_manager.login_view='main.login' 12 | 13 | def create_app(): 14 | app = Flask(__name__) 15 | app.config.from_object(config) 16 | 17 | #注册蓝图 18 | from apps.blog import blog 19 | app.register_blueprint(blog) 20 | 21 | #注册db 22 | app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://pig:xiaobing123@117.48.202.102:3310/cleanblog' 23 | db.init_app(app) 24 | 25 | # 国际化 26 | from flask_babelex import Babel 27 | babel = Babel(app) 28 | 29 | #注册flask-admin 30 | admin = Admin(app,name="xiaoblog",template_mode='bootstrap3',base_template='admin/mybase.html') 31 | from .models import User,Tag,Article 32 | from flask_admin.contrib.sqla import ModelView 33 | from apps.modelview import UModelview,BaseMView,ArticleVModel 34 | 35 | admin.add_view(UModelview(User, db.session, name="用户管理")) 36 | admin.add_view(BaseMView(Tag, db.session, category='Models' ,name="标签管理")) 37 | admin.add_view(ArticleVModel(Article, db.session,category='Models' , name="文章管理")) 38 | 39 | #整合flask-login 40 | login_manager.init_app(app) 41 | 42 | 43 | return app 44 | -------------------------------------------------------------------------------- /apps/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /apps/__pycache__/models.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/__pycache__/models.cpython-36.pyc -------------------------------------------------------------------------------- /apps/__pycache__/modelview.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/__pycache__/modelview.cpython-36.pyc -------------------------------------------------------------------------------- /apps/blog/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | blog = Blueprint('main',__name__) 3 | from . import views -------------------------------------------------------------------------------- /apps/blog/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/blog/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /apps/blog/__pycache__/forms.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/blog/__pycache__/forms.cpython-36.pyc -------------------------------------------------------------------------------- /apps/blog/__pycache__/views.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/blog/__pycache__/views.cpython-36.pyc -------------------------------------------------------------------------------- /apps/blog/forms.py: -------------------------------------------------------------------------------- 1 | from wtforms import fields, validators 2 | from flask_wtf import FlaskForm 3 | 4 | class LoginForm(FlaskForm): 5 | username = fields.StringField(label=u'管理员账号', validators=[validators.required()]) 6 | password = fields.PasswordField(label=u'密码', validators=[validators.required()]) 7 | 8 | remember_me = fields.BooleanField('记住我') 9 | submit = fields.SubmitField('登陆') -------------------------------------------------------------------------------- /apps/blog/views.py: -------------------------------------------------------------------------------- 1 | from flask import url_for,redirect,request,flash,render_template 2 | from . import blog 3 | from .forms import LoginForm 4 | from apps.models import User,Article 5 | from flask_login import login_user,logout_user 6 | 7 | @blog.route("/index.html") 8 | def index(): 9 | page = request.args.get("page") 10 | if page is None: 11 | page=1 12 | page=int(page) 13 | paginate=Article.query.order_by(Article.create_time.desc()).paginate(page,3,error_out=False) 14 | articles=paginate.items 15 | 16 | return render_template("index.html",articles=articles,paginate=paginate) 17 | 18 | @blog.route("/") 19 | def index2(): 20 | return redirect(url_for("main.index")) 21 | 22 | @blog.route("/login.html",methods=['POST','GET']) 23 | def login(): 24 | form = LoginForm() 25 | if form.validate_on_submit(): 26 | user=User.query.filter_by(username=form.username.data).first() 27 | if user is not None: 28 | flag=User.verity_password(form.password.data,user.password_hash) 29 | if flag: 30 | login_user(user,form.remember_me.data) 31 | return redirect(request.args.get('next') or url_for("admin.index")) 32 | flash('无效的用户名或者密码') 33 | 34 | return render_template("login.html",form=form) 35 | 36 | @blog.route("/loginout.html") 37 | def loginout(): 38 | logout_user() 39 | flash("退出成功!") 40 | return redirect(url_for("main.login")) 41 | 42 | @blog.route("/aboutme.html") 43 | def aboutme(): 44 | return render_template("about.html") 45 | 46 | @blog.route("/article/") 47 | def details(id): 48 | article=Article.query.filter_by(id=id).first() 49 | return render_template('article.html',article=article) 50 | -------------------------------------------------------------------------------- /apps/models.py: -------------------------------------------------------------------------------- 1 | #coding: utf-8 2 | import hashlib 3 | from datetime import datetime 4 | from . import db 5 | from flask_login import UserMixin 6 | 7 | 8 | #用户表 9 | class User(UserMixin,db.Model): 10 | id = db.Column(db.Integer, primary_key=True) 11 | email = db.Column(db.String(64), unique=True, nullable=False) 12 | username = db.Column(db.String(64), unique=True, nullable=False) 13 | role = db.Column(db.String(64), nullable=True) 14 | password_hash = db.Column(db.String(128)) 15 | head_img = db.Column(db.String(128), unique=False, nullable=True) 16 | create_time = db.Column(db.DateTime, nullable=True,default=datetime.now) 17 | 18 | from apps import login_manager 19 | @login_manager.user_loader 20 | def load_user(userid): 21 | user = User.query.filter_by(id=userid).first() 22 | return user 23 | 24 | def verity_password(originPassword, password): 25 | from apps.util import common 26 | newpassword = common.md5(originPassword) 27 | return password == newpassword 28 | 29 | def __repr__(self): 30 | return '' % self.username 31 | 32 | class Article(db.Model): 33 | id = db.Column(db.Integer, primary_key=True) 34 | title=db.Column(db.String(32)) 35 | content=db.Column(db.Text,nullable=False) 36 | tag=db.Column(db.String(64),nullable=True) 37 | create_time = db.Column(db.DateTime, nullable=True, default=datetime.now) 38 | 39 | def __repr__(self): 40 | return '' % self.title 41 | 42 | class Tag(db.Model): 43 | id = db.Column(db.Integer, primary_key=True) 44 | name = db.Column(db.String(32), nullable=False) 45 | desc = db.Column(db.String(64), nullable=True) 46 | count= db.Column(db.Integer,nullable=False,default=1) 47 | create_time = db.Column(db.DateTime, nullable=True, default=datetime.now) 48 | 49 | def __repr__(self): 50 | return '' % self.name 51 | -------------------------------------------------------------------------------- /apps/modelview.py: -------------------------------------------------------------------------------- 1 | from flask_admin.contrib.sqla import ModelView 2 | from sqlalchemy.event import listens_for 3 | import os.path as op 4 | import os 5 | from jinja2 import Markup 6 | from . import db 7 | 8 | from flask import url_for,redirect,request 9 | from flask_admin import Admin, form 10 | from apps.models import User,Tag 11 | from flask_login.utils import current_user 12 | import datetime 13 | 14 | file_path = op.join(op.dirname(__file__), 'static') # 文件上传路径 15 | # base ModelView 16 | class BaseMView(ModelView): 17 | def is_accessible(self): 18 | return current_user.is_authenticated 19 | 20 | def inaccessible_callback(self, name, **kwargs): 21 | # redirect to login page if user doesn't have access 22 | return redirect(url_for('login', next=request.url)) 23 | 24 | 25 | 26 | @listens_for(User, 'after_delete') 27 | def del_image(mapper, connection, target): 28 | if target.head_img: 29 | # Delete image 30 | try: 31 | os.remove(op.join(file_path, target.head_img)) 32 | except OSError: 33 | pass 34 | 35 | # Delete thumbnail 36 | try: 37 | os.remove(op.join(file_path, 38 | form.thumbgen_filename(target.head_img))) 39 | except OSError: 40 | pass 41 | 42 | 43 | class UModelview(BaseMView): 44 | column_labels = { 45 | 'id': u'序号', 46 | 'email': u'邮件', 47 | 'username': u'用户名', 48 | 'role': u'角色', 49 | 'password_hash': u'密码', 50 | 'head_img': u'头像', 51 | 'create_time': u'创建时间' 52 | } 53 | column_exclude_list = ['password_hash', ] 54 | 55 | def _list_thumbnail(view, context, model, name): 56 | if not model.head_img: 57 | return '' 58 | 59 | return Markup('' % url_for('static', 60 | filename="uploadfile/"+form.thumbgen_filename(model.head_img))) 61 | 62 | column_formatters = { 63 | 'head_img': _list_thumbnail 64 | } 65 | 66 | # Alternative way to contribute field is to override it completely. 67 | # In this case, Flask-Admin won't attempt to merge various parameters for the field. 68 | form_extra_fields = { 69 | 'head_img': form.ImageUploadField('Image', 70 | base_path=file_path, 71 | relative_path="uploadfile/", 72 | thumbnail_size=(100, 100, True)) 73 | } 74 | 75 | from wtforms import TextAreaField 76 | from wtforms.widgets import TextArea 77 | 78 | class CKTextAreaWidget(TextArea): 79 | def __call__(self, field, **kwargs): 80 | if kwargs.get('class'): 81 | kwargs['class'] += ' ckeditor' 82 | else: 83 | kwargs.setdefault('class', 'ckeditor') 84 | return super(CKTextAreaWidget, self).__call__(field, **kwargs) 85 | 86 | class CKTextAreaField(TextAreaField): 87 | widget = CKTextAreaWidget() 88 | 89 | 90 | 91 | #文章的自定义视图 92 | class ArticleVModel(BaseMView): 93 | extra_js = ['//cdn.ckeditor.com/4.6.0/standard/ckeditor.js'] 94 | 95 | form_overrides = { 96 | 'content': CKTextAreaField 97 | } 98 | 99 | def _on_model_change(self, form, model, is_created): 100 | print(str(model.__dict__)) 101 | if is_created: 102 | taglist=[] 103 | tagnames=model.tag.split(",") 104 | if tagnames is not None: 105 | for tag in tagnames: 106 | searchTag=Tag.query.filter_by(name=tag).first() 107 | if searchTag is None: 108 | tagobj=Tag(name=tag,desc=tag,count=1,create_time=datetime.datetime.utcnow()) 109 | else: 110 | searchTag.count=+1 111 | taglist.append(tagobj) 112 | db.session.add_all(taglist) 113 | 114 | -------------------------------------------------------------------------------- /apps/static/dist/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function() { 7 | $('#side-menu').metisMenu(); 8 | }); 9 | 10 | //Loads the correct sidebar on window load, 11 | //collapses the sidebar on window resize. 12 | // Sets the min-height of #page-wrapper to window size 13 | $(function() { 14 | $(window).bind("load resize", function() { 15 | var topOffset = 50; 16 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 17 | if (width < 768) { 18 | $('div.navbar-collapse').addClass('collapse'); 19 | topOffset = 100; // 2-row-menu 20 | } else { 21 | $('div.navbar-collapse').removeClass('collapse'); 22 | } 23 | 24 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 25 | height = height - topOffset; 26 | if (height < 1) height = 1; 27 | if (height > topOffset) { 28 | $("#page-wrapper").css("min-height", (height) + "px"); 29 | } 30 | }); 31 | 32 | var url = window.location; 33 | // var element = $('ul.nav a').filter(function() { 34 | // return this.href == url; 35 | // }).addClass('active').parent().parent().addClass('in').parent(); 36 | var element = $('ul.nav a').filter(function() { 37 | return this.href == url; 38 | }).addClass('active').parent(); 39 | 40 | while (true) { 41 | if (element.is('li')) { 42 | element = element.parent().addClass('in').parent(); 43 | } else { 44 | break; 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /apps/static/dist/js/sb-admin-2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){var i=50,n=this.window.innerWidth>0?this.window.innerWidth:this.screen.width;n<768?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse");var e=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1;e-=i,e<1&&(e=1),e>i&&$("#page-wrapper").css("min-height",e+"px")});for(var i=window.location,n=$("ul.nav a").filter(function(){return this.href==i}).addClass("active").parent();;){if(!n.is("li"))break;n=n.parent().addClass("in").parent()}}); -------------------------------------------------------------------------------- /apps/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/favicon.ico -------------------------------------------------------------------------------- /apps/static/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('#side-menu').metisMenu(); 3 | }); 4 | 5 | //Loads the correct sidebar on window load, 6 | //collapses the sidebar on window resize. 7 | // Sets the min-height of #page-wrapper to window size 8 | $(function() { 9 | $(window).bind("load resize", function() { 10 | var topOffset = 50; 11 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 12 | if (width < 768) { 13 | $('div.navbar-collapse').addClass('collapse'); 14 | topOffset = 100; // 2-row-menu 15 | } else { 16 | $('div.navbar-collapse').removeClass('collapse'); 17 | } 18 | 19 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 20 | height = height - topOffset; 21 | if (height < 1) height = 1; 22 | if (height > topOffset) { 23 | $("#page-wrapper").css("min-height", (height) + "px"); 24 | } 25 | }); 26 | 27 | var url = window.location; 28 | // var element = $('ul.nav a').filter(function() { 29 | // return this.href == url; 30 | // }).addClass('active').parent().parent().addClass('in').parent(); 31 | var element = $('ul.nav a').filter(function() { 32 | return this.href == url; 33 | }).addClass('active').parent(); 34 | 35 | while (true) { 36 | if (element.is('li')) { 37 | element = element.parent().addClass('in').parent(); 38 | } else { 39 | break; 40 | } 41 | } 42 | }); 43 | -------------------------------------------------------------------------------- /apps/static/login/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/Thumbs.db -------------------------------------------------------------------------------- /apps/static/login/images/adm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/adm.png -------------------------------------------------------------------------------- /apps/static/login/images/avtar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/avtar.png -------------------------------------------------------------------------------- /apps/static/login/images/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/bg1.jpg -------------------------------------------------------------------------------- /apps/static/login/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/close.png -------------------------------------------------------------------------------- /apps/static/login/images/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/key.png -------------------------------------------------------------------------------- /apps/static/login/images/pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/login/images/pass.png -------------------------------------------------------------------------------- /apps/static/theme/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}html{-webkit-box-sizing:border-box;box-sizing:border-box}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}html{-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}body{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{cursor:help}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}a{color:#0275d8;text-decoration:none}a:focus,a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle}[role=button]{cursor:pointer}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse;background-color:transparent}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,select,textarea{line-height:inherit}input[type=checkbox]:disabled,input[type=radio]:disabled{cursor:not-allowed}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit}input[type=search]{-webkit-appearance:none}output{display:inline-block}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /apps/static/theme/img/about-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/theme/img/about-bg.jpg -------------------------------------------------------------------------------- /apps/static/theme/img/contact-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/theme/img/contact-bg.jpg -------------------------------------------------------------------------------- /apps/static/theme/img/home-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/theme/img/home-bg.jpg -------------------------------------------------------------------------------- /apps/static/theme/img/post-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/theme/img/post-bg.jpg -------------------------------------------------------------------------------- /apps/static/theme/img/post-sample-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/theme/img/post-sample-image.jpg -------------------------------------------------------------------------------- /apps/static/theme/js/clean-blog.js: -------------------------------------------------------------------------------- 1 | // Floating label headings for the contact form 2 | $(function() { 3 | $("body").on("input propertychange", ".floating-label-form-group", function(e) { 4 | $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val()); 5 | }).on("focus", ".floating-label-form-group", function() { 6 | $(this).addClass("floating-label-form-group-with-focus"); 7 | }).on("blur", ".floating-label-form-group", function() { 8 | $(this).removeClass("floating-label-form-group-with-focus"); 9 | }); 10 | }); 11 | 12 | // Navigation Scripts to Show Header on Scroll-Up 13 | jQuery(document).ready(function($) { 14 | var MQL = 1170; 15 | 16 | //primary navigation slide-in effect 17 | if ($(window).width() > MQL) { 18 | var headerHeight = $('#mainNav').height(); 19 | $(window).on('scroll', { 20 | previousTop: 0 21 | }, 22 | function() { 23 | var currentTop = $(window).scrollTop(); 24 | //check if user is scrolling up 25 | if (currentTop < this.previousTop) { 26 | //if scrolling up... 27 | if (currentTop > 0 && $('#mainNav').hasClass('is-fixed')) { 28 | $('#mainNav').addClass('is-visible'); 29 | } else { 30 | $('#mainNav').removeClass('is-visible is-fixed'); 31 | } 32 | } else if (currentTop > this.previousTop) { 33 | //if scrolling down... 34 | $('#mainNav').removeClass('is-visible'); 35 | if (currentTop > headerHeight && !$('#mainNav').hasClass('is-fixed')) $('#mainNav').addClass('is-fixed'); 36 | } 37 | this.previousTop = currentTop; 38 | }); 39 | } 40 | }); 41 | -------------------------------------------------------------------------------- /apps/static/theme/js/clean-blog.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - Clean Blog v4.0.0-alpha (http://startbootstrap.com/template-overviews/clean-blog) 3 | * Copyright 2013-2017 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function(){$("body").on("input propertychange",".floating-label-form-group",function(i){$(this).toggleClass("floating-label-form-group-with-value",!!$(i.target).val())}).on("focus",".floating-label-form-group",function(){$(this).addClass("floating-label-form-group-with-focus")}).on("blur",".floating-label-form-group",function(){$(this).removeClass("floating-label-form-group-with-focus")})}),jQuery(document).ready(function(i){var o=1170;if(i(window).width()>o){var a=i("#mainNav").height();i(window).on("scroll",{previousTop:0},function(){var o=i(window).scrollTop();o0&&i("#mainNav").hasClass("is-fixed")?i("#mainNav").addClass("is-visible"):i("#mainNav").removeClass("is-visible is-fixed"):o>this.previousTop&&(i("#mainNav").removeClass("is-visible"),o>a&&!i("#mainNav").hasClass("is-fixed")&&i("#mainNav").addClass("is-fixed")),this.previousTop=o})}}); -------------------------------------------------------------------------------- /apps/static/theme/js/contact_me.js: -------------------------------------------------------------------------------- 1 | // Contact Form Scripts 2 | 3 | $(function() { 4 | 5 | $("#contactForm input,#contactForm textarea").jqBootstrapValidation({ 6 | preventSubmit: true, 7 | submitError: function($form, event, errors) { 8 | // additional error messages or events 9 | }, 10 | submitSuccess: function($form, event) { 11 | event.preventDefault(); // prevent default submit behaviour 12 | // get values from FORM 13 | var name = $("input#name").val(); 14 | var email = $("input#email").val(); 15 | var phone = $("input#phone").val(); 16 | var message = $("textarea#message").val(); 17 | var firstName = name; // For Success/Failure Message 18 | // Check for white space in name for Success/Fail message 19 | if (firstName.indexOf(' ') >= 0) { 20 | firstName = name.split(' ').slice(0, -1).join(' '); 21 | } 22 | $.ajax({ 23 | url: "././mail/contact_me.php", 24 | type: "POST", 25 | data: { 26 | name: name, 27 | phone: phone, 28 | email: email, 29 | message: message 30 | }, 31 | cache: false, 32 | success: function() { 33 | // Success message 34 | $('#success').html("
"); 35 | $('#success > .alert-success').html(""); 37 | $('#success > .alert-success') 38 | .append("Your message has been sent."); 39 | $('#success > .alert-success') 40 | .append('
'); 41 | 42 | //clear all fields 43 | $('#contactForm').trigger("reset"); 44 | }, 45 | error: function() { 46 | // Fail message 47 | $('#success').html("
"); 48 | $('#success > .alert-danger').html(""); 50 | $('#success > .alert-danger').append("Sorry " + firstName + ", it seems that my mail server is not responding. Please try again later!"); 51 | $('#success > .alert-danger').append('
'); 52 | //clear all fields 53 | $('#contactForm').trigger("reset"); 54 | }, 55 | }); 56 | }, 57 | filter: function() { 58 | return $(this).is(":visible"); 59 | }, 60 | }); 61 | 62 | $("a[data-toggle=\"tab\"]").click(function(e) { 63 | e.preventDefault(); 64 | $(this).tab("show"); 65 | }); 66 | }); 67 | 68 | 69 | /*When clicking on Full hide fail/success boxes */ 70 | $('#name').focus(function() { 71 | $('#success').html(''); 72 | }); 73 | -------------------------------------------------------------------------------- /apps/static/uploadfile/1231.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/uploadfile/1231.png -------------------------------------------------------------------------------- /apps/static/uploadfile/1231_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/uploadfile/1231_thumb.png -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap-social/bootstrap-social.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Social Buttons for Bootstrap 3 | * 4 | * Copyright 2013-2014 Panayiotis Lipiridis 5 | * Licensed under the MIT License 6 | * 7 | * https://github.com/lipis/bootstrap-social 8 | */ 9 | 10 | @bs-height-base: (@line-height-computed + @padding-base-vertical * 2); 11 | @bs-height-lg: (floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2); 12 | @bs-height-sm: (floor(@font-size-small * 1.5) + @padding-small-vertical * 2); 13 | @bs-height-xs: (floor(@font-size-small * 1.2) + @padding-small-vertical + 1); 14 | 15 | .btn-social { 16 | position: relative; 17 | padding-left: (@bs-height-base + @padding-base-horizontal); 18 | text-align: left; 19 | white-space: nowrap; 20 | overflow: hidden; 21 | text-overflow: ellipsis; 22 | > :first-child { 23 | position: absolute; 24 | left: 0; 25 | top: 0; 26 | bottom: 0; 27 | width: @bs-height-base; 28 | line-height: (@bs-height-base + 2); 29 | font-size: 1.6em; 30 | text-align: center; 31 | border-right: 1px solid rgba(0, 0, 0, 0.2); 32 | } 33 | &.btn-lg { 34 | padding-left: (@bs-height-lg + @padding-large-horizontal); 35 | :first-child { 36 | line-height: @bs-height-lg; 37 | width: @bs-height-lg; 38 | font-size: 1.8em; 39 | } 40 | } 41 | &.btn-sm { 42 | padding-left: (@bs-height-sm + @padding-small-horizontal); 43 | :first-child { 44 | line-height: @bs-height-sm; 45 | width: @bs-height-sm; 46 | font-size: 1.4em; 47 | } 48 | } 49 | &.btn-xs { 50 | padding-left: (@bs-height-xs + @padding-small-horizontal); 51 | :first-child { 52 | line-height: @bs-height-xs; 53 | width: @bs-height-xs; 54 | font-size: 1.2em; 55 | } 56 | } 57 | } 58 | 59 | .btn-social-icon { 60 | .btn-social; 61 | height: (@bs-height-base + 2); 62 | width: (@bs-height-base + 2); 63 | padding: 0; 64 | :first-child { 65 | border: none; 66 | text-align: center; 67 | width: 100%!important; 68 | } 69 | &.btn-lg { 70 | height: @bs-height-lg; 71 | width: @bs-height-lg; 72 | padding-left: 0; 73 | padding-right: 0; 74 | } 75 | &.btn-sm { 76 | height: (@bs-height-sm + 2); 77 | width: (@bs-height-sm + 2); 78 | padding-left: 0; 79 | padding-right: 0; 80 | } 81 | &.btn-xs { 82 | height: (@bs-height-xs + 2); 83 | width: (@bs-height-xs + 2); 84 | padding-left: 0; 85 | padding-right: 0; 86 | } 87 | } 88 | 89 | .btn-social(@color-bg, @color: #fff) { 90 | background-color: @color-bg; 91 | .button-variant(@color, @color-bg, rgba(0,0,0,.2)); 92 | } 93 | 94 | 95 | .btn-adn { .btn-social(#d87a68); } 96 | .btn-bitbucket { .btn-social(#205081); } 97 | .btn-dropbox { .btn-social(#1087dd); } 98 | .btn-facebook { .btn-social(#3b5998); } 99 | .btn-flickr { .btn-social(#ff0084); } 100 | .btn-foursquare { .btn-social(#f94877); } 101 | .btn-github { .btn-social(#444444); } 102 | .btn-google-plus { .btn-social(#dd4b39); } 103 | .btn-instagram { .btn-social(#3f729b); } 104 | .btn-linkedin { .btn-social(#007bb6); } 105 | .btn-microsoft { .btn-social(#2672ec); } 106 | .btn-openid { .btn-social(#f7931e); } 107 | .btn-pinterest { .btn-social(#cb2027); } 108 | .btn-reddit { .btn-social(#eff7ff, #000); } 109 | .btn-soundcloud { .btn-social(#ff5500); } 110 | .btn-tumblr { .btn-social(#2c4762); } 111 | .btn-twitter { .btn-social(#55acee); } 112 | .btn-vimeo { .btn-social(#1ab7ea); } 113 | .btn-vk { .btn-social(#587ea3); } 114 | .btn-yahoo { .btn-social(#720e9e); } 115 | -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap-social/bootstrap-social.scss: -------------------------------------------------------------------------------- 1 | /* 2 | * Social Buttons for Bootstrap 3 | * 4 | * Copyright 2013-2014 Panayiotis Lipiridis 5 | * Licensed under the MIT License 6 | * 7 | * https://github.com/lipis/bootstrap-social 8 | */ 9 | 10 | $bs-height-base: ($line-height-computed + $padding-base-vertical * 2); 11 | $bs-height-lg: (floor($font-size-large * $line-height-base) + $padding-large-vertical * 2); 12 | $bs-height-sm: (floor($font-size-small * 1.5) + $padding-small-vertical * 2); 13 | $bs-height-xs: (floor($font-size-small * 1.2) + $padding-small-vertical + 1); 14 | 15 | .btn-social { 16 | position: relative; 17 | padding-left: ($bs-height-base + $padding-base-horizontal); 18 | text-align: left; 19 | white-space: nowrap; 20 | overflow: hidden; 21 | text-overflow: ellipsis; 22 | > :first-child { 23 | position: absolute; 24 | left: 0; 25 | top: 0; 26 | bottom: 0; 27 | width: $bs-height-base; 28 | line-height: ($bs-height-base + 2); 29 | font-size: 1.6em; 30 | text-align: center; 31 | border-right: 1px solid rgba(0, 0, 0, 0.2); 32 | } 33 | &.btn-lg { 34 | padding-left: ($bs-height-lg + $padding-large-horizontal); 35 | :first-child { 36 | line-height: $bs-height-lg; 37 | width: $bs-height-lg; 38 | font-size: 1.8em; 39 | } 40 | } 41 | &.btn-sm { 42 | padding-left: ($bs-height-sm + $padding-small-horizontal); 43 | :first-child { 44 | line-height: $bs-height-sm; 45 | width: $bs-height-sm; 46 | font-size: 1.4em; 47 | } 48 | } 49 | &.btn-xs { 50 | padding-left: ($bs-height-xs + $padding-small-horizontal); 51 | :first-child { 52 | line-height: $bs-height-xs; 53 | width: $bs-height-xs; 54 | font-size: 1.2em; 55 | } 56 | } 57 | } 58 | 59 | .btn-social-icon { 60 | @extend .btn-social; 61 | height: ($bs-height-base + 2); 62 | width: ($bs-height-base + 2); 63 | padding: 0; 64 | :first-child { 65 | border: none; 66 | text-align: center; 67 | width: 100%!important; 68 | } 69 | &.btn-lg { 70 | height: $bs-height-lg; 71 | width: $bs-height-lg; 72 | padding-left: 0; 73 | padding-right: 0; 74 | } 75 | &.btn-sm { 76 | height: ($bs-height-sm + 2); 77 | width: ($bs-height-sm + 2); 78 | padding-left: 0; 79 | padding-right: 0; 80 | } 81 | &.btn-xs { 82 | height: ($bs-height-xs + 2); 83 | width: ($bs-height-xs + 2); 84 | padding-left: 0; 85 | padding-right: 0; 86 | } 87 | } 88 | 89 | @mixin btn-social($color-bg, $color: #fff) { 90 | background-color: $color-bg; 91 | @include button-variant($color, $color-bg, rgba(0,0,0,.2)); 92 | } 93 | 94 | 95 | .btn-adn { @include btn-social(#d87a68); } 96 | .btn-bitbucket { @include btn-social(#205081); } 97 | .btn-dropbox { @include btn-social(#1087dd); } 98 | .btn-facebook { @include btn-social(#3b5998); } 99 | .btn-flickr { @include btn-social(#ff0084); } 100 | .btn-foursquare { @include btn-social(#f94877); } 101 | .btn-github { @include btn-social(#444444); } 102 | .btn-google-plus { @include btn-social(#dd4b39); } 103 | .btn-instagram { @include btn-social(#3f729b); } 104 | .btn-linkedin { @include btn-social(#007bb6); } 105 | .btn-microsoft { @include btn-social(#2672ec); } 106 | .btn-openid { @include btn-social(#f7931e); } 107 | .btn-pinterest { @include btn-social(#cb2027); } 108 | .btn-reddit { @include btn-social(#eff7ff, #000); } 109 | .btn-soundcloud { @include btn-social(#ff5500); } 110 | .btn-tumblr { @include btn-social(#2c4762); } 111 | .btn-twitter { @include btn-social(#55acee); } 112 | .btn-vimeo { @include btn-social(#1ab7ea); } 113 | .btn-vk { @include btn-social(#587ea3); } 114 | .btn-yahoo { @include btn-social(#720e9e); } 115 | -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/minsons/xiaoblog/ce3c98b99d563fff227de24bbefb4470baefc657/apps/static/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /apps/static/vendor/datatables-plugins/dataTables.bootstrap.js: -------------------------------------------------------------------------------- 1 | /*! DataTables Bootstrap 3 integration 2 | * ©2011-2014 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | /** 6 | * DataTables integration for Bootstrap 3. This requires Bootstrap 3 and 7 | * DataTables 1.10 or newer. 8 | * 9 | * This file sets the defaults and adds options to DataTables to style its 10 | * controls using Bootstrap. See http://datatables.net/manual/styling/bootstrap 11 | * for further information. 12 | */ 13 | (function(window, document, undefined){ 14 | 15 | var factory = function( $, DataTable ) { 16 | "use strict"; 17 | 18 | 19 | /* Set the defaults for DataTables initialisation */ 20 | $.extend( true, DataTable.defaults, { 21 | dom: 22 | "<'row'<'col-sm-6'l><'col-sm-6'f>>" + 23 | "<'row'<'col-sm-12'tr>>" + 24 | "<'row'<'col-sm-6'i><'col-sm-6'p>>", 25 | renderer: 'bootstrap' 26 | } ); 27 | 28 | 29 | /* Default class modification */ 30 | $.extend( DataTable.ext.classes, { 31 | sWrapper: "dataTables_wrapper form-inline dt-bootstrap", 32 | sFilterInput: "form-control input-sm", 33 | sLengthSelect: "form-control input-sm" 34 | } ); 35 | 36 | 37 | /* Bootstrap paging button renderer */ 38 | DataTable.ext.renderer.pageButton.bootstrap = function ( settings, host, idx, buttons, page, pages ) { 39 | var api = new DataTable.Api( settings ); 40 | var classes = settings.oClasses; 41 | var lang = settings.oLanguage.oPaginate; 42 | var btnDisplay, btnClass; 43 | 44 | var attach = function( container, buttons ) { 45 | var i, ien, node, button; 46 | var clickHandler = function ( e ) { 47 | e.preventDefault(); 48 | if ( !$(e.currentTarget).hasClass('disabled') ) { 49 | api.page( e.data.action ).draw( false ); 50 | } 51 | }; 52 | 53 | for ( i=0, ien=buttons.length ; i 0 ? 72 | '' : ' disabled'); 73 | break; 74 | 75 | case 'previous': 76 | btnDisplay = lang.sPrevious; 77 | btnClass = button + (page > 0 ? 78 | '' : ' disabled'); 79 | break; 80 | 81 | case 'next': 82 | btnDisplay = lang.sNext; 83 | btnClass = button + (page < pages-1 ? 84 | '' : ' disabled'); 85 | break; 86 | 87 | case 'last': 88 | btnDisplay = lang.sLast; 89 | btnClass = button + (page < pages-1 ? 90 | '' : ' disabled'); 91 | break; 92 | 93 | default: 94 | btnDisplay = button + 1; 95 | btnClass = page === button ? 96 | 'active' : ''; 97 | break; 98 | } 99 | 100 | if ( btnDisplay ) { 101 | node = $('
  • ', { 102 | 'class': classes.sPageButton+' '+btnClass, 103 | 'aria-controls': settings.sTableId, 104 | 'tabindex': settings.iTabIndex, 105 | 'id': idx === 0 && typeof button === 'string' ? 106 | settings.sTableId +'_'+ button : 107 | null 108 | } ) 109 | .append( $('', { 110 | 'href': '#' 111 | } ) 112 | .html( btnDisplay ) 113 | ) 114 | .appendTo( container ); 115 | 116 | settings.oApi._fnBindAction( 117 | node, {action: button}, clickHandler 118 | ); 119 | } 120 | } 121 | } 122 | }; 123 | 124 | attach( 125 | $(host).empty().html('