├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── app ├── __init__.py ├── main │ ├── __init__.py │ ├── errors.py │ ├── forms.py │ ├── models.py │ └── views.py ├── static │ ├── css │ │ ├── app.css │ │ ├── baguetteBox │ │ │ ├── baguetteBox.min.css │ │ │ ├── fluid-gallery.css │ │ │ ├── gallery-clean.css │ │ │ ├── gallery-grid.css │ │ │ ├── htmleaf-demo.css │ │ │ └── thumbnail-gallery.css │ │ ├── bootstrap.css │ │ ├── class.css │ │ ├── fileinput │ │ │ ├── fileinput-rtl.css │ │ │ ├── fileinput-rtl.min.css │ │ │ ├── fileinput.css │ │ │ └── fileinput.min.css │ │ ├── img │ │ │ ├── loading-sm.gif │ │ │ └── loading.gif │ │ ├── mmenu.css │ │ ├── spinkit │ │ │ └── spinkit.css │ │ ├── style.css │ │ ├── theme │ │ │ ├── black.css │ │ │ ├── blue.css │ │ │ ├── green.css │ │ │ ├── orange.css │ │ │ └── red.css │ │ └── vipPush.css │ ├── downloadFile │ │ ├── 776671timg.png │ │ ├── 776671timg_blue.png │ │ ├── 776671timg_red.png │ │ └── 776671timg_white.png │ ├── fonts │ │ ├── Aller_Bd.ttf │ │ ├── Amble-Light-webfont.ttf │ │ ├── base │ │ │ ├── demo.css │ │ │ ├── demo_fontclass.html │ │ │ ├── demo_symbol.html │ │ │ ├── demo_unicode.html │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.js │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── font_mot1bvdidyq │ │ │ ├── demo.css │ │ │ ├── demo_fontclass.html │ │ │ ├── demo_symbol.html │ │ │ ├── demo_unicode.html │ │ │ ├── iconfont.css │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.js │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── images │ │ ├── banner.jpg │ │ ├── create.jpg │ │ ├── mobie_404.png │ │ ├── mobie_complete.png │ │ ├── mobie_index.png │ │ ├── mobie_ugerror.png │ │ ├── mouse.png │ │ ├── nav_icon.png │ │ ├── p5.jpg │ │ ├── pc_404.png │ │ ├── pc_complete.png │ │ ├── pc_index.png │ │ ├── pc_index2.png │ │ ├── pc_key.png │ │ ├── pc_ugerror.png │ │ ├── show.gif │ │ ├── top_arrow.png │ │ └── zip.jpg │ ├── js │ │ ├── baguetteBox.min.js │ │ ├── clipboard.min.js │ │ ├── easing.js │ │ ├── fileinput │ │ │ ├── fileinput.js │ │ │ ├── fileinput.min.js │ │ │ ├── locales │ │ │ │ └── zh.js │ │ │ └── plugins │ │ │ │ ├── piexif.js │ │ │ │ ├── piexif.min.js │ │ │ │ ├── purify.js │ │ │ │ ├── purify.min.js │ │ │ │ ├── sortable.js │ │ │ │ └── sortable.min.js │ │ ├── index.js │ │ ├── jquery-1.11.1.min.js │ │ ├── jquery.easing.min.js │ │ ├── jquery.mixitup.min.js │ │ ├── jquery.mmenu.min.js │ │ └── move-top.js │ ├── uploadFile │ │ └── 776671timg.jpg │ └── zipFile │ │ └── 776671timg.zip └── templates │ ├── 401.html │ ├── 404.html │ ├── 500.html │ ├── base.html │ ├── complete.html │ ├── index.html │ └── upError.html ├── config.py ├── manage.py ├── requirements.txt ├── sql └── upGoremove.sql └── test.py /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=python 2 | *.css linguist-language=python 3 | *.html linguist-language=python 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flask-background-remove 2 |

3 | 4 | 5 | 6 |

7 |

UPGOREMOVE,一键去除图片背景。

8 |

9 | GitHub issues 10 | GitHub forks 11 | GitHub stars 12 | GitHub license 13 |

14 | 15 | ## 💡 简介 16 | 17 | [UPGOREMOVE](https://github.com/wangxinleo/UpGoRemove_Flask) 是一款快速、精细去除背景图片的AI web工具!!! 18 | 19 | 从照片中删除背景是一项繁琐的任务 ,就算是专业的设计师,使用最专业的软件,也需要花费大量时间去处理图片细节问题。 20 | 21 | 使用[UPGOREMOVE](https://github.com/wangxinleo/UpGoRemove_Flask),您可以在5秒内自动100%剪切任何图像,不需要进一步输入:没有选择像素,没有标记人,什么都没有。 22 | 23 | UPGOREMOVE 基于[REMOVEBG](https://www.remove.bg),它有偿提供了自动删除背景的API接口,就算不了解人工智能,也能通过它提供的接口实现个人开发需求。 24 | 25 | > 具体细节请浏览 [REMOVEBG/API](https://www.remove.bg/api) 26 | 27 | ### 为什么要花时间去研究这个? 28 | 29 | 先来一张效果对比图 30 | 31 | ![showimg.png](https://i.loli.net/2019/08/08/WmQYRlArafdzKcu.png) 32 | 33 | 对比之后明显发现,REMOVEBG API可以提供更丰满的图片效果。相比于一些抠图难度大的图片,REMOVEBG API可以更加帮助到设计师短时间完成自己的工作。 34 | 35 | 最重要的。。网上那些智能抠图工具有着致命和繁琐的套路 36 | 37 | 注册-->填信息-->收邮件-->打开邮箱-->确认邮件-->登录-->下载 38 | 39 | 对不起,打扰了~我选择死亡~[手动滑稽] 40 | 41 | ## 🗃 示例地址 42 | [REMOVEBG_http://removebg.wangxinleo.cn/](http://removebg.wangxinleo.cn/) 43 | 44 | ## 🗃 演示 45 | 46 | ![show.gif](http://i.loli.net/2019/08/08/ulsbS64w3AGJNR1.gif) 47 | 48 | ## 🎨 界面 49 | 50 | ### 开始使用 51 | 52 | PC端 53 | 54 | ![pc_key.png](https://i.loli.net/2019/08/08/ZEHnwR1yW4aU9Xo.png) 55 | 56 | ![pc_index.png](https://i.loli.net/2019/08/08/BTDPdEzk5CL1NWw.png) 57 | 58 | ![pc_index2.png](https://i.loli.net/2019/08/08/5K3OgqVcrthPAxp.png) 59 | 60 | 移动端 61 | 62 | ![mobie_index.png](https://i.loli.net/2019/08/08/xdeI5mMHcQXB17K.png) 63 | 64 | ### 处理完成 65 | 66 | PC端 67 | 68 | ![pc_complete.png](https://i.loli.net/2019/08/08/InPGwcZXBM5NqE2.png) 69 | 70 | 移动端 71 | 72 | ![mobie_complete.png](https://i.loli.net/2019/08/08/T6Mrjb3sJg9m1CS.png) 73 | 74 | ### 错误页面 75 | 76 | PC端 77 | 78 | ![pc_404.png](https://i.loli.net/2019/08/08/okfxKFCLsBnV8zU.png) 79 | 80 | ![pc_ugerror.png](https://i.loli.net/2019/08/08/eQmn8MjRt5bJ2Cv.png) 81 | 82 | 移动端 83 | 84 | ![mobie_404.png](https://i.loli.net/2019/08/08/grb41LC9fFm5SxJ.png) 85 | 86 | ![mobie_ugerror.png](https://i.loli.net/2019/08/08/rEO9oJxqym2FYkH.png) 87 | 88 | ## 🛠️ 安装 89 | 90 | ### 本地试用 91 | 1.下载并正确安装 [python ](https://www.python.org/)、[pip3](https://pypi.org/project/pip/#files)、mysql 92 | 93 | 2.[下载UpGoRemove_Flask](https://github.com/wangxinleo/UpGoRemove_Flask),解压,进入解压目录 94 | 95 | 3.在项目目录中进入命令行模式(Windows进入cmd,linux进入shell),运行命令以下,安装依赖 96 | ``` 97 | pip install -r requirements.txt 98 | ``` 99 | 100 | 4.在mysql中运行sql文件夹下的upGoremove.sql文件 101 | 102 | - 4-1创建数据库 103 | - 数据库的字符集选择utf8mb4,字符集校对选择utf8mb4_general_cil 104 | 105 | ![image.png](https://i.loli.net/2019/09/18/yfNL1q6pB4V75vt.png) 106 | - 4-2运行sql脚本 107 | - 注意选择正确的字符集 108 | 109 | ![image.png](https://i.loli.net/2019/09/18/KWTfupn8jX46Lqg.png) 110 | 111 | 5.更改config.py中关于 SQLALCHEMY_DATABASE_URI的值,指向自己的数据库 112 | 113 | ``` 114 | SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://用户名:密码@数据库地址:3306/upGoremove' 115 | ``` 116 | 117 | 6.运行项目主程序,不要关掉黑色窗口 118 | ``` 119 | python manage.py 120 | ``` 121 | 122 | 5.根据提示,打开 http://127.0.0.1:5000/ 即可 123 | 124 | ### 获取密钥 125 | 要处理图像,您必须访问[Removebg API](https://www.remove.bg/api) 126 | 127 | 根据网站指引注册登录后即可获得免费密钥 128 | 129 | ### 处理图像目录 130 | 用户上传图片时,保存的目录: 131 | ``` 132 | uploadFile/ 133 | ├── person.jpg 134 | └── car.png 135 | ``` 136 | 137 | 运行后将得到的图片目录: 138 | 139 | ``` 140 | uploadFile/ 141 | ├── person.jpg 142 | └── car.png 143 | 144 | downloadFile/ 145 | ├── person.png 146 | ├── person_blue.png 147 | ├── person_red.png 148 | └── person_white.png 149 | 150 | zipFile/ 151 | └── person.zip 152 | ``` 153 | 154 | ### 隐私安全 155 | 关闭下载页面时,会触发关闭事件,删除与目标用户有关的图像数据,请试用的小伙伴及时保存好自己的图片数据 156 | 157 | ### 日志输出 158 | 默认将日志打印到error.log,请在项目目录中查看 159 | 160 | ## 🏘️ 提问 161 | 162 | * [报告问题](https://github.com/wangxinleo/UpGoRemove_Flask/issues/new) 163 | 164 | ## 🙏 鸣谢 165 | 166 | * [remove-bg](https://github.com/remove-bg/go):一个基于GO语言的removebg API 167 | 168 | ## 🏘️ 社区 169 | 170 | * 欢迎加入B3LOG的小众开源社区,详情请看[这里](https://hacpai.com/article/1463025124998) 171 | -------------------------------------------------------------------------------- /app/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from flask import Flask 3 | from flask_sqlalchemy import SQLAlchemy 4 | # from flask_bootstrap import Bootstrap 5 | # from flask_mail import Mail 6 | # from flask_moment import Moment 7 | from config import config 8 | 9 | 10 | # bootstrap = Bootstrap() 11 | # mail = Mail() 12 | # moment = Moment() 13 | sqlalchemy = SQLAlchemy() 14 | 15 | 16 | def create_app(config_name): 17 | '''程序的工厂函数''' 18 | app = Flask(__name__) 19 | app.config.from_object(config[config_name]) # 将配置类中的配置导入程序 20 | config[config_name].init_app(app) 21 | 22 | # 初始化扩展 23 | # bootstrap.init_app(app) 24 | # mail.init_app(app) 25 | # moment.init_app(app) 26 | sqlalchemy.init_app(app) 27 | 28 | # 注册蓝本 29 | from .main import main as main_blueprint 30 | app.register_blueprint(main_blueprint) 31 | 32 | return app 33 | -------------------------------------------------------------------------------- /app/main/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | main = Blueprint("main", __name__) #"main" 为这个蓝图的名字 4 | 5 | from . import views, errors, forms, models#导入需要用到蓝图的文件 -------------------------------------------------------------------------------- /app/main/errors.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 蓝本中的错误处理程序 3 | from flask import render_template 4 | from . import main 5 | 6 | 7 | # 如果使用 errorhandler 修饰器,那么只有蓝本中的 8 | # 错误才能触发处理程序。要想注册程序全局的错误处理程序,必须使用 app_errorhandler 9 | @main.app_errorhandler(404) 10 | def page_not_found(e): 11 | return render_template('404.html'), 404 12 | 13 | 14 | @main.app_errorhandler(500) 15 | def internal_server_error(e): 16 | return render_template('500.html'), 500 17 | 18 | 19 | @main.errorhandler(401) 20 | def page_not_found(e): 21 | return render_template('401.html'), 401 22 | 23 | @main.errorhandler(403) 24 | def page_not_found(e): 25 | return render_template('upError.html'), 403 -------------------------------------------------------------------------------- /app/main/forms.py: -------------------------------------------------------------------------------- 1 | import os 2 | from flask import current_app 3 | from . import main 4 | 5 | 6 | @main.route('/complete/') 7 | def complete_json(fileId): 8 | # os.remove("%s\%s" % (current_app.config.get('UPLOAD_FOLDER'), filename)) 9 | DataNum = 0 10 | rejson = '{"status":200,"Message":"获取数据成功","Data":[' 11 | for pic in os.listdir(current_app.config.get('DOWNLOAD_FOLDER')): 12 | if str(fileId) == pic[0:6]: 13 | DataNum += 1 14 | temp = ("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), pic)).split('/') 15 | imgPath = '/'+temp[-3]+'/'+temp[-2]+'/'+temp[-1] 16 | rejson += '{"filename":"' + pic[6:] + '","filepath":"' + imgPath + '"},' 17 | for tempZip in os.listdir(current_app.config.get('ZIP_FOLDER')): 18 | if str(fileId) == tempZip[0:6]: 19 | DataNum += 1 20 | temp = ("%s/%s" % (current_app.config.get('ZIP_FOLDER'), tempZip)).split('/') 21 | zipPath = '/'+temp[-3]+'/'+temp[-2]+'/'+temp[-1] 22 | rejson += '{"filename":"' + tempZip[6:] + '","filepath":"' + zipPath + '"}' 23 | rejson += ']}' 24 | if DataNum != 0: 25 | return rejson 26 | else: 27 | return '{"status":400,"Message":"获取数据失败"}' -------------------------------------------------------------------------------- /app/main/models.py: -------------------------------------------------------------------------------- 1 | from app import sqlalchemy 2 | 3 | 4 | class dbKey(sqlalchemy.Model): 5 | __tablename__ = 'UG_KEYBOX' 6 | id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True) 7 | Rkey = sqlalchemy.Column(sqlalchemy.String(32), unique=True) 8 | num = sqlalchemy.Column(sqlalchemy.Integer) 9 | 10 | def __init__(self, Rkey, num): 11 | self.Rkey = Rkey 12 | self.num = num 13 | 14 | def __repr__(self): 15 | return '%r:%r' %(self.Rkey, self.num) 16 | 17 | 18 | class dbMac(sqlalchemy.Model): 19 | __tablename__ = 'UG_MACBOX' 20 | id = sqlalchemy.Column(sqlalchemy.Integer, primary_key=True) 21 | userMac = sqlalchemy.Column(sqlalchemy.String(32), unique=True) 22 | 23 | -------------------------------------------------------------------------------- /app/main/views.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 蓝本中定义的程序路由 3 | import os, zipfile, random, base64, uuid 4 | from werkzeug.utils import secure_filename 5 | from removebg import RemoveBg 6 | import PIL.Image as Image 7 | import shutil 8 | # from datetime import datetime 9 | from flask import render_template, session, redirect, url_for, request, abort, current_app 10 | from . import main 11 | from .models import dbKey 12 | from app import sqlalchemy 13 | 14 | 15 | def allowed_file(filename): # 验证上传文件是否符合要求 16 | return '.' in filename and filename.rsplit('.', 1)[1] in current_app.config.get('ALLOWED_EXTENSIONS') 17 | 18 | 19 | def get_mac_address(): # 获取mac地址 20 | mac = uuid.UUID(int=uuid.getnode()).hex[-12:] 21 | return ":".join([mac[e:e + 2] for e in range(0, 11, 2)]) 22 | 23 | 24 | @main.route('/') 25 | def index(): 26 | keybox = dbKey.query.all() 27 | count = 0 28 | if not (keybox.__repr__()): # 无密钥 29 | keyExist = 0 # 显示状态 30 | else: # 数据库有密钥 31 | for i in keybox: 32 | key = i.Rkey 33 | num = i.num 34 | if num > 0: 35 | current_app.config['API_KEY'] = key 36 | keyExist = 2 # 显示状态 37 | count += num 38 | else: 39 | count += num 40 | current_app.config['UPGOREMOVE_COUNT'] = count 41 | 42 | if count > 0 : 43 | return render_template('index.html', keyExist=keyExist, count=current_app.config.get('UPGOREMOVE_COUNT')) 44 | else: 45 | return render_template('index.html', keyExist=0, count=0) 46 | 47 | 48 | @main.route('/guest') 49 | def guest(): 50 | keybox = dbKey.query.all() 51 | count = 0 52 | for i in keybox: 53 | key = i.Rkey 54 | num = i.num 55 | if num > 0: 56 | current_app.config['API_KEY'] = key 57 | current_app.config['KEYEXIST'] = 2 58 | keyExist = 2 59 | count += num 60 | else: 61 | count += num 62 | current_app.config['UPGOREMOVE_COUNT'] = count 63 | try: 64 | if keyExist: 65 | # return redirect(url_for('index', )) 66 | return render_template('index.html', keyExist=keyExist, count=count) 67 | return '没有足够的密钥了' 68 | except: 69 | abort(401) 70 | 71 | # db.session.add_all([db_mac]) 72 | # db.session.commit() 73 | 74 | 75 | @main.route('/key', methods=['POST']) 76 | def pushkey(): 77 | if request.method == 'POST': 78 | # global API_KEY 79 | tempkey = request.form['key'] 80 | tempnum = request.form['num'] 81 | tempcode = base64.b64encode(tempkey.encode('utf-8')) 82 | insertKey = dbKey(Rkey=tempcode,num=int(tempnum)) 83 | sqlalchemy.session.add(insertKey) 84 | sqlalchemy.session.commit() 85 | 86 | return redirect(url_for('main.index')) 87 | 88 | 89 | @main.route('/login', methods=['POST', 'GET']) 90 | def login(): 91 | error = None 92 | if request.method == 'POST': 93 | 94 | if request.form['username'] != 'admin' or request.form['password'] != 'admin': 95 | error = '密钥无效!' 96 | else: 97 | session['username'] = request.form['username'] 98 | return redirect(url_for('main.upload_file')) 99 | return render_template('upError.html', error=error) 100 | 101 | 102 | @main.route('/logout//') 103 | def logout(fileId, filename): 104 | # session.pop('username', None) 105 | 106 | for userfile in os.listdir(current_app.config.get('DOWNLOAD_FOLDER')): 107 | if str(fileId) == userfile[0:6]: 108 | os.remove("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), userfile)) 109 | for userzip in os.listdir(current_app.config.get('ZIP_FOLDER')): 110 | if str(fileId) == userzip[0:6]: 111 | os.remove("%s/%s" % (current_app.config.get('ZIP_FOLDER'), userzip)) 112 | for userimg in os.listdir(current_app.config.get('UPLOAD_FOLDER')): 113 | if str(fileId) == userimg[0:6]: 114 | os.remove("%s/%s" % (current_app.config.get('UPLOAD_FOLDER'), userimg)) 115 | current_app.config['KEYEXIST'] = 0 116 | 117 | return 'success' 118 | # return redirect(url_for('index')) 119 | 120 | 121 | @main.route('/upload', methods=['POST', 'GET']) 122 | def upload_file(): 123 | if request.method == 'POST': 124 | fileId = random.randint(100000, 999999); 125 | file = request.files['file'] # 获取上传的文件 126 | if file and allowed_file(file.filename): 127 | filename = str(fileId)+secure_filename(file.filename) # 获取上传的文件名 128 | file.save(os.path.join(current_app.config.get('UPLOAD_FOLDER'), filename)) # 保存文件 129 | 130 | return '{"Code":0,"Message":"保存数据成功","Data":[{"fileId":"'+str(fileId)+'","filename":"'+filename+'"}]}' 131 | else: 132 | return '系统检测到非法的文件格式或操作!返回 ' 133 | else: 134 | try: 135 | name = session['username'] 136 | return render_template('index.html') 137 | except KeyError: 138 | abort(401) 139 | 140 | 141 | @main.route('/drawing//') 142 | def drawing(fileId, filename): 143 | key=str(base64.b64decode(current_app.config.get('API_KEY')), 'utf-8') 144 | rmbg = RemoveBg(key, "error.log") 145 | for pic in os.listdir(current_app.config.get('UPLOAD_FOLDER')): 146 | if pic == filename: 147 | tempPic = pic.rsplit('.', 1)[0] 148 | url = "%s/%s" % (current_app.config.get('UPLOAD_FOLDER'), filename) 149 | rmbg.remove_background_from_img_file(url) 150 | 151 | # 更新存储量 152 | dbtempKey = dbKey.query.filter_by(Rkey=current_app.config.get('API_KEY')).first() 153 | dbtempKey.num = dbtempKey.num - 1 154 | current_app.config['UPGOREMOVE_COUNT'] = current_app.config['UPGOREMOVE_COUNT'] -1 155 | sqlalchemy.session.commit() 156 | 157 | # 更换底色 158 | oldImg = url + "_no_bg.png" 159 | newImg = "%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), tempPic + ".png") 160 | try: 161 | shutil.move(oldImg, newImg) 162 | im = Image.open(newImg) 163 | x, y = im.size 164 | p = Image.new('RGBA', im.size, (255, 255, 255)) 165 | p.paste(im, (0, 0, x, y), im) 166 | p.save("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), tempPic + '_white.png')) 167 | 168 | im = Image.open(newImg) 169 | x, y = im.size 170 | p = Image.new('RGBA', im.size, (0, 0, 255)) 171 | p.paste(im, (0, 0, x, y), im) 172 | p.save("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), tempPic + '_blue.png')) 173 | 174 | im = Image.open(newImg) 175 | x, y = im.size 176 | p = Image.new('RGBA', im.size, (255, 0, 0)) 177 | p.paste(im, (0, 0, x, y), im) 178 | p.save("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), tempPic + '_red.png')) 179 | 180 | with zipfile.ZipFile("%s/%s" % (current_app.config.get('ZIP_FOLDER'), tempPic + '.zip'), mode="w") as f: 181 | for userfile in os.listdir(current_app.config.get('DOWNLOAD_FOLDER')): 182 | if userfile.rsplit('.', 1)[1] == 'png': 183 | f.write("%s/%s" % (current_app.config.get('DOWNLOAD_FOLDER'), userfile), userfile) 184 | 185 | return redirect(url_for('main.complete_file', filename=filename, fileId=fileId)) 186 | except FileNotFoundError: 187 | for userimg in os.listdir(current_app.config.get('UPLOAD_FOLDER')): 188 | if str(fileId) == userimg[0:6]: 189 | os.remove("%s/%s" % (current_app.config.get('UPLOAD_FOLDER'), userimg)) 190 | return render_template('upError.html') 191 | else: 192 | continue 193 | return abort(401) 194 | return abort(401) 195 | 196 | 197 | @main.route('/complete//') 198 | def complete_file(fileId,filename): 199 | return render_template('complete.html', fileId=fileId, filename=filename) 200 | 201 | 202 | -------------------------------------------------------------------------------- /app/static/css/baguetteBox/baguetteBox.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * baguetteBox.js 3 | * @author feimosi 4 | * @version 1.8.2 5 | * @url https://github.com/feimosi/baguetteBox.js 6 | */#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@-webkit-keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}@keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}} -------------------------------------------------------------------------------- /app/static/css/baguetteBox/fluid-gallery.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #494A5F; 3 | min-height: 100vh; 4 | font: normal 16px sans-serif; 5 | padding: 40px 0; 6 | } 7 | 8 | .container.gallery-container { 9 | background-color: #fff; 10 | color: #35373a; 11 | min-height: 100vh; 12 | padding: 30px 50px; 13 | } 14 | 15 | .gallery-container h1 { 16 | text-align: center; 17 | margin-top: 50px; 18 | font-family: 'Droid Sans', sans-serif; 19 | font-weight: bold; 20 | } 21 | 22 | .gallery-container p.page-description { 23 | text-align: center; 24 | margin: 25px auto; 25 | font-size: 18px; 26 | color: #999; 27 | } 28 | 29 | .tz-gallery { 30 | padding: 40px; 31 | } 32 | 33 | /* Override bootstrap column paddings */ 34 | .tz-gallery .row > div { 35 | padding: 2px; 36 | } 37 | 38 | .tz-gallery .lightbox img { 39 | width: 100%; 40 | border-radius: 0; 41 | position: relative; 42 | } 43 | 44 | .tz-gallery .lightbox:before { 45 | position: absolute; 46 | top: 50%; 47 | left: 50%; 48 | margin-top: -13px; 49 | margin-left: -13px; 50 | opacity: 0; 51 | color: #fff; 52 | font-size: 26px; 53 | font-family: 'Glyphicons Halflings'; 54 | content: '\e003'; 55 | pointer-events: none; 56 | z-index: 9000; 57 | transition: 0.4s; 58 | } 59 | 60 | 61 | .tz-gallery .lightbox:after { 62 | position: absolute; 63 | top: 0; 64 | left: 0; 65 | width: 100%; 66 | height: 100%; 67 | opacity: 0; 68 | background-color: rgba(46, 132, 206, 0.7); 69 | content: ''; 70 | transition: 0.4s; 71 | } 72 | 73 | .tz-gallery .lightbox:hover:after, 74 | .tz-gallery .lightbox:hover:before { 75 | opacity: 1; 76 | } 77 | 78 | .baguetteBox-button { 79 | background-color: transparent !important; 80 | } 81 | 82 | @media(max-width: 768px) { 83 | body { 84 | padding: 0; 85 | } 86 | } -------------------------------------------------------------------------------- /app/static/css/baguetteBox/gallery-clean.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #fff; 3 | min-height: 100vh; 4 | font: normal 16px sans-serif; 5 | } 6 | 7 | .gallery-container h1 { 8 | text-align: center; 9 | margin-top: 70px; 10 | font-family: 'Droid Sans', sans-serif; 11 | font-weight: bold; 12 | color: #58595a; 13 | } 14 | 15 | .gallery-container p.page-description { 16 | text-align: center; 17 | margin: 30px auto; 18 | font-size: 18px; 19 | color: #85878c; 20 | } 21 | 22 | /* Styles for the gallery */ 23 | 24 | .tz-gallery { 25 | padding: 40px; 26 | } 27 | 28 | .tz-gallery .thumbnail { 29 | padding: 0; 30 | margin-bottom: 30px; 31 | border: none; 32 | } 33 | 34 | .tz-gallery img { 35 | border-radius: 2px; 36 | } 37 | 38 | .tz-gallery .caption{ 39 | padding: 26px 30px; 40 | text-align: center; 41 | } 42 | 43 | .tz-gallery .caption h3 { 44 | font-size: 14px; 45 | font-weight: bold; 46 | margin-top: 0; 47 | } 48 | 49 | .tz-gallery .caption p { 50 | font-size: 12px; 51 | color: #7b7d7d; 52 | margin: 0; 53 | } 54 | 55 | .baguetteBox-button { 56 | background-color: transparent !important; 57 | } -------------------------------------------------------------------------------- /app/static/css/baguetteBox/gallery-grid.css: -------------------------------------------------------------------------------- 1 | body { 2 | /*background-image: linear-gradient(to top, #ecedee 0%, #eceeef 75%, #e7e8e9 100%);*/ 3 | background: #494A5F; 4 | min-height: 100vh; 5 | font: normal 16px sans-serif; 6 | padding: 60px 0; 7 | } 8 | 9 | .container.gallery-container { 10 | background-color: #fff; 11 | color: #35373a; 12 | min-height: 100vh; 13 | border-radius: 20px; 14 | box-shadow: 0 8px 15px rgba(0, 0, 0, 0.06); 15 | } 16 | 17 | .gallery-container h1 { 18 | text-align: center; 19 | margin-top: 70px; 20 | font-family: 'Droid Sans', sans-serif; 21 | font-weight: bold; 22 | } 23 | 24 | .gallery-container p.page-description { 25 | text-align: center; 26 | max-width: 800px; 27 | margin: 25px auto; 28 | color: #888; 29 | font-size: 18px; 30 | } 31 | 32 | .tz-gallery { 33 | padding: 40px; 34 | } 35 | 36 | .tz-gallery .lightbox img { 37 | width: 100%; 38 | margin-bottom: 30px; 39 | transition: 0.2s ease-in-out; 40 | box-shadow: 0 2px 3px rgba(0,0,0,0.2); 41 | } 42 | 43 | 44 | .tz-gallery .lightbox img:hover { 45 | transform: scale(1.05); 46 | box-shadow: 0 8px 15px rgba(0,0,0,0.3); 47 | } 48 | 49 | .tz-gallery img { 50 | border-radius: 4px; 51 | } 52 | 53 | .baguetteBox-button { 54 | background-color: transparent !important; 55 | } 56 | 57 | 58 | @media(max-width: 768px) { 59 | body { 60 | padding: 0; 61 | } 62 | 63 | .container.gallery-container { 64 | border-radius: 0; 65 | } 66 | } -------------------------------------------------------------------------------- /app/static/css/baguetteBox/htmleaf-demo.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'icomoon'; 3 | src:url('../fonts/icomoon.eot?rretjt'); 4 | src:url('../fonts/icomoon.eot?#iefixrretjt') format('embedded-opentype'), 5 | url('../fonts/icomoon.woff?rretjt') format('woff'), 6 | url('../fonts/icomoon.ttf?rretjt') format('truetype'), 7 | url('../fonts/icomoon.svg?rretjt#icomoon') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | 12 | [class^="icon-"], [class*=" icon-"] { 13 | font-family: 'icomoon'; 14 | speak: none; 15 | font-style: normal; 16 | font-weight: normal; 17 | font-variant: normal; 18 | text-transform: none; 19 | line-height: 1; 20 | 21 | /* Better Font Rendering =========== */ 22 | -webkit-font-smoothing: antialiased; 23 | -moz-osx-font-smoothing: grayscale; 24 | } 25 | 26 | body, html { font-size: 100%; padding: 0; margin: 0;} 27 | 28 | /* Reset */ 29 | *, 30 | *:after, 31 | *:before { 32 | -webkit-box-sizing: border-box; 33 | -moz-box-sizing: border-box; 34 | box-sizing: border-box; 35 | } 36 | 37 | /* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */ 38 | .clearfix:before, 39 | .clearfix:after { 40 | content: " "; 41 | display: table; 42 | } 43 | 44 | .clearfix:after { 45 | clear: both; 46 | } 47 | 48 | body{ 49 | /*background: #494A5F;*/ 50 | color: #D5D6E2; 51 | font-weight: 500; 52 | font-size: 1.05em; 53 | font-family: "Microsoft YaHei","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif; 54 | } 55 | a{ color: rgba(255, 255, 255, 0.6);outline: none;text-decoration: none;-webkit-transition: 0.2s;transition: 0.2s;} 56 | a:hover,a:focus{color:#74777b;text-decoration: none;} 57 | .htmleaf-container{ 58 | margin: 0 auto; 59 | } 60 | 61 | .bgcolor-1 { background: #f0efee; } 62 | .bgcolor-2 { background: #f9f9f9; } 63 | .bgcolor-3 { background: #e8e8e8; }/*light grey*/ 64 | .bgcolor-4 { background: #2f3238; color: #fff; }/*Dark grey*/ 65 | .bgcolor-5 { background: #df6659; color: #521e18; }/*pink1*/ 66 | .bgcolor-6 { background: #2fa8ec; }/*sky blue*/ 67 | .bgcolor-7 { background: #d0d6d6; }/*White tea*/ 68 | .bgcolor-8 { background: #3d4444; color: #fff; }/*Dark grey2*/ 69 | .bgcolor-9 { background: #ef3f52; color: #fff;}/*pink2*/ 70 | .bgcolor-10{ background: #64448f; color: #fff;}/*Violet*/ 71 | .bgcolor-11{ background: #3755ad; color: #fff;}/*dark blue*/ 72 | .bgcolor-12{ background: #3498DB; color: #fff;}/*light blue*/ 73 | .bgcolor-20{ background: #494A5F;color: #D5D6E2;} 74 | /* Header */ 75 | .htmleaf-header{ 76 | padding: 1em 190px 1em; 77 | letter-spacing: -1px; 78 | text-align: center; 79 | background: #333; 80 | } 81 | .no-color{ 82 | background: transparent; 83 | } 84 | .htmleaf-header h1 { 85 | color: #D5D6E2; 86 | font-weight: 600; 87 | font-size: 2em; 88 | line-height: 1; 89 | margin-bottom: 0; 90 | } 91 | .htmleaf-header h1 span { 92 | display: block; 93 | font-size: 60%; 94 | font-weight: 400; 95 | padding: 0.8em 0 0.5em 0; 96 | color: #c3c8cd; 97 | } 98 | /*nav*/ 99 | .htmleaf-demo a{color: #fff;text-decoration: none;} 100 | .htmleaf-demo{width: 100%;padding-bottom: 1.2em;} 101 | .htmleaf-demo a{display: inline-block;margin: 0.5em;padding: 0.6em 1em;border: 3px solid #fff;font-weight: 700;} 102 | .htmleaf-demo a:hover{opacity: 0.6;} 103 | .htmleaf-demo a.current{background:#1d7db1;color: #fff; } 104 | /* Top Navigation Style */ 105 | .htmleaf-links { 106 | position: relative; 107 | display: inline-block; 108 | white-space: nowrap; 109 | font-size: 1.5em; 110 | text-align: center; 111 | } 112 | 113 | .htmleaf-links::after { 114 | position: absolute; 115 | top: 0; 116 | left: 50%; 117 | margin-left: -1px; 118 | width: 2px; 119 | height: 100%; 120 | background: #dbdbdb; 121 | content: ''; 122 | -webkit-transform: rotate3d(0,0,1,22.5deg); 123 | transform: rotate3d(0,0,1,22.5deg); 124 | } 125 | 126 | .htmleaf-icon { 127 | display: inline-block; 128 | margin: 0.5em; 129 | padding: 0em 0; 130 | width: 1.5em; 131 | text-decoration: none; 132 | } 133 | 134 | .htmleaf-icon span { 135 | display: none; 136 | } 137 | 138 | .htmleaf-icon:before { 139 | margin: 0 5px; 140 | text-transform: none; 141 | font-weight: normal; 142 | font-style: normal; 143 | font-variant: normal; 144 | font-family: 'icomoon'; 145 | line-height: 1; 146 | speak: none; 147 | -webkit-font-smoothing: antialiased; 148 | } 149 | /* footer */ 150 | .htmleaf-footer{width: 100%;padding-top: 10px;} 151 | .htmleaf-small{font-size: 0.8em;} 152 | .center{text-align: center;} 153 | /****/ 154 | .related { 155 | color: #fff; 156 | background: #494A5F; 157 | text-align: center; 158 | font-size: 1.25em; 159 | padding: 0.5em 0; 160 | overflow: hidden; 161 | } 162 | 163 | .related > a { 164 | vertical-align: top; 165 | width: calc(100% - 20px); 166 | max-width: 340px; 167 | display: inline-block; 168 | text-align: center; 169 | margin: 20px 10px; 170 | padding: 25px; 171 | font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo; 172 | } 173 | .related a { 174 | display: inline-block; 175 | text-align: left; 176 | margin: 20px auto; 177 | padding: 10px 20px; 178 | opacity: 0.8; 179 | -webkit-transition: opacity 0.3s; 180 | transition: opacity 0.3s; 181 | -webkit-backface-visibility: hidden; 182 | } 183 | 184 | .related a:hover, 185 | .related a:active { 186 | opacity: 1; 187 | } 188 | 189 | .related a img { 190 | max-width: 100%; 191 | opacity: 0.8; 192 | border-radius: 4px; 193 | } 194 | .related a:hover img, 195 | .related a:active img { 196 | opacity: 1; 197 | } 198 | .related h3{font-family: "Microsoft YaHei", sans-serif;font-size: 1.2em} 199 | .related a h3 { 200 | font-size: 0.85em; 201 | font-weight: 300; 202 | margin-top: 0.15em; 203 | color: #fff; 204 | } 205 | /* icomoon */ 206 | .icon-htmleaf-home-outline:before { 207 | content: "\e5000"; 208 | } 209 | 210 | .icon-htmleaf-arrow-forward-outline:before { 211 | content: "\e5001"; 212 | } 213 | 214 | @media screen and (max-width: 1024px) { 215 | .htmleaf-header { 216 | padding: 2em 10% 2em; 217 | } 218 | .htmleaf-header h1 { 219 | font-size:1.4em; 220 | } 221 | .htmleaf-links{font-size: 1.4em} 222 | } 223 | 224 | @media screen and (max-width: 960px) { 225 | .htmleaf-header { 226 | padding: 2em 10% 2em; 227 | } 228 | .htmleaf-header h1 { 229 | font-size:1.2em; 230 | } 231 | .htmleaf-links{font-size: 1.2em} 232 | .related h3{font-size: 1em;} 233 | .related a h3 { 234 | font-size: 0.8em; 235 | } 236 | } 237 | 238 | @media screen and (max-width: 766px) { 239 | .htmleaf-header h1 { 240 | font-size:1.3em; 241 | } 242 | .htmleaf-links{font-size: 1.3em} 243 | } 244 | 245 | @media screen and (max-width: 640px) { 246 | .htmleaf-header { 247 | padding: 2em 10% 2em; 248 | } 249 | .htmleaf-header h1 { 250 | font-size:1em; 251 | } 252 | .htmleaf-links{font-size: 1em} 253 | .related h3{font-size: 0.8em;} 254 | .related a h3 { 255 | font-size: 0.6em; 256 | } 257 | } -------------------------------------------------------------------------------- /app/static/css/baguetteBox/thumbnail-gallery.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%); 3 | min-height: 100vh; 4 | font: normal 16px sans-serif; 5 | } 6 | 7 | .gallery-container h1 { 8 | text-align: center; 9 | margin-top: 70px; 10 | font-family: 'Droid Sans', sans-serif; 11 | font-weight: bold; 12 | color: #58595a; 13 | } 14 | #header_nav a, .header_nav a { 15 | display: block; 16 | width:35px; 17 | height:28px; 18 | position: absolute; 19 | top:30px; 20 | left:30px; 21 | background: url(/static/images/nav_icon.png); 22 | } 23 | .footer{ 24 | padding:2em 0; 25 | background:#222; 26 | text-align:center; 27 | } 28 | p.copy{ 29 | color:#fff; 30 | font-size:1em; 31 | } 32 | p.copy a{ 33 | color:#d87843; 34 | } 35 | p.copy a:hover{ 36 | text-decoration:none; 37 | color:#fff; 38 | } 39 | #toTop { 40 | display: none; 41 | text-decoration: none; 42 | position: fixed; 43 | bottom: 10px; 44 | right: 10px; 45 | overflow: hidden; 46 | width:50px; 47 | height:50px; 48 | border: none; 49 | text-indent: 100%; 50 | background: url(/static/images/top_arrow.png) no-repeat 0px 0px; 51 | } 52 | 53 | .gallery-container p.page-description { 54 | text-align: center; 55 | margin: 30px auto; 56 | font-size: 18px; 57 | color: #85878c; 58 | } 59 | 60 | .tz-gallery { 61 | padding: 40px; 62 | } 63 | 64 | .tz-gallery .thumbnail { 65 | padding: 0; 66 | margin-bottom: 30px; 67 | background-color: #fff; 68 | border-radius: 4px; 69 | border: none; 70 | transition: 0.15s ease-in-out; 71 | box-shadow: 0 8px 15px rgba(0, 0, 0, 0.06); 72 | } 73 | 74 | .tz-gallery .thumbnail:hover { 75 | transform: translateY(-10px) scale(1.02); 76 | } 77 | 78 | .tz-gallery .lightbox img { 79 | border-radius: 4px 4px 0 0; 80 | } 81 | 82 | .tz-gallery .caption{ 83 | padding: 26px 30px; 84 | text-align: center; 85 | } 86 | 87 | .tz-gallery .caption h3 { 88 | font-size: 14px; 89 | font-weight: bold; 90 | margin-top: 0; 91 | } 92 | 93 | .tz-gallery .caption p { 94 | font-size: 12px; 95 | color: #7b7d7d; 96 | margin: 0; 97 | } 98 | 99 | .baguetteBox-button { 100 | background-color: transparent !important; 101 | } -------------------------------------------------------------------------------- /app/static/css/class.css: -------------------------------------------------------------------------------- 1 | 2 | /* padding */ 3 | .pad-no { 4 | padding: 0 !important 5 | } 6 | 7 | .pad-all { 8 | padding: 15px 9 | } 10 | 11 | .pad-top { 12 | padding-top: 15px 13 | } 14 | 15 | .pad-btm { 16 | padding-bottom: 15px 17 | } 18 | 19 | .pad-lft { 20 | padding-left: 15px 21 | } 22 | 23 | .pad-rgt { 24 | padding-right: 15px 25 | } 26 | 27 | .pad-hor { 28 | padding-left: 15px; 29 | padding-right: 15px 30 | } 31 | 32 | .pad-ver { 33 | padding-top: 15px; 34 | padding-bottom: 15px 35 | } 36 | 37 | /* margin */ 38 | .mar-no { 39 | margin: 0 !important 40 | } 41 | 42 | .mar-all { 43 | margin: 15px 44 | } 45 | 46 | .mar-top { 47 | margin-top: 15px 48 | } 49 | 50 | .mar-btm { 51 | margin-bottom: 15px 52 | } 53 | 54 | .mar-lft { 55 | margin-left: 15px 56 | } 57 | 58 | .mar-rgt { 59 | margin-right: 15px 60 | } 61 | 62 | .mar-hor { 63 | margin-left: 15px; 64 | margin-right: 15px 65 | } 66 | 67 | .mar-ver { 68 | margin-top: 15px; 69 | margin-bottom: 15px 70 | } 71 | 72 | /* img */ 73 | .img-mar { 74 | margin: 5px 75 | } 76 | 77 | .img-border { 78 | box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1) 79 | } 80 | 81 | .img-border-light { 82 | box-shadow: 0 0 0 4px #fff 83 | } 84 | 85 | .img-xs { 86 | width: 32px; 87 | height: 32px 88 | } 89 | 90 | .img-md { 91 | width: 64px; 92 | height: 64px 93 | } 94 | 95 | .img-sm { 96 | width: 48px; 97 | height: 48px 98 | } 99 | 100 | .img-lg { 101 | width: 96px; 102 | height: 96px 103 | } 104 | 105 | .img-holder img { 106 | max-width: 100%; 107 | border-radius: 3px 108 | } 109 | 110 | .img-gallery { 111 | margin-left: -4px; 112 | margin-right: -4px 113 | } 114 | 115 | .img-gallery [class^="col-"], .img-gallery [class*=" col-"] { 116 | padding-left: 4px; 117 | padding-right: 4px; 118 | margin-bottom: 8px 119 | } 120 | 121 | .img-gallery img { 122 | border-radius: 4px 123 | } 124 | 125 | /* icon */ 126 | .icon-wrap { 127 | display: inline-block; 128 | padding: 10px; 129 | border-radius: 2px 130 | } 131 | 132 | .icon-wrap i { 133 | display: block; 134 | line-height: 1em; 135 | text-align: center; 136 | position: relative; 137 | width: 1em; 138 | padding-top: 1em; 139 | vertical-align: middle 140 | } 141 | 142 | .icon-wrap i:before { 143 | position: absolute; 144 | top: 0; 145 | bottom: 0; 146 | left: 0; 147 | right: 0 148 | } 149 | 150 | .icon-wrap .icon-txt { 151 | display: block; 152 | line-height: 1em; 153 | text-align: center; 154 | position: relative; 155 | width: 1em; 156 | vertical-align: top 157 | } 158 | 159 | .icon-wrap-lg { 160 | padding: 20px 161 | } 162 | 163 | .icon-wrap-md { 164 | padding: 17px 165 | } 166 | 167 | .icon-wrap-sm { 168 | padding: 12px 169 | } 170 | 171 | .icon-wrap-xs { 172 | padding: 7px 173 | } 174 | 175 | .icon-circle { 176 | border-radius: 50% 177 | } 178 | 179 | .icon-lg { 180 | font-size: 1.333em; 181 | line-height: 1.095em; 182 | vertical-align: middle 183 | } 184 | 185 | .icon-fw { 186 | width: 1.33em; 187 | margin-right: 4px; 188 | text-align: center 189 | } 190 | 191 | .icon-2x { 192 | font-size: 2em; 193 | line-height: 1em 194 | } 195 | 196 | .icon-3x { 197 | font-size: 3em; 198 | line-height: 1em 199 | } 200 | 201 | .icon-4x { 202 | font-size: 4em; 203 | line-height: 1em 204 | } 205 | 206 | .icon-5x { 207 | font-size: 5em; 208 | line-height: 1em 209 | } 210 | 211 | /* text */ 212 | .text-thin { 213 | font-weight: 300 214 | } 215 | 216 | .text-normal { 217 | font-weight: normal 218 | } 219 | 220 | .text-semibold { 221 | font-weight: 600 222 | } 223 | 224 | .text-bold { 225 | font-weight: 700 226 | } 227 | 228 | .text-5x, .text-4x, .text-5x, .text-2x, .text-lg, .text-sm, .text-xs { 229 | line-height: 1.25; 230 | font-size: 4em 231 | } 232 | 233 | .text-4x { 234 | font-size: 4em 235 | } 236 | 237 | .text-3x { 238 | font-size: 3em 239 | } 240 | 241 | .text-2x { 242 | font-size: 2em 243 | } 244 | 245 | .text-1x { 246 | font-size: 1.5em 247 | } 248 | 249 | .text-lg { 250 | font-size: 1.2em 251 | } 252 | 253 | .text-sm { 254 | font-size: .9em 255 | } 256 | 257 | .text-xs { 258 | font-size: .8em 259 | } 260 | 261 | .text-overflow { 262 | display: block; 263 | white-space: nowrap; 264 | overflow: hidden; 265 | text-overflow: ellipsis 266 | } 267 | 268 | .text-unit { 269 | font-size: 15px; 270 | vertical-align: top; 271 | line-height: 1.5em 272 | } 273 | .text-center { 274 | text-align: center; 275 | } 276 | .text-left { 277 | text-align: left; 278 | } 279 | .text-right { 280 | text-align: right; 281 | } 282 | 283 | /* border */ 284 | .bord-no { 285 | border: 0 !important 286 | } 287 | 288 | .bord-all { 289 | border: 1px solid rgba(0, 0, 0, 0.07) 290 | } 291 | 292 | .bord-top { 293 | border-top: 1px solid rgba(0, 0, 0, 0.07) 294 | } 295 | 296 | .bord-btm { 297 | border-bottom: 1px solid rgba(0, 0, 0, 0.07) 298 | } 299 | 300 | .bord-lft { 301 | border-left: 1px solid rgba(0, 0, 0, 0.07) 302 | } 303 | 304 | .bord-rgt { 305 | border-right: 1px solid rgba(0, 0, 0, 0.07) 306 | } 307 | 308 | .bord-ver { 309 | border-top: 1px solid rgba(0, 0, 0, 0.07); 310 | border-bottom: 1px solid rgba(0, 0, 0, 0.07) 311 | } 312 | 313 | .bord-hor { 314 | border-right: 1px solid rgba(0, 0, 0, 0.07); 315 | border-left: 1px solid rgba(0, 0, 0, 0.07) 316 | } 317 | 318 | /* position */ 319 | .pos-rel { 320 | position: relative 321 | } 322 | 323 | .pos-abs { 324 | position: absolute 325 | } 326 | 327 | .pos-fix { 328 | position: fixed 329 | } 330 | 331 | .pos-sta { 332 | position: static 333 | } 334 | 335 | /* vertical */ 336 | .v-middle { 337 | vertical-align: middle 338 | } 339 | 340 | .v-top { 341 | vertical-align: top 342 | } 343 | 344 | .v-bottom { 345 | vertical-align: bottom 346 | } 347 | 348 | .v-baseline { 349 | vertical-align: baseline 350 | } 351 | 352 | /* text color */ 353 | .text-light, a.text-light:hover, a.text-light:focus { 354 | color: #fff 355 | } 356 | 357 | .text-muted, a.text-muted:hover, a.text-muted:focus { 358 | color: #909ba1 359 | } 360 | 361 | .text-primary, a.text-primary:hover, a.text-primary:focus { 362 | color: #1c3550 363 | } 364 | 365 | .text-info, a.text-info:hover, a.text-info:focus { 366 | color: #0391d1 367 | } 368 | 369 | .text-success, a.text-success:hover, a.text-success:focus { 370 | color: #79af3a 371 | } 372 | 373 | .text-warning, a.text-warning:hover, a.text-warning:focus { 374 | color: #db9a00 375 | } 376 | 377 | .text-danger, a.text-danger:hover, a.text-danger:focus { 378 | color: #f22314 379 | } 380 | 381 | .text-main, a.text-main:hover, a.text-main:focus { 382 | color: #4d627b 383 | } 384 | 385 | .text-mint, a.text-mint:hover, a.text-mint:focus { 386 | color: #1f897f 387 | } 388 | 389 | .text-purple, a.text-purple:hover, a.text-purple:focus { 390 | color: #953ca4 391 | } 392 | 393 | .text-pink, a.text-pink:hover, a.text-pink:focus { 394 | color: #ed417b 395 | } 396 | 397 | .text-dark, a.text-dark:hover, a.text-dark:focus { 398 | color: #2b323a 399 | } 400 | 401 | /* bg color */ 402 | .bg-trans { 403 | background-color: transparent 404 | } 405 | 406 | .bg-light { 407 | background-color: #fff 408 | } 409 | 410 | .bg-light, .bg-light a { 411 | color: #222 412 | } 413 | 414 | .bg-light a:hover, .bg-light a:focus { 415 | color: #222 416 | } 417 | 418 | .bg-gray-light { 419 | background-color: #f8f9fa 420 | } 421 | 422 | .bg-gray-light, .bg-gray-light a { 423 | color: #7a878e 424 | } 425 | 426 | .bg-gray-light a:hover, .bg-gray-light a:focus { 427 | color: #7a878e 428 | } 429 | 430 | .bg-gray { 431 | background-color: #e9eeef 432 | } 433 | 434 | .bg-gray, .bg-gray a { 435 | color: #7a878e 436 | } 437 | 438 | .bg-gray a:hover, .bg-gray a:focus { 439 | color: #7a878e 440 | } 441 | 442 | .bg-gray-dark { 443 | background-color: #cbd7da 444 | } 445 | 446 | .bg-gray-dark, .bg-gray-dark a { 447 | color: #7a878e 448 | } 449 | 450 | .bg-gray-dark a:hover, .bg-gray-dark a:focus { 451 | color: #7a878e 452 | } 453 | 454 | .bg-trans-light { 455 | background-color: rgba(255, 255, 255, 0.1) 456 | } 457 | 458 | .bg-trans-light, .bg-trans-light a { 459 | color: inherit 460 | } 461 | 462 | .bg-trans-light a:hover, .bg-trans-light a:focus { 463 | color: inherit 464 | } 465 | 466 | .bg-trans-dark { 467 | background-color: rgba(0, 0, 0, 0.1) 468 | } 469 | 470 | .bg-trans-dark, .bg-trans-dark a { 471 | color: inherit 472 | } 473 | 474 | .bg-trans-dark a:hover, .bg-trans-dark a:focus { 475 | color: inherit 476 | } 477 | 478 | .bg-primary { 479 | background-color: #25476a 480 | } 481 | 482 | .bg-primary, .bg-primary a { 483 | color: #fff 484 | } 485 | 486 | .bg-primary a:hover, .bg-primary a:focus { 487 | color: #fff 488 | } 489 | 490 | .bg-info { 491 | background-color: #03a9f4 492 | } 493 | 494 | .bg-info, .bg-info a { 495 | color: #fff 496 | } 497 | 498 | .bg-info a:hover, .bg-info a:focus { 499 | color: #fff 500 | } 501 | 502 | .bg-success { 503 | background-color: #8bc34a 504 | } 505 | 506 | .bg-success, .bg-success a { 507 | color: #fff 508 | } 509 | 510 | .bg-success a:hover, .bg-success a:focus { 511 | color: #fff 512 | } 513 | 514 | .bg-warning { 515 | background-color: #ffb300 516 | } 517 | 518 | .bg-warning, .bg-warning a { 519 | color: #fff 520 | } 521 | 522 | .bg-warning a:hover, .bg-warning a:focus { 523 | color: #fff 524 | } 525 | 526 | .bg-danger { 527 | background-color: #f44336 528 | } 529 | 530 | .bg-danger, .bg-danger a { 531 | color: #fff 532 | } 533 | 534 | .bg-danger a:hover, .bg-danger a:focus { 535 | color: #fff 536 | } 537 | 538 | .bg-mint { 539 | background-color: #26a69a 540 | } 541 | 542 | .bg-mint, .bg-mint a { 543 | color: #fff 544 | } 545 | 546 | .bg-mint a:hover, .bg-mint a:focus { 547 | color: #fff 548 | } 549 | 550 | .bg-purple { 551 | background-color: #ab47bc 552 | } 553 | 554 | .bg-purple, .bg-purple a { 555 | color: #fff 556 | } 557 | 558 | .bg-purple a:hover, .bg-purple a:focus { 559 | color: #fff 560 | } 561 | 562 | .bg-pink { 563 | background-color: #f06292 564 | } 565 | 566 | .bg-pink, .bg-pink a { 567 | color: #fff 568 | } 569 | 570 | .bg-pink a:hover, .bg-pink a:focus { 571 | color: #fff 572 | } 573 | 574 | .bg-dark { 575 | background-color: #3a444e 576 | } 577 | 578 | .bg-dark, .bg-dark a { 579 | color: #fff 580 | } 581 | 582 | .bg-dark a:hover, .bg-dark a:focus { 583 | color: #fff 584 | } 585 | 586 | /* user-select */ 587 | .user-select{ 588 | -webkit-touch-callout: none; /* iOS Safari */ 589 | -webkit-user-select: none; /* Chrome/Safari/Opera */ 590 | -khtml-user-select: none; /* Konqueror */ 591 | -moz-user-select: none; /* Firefox */ 592 | -ms-user-select: none; /* Internet Explorer/Edge */ 593 | user-select: none; 594 | } 595 | 596 | /* width height */ 597 | .width-all, .width-height-all{ 598 | width: 100%; 599 | } 600 | .height-all, .width-height-all{ 601 | height: 100%; 602 | } 603 | 604 | /* btn */ 605 | .vip-btn-circle { 606 | width: 30px; 607 | height: 30px; 608 | padding: 6px 0; 609 | border-radius: 15px; 610 | text-align: center; 611 | font-size: 12px; 612 | line-height: 1.428571429; 613 | } 614 | .vip-btn-lg { 615 | width: 50px; 616 | height: 50px; 617 | padding: 10px 16px; 618 | border-radius: 25px; 619 | font-size: 18px; 620 | line-height: 1.6; 621 | } 622 | 623 | /* flt */ 624 | .flt-left { 625 | float: left; 626 | } 627 | .flt-right { 628 | float: right; 629 | } 630 | -------------------------------------------------------------------------------- /app/static/css/fileinput/fileinput-rtl.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-fileinput v5.0.5 3 | * http://plugins.krajee.com/file-input 4 | * 5 | * Krajee RTL (Right To Left) default styling for bootstrap-fileinput. 6 | * 7 | * Author: Kartik Visweswaran 8 | * Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com 9 | * 10 | * Licensed under the BSD-3-Clause 11 | * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md 12 | */ 13 | .kv-rtl .close, .kv-rtl .krajee-default .file-actions, .kv-rtl .krajee-default .file-other-error { 14 | float: left; 15 | } 16 | .kv-rtl .krajee-default.file-preview-frame, .kv-rtl .krajee-default .file-drag-handle, .kv-rtl .krajee-default .file-upload-indicator { 17 | float: right; 18 | } 19 | .kv-rtl .file-zoom-dialog, .kv-rtl .file-error-message pre, .kv-rtl .file-error-message ul { 20 | text-align: right; 21 | } 22 | .kv-rtl { 23 | direction: rtl; 24 | } 25 | .kv-rtl .floating-buttons { 26 | left: 10px; 27 | right: auto; 28 | } 29 | .kv-rtl .floating-buttons .btn-kv { 30 | margin-left: 0; 31 | margin-right: 3px; 32 | } 33 | .kv-rtl .file-caption-icon { 34 | left: auto; 35 | right: 8px; 36 | } 37 | .kv-rtl .file-drop-zone { 38 | margin: 12px 12px 12px 15px; 39 | } 40 | .kv-rtl .btn-prev { 41 | right: 1px; 42 | left: auto; 43 | } 44 | .kv-rtl .btn-next { 45 | left: 1px; 46 | right: auto; 47 | } 48 | .kv-rtl .pull-right, .kv-rtl .float-right { 49 | float: left !important; 50 | } 51 | .kv-rtl .pull-left, .kv-rtl .float-left { 52 | float: right !important; 53 | } 54 | .kv-rtl .kv-zoom-title { 55 | direction: ltr; 56 | } 57 | .kv-rtl .krajee-default.file-preview-frame { 58 | box-shadow: -1px 1px 5px 0 #a2958a; 59 | } 60 | .kv-rtl .krajee-default.file-preview-frame:not(.file-preview-error):hover { 61 | box-shadow: -3px 3px 5px 0 #333; 62 | } 63 | .kv-rtl .kv-zoom-actions .btn-kv { 64 | margin-left: 0; 65 | margin-right: 3px; 66 | } 67 | .kv-rtl .file-caption.icon-visible .file-caption-name { 68 | padding-left: 0; 69 | padding-right: 15px; 70 | } 71 | .kv-rtl .input-group-btn > .btn:last-child { 72 | border-radius: 4px 0 0 4px; 73 | } 74 | .kv-rtl .input-group .form-control:first-child { 75 | border-radius: 0 4px 4px 0; 76 | } 77 | .kv-rtl .btn-file input[type=file] { 78 | left: auto; 79 | right: 0; 80 | text-align: left; 81 | background: none repeat scroll 100% 0 transparent; 82 | } -------------------------------------------------------------------------------- /app/static/css/fileinput/fileinput-rtl.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-fileinput v5.0.5 3 | * http://plugins.krajee.com/file-input 4 | * 5 | * Krajee RTL (Right To Left) default styling for bootstrap-fileinput. 6 | * 7 | * Author: Kartik Visweswaran 8 | * Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com 9 | * 10 | * Licensed under the BSD-3-Clause 11 | * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md 12 | */.kv-rtl .close,.kv-rtl .krajee-default .file-actions,.kv-rtl .krajee-default .file-other-error{float:left}.kv-rtl .krajee-default .file-drag-handle,.kv-rtl .krajee-default .file-upload-indicator,.kv-rtl .krajee-default.file-preview-frame{float:right}.kv-rtl .file-error-message pre,.kv-rtl .file-error-message ul,.kv-rtl .file-zoom-dialog{text-align:right}.kv-rtl{direction:rtl}.kv-rtl .floating-buttons{left:10px;right:auto}.kv-rtl .floating-buttons .btn-kv{margin-left:0;margin-right:3px}.kv-rtl .file-caption-icon{left:auto;right:8px}.kv-rtl .file-drop-zone{margin:12px 12px 12px 15px}.kv-rtl .btn-prev{right:1px;left:auto}.kv-rtl .btn-next{left:1px;right:auto}.kv-rtl .float-right,.kv-rtl .pull-right{float:left!important}.kv-rtl .float-left,.kv-rtl .pull-left{float:right!important}.kv-rtl .kv-zoom-title{direction:ltr}.kv-rtl .krajee-default.file-preview-frame{box-shadow:-1px 1px 5px 0 #a2958a}.kv-rtl .krajee-default.file-preview-frame:not(.file-preview-error):hover{box-shadow:-3px 3px 5px 0 #333}.kv-rtl .kv-zoom-actions .btn-kv{margin-left:0;margin-right:3px}.kv-rtl .file-caption.icon-visible .file-caption-name{padding-left:0;padding-right:15px}.kv-rtl .input-group-btn>.btn:last-child{border-radius:4px 0 0 4px}.kv-rtl .input-group .form-control:first-child{border-radius:0 4px 4px 0}.kv-rtl .btn-file input[type=file]{left:auto;right:0;text-align:left;background:100% 0 none} -------------------------------------------------------------------------------- /app/static/css/fileinput/fileinput.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-fileinput v5.0.5 3 | * http://plugins.krajee.com/file-input 4 | * 5 | * Krajee default styling for bootstrap-fileinput. 6 | * 7 | * Author: Kartik Visweswaran 8 | * Copyright: 2014 - 2019, Kartik Visweswaran, Krajee.com 9 | * 10 | * Licensed under the BSD-3-Clause 11 | * https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md 12 | */.btn-file input[type=file],.file-caption-icon,.file-no-browse,.file-preview .fileinput-remove,.file-zoom-dialog .btn-navigate,.file-zoom-dialog .floating-buttons,.krajee-default .file-thumb-progress{position:absolute}.file-loading input[type=file],input[type=file].file-loading{width:0;height:0}.file-no-browse{left:50%;bottom:20%;width:1px;height:1px;font-size:0;opacity:0;border:none;background:0 0;outline:0;box-shadow:none}.file-caption-icon,.file-input-ajax-new .fileinput-remove-button,.file-input-ajax-new .fileinput-upload-button,.file-input-ajax-new .no-browse .input-group-btn,.file-input-new .close,.file-input-new .file-preview,.file-input-new .fileinput-remove-button,.file-input-new .fileinput-upload-button,.file-input-new .glyphicon-file,.file-input-new .no-browse .input-group-btn,.file-zoom-dialog .modal-header:after,.file-zoom-dialog .modal-header:before,.hide-content .kv-file-content,.is-locked .fileinput-remove-button,.is-locked .fileinput-upload-button,.kv-hidden{display:none}.file-caption-icon .kv-caption-icon{line-height:inherit}.btn-file,.file-caption,.file-input,.file-loading:before,.file-preview,.file-zoom-dialog .modal-dialog,.krajee-default .file-thumbnail-footer,.krajee-default.file-preview-frame{position:relative}.file-error-message pre,.file-error-message ul,.krajee-default .file-actions,.krajee-default .file-other-error{text-align:left}.file-error-message pre,.file-error-message ul{margin:0}.krajee-default .file-drag-handle,.krajee-default .file-upload-indicator{float:left;margin-top:10px;width:16px;height:16px}.krajee-default .file-thumb-progress .progress,.krajee-default .file-thumb-progress .progress-bar{height:11px;font-family:Verdana,Helvetica,sans-serif;font-size:9px}.krajee-default .file-thumb-progress .progress,.kv-upload-progress .progress{background-color:#ccc}.krajee-default .file-caption-info,.krajee-default .file-size-info{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:160px;height:15px;margin:auto}.file-zoom-content>.file-object.type-flash,.file-zoom-content>.file-object.type-image,.file-zoom-content>.file-object.type-video{max-width:100%;max-height:100%;width:auto}.file-zoom-content>.file-object.type-flash,.file-zoom-content>.file-object.type-video{height:100%}.file-zoom-content>.file-object.type-default,.file-zoom-content>.file-object.type-html,.file-zoom-content>.file-object.type-pdf,.file-zoom-content>.file-object.type-text{width:100%}.file-loading:before{content:" Loading...";display:inline-block;padding-left:20px;line-height:16px;font-size:13px;font-variant:small-caps;color:#999;background:url(../img/loading.gif) top left no-repeat}.file-object{margin:0 0 -5px;padding:0}.btn-file{overflow:hidden}.btn-file input[type=file]{top:0;left:0;min-width:100%;min-height:100%;text-align:right;opacity:0;background:none;cursor:inherit;display:block}.btn-file ::-ms-browse{font-size:10000px;width:100%;height:100%}.file-caption .file-caption-name{width:100%;margin:0;padding:0;box-shadow:none;border:none;background:0 0;outline:0}.file-caption.icon-visible .file-caption-icon{display:inline-block}.file-caption.icon-visible .file-caption-name{padding-left:15px}.file-caption-icon{left:8px}.file-error-message{color:#a94442;background-color:#f2dede;margin:5px;border:1px solid #ebccd1;border-radius:4px;padding:15px}.file-error-message pre{margin:5px 0}.file-caption-disabled{background-color:#eee;cursor:not-allowed;opacity:1}.file-preview{border-radius:5px;border:1px solid #ddd;padding:8px;width:100%;margin-bottom:5px}.file-preview .btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.file-preview .fileinput-remove{top:1px;right:1px;line-height:10px}.file-preview .clickable{cursor:pointer}.file-preview-image{font:40px Impact,Charcoal,sans-serif;color:green}.krajee-default.file-preview-frame{margin:8px;border:1px solid rgba(0,0,0,.2);box-shadow:0 0 10px 0 rgba(0,0,0,.2);padding:6px;float:left;text-align:center}.krajee-default.file-preview-frame .kv-file-content{width:213px;height:160px}.krajee-default .file-preview-other-frame{display:flex;align-items:center;justify-content:center}.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:400px}.krajee-default.file-preview-frame[data-template=audio] .kv-file-content{width:240px;height:55px}.krajee-default.file-preview-frame .file-thumbnail-footer{height:70px}.krajee-default.file-preview-frame:not(.file-preview-error):hover{border:1px solid rgba(0,0,0,.3);box-shadow:0 0 10px 0 rgba(0,0,0,.4)}.krajee-default .file-preview-text{display:block;color:#428bca;border:1px solid #ddd;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;outline:0;padding:8px;resize:none}.krajee-default .file-preview-html{border:1px solid #ddd;padding:8px;overflow:auto}.krajee-default .file-other-icon{font-size:6em;line-height:1}.krajee-default .file-footer-buttons{float:right}.krajee-default .file-footer-caption{display:block;text-align:center;padding-top:4px;font-size:11px;color:#777;margin-bottom:30px}.file-upload-stats{font-size:10px;text-align:center;width:100%}.kv-upload-progress .file-upload-stats{font-size:12px;margin:-10px 0 5px}.krajee-default .file-preview-error{opacity:.65;box-shadow:none}.krajee-default .file-thumb-progress{height:11px;top:37px;left:0;right:0}.krajee-default.kvsortable-ghost{background:#e1edf7;border:2px solid #a1abff}.krajee-default .file-preview-other:hover{opacity:.8}.krajee-default .file-preview-frame:not(.file-preview-error) .file-footer-caption:hover{color:#000}.kv-upload-progress .progress{height:20px;margin:10px 0;overflow:hidden}.kv-upload-progress .progress-bar{height:20px;font-family:Verdana,Helvetica,sans-serif}.file-zoom-dialog .file-other-icon{font-size:22em;font-size:50vmin}.file-zoom-dialog .modal-dialog{width:auto}.file-zoom-dialog .modal-header{display:flex;align-items:center;justify-content:space-between}.file-zoom-dialog .btn-navigate{padding:0;margin:0;background:0 0;text-decoration:none;outline:0;opacity:.7;top:45%;font-size:4em;color:#1c94c4}.file-zoom-dialog .btn-navigate:not([disabled]):hover{outline:0;box-shadow:none;opacity:.6}.file-zoom-dialog .floating-buttons{top:5px;right:10px}.file-zoom-dialog .btn-navigate[disabled]{opacity:.3}.file-zoom-dialog .btn-prev{left:1px}.file-zoom-dialog .btn-next{right:1px}.file-zoom-dialog .kv-zoom-title{font-weight:300;color:#999;max-width:50%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.file-input-ajax-new .no-browse .form-control,.file-input-new .no-browse .form-control{border-top-right-radius:4px;border-bottom-right-radius:4px}.file-caption-main{width:100%}.file-thumb-loading{background:url(../img/loading.gif) center center no-repeat content-box!important}.file-drop-zone{border:1px dashed #aaa;border-radius:4px;text-align:center;vertical-align:middle;margin:12px 15px 12px 12px;padding:5px}.file-drop-zone.clickable:hover{border:2px dashed #999}.file-drop-zone.clickable:focus{border:2px solid #5acde2}.file-drop-zone .file-preview-thumbnails{cursor:default}.file-drop-zone-title{color:#aaa;font-size:1.6em;padding:85px 10px;cursor:default}.file-highlighted{border:2px dashed #999!important;background-color:#eee}.file-uploading{background:url(../img/loading-sm.gif) center bottom 10px no-repeat;opacity:.65}.file-zoom-fullscreen .modal-dialog{min-width:100%;margin:0}.file-zoom-fullscreen .modal-content{border-radius:0;box-shadow:none;min-height:100vh}.file-zoom-fullscreen .modal-body{overflow-y:auto}.floating-buttons{z-index:3000}.floating-buttons .btn-kv{margin-left:3px;z-index:3000}.kv-zoom-actions .btn-kv{margin-left:3px}.file-zoom-content{height:480px;text-align:center}.file-zoom-content .file-preview-image,.file-zoom-content .file-preview-video{max-height:100%}.file-zoom-content>.file-object.type-image{height:auto;min-height:inherit}.file-zoom-content>.file-object.type-audio{width:auto;height:30px}@media (min-width:576px){.file-zoom-dialog .modal-dialog{max-width:500px}}@media (min-width:992px){.file-zoom-dialog .modal-lg{max-width:800px}}@media (max-width:767px){.file-preview-thumbnails{display:flex;justify-content:center;align-items:center;flex-direction:column}.file-zoom-dialog .modal-header{flex-direction:column}}@media (max-width:350px){.krajee-default.file-preview-frame:not([data-template=audio]) .kv-file-content{width:160px}}@media (max-width:420px){.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered{width:100%}}.file-loading[dir=rtl]:before{background:url(../img/loading.gif) top right no-repeat;padding-left:0;padding-right:20px}.file-sortable .file-drag-handle{cursor:move;opacity:1}.file-sortable .file-drag-handle:hover{opacity:.7}.clickable .file-drop-zone-title{cursor:pointer}.file-preview-initial.sortable-chosen{background-color:#d9edf7} -------------------------------------------------------------------------------- /app/static/css/img/loading-sm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/css/img/loading-sm.gif -------------------------------------------------------------------------------- /app/static/css/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/css/img/loading.gif -------------------------------------------------------------------------------- /app/static/css/mmenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | Animations 3 | */ 4 | html.mm-opened .mm-page, 5 | html.mm-opened #mm-blocker, 6 | .mm-is-menu.mm-horizontal .mm-inner > ul 7 | { 8 | -webkit-transition: none 0.4s ease; 9 | -moz-transition: none 0.4s ease; 10 | -ms-transition: none 0.4s ease; 11 | -o-transition: none 0.4s ease; 12 | transition: none 0.4s ease; 13 | } 14 | html.mm-opened.mm-dragging .mm-page 15 | { 16 | -webkit-transition-duration: 0s; 17 | -moz-transition-duration: 0s; 18 | -ms-transition-duration: 0s; 19 | -o-transition-duration: 0s; 20 | transition-duration: 0s; 21 | } 22 | html.mm-opened.mm-dragging.mm-next .mm-menu, 23 | html.mm-opened.mm-dragging.mm-front .mm-menu 24 | { 25 | -webkit-transition-duration: 0s; 26 | -moz-transition-duration: 0s; 27 | -ms-transition-duration: 0s; 28 | -o-transition-duration: 0s; 29 | transition-duration: 0s; 30 | } 31 | html.mm-opened .mm-page, 32 | html.mm-opened #mm-blocker 33 | { 34 | /* border-color is needed to force transitionend event even if no other value changed */ 35 | /* transform is needed to force hardware acceleration */ 36 | -webkit-transition-property: top, right, bottom, left, margin, border, -webkit-transform; 37 | -moz-transition-property: top, right, bottom, left, margin, border, -moz-transform; 38 | -ms-transition-property: top, right, bottom, left, margin, border, -ms-transform; 39 | -o-transition-property: top, right, bottom, left, margin, border, -o-transform; 40 | transition-property: top, right, bottom, left, margin, border, transform; 41 | 42 | border: none solid rgba(0, 0, 0, 0); 43 | } 44 | html.mm-opening .mm-page, 45 | html.mm-opening #mm-blocker 46 | { 47 | border: none solid rgba(1, 1, 1, 0); 48 | } 49 | .mm-is-menu.mm-horizontal .mm-inner > ul 50 | { 51 | -webkit-transition-property: margin-left; 52 | -moz-transition-property: margin-left; 53 | -ms-transition-property: margin-left; 54 | -o-transition-property: margin-left; 55 | transition-property: margin-left; 56 | } 57 | 58 | html.mm-accelerated.mm-opening .mm-page, 59 | html.mm-accelerated.mm-opening #mm-blocker, 60 | html.mm-accelerated .mm-is-menu.mm-horizontal .mm-inner > ul.mm-subopened 61 | { 62 | -webkit-transform: translate3d( 0, 0, 1px ); 63 | -moz-transform: translate3d( 0, 0, 1px ); 64 | -ms-transform: translate3d( 0, 0, 1px ); 65 | -o-transform: translate3d( 0, 0, 1px ); 66 | transform: translate3d( 0, 0, 1px ); 67 | } 68 | 69 | html.mm-opened .mm-page, 70 | html.mm-opened #mm-blocker 71 | { 72 | margin: 0px; 73 | left: 0%; 74 | top: 0; 75 | } 76 | html.mm-opening .mm-page, 77 | html.mm-opening #mm-blocker 78 | { 79 | margin: 0 0 0 -65px; 80 | left: 100%; 81 | } 82 | /* html/body */ 83 | html.mm-opened, 84 | html.mm-opened body 85 | { 86 | width: 100%; 87 | height: 100%; 88 | overflow: hidden; 89 | } 90 | html.mm-opened body 91 | { 92 | position: relative; 93 | } 94 | 95 | /* menu */ 96 | .mm-menu 97 | { 98 | display: none; 99 | width: 100%; 100 | height: 100%; 101 | position: absolute; 102 | left:0px; 103 | top: 0; 104 | z-index:0; 105 | overflow: hidden; 106 | } 107 | .mm-menu.mm-opened 108 | { 109 | display: block; 110 | overflow: scroll; 111 | overflow-x: hidden; 112 | overflow-y: auto; 113 | -webkit-overflow-scrolling: touch; 114 | } 115 | .mm-menu.mm-opened ~ .mm-menu.mm-opened 116 | { 117 | display: none; 118 | } 119 | .mm-inner 120 | { 121 | width: 100%; 122 | height: 100%; 123 | padding: 0 65px 0 0; 124 | } 125 | 126 | /* ul/li */ 127 | .mm-is-menu ul, 128 | .mm-is-menu li 129 | { 130 | list-style: none; 131 | display: block; 132 | padding: 0; 133 | margin: 0; 134 | } 135 | .mm-is-menu li 136 | { 137 | position: relative; 138 | } 139 | .mm-is-menu li:after 140 | { 141 | content: ''; 142 | display: block; 143 | width: 100%; 144 | position: absolute; 145 | bottom: 0; 146 | } 147 | .mm-is-menu .mm-inner > ul 148 | { 149 | width: 100%; 150 | padding:40px; 151 | } 152 | /* items */ 153 | .mm-is-menu li > a, 154 | .mm-is-menu li > span 155 | { 156 | text-indent: 20px; 157 | text-overflow: ellipsis; 158 | white-space: nowrap; 159 | line-height: 40px; 160 | overflow: hidden; 161 | display: block; 162 | padding: 0 10px 0 0; 163 | margin: 0; 164 | text-transform: uppercase; 165 | margin-bottom: 10px; 166 | } 167 | /* subopen/close */ 168 | .mm-menu a.mm-subopen 169 | { 170 | width: 40px; 171 | height: 40px; 172 | padding: 0; 173 | position: absolute; 174 | right: 0; 175 | top: 0; 176 | z-index: 2; 177 | } 178 | .mm-menu a.mm-subopen:before 179 | { 180 | content: ''; 181 | display: block; 182 | height: 100%; 183 | position: absolute; 184 | left: 0; 185 | } 186 | .mm-menu a.mm-subopen.mm-fullsubopen 187 | { 188 | border-left: none; 189 | width: 100%; 190 | } 191 | .mm-menu a.mm-subopen.mm-fullsubopen:before 192 | { 193 | border-left: none; 194 | } 195 | .mm-menu a.mm-subclose 196 | { 197 | text-indent: 40px; 198 | padding-top: 20px; 199 | margin-top: -20px; 200 | } 201 | .mm-menu a.mm-subopen + a, 202 | .mm-menu a.mm-subopen + span 203 | { 204 | padding-right: 45px; 205 | } 206 | 207 | /* page + blocker */ 208 | html.mm-opened .mm-page 209 | { 210 | height: 100%; 211 | overflow: hidden; 212 | position: absolute; 213 | } 214 | html.mm-background .mm-page 215 | { 216 | background: inherit; 217 | } 218 | #mm-blocker 219 | { 220 | background: #fff; 221 | opacity: 0; 222 | display: none; 223 | width: 100%; 224 | height: 100%; 225 | position: absolute; 226 | z-index: 9999; 227 | } 228 | html.mm-opened #mm-blocker, 229 | html.mm-blocking #mm-blocker 230 | { 231 | display: block; 232 | } 233 | 234 | /* vertical submenu */ 235 | .mm-menu.mm-vertical ul ul 236 | { 237 | display: none; 238 | padding: 10px 0 10px 10px; 239 | } 240 | .mm-menu.mm-vertical li.mm-opened > ul 241 | { 242 | display: block; 243 | } 244 | .mm-menu.mm-vertical ul ul li:last-child, 245 | .mm-menu.mm-vertical ul ul li:last-child:after 246 | { 247 | border-bottom-width: 0; 248 | } 249 | .mm-menu.mm-vertical li.mm-selected > a.mm-subopen + a, 250 | .mm-menu.mm-vertical li.mm-selected > a.mm-subopen + span 251 | { 252 | padding-right: 5px; 253 | margin-right: 40px; 254 | } 255 | .mm-menu.mm-vertical li.mm-selected > em.mm-counter + a.mm-subopen + a, 256 | .mm-menu.mm-vertical li.mm-selected > em.mm-counter + a.mm-subopen + span 257 | { 258 | margin-right: 75px; 259 | } 260 | .mm-menu.mm-horizontal ul 261 | { 262 | vertical-align: top; 263 | margin-left: 0%; 264 | } 265 | .mm-menu.mm-horizontal ul.mm-submenu 266 | { 267 | display: none; 268 | } 269 | .mm-menu.mm-horizontal ul, 270 | .mm-menu.mm-horizontal ul.mm-submenu.mm-opened 271 | { 272 | display: inline-block; 273 | } 274 | .mm-menu.mm-horizontal ul.mm-subopened 275 | { 276 | margin-left: -100%; 277 | max-height: 100%; 278 | overflow: hidden; 279 | } 280 | /* 281 | Menu, submenus, items 282 | - Styling (default: dark background) 283 | */ 284 | .mm-is-menu 285 | { 286 | background:#222; 287 | } 288 | .mm-is-menu * 289 | { 290 | -webkit-text-size-adjust: none; 291 | font-size: 16px; 292 | } 293 | .mm-is-menu li, 294 | .mm-is-menu li > a, 295 | .mm-is-menu li > span 296 | { 297 | color:#fff; 298 | text-decoration: none; 299 | } 300 | .mm-is-menu li:hover, 301 | .mm-is-menu li > a:hover, 302 | .mm-is-menu li > span:hover 303 | { 304 | color:#333; 305 | background:#fff; 306 | } 307 | .mm-menu li.mm-selected > a, 308 | .mm-menu li.mm-selected > span 309 | { 310 | background:#fff; 311 | color:#333; 312 | } 313 | .mm-menu li.mm-selected > a.mm-subopen 314 | { 315 | background: transparent; 316 | } 317 | /* subopen/close */ 318 | .mm-menu a.mm-subopen 319 | { 320 | border-left: 1px solid rgba( 255, 255, 255, 0.1 ); 321 | } 322 | .mm-menu a.mm-subopen:before 323 | { 324 | border-left: 1px solid rgba( 0, 0, 0, 0.4 ); 325 | } 326 | .mm-menu a.mm-subclose 327 | { 328 | background: rgba( 0, 0, 0, 0.2 ); 329 | } 330 | 331 | /* vertical submenu */ 332 | .mm-menu.mm-vertical li.mm-opened > a.mm-subopen, 333 | .mm-menu.mm-vertical li.mm-opened > ul 334 | { 335 | background: rgba( 255, 255, 255, 0.06 ); 336 | } 337 | /* 338 | Labels 339 | - Sizing and positioning 340 | */ 341 | .mm-menu li.mm-label 342 | { 343 | text-transform: uppercase; 344 | text-indent: 20px; 345 | line-height: 25px; 346 | } 347 | /* 348 | Labels 349 | - Styling 350 | */ 351 | .mm-menu li.mm-label 352 | { 353 | background: rgba( 255, 255, 255, 0.1 ); 354 | font-size: 11px; 355 | color: rgba( 255, 255, 255, 0.5 ); 356 | } 357 | 358 | 359 | /* 360 | Counters 361 | - Sizing and positioning 362 | */ 363 | .mm-menu em.mm-counter 364 | { 365 | text-indent: 0; 366 | text-align: center; 367 | text-shadow: none; 368 | line-height: 22px; 369 | display: block; 370 | min-width: 16px; 371 | height: 20px; 372 | padding: 0 2px; 373 | position: absolute; 374 | right: 40px; 375 | top: 10px; 376 | } 377 | .mm-menu em.mm-counter + a.mm-subopen 378 | { 379 | padding-left: 35px; 380 | } 381 | .mm-menu em.mm-counter + a.mm-subopen + a, 382 | .mm-menu em.mm-counter + a.mm-subopen + span 383 | { 384 | padding-right: 80px; 385 | } 386 | 387 | 388 | /* 389 | Counters 390 | - Styling 391 | */ 392 | .mm-menu em.mm-counter 393 | { 394 | border-radius: 5px; 395 | background: rgba( 255, 255, 255, 0.1 ); 396 | box-shadow: 0 0 2px rgba( 0, 0, 0, 0.3 ); 397 | font-size: 11px; 398 | font-style: normal; 399 | color: rgba( 255, 255, 255, 0.4 ); 400 | } 401 | 402 | 403 | /* 404 | Arrows 405 | - Sizing and positioning 406 | */ 407 | .mm-menu a.mm-subopen:after, 408 | .mm-menu a.mm-subclose:before 409 | { 410 | content: ''; 411 | border-width: 4px; 412 | border-style: solid; 413 | display: block; 414 | width: 6px; 415 | height: 6px; 416 | position: absolute; 417 | top: 50%; 418 | -webkit-transform: rotate( -45deg ); 419 | -moz-transform: rotate( -45deg ); 420 | -ms-transform: rotate( -45deg ); 421 | -o-transform: rotate( -45deg ); 422 | transform: rotate( -45deg ); 423 | } 424 | .mm-menu a.mm-subopen:after 425 | { 426 | border-top: none; 427 | border-left: none; 428 | margin-top: -4px; 429 | right: 16px; 430 | } 431 | .mm-menu a.mm-subclose:before 432 | { 433 | border-right: none; 434 | border-bottom: none; 435 | margin-top: 4px; 436 | left: 20px; 437 | } 438 | .mm-menu.mm-vertical li.mm-opened > a.mm-subopen:after 439 | { 440 | -webkit-transform: rotate( 45deg ); 441 | -moz-transform: rotate( 45deg ); 442 | -ms-transform: rotate( 45deg ); 443 | -o-transform: rotate( 45deg ); 444 | transform: rotate( 45deg ); 445 | } 446 | 447 | 448 | /* 449 | Arrows 450 | - Styling 451 | */ 452 | .mm-menu a.mm-subopen:after, 453 | .mm-menu a.mm-subclose:before 454 | { 455 | border-color: rgba( 255, 255, 255, 0.3 ); 456 | } 457 | 458 | 459 | /* 460 | Search 461 | - Sizing and positioning 462 | */ 463 | .mm-menu div.mm-search 464 | { 465 | width: 100%; 466 | height: 50px; 467 | padding: 10px; 468 | position: relative; 469 | z-index: 1; 470 | } 471 | 472 | .mm-menu div.mm-search input 473 | { 474 | border: none; 475 | border-radius: 15px; 476 | line-height: 30px; 477 | outline: none; 478 | display: block; 479 | width: 100%; 480 | height: 30px; 481 | margin: 0; 482 | padding: 0 0 0 10px; 483 | } 484 | .mm-menu li.mm-noresults 485 | { 486 | border: none; 487 | display: none; 488 | padding-top: 30px; 489 | } 490 | .mm-menu li.mm-noresults:after 491 | { 492 | border: none; 493 | } 494 | .mm-menu.mm-noresults li.mm-noresults 495 | { 496 | display: block; 497 | } 498 | 499 | .mm-menu .mm-noresult, 500 | .mm-menu .mm-nosubresult > a.mm-subopen, 501 | .mm-menu .mm-nosubresult > em.mm-counter 502 | { 503 | display: none; 504 | } 505 | .mm-menu .mm-nosubresult > a.mm-subopen + a, 506 | .mm-menu .mm-nosubresult > a.mm-subopen + span 507 | { 508 | padding-right: 5px; 509 | } 510 | 511 | 512 | /* 513 | Search 514 | - Styling 515 | */ 516 | .mm-menu div.mm-search 517 | { 518 | background: rgba( 0, 0, 0, 0.2 ); 519 | border-bottom: 1px solid rgba( 255, 255, 255, 0.1 ); 520 | } 521 | .mm-menu div.mm-search input 522 | { 523 | background: rgba( 255, 255, 255, 0.3 ); 524 | color: rgba( 255, 255, 255, 0.9 ); 525 | } 526 | .mm-menu li.mm-noresults 527 | { 528 | color: rgba( 255, 255, 255, 0.4 ); 529 | text-align: center; 530 | } 531 | 532 | 533 | /* 534 | Bugfix for browsers without support for overflowscrolling 535 | - Android < 3 536 | */ 537 | html.mm-no-overflowscrolling.mm-opened, 538 | html.mm-no-overflowscrolling.mm-opened body 539 | { 540 | overflow: visible; 541 | } 542 | html.mm-no-overflowscrolling.mm-opened body 543 | { 544 | overflow-x: hidden; 545 | } 546 | html.mm-no-overflowscrolling.mm-opened .mm-page 547 | { 548 | min-height: 200%; 549 | position: fixed; 550 | top: 0; 551 | z-index: 3; 552 | } 553 | html.mm-no-overflowscrolling .mm-menu 554 | { 555 | height: auto; 556 | min-height: 100%; 557 | overflow: default; 558 | overflow-x: default; 559 | overflow-y: default; 560 | position: relative; 561 | left: auto; 562 | top: auto; 563 | } 564 | 565 | 566 | /* 567 | Bugfix for browsers with "scrolling" addressbar 568 | - mobiel safari on iPhone and iPod 569 | */ 570 | html.mm-iphone-addressbar.mm-opened body 571 | { 572 | padding-bottom: 60px; 573 | } 574 | 575 | 576 | /* 577 | Sizing and positioning for larger screens 578 | */ 579 | @media all and (min-width: 500px) { 580 | 581 | .mm-menu 582 | { 583 | width: 500px; 584 | } 585 | html.mm-opening .mm-page, 586 | html.mm-opening #mm-blocker 587 | { 588 | left: 500px; 589 | } 590 | } -------------------------------------------------------------------------------- /app/static/css/theme/black.css: -------------------------------------------------------------------------------- 1 | .vip-nav 2 | , .vip-aside 3 | , .vip-aside:before 4 | , .vip-aside:after { 5 | background-color: #2F4056; 6 | } 7 | .vip-nav ul li>i { 8 | color: white !important; 9 | } 10 | .vip-nav ul li>i:hover, .vip-nav ul li>i.active { 11 | border-left: 1px solid #FFF; 12 | } 13 | .vip-aside ul hr { 14 | background-color: #FFF !important; 15 | } -------------------------------------------------------------------------------- /app/static/css/theme/blue.css: -------------------------------------------------------------------------------- 1 | .vip-nav 2 | , .vip-aside 3 | , .vip-aside:before 4 | , .vip-aside:after { 5 | background-color: #1E9FFF; 6 | } 7 | .vip-nav ul li>i { 8 | color: white !important; 9 | } 10 | .vip-nav ul li>i:hover, .vip-nav ul li>i.active { 11 | border-left: 1px solid #FFF; 12 | } 13 | .vip-aside ul hr { 14 | background-color: #FFF !important; 15 | } -------------------------------------------------------------------------------- /app/static/css/theme/green.css: -------------------------------------------------------------------------------- 1 | .vip-nav 2 | , .vip-aside 3 | , .vip-aside:before 4 | , .vip-aside:after { 5 | background-color: #009688; 6 | } 7 | .vip-nav ul li>i { 8 | color: white !important; 9 | } 10 | .vip-nav ul li>i:hover, .vip-nav ul li>i.active { 11 | border-left: 1px solid #FFF; 12 | } 13 | .vip-aside ul hr { 14 | background-color: #FFF !important; 15 | } -------------------------------------------------------------------------------- /app/static/css/theme/orange.css: -------------------------------------------------------------------------------- 1 | .vip-nav 2 | , .vip-aside 3 | , .vip-aside:before 4 | , .vip-aside:after { 5 | background-color: #FFB800; 6 | } 7 | .vip-nav ul li>i { 8 | color: white !important; 9 | } 10 | .vip-nav ul li>i:hover, .vip-nav ul li>i.active { 11 | border-left: 1px solid #FFF; 12 | } 13 | .vip-aside ul hr { 14 | background-color: #FFF !important; 15 | } -------------------------------------------------------------------------------- /app/static/css/theme/red.css: -------------------------------------------------------------------------------- 1 | .vip-nav 2 | , .vip-aside 3 | , .vip-aside:before 4 | , .vip-aside:after { 5 | background-color: #FF5722; 6 | } 7 | .vip-nav ul li>i { 8 | color: white !important; 9 | } 10 | .vip-nav ul li>i:hover, .vip-nav ul li>i.active { 11 | border-left: 1px solid #FFF; 12 | } 13 | .vip-aside ul hr { 14 | background-color: #FFF !important; 15 | } -------------------------------------------------------------------------------- /app/static/css/vipPush.css: -------------------------------------------------------------------------------- 1 | .vip-push-container { 2 | background-color: #EFEFEF; 3 | } 4 | 5 | .vip-push { 6 | position: relative; 7 | margin: 5px; 8 | padding-top: 30px; 9 | overflow: hidden; 10 | } 11 | 12 | .vip-push-footer { 13 | position: absolute; 14 | right: 0; 15 | top: 0; 16 | height: 28px; 17 | line-height: 28px; 18 | width: 100%; 19 | text-align: center; 20 | } 21 | 22 | .vip-push-footer span { 23 | min-width: 50px; 24 | padding: 5px 8px; 25 | margin: 0 6px; 26 | border-top: 1px solid transparent; 27 | cursor: pointer; 28 | } 29 | 30 | .vip-push-footer span.active { 31 | border-top: 1px solid black; 32 | background: white; 33 | } 34 | 35 | .vip-push-list { 36 | position: relative; 37 | border: 2px solid transparent; 38 | } 39 | 40 | .vip-push-list:hover { 41 | border-bottom: 2px solid red; 42 | } 43 | 44 | .vip-push-list:hover .vip-push-list-price { 45 | display: block; 46 | } 47 | 48 | .vip-push-list img { 49 | width: 100%; 50 | } 51 | 52 | .vip-push-list-price { 53 | position: absolute; 54 | top: 0; 55 | right: 0; 56 | padding: 1px 5px; 57 | background-color: white; 58 | font-size: 14px; 59 | color: red; 60 | display: none; 61 | } 62 | 63 | .vip-push-list-body { 64 | position: absolute; 65 | bottom: 0; 66 | left: 0; 67 | display: inline-block; 68 | width: 97%; 69 | height: 30px; 70 | line-height: 15px; 71 | overflow: hidden; 72 | padding: 0 1.5%; 73 | font-size: 13px; 74 | background-color: white; 75 | opacity: .8; 76 | text-overflow: ellipsis; 77 | display: -webkit-box; 78 | -webkit-box-orient: vertical; 79 | -webkit-line-clamp: 2; 80 | color: black; 81 | } 82 | 83 | .vip-push-type2 { 84 | width: 100% !important; 85 | overflow: hidden; 86 | } 87 | 88 | .vip-push-type2 .vip-push-list, .vip-push-type2 .vip-push-list img { 89 | 90 | } 91 | 92 | .vip-push-type2 .vip-push-list .vip-push-list-price, .vip-push-type2 .vip-push-list .vip-push-list-body { 93 | display: none; 94 | } 95 | 96 | .vip-push-type2 .vip-push-list:hover { 97 | border: 2px solid red; 98 | } 99 | 100 | .vip-push-container .layui-layer-title, .vip-push .layui-carousel.push-carousel div { 101 | background-color: white; 102 | } 103 | 104 | .vip-push .layui-carousel.push-carousel img { 105 | max-width: 100%; 106 | height: 100%; 107 | display: block; 108 | margin: 0 auto; 109 | } -------------------------------------------------------------------------------- /app/static/downloadFile/776671timg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/downloadFile/776671timg.png -------------------------------------------------------------------------------- /app/static/downloadFile/776671timg_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/downloadFile/776671timg_blue.png -------------------------------------------------------------------------------- /app/static/downloadFile/776671timg_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/downloadFile/776671timg_red.png -------------------------------------------------------------------------------- /app/static/downloadFile/776671timg_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/downloadFile/776671timg_white.png -------------------------------------------------------------------------------- /app/static/fonts/Aller_Bd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/Aller_Bd.ttf -------------------------------------------------------------------------------- /app/static/fonts/Amble-Light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/Amble-Light-webfont.ttf -------------------------------------------------------------------------------- /app/static/fonts/base/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main { 60 | padding: 30px 100px; 61 | width: 960px; 62 | margin: 0 auto; 63 | } 64 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 65 | 66 | .helps{margin-top:40px;} 67 | .helps pre{ 68 | padding:20px; 69 | margin:10px 0; 70 | border:solid 1px #e7e1cd; 71 | background-color: #fffdef; 72 | overflow: auto; 73 | } 74 | 75 | .icon_lists{ 76 | width: 100% !important; 77 | 78 | } 79 | 80 | .icon_lists li{ 81 | float:left; 82 | width: 100px; 83 | height:180px; 84 | text-align: center; 85 | list-style: none !important; 86 | } 87 | .icon_lists .icon{ 88 | font-size: 42px; 89 | line-height: 100px; 90 | margin: 10px 0; 91 | color:#333; 92 | -webkit-transition: font-size 0.25s ease-out 0s; 93 | -moz-transition: font-size 0.25s ease-out 0s; 94 | transition: font-size 0.25s ease-out 0s; 95 | 96 | } 97 | .icon_lists .icon:hover{ 98 | font-size: 100px; 99 | } 100 | 101 | 102 | 103 | .markdown { 104 | color: #666; 105 | font-size: 14px; 106 | line-height: 1.8; 107 | } 108 | 109 | .highlight { 110 | line-height: 1.5; 111 | } 112 | 113 | .markdown img { 114 | vertical-align: middle; 115 | max-width: 100%; 116 | } 117 | 118 | .markdown h1 { 119 | color: #404040; 120 | font-weight: 500; 121 | line-height: 40px; 122 | margin-bottom: 24px; 123 | } 124 | 125 | .markdown h2, 126 | .markdown h3, 127 | .markdown h4, 128 | .markdown h5, 129 | .markdown h6 { 130 | color: #404040; 131 | margin: 1.6em 0 0.6em 0; 132 | font-weight: 500; 133 | clear: both; 134 | } 135 | 136 | .markdown h1 { 137 | font-size: 28px; 138 | } 139 | 140 | .markdown h2 { 141 | font-size: 22px; 142 | } 143 | 144 | .markdown h3 { 145 | font-size: 16px; 146 | } 147 | 148 | .markdown h4 { 149 | font-size: 14px; 150 | } 151 | 152 | .markdown h5 { 153 | font-size: 12px; 154 | } 155 | 156 | .markdown h6 { 157 | font-size: 12px; 158 | } 159 | 160 | .markdown hr { 161 | height: 1px; 162 | border: 0; 163 | background: #e9e9e9; 164 | margin: 16px 0; 165 | clear: both; 166 | } 167 | 168 | .markdown p, 169 | .markdown pre { 170 | margin: 1em 0; 171 | } 172 | 173 | .markdown > p, 174 | .markdown > blockquote, 175 | .markdown > .highlight, 176 | .markdown > ol, 177 | .markdown > ul { 178 | width: 80%; 179 | } 180 | 181 | .markdown ul > li { 182 | list-style: circle; 183 | } 184 | 185 | .markdown > ul li, 186 | .markdown blockquote ul > li { 187 | margin-left: 20px; 188 | padding-left: 4px; 189 | } 190 | 191 | .markdown > ul li p, 192 | .markdown > ol li p { 193 | margin: 0.6em 0; 194 | } 195 | 196 | .markdown ol > li { 197 | list-style: decimal; 198 | } 199 | 200 | .markdown > ol li, 201 | .markdown blockquote ol > li { 202 | margin-left: 20px; 203 | padding-left: 4px; 204 | } 205 | 206 | .markdown code { 207 | margin: 0 3px; 208 | padding: 0 5px; 209 | background: #eee; 210 | border-radius: 3px; 211 | } 212 | 213 | .markdown pre { 214 | border-radius: 6px; 215 | background: #f7f7f7; 216 | padding: 20px; 217 | } 218 | 219 | .markdown pre code { 220 | border: none; 221 | background: #f7f7f7; 222 | margin: 0; 223 | } 224 | 225 | .markdown strong, 226 | .markdown b { 227 | font-weight: 600; 228 | } 229 | 230 | .markdown > table { 231 | border-collapse: collapse; 232 | border-spacing: 0px; 233 | empty-cells: show; 234 | border: 1px solid #e9e9e9; 235 | width: 95%; 236 | margin-bottom: 24px; 237 | } 238 | 239 | .markdown > table th { 240 | white-space: nowrap; 241 | color: #333; 242 | font-weight: 600; 243 | 244 | } 245 | 246 | .markdown > table th, 247 | .markdown > table td { 248 | border: 1px solid #e9e9e9; 249 | padding: 8px 16px; 250 | text-align: left; 251 | } 252 | 253 | .markdown > table th { 254 | background: #F7F7F7; 255 | } 256 | 257 | .markdown blockquote { 258 | font-size: 90%; 259 | color: #999; 260 | border-left: 4px solid #e9e9e9; 261 | padding-left: 0.8em; 262 | margin: 1em 0; 263 | font-style: italic; 264 | } 265 | 266 | .markdown blockquote p { 267 | margin: 0; 268 | } 269 | 270 | .markdown .anchor { 271 | opacity: 0; 272 | transition: opacity 0.3s ease; 273 | margin-left: 8px; 274 | } 275 | 276 | .markdown .waiting { 277 | color: #ccc; 278 | } 279 | 280 | .markdown h1:hover .anchor, 281 | .markdown h2:hover .anchor, 282 | .markdown h3:hover .anchor, 283 | .markdown h4:hover .anchor, 284 | .markdown h5:hover .anchor, 285 | .markdown h6:hover .anchor { 286 | opacity: 1; 287 | display: inline-block; 288 | } 289 | 290 | .markdown > br, 291 | .markdown > p > br { 292 | clear: both; 293 | } 294 | 295 | 296 | .hljs { 297 | display: block; 298 | background: white; 299 | padding: 0.5em; 300 | color: #333333; 301 | overflow-x: auto; 302 | } 303 | 304 | .hljs-comment, 305 | .hljs-meta { 306 | color: #969896; 307 | } 308 | 309 | .hljs-string, 310 | .hljs-variable, 311 | .hljs-template-variable, 312 | .hljs-strong, 313 | .hljs-emphasis, 314 | .hljs-quote { 315 | color: #df5000; 316 | } 317 | 318 | .hljs-keyword, 319 | .hljs-selector-tag, 320 | .hljs-type { 321 | color: #a71d5d; 322 | } 323 | 324 | .hljs-literal, 325 | .hljs-symbol, 326 | .hljs-bullet, 327 | .hljs-attribute { 328 | color: #0086b3; 329 | } 330 | 331 | .hljs-section, 332 | .hljs-name { 333 | color: #63a35c; 334 | } 335 | 336 | .hljs-tag { 337 | color: #333333; 338 | } 339 | 340 | .hljs-title, 341 | .hljs-attr, 342 | .hljs-selector-id, 343 | .hljs-selector-class, 344 | .hljs-selector-attr, 345 | .hljs-selector-pseudo { 346 | color: #795da3; 347 | } 348 | 349 | .hljs-addition { 350 | color: #55a532; 351 | background-color: #eaffea; 352 | } 353 | 354 | .hljs-deletion { 355 | color: #bd2c00; 356 | background-color: #ffecec; 357 | } 358 | 359 | .hljs-link { 360 | text-decoration: underline; 361 | } 362 | 363 | pre{ 364 | background: #fff; 365 | } 366 | 367 | 368 | 369 | 370 | 371 | -------------------------------------------------------------------------------- /app/static/fonts/base/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/base/iconfont.eot -------------------------------------------------------------------------------- /app/static/fonts/base/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/base/iconfont.ttf -------------------------------------------------------------------------------- /app/static/fonts/base/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/base/iconfont.woff -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/demo.css: -------------------------------------------------------------------------------- 1 | *{margin: 0;padding: 0;list-style: none;} 2 | /* 3 | KISSY CSS Reset 4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。 5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。 6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。 7 | 特色:1. 适应中文;2. 基于最新主流浏览器。 8 | 维护:玉伯, 正淳 9 | */ 10 | 11 | /** 清除内外边距 **/ 12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */ 13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */ 14 | pre, /* text formatting elements 文本格式元素 */ 15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */ 16 | th, td /* table elements 表格元素 */ { 17 | margin: 0; 18 | padding: 0; 19 | } 20 | 21 | /** 设置默认字体 **/ 22 | body, 23 | button, input, select, textarea /* for ie */ { 24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif; 25 | } 26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; } 27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */ 28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */ 29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */ 30 | 31 | /** 重置列表元素 **/ 32 | ul, ol { list-style: none; } 33 | 34 | /** 重置文本格式元素 **/ 35 | a { text-decoration: none; } 36 | a:hover { text-decoration: underline; } 37 | 38 | 39 | /** 重置表单元素 **/ 40 | legend { color: #000; } /* for ie6 */ 41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */ 42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */ 43 | /* 注:optgroup 无法扶正 */ 44 | 45 | /** 重置表格元素 **/ 46 | table { border-collapse: collapse; border-spacing: 0; } 47 | 48 | /* 清除浮动 */ 49 | .ks-clear:after, .clear:after { 50 | content: '\20'; 51 | display: block; 52 | height: 0; 53 | clear: both; 54 | } 55 | .ks-clear, .clear { 56 | *zoom: 1; 57 | } 58 | 59 | .main { 60 | padding: 30px 100px; 61 | width: 960px; 62 | margin: 0 auto; 63 | } 64 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;} 65 | 66 | .helps{margin-top:40px;} 67 | .helps pre{ 68 | padding:20px; 69 | margin:10px 0; 70 | border:solid 1px #e7e1cd; 71 | background-color: #fffdef; 72 | overflow: auto; 73 | } 74 | 75 | .icon_lists{ 76 | width: 100% !important; 77 | 78 | } 79 | 80 | .icon_lists li{ 81 | float:left; 82 | width: 100px; 83 | height:180px; 84 | text-align: center; 85 | list-style: none !important; 86 | } 87 | .icon_lists .icon{ 88 | font-size: 42px; 89 | line-height: 100px; 90 | margin: 10px 0; 91 | color:#333; 92 | -webkit-transition: font-size 0.25s ease-out 0s; 93 | -moz-transition: font-size 0.25s ease-out 0s; 94 | transition: font-size 0.25s ease-out 0s; 95 | 96 | } 97 | .icon_lists .icon:hover{ 98 | font-size: 100px; 99 | } 100 | 101 | 102 | 103 | .markdown { 104 | color: #666; 105 | font-size: 14px; 106 | line-height: 1.8; 107 | } 108 | 109 | .highlight { 110 | line-height: 1.5; 111 | } 112 | 113 | .markdown img { 114 | vertical-align: middle; 115 | max-width: 100%; 116 | } 117 | 118 | .markdown h1 { 119 | color: #404040; 120 | font-weight: 500; 121 | line-height: 40px; 122 | margin-bottom: 24px; 123 | } 124 | 125 | .markdown h2, 126 | .markdown h3, 127 | .markdown h4, 128 | .markdown h5, 129 | .markdown h6 { 130 | color: #404040; 131 | margin: 1.6em 0 0.6em 0; 132 | font-weight: 500; 133 | clear: both; 134 | } 135 | 136 | .markdown h1 { 137 | font-size: 28px; 138 | } 139 | 140 | .markdown h2 { 141 | font-size: 22px; 142 | } 143 | 144 | .markdown h3 { 145 | font-size: 16px; 146 | } 147 | 148 | .markdown h4 { 149 | font-size: 14px; 150 | } 151 | 152 | .markdown h5 { 153 | font-size: 12px; 154 | } 155 | 156 | .markdown h6 { 157 | font-size: 12px; 158 | } 159 | 160 | .markdown hr { 161 | height: 1px; 162 | border: 0; 163 | background: #e9e9e9; 164 | margin: 16px 0; 165 | clear: both; 166 | } 167 | 168 | .markdown p, 169 | .markdown pre { 170 | margin: 1em 0; 171 | } 172 | 173 | .markdown > p, 174 | .markdown > blockquote, 175 | .markdown > .highlight, 176 | .markdown > ol, 177 | .markdown > ul { 178 | width: 80%; 179 | } 180 | 181 | .markdown ul > li { 182 | list-style: circle; 183 | } 184 | 185 | .markdown > ul li, 186 | .markdown blockquote ul > li { 187 | margin-left: 20px; 188 | padding-left: 4px; 189 | } 190 | 191 | .markdown > ul li p, 192 | .markdown > ol li p { 193 | margin: 0.6em 0; 194 | } 195 | 196 | .markdown ol > li { 197 | list-style: decimal; 198 | } 199 | 200 | .markdown > ol li, 201 | .markdown blockquote ol > li { 202 | margin-left: 20px; 203 | padding-left: 4px; 204 | } 205 | 206 | .markdown code { 207 | margin: 0 3px; 208 | padding: 0 5px; 209 | background: #eee; 210 | border-radius: 3px; 211 | } 212 | 213 | .markdown pre { 214 | border-radius: 6px; 215 | background: #f7f7f7; 216 | padding: 20px; 217 | } 218 | 219 | .markdown pre code { 220 | border: none; 221 | background: #f7f7f7; 222 | margin: 0; 223 | } 224 | 225 | .markdown strong, 226 | .markdown b { 227 | font-weight: 600; 228 | } 229 | 230 | .markdown > table { 231 | border-collapse: collapse; 232 | border-spacing: 0px; 233 | empty-cells: show; 234 | border: 1px solid #e9e9e9; 235 | width: 95%; 236 | margin-bottom: 24px; 237 | } 238 | 239 | .markdown > table th { 240 | white-space: nowrap; 241 | color: #333; 242 | font-weight: 600; 243 | 244 | } 245 | 246 | .markdown > table th, 247 | .markdown > table td { 248 | border: 1px solid #e9e9e9; 249 | padding: 8px 16px; 250 | text-align: left; 251 | } 252 | 253 | .markdown > table th { 254 | background: #F7F7F7; 255 | } 256 | 257 | .markdown blockquote { 258 | font-size: 90%; 259 | color: #999; 260 | border-left: 4px solid #e9e9e9; 261 | padding-left: 0.8em; 262 | margin: 1em 0; 263 | font-style: italic; 264 | } 265 | 266 | .markdown blockquote p { 267 | margin: 0; 268 | } 269 | 270 | .markdown .anchor { 271 | opacity: 0; 272 | transition: opacity 0.3s ease; 273 | margin-left: 8px; 274 | } 275 | 276 | .markdown .waiting { 277 | color: #ccc; 278 | } 279 | 280 | .markdown h1:hover .anchor, 281 | .markdown h2:hover .anchor, 282 | .markdown h3:hover .anchor, 283 | .markdown h4:hover .anchor, 284 | .markdown h5:hover .anchor, 285 | .markdown h6:hover .anchor { 286 | opacity: 1; 287 | display: inline-block; 288 | } 289 | 290 | .markdown > br, 291 | .markdown > p > br { 292 | clear: both; 293 | } 294 | 295 | 296 | .hljs { 297 | display: block; 298 | background: white; 299 | padding: 0.5em; 300 | color: #333333; 301 | overflow-x: auto; 302 | } 303 | 304 | .hljs-comment, 305 | .hljs-meta { 306 | color: #969896; 307 | } 308 | 309 | .hljs-string, 310 | .hljs-variable, 311 | .hljs-template-variable, 312 | .hljs-strong, 313 | .hljs-emphasis, 314 | .hljs-quote { 315 | color: #df5000; 316 | } 317 | 318 | .hljs-keyword, 319 | .hljs-selector-tag, 320 | .hljs-type { 321 | color: #a71d5d; 322 | } 323 | 324 | .hljs-literal, 325 | .hljs-symbol, 326 | .hljs-bullet, 327 | .hljs-attribute { 328 | color: #0086b3; 329 | } 330 | 331 | .hljs-section, 332 | .hljs-name { 333 | color: #63a35c; 334 | } 335 | 336 | .hljs-tag { 337 | color: #333333; 338 | } 339 | 340 | .hljs-title, 341 | .hljs-attr, 342 | .hljs-selector-id, 343 | .hljs-selector-class, 344 | .hljs-selector-attr, 345 | .hljs-selector-pseudo { 346 | color: #795da3; 347 | } 348 | 349 | .hljs-addition { 350 | color: #55a532; 351 | background-color: #eaffea; 352 | } 353 | 354 | .hljs-deletion { 355 | color: #bd2c00; 356 | background-color: #ffecec; 357 | } 358 | 359 | .hljs-link { 360 | text-decoration: underline; 361 | } 362 | 363 | pre{ 364 | background: #fff; 365 | } 366 | 367 | 368 | 369 | 370 | 371 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/demo_fontclass.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 11 |
12 |

IconFont 图标

13 |
    14 | 15 |
  • 16 | 17 |
    qq
    18 |
    .icon-qq
    19 |
  • 20 | 21 |
22 | 23 |

font-class引用

24 |
25 | 26 |

font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。

27 |

与unicode使用方式相比,具有如下特点:

28 |
    29 |
  • 兼容性良好,支持ie8+,及所有现代浏览器。
  • 30 |
  • 相比于unicode语意明确,书写更直观。可以很容易分辨这个icon是什么。
  • 31 |
  • 因为使用class来定义图标,所以当要替换图标时,只需要修改class里面的unicode引用。
  • 32 |
  • 不过因为本质上还是使用的字体,所以多色图标还是不支持的。
  • 33 |
34 |

使用步骤如下:

35 |

第一步:引入项目下面生成的fontclass代码:

36 | 37 | 38 |
<link rel="stylesheet" type="text/css" href="./iconfont.css">
39 |

第二步:挑选相应图标并获取类名,应用于页面:

40 |
<i class="iconfont icon-xxx"></i>
41 |
42 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

43 |
44 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/demo_symbol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 10 | 24 | 25 | 26 |
27 |

IconFont 图标

28 |
    29 | 30 |
  • 31 | 34 |
    qq
    35 |
    #icon-qq
    36 |
  • 37 | 38 |
39 | 40 | 41 |

symbol引用

42 |
43 | 44 |

这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 45 | 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:

46 |
    47 |
  • 支持多色图标了,不再受单色限制。
  • 48 |
  • 通过一些技巧,支持像字体那样,通过font-size,color来调整样式。
  • 49 |
  • 兼容性较差,支持 ie9+,及现代浏览器。
  • 50 |
  • 浏览器渲染svg的性能一般,还不如png。
  • 51 |
52 |

使用步骤如下:

53 |

第一步:引入项目下面生成的symbol代码:

54 |
<script src="./iconfont.js"></script>
55 |

第二步:加入通用css代码(引入一次就行):

56 |
<style type="text/css">
57 | .icon {
58 |    width: 1em; height: 1em;
59 |    vertical-align: -0.15em;
60 |    fill: currentColor;
61 |    overflow: hidden;
62 | }
63 | </style>
64 |

第三步:挑选相应图标并获取类名,应用于页面:

65 |
<svg class="icon" aria-hidden="true">
66 |   <use xlink:href="#icon-xxx"></use>
67 | </svg>
68 |         
69 |
70 | 71 | 72 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/demo_unicode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | IconFont 7 | 8 | 9 | 29 | 30 | 31 |
32 |

IconFont 图标

33 |
    34 | 35 |
  • 36 | 37 |
    qq
    38 |
    &#xe60e;
    39 |
  • 40 | 41 |
42 |

unicode引用

43 |
44 | 45 |

unicode是字体在网页端最原始的应用方式,特点是:

46 |
    47 |
  • 兼容性最好,支持ie6+,及所有现代浏览器。
  • 48 |
  • 支持按字体的方式去动态调整图标大小,颜色等等。
  • 49 |
  • 但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。
  • 50 |
51 |
52 |

注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式

53 |
54 |

unicode使用步骤如下:

55 |

第一步:拷贝项目下面生成的font-face

56 |
@font-face {
57 |   font-family: 'iconfont';
58 |   src: url('iconfont.eot');
59 |   src: url('iconfont.eot?#iefix') format('embedded-opentype'),
60 |   url('iconfont.woff') format('woff'),
61 |   url('iconfont.ttf') format('truetype'),
62 |   url('iconfont.svg#iconfont') format('svg');
63 | }
64 | 
65 |

第二步:定义使用iconfont的样式

66 |
.iconfont{
67 |   font-family:"iconfont" !important;
68 |   font-size:16px;font-style:normal;
69 |   -webkit-font-smoothing: antialiased;
70 |   -webkit-text-stroke-width: 0.2px;
71 |   -moz-osx-font-smoothing: grayscale;
72 | }
73 | 
74 |

第三步:挑选相应图标并获取字体编码,应用于页面

75 |
<i class="iconfont">&#x33;</i>
76 | 77 |
78 |

"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。

79 |
80 |
81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.css: -------------------------------------------------------------------------------- 1 | 2 | @font-face {font-family: "vip-icon"; 3 | src: url('iconfont.eot?t=1536759438020'); /* IE9*/ 4 | src: url('iconfont.eot?t=1536759438020#iefix') format('embedded-opentype'), /* IE6-IE8 */ 5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAARQAAsAAAAABpQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFY8hEgHY21hcAAAAYAAAABLAAABcOc2tdRnbHlmAAABzAAAAKQAAACk37T+m2hlYWQAAAJwAAAALwAAADYSnbMkaGhlYQAAAqAAAAAcAAAAJAfeA4NobXR4AAACvAAAAAgAAAAICAAAAGxvY2EAAALEAAAABgAAAAYAUgAAbWF4cAAAAswAAAAeAAAAIAENAD9uYW1lAAAC7AAAAUUAAAJtPlT+fXBvc3QAAAQ0AAAAGwAAACxyggEEeJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2BkYWCcwMDKwMHUyXSGgYGhH0IzvmYwYuRgYGBiYGVmwAoC0lxTGBye8T3jY27438AQw9zO0AAUZgTJAQDfogwGeJxjYGBgZWBgYAZiHSBmYWBgDGFgZAABP6AoI1icmYELLM7CoARWwwISf8b3/z+MBPJZwCQDIxvDKOABkzJQHjisIJiBEQBLJgmhAAABAAD/hAPNA4cAMgAAJRQGBzYWFRYGBwYmJyMOAScuATc0NhcuATUGJjc+ATcmNhc2JBc2BBc2FgceARcWBicxA2MlIwZGBjaBB3sjIiN7B4E2BkcFIyVQGgUUVQUHJQMaAQgXFwEIGgMlBgRVFAUaULwCUTEBMDcFRwEBGicnGgEBRwU3MAExUQJ2fRNebQFSNQP5ZwsLZ/kDNVIBbV4TfXYAeJxjYGRgYABiH+bEPfH8Nl8ZuFkYQOD6fvM+BP2/hYWBuR3I5WBgAokCABTWCe4AeJxjYGRgYG7438AQw8IAAkCSkQEVMAEARwgCawQAAAAEAAAAAAAAAABSAAB4nGNgZGBgYGIwZgDRIBYDAxcQMjD8B/MZAA2SAU0AAHicZY9NTsMwEIVf+gekEqqoYIfkBWIBKP0Rq25YVGr3XXTfpk6bKokjx63UA3AejsAJOALcgDvwSCebNpbH37x5Y08A3OAHHo7fLfeRPVwyO3INF7gXrlN/EG6QX4SbaONVuEX9TdjHM6bCbXRheYPXuGL2hHdhDx18CNdwjU/hOvUv4Qb5W7iJO/wKt9Dx6sI+5l5XuI1HL/bHVi+cXqnlQcWhySKTOb+CmV7vkoWt0uqca1vEJlODoF9JU51pW91T7NdD5yIVWZOqCas6SYzKrdnq0AUb5/JRrxeJHoQm5Vhj/rbGAo5xBYUlDowxQhhkiMro6DtVZvSvsUPCXntWPc3ndFsU1P9zhQEC9M9cU7qy0nk6T4E9XxtSdXQrbsuelDSRXs1JErJCXta2VELqATZlV44RelzRiT8oZ0j/AAlabsgAAAB4nGNgYoAALgbsgImRiZGZgamwkIEBAAVQAPoA') format('woff'), 6 | url('iconfont.ttf?t=1536759438020') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ 7 | url('iconfont.svg?t=1536759438020#vip-icon') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .vip-icon { 11 | font-family:"vip-icon" !important; 12 | font-size:16px; 13 | font-style:normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-qq:before { content: "\e60e"; } 19 | 20 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/font_mot1bvdidyq/iconfont.eot -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.js: -------------------------------------------------------------------------------- 1 | (function(window){var svgSprite='';var script=function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1]}();var shouldInjectCss=script.getAttribute("data-injectcss");var ready=function(fn){if(document.addEventListener){if(~["complete","loaded","interactive"].indexOf(document.readyState)){setTimeout(fn,0)}else{var loadFn=function(){document.removeEventListener("DOMContentLoaded",loadFn,false);fn()};document.addEventListener("DOMContentLoaded",loadFn,false)}}else if(document.attachEvent){IEContentLoaded(window,fn)}function IEContentLoaded(w,fn){var d=w.document,done=false,init=function(){if(!done){done=true;fn()}};var polling=function(){try{d.documentElement.doScroll("left")}catch(e){setTimeout(polling,50);return}init()};polling();d.onreadystatechange=function(){if(d.readyState=="complete"){d.onreadystatechange=null;init()}}}};var before=function(el,target){target.parentNode.insertBefore(el,target)};var prepend=function(el,target){if(target.firstChild){before(el,target.firstChild)}else{target.appendChild(el)}};function appendSvg(){var div,svg;div=document.createElement("div");div.innerHTML=svgSprite;svgSprite=null;svg=div.getElementsByTagName("svg")[0];if(svg){svg.setAttribute("aria-hidden","true");svg.style.position="absolute";svg.style.width=0;svg.style.height=0;svg.style.overflow="hidden";prepend(svg,document.body)}}if(shouldInjectCss&&!window.__iconfont__svg__cssinject__){window.__iconfont__svg__cssinject__=true;try{document.write("")}catch(e){console&&console.log(e)}}ready(appendSvg)})(window) -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by iconfont 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/font_mot1bvdidyq/iconfont.ttf -------------------------------------------------------------------------------- /app/static/fonts/font_mot1bvdidyq/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/font_mot1bvdidyq/iconfont.woff -------------------------------------------------------------------------------- /app/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /app/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /app/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /app/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /app/static/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/banner.jpg -------------------------------------------------------------------------------- /app/static/images/create.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/create.jpg -------------------------------------------------------------------------------- /app/static/images/mobie_404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/mobie_404.png -------------------------------------------------------------------------------- /app/static/images/mobie_complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/mobie_complete.png -------------------------------------------------------------------------------- /app/static/images/mobie_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/mobie_index.png -------------------------------------------------------------------------------- /app/static/images/mobie_ugerror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/mobie_ugerror.png -------------------------------------------------------------------------------- /app/static/images/mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/mouse.png -------------------------------------------------------------------------------- /app/static/images/nav_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/nav_icon.png -------------------------------------------------------------------------------- /app/static/images/p5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/p5.jpg -------------------------------------------------------------------------------- /app/static/images/pc_404.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_404.png -------------------------------------------------------------------------------- /app/static/images/pc_complete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_complete.png -------------------------------------------------------------------------------- /app/static/images/pc_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_index.png -------------------------------------------------------------------------------- /app/static/images/pc_index2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_index2.png -------------------------------------------------------------------------------- /app/static/images/pc_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_key.png -------------------------------------------------------------------------------- /app/static/images/pc_ugerror.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/pc_ugerror.png -------------------------------------------------------------------------------- /app/static/images/show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/show.gif -------------------------------------------------------------------------------- /app/static/images/top_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/top_arrow.png -------------------------------------------------------------------------------- /app/static/images/zip.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/images/zip.jpg -------------------------------------------------------------------------------- /app/static/js/baguetteBox.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * baguetteBox.js 3 | * @author feimosi 4 | * @version 1.8.2 5 | * @url https://github.com/feimosi/baguetteBox.js 6 | */ 7 | !function(t,e){"use strict";"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.baguetteBox=e()}(this,function(){"use strict";function t(t,n){M.transforms=w(),M.svg=k(),i(),o(t),e(t,n)}function e(t,e){var n=document.querySelectorAll(t),o={galleries:[],nodeList:n};U[t]=o,[].forEach.call(n,function(t){e&&e.filter&&(V=e.filter);var n=[];if(n="A"===t.tagName?[t]:t.getElementsByTagName("a"),n=[].filter.call(n,function(t){return V.test(t.href)}),0!==n.length){var i=[];[].forEach.call(n,function(t,n){var o=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,u(i,e),c(n)},a={eventHandler:o,imageElement:t};E(t,"click",o),i.push(a)}),o.galleries.push(i)}})}function n(){for(var t in U)U.hasOwnProperty(t)&&o(t)}function o(t){if(U.hasOwnProperty(t)){var e=U[t].galleries;[].forEach.call(e,function(t){[].forEach.call(t,function(t){B(t.imageElement,"click",t.eventHandler)}),R===t&&(R=[])}),delete U[t]}}function i(){if(S=T("baguetteBox-overlay"))return P=T("baguetteBox-slider"),F=T("previous-button"),H=T("next-button"),void(L=T("close-button"));S=N("div"),S.setAttribute("role","dialog"),S.id="baguetteBox-overlay",document.getElementsByTagName("body")[0].appendChild(S),P=N("div"),P.id="baguetteBox-slider",S.appendChild(P),F=N("button"),F.setAttribute("type","button"),F.id="previous-button",F.setAttribute("aria-label","Previous"),F.innerHTML=M.svg?I:"<",S.appendChild(F),H=N("button"),H.setAttribute("type","button"),H.id="next-button",H.setAttribute("aria-label","Next"),H.innerHTML=M.svg?Y:">",S.appendChild(H),L=N("button"),L.setAttribute("type","button"),L.id="close-button",L.setAttribute("aria-label","Close"),L.innerHTML=M.svg?q:"×",S.appendChild(L),F.className=H.className=L.className="baguetteBox-button",r()}function a(t){switch(t.keyCode){case 37:v();break;case 39:h();break;case 27:m()}}function r(){E(S,"click",J),E(F,"click",K),E(H,"click",Q),E(L,"click",Z),E(S,"touchstart",$),E(S,"touchmove",_),E(S,"touchend",tt),E(document,"focus",et,!0)}function l(){B(S,"click",J),B(F,"click",K),B(H,"click",Q),B(L,"click",Z),B(S,"touchstart",$),B(S,"touchmove",_),B(S,"touchend",tt),B(document,"focus",et,!0)}function u(t,e){if(R!==t){for(R=t,s(e);P.firstChild;)P.removeChild(P.firstChild);W.length=0;for(var n,o=[],i=[],a=0;a
',j.captions&&r){var s=N("figcaption");s.id="baguetteBox-figcaption-"+t,s.innerHTML=r,u.appendChild(s)}n.appendChild(u);var c=N("img");c.onload=function(){var n=document.querySelector("#baguette-img-"+t+" .baguetteBox-spinner");u.removeChild(n),!j.async&&e&&e()},c.setAttribute("src",l),c.alt=a?a.alt||"":"",j.titleTag&&r&&(c.title=r),u.appendChild(c),j.async&&e&&e()}}function b(t){var e=t.href;if(t.dataset){var n=[];for(var o in t.dataset)"at-"!==o.substring(0,3)||isNaN(o.substring(3))||(n[o.replace("at-","")]=t.dataset[o]);for(var i=Object.keys(n).sort(function(t,e){return parseInt(t,10)=1?(z--,y(),C(z),t=!0):j.animation&&(P.className="bounce-from-left",setTimeout(function(){P.className=""},400),t=!1),j.onChange&&j.onChange(z,W.length),t}function y(){var t=100*-z+"%";"fadeIn"===j.animation?(P.style.opacity=0,setTimeout(function(){M.transforms?P.style.transform=P.style.webkitTransform="translate3d("+t+",0,0)":P.style.left=t,P.style.opacity=1},400)):M.transforms?P.style.transform=P.style.webkitTransform="translate3d("+t+",0,0)":P.style.left=t}function w(){var t=N("div");return void 0!==t.style.perspective||void 0!==t.style.webkitPerspective}function k(){var t=N("div");return t.innerHTML="","http://www.w3.org/2000/svg"===(t.firstChild&&t.firstChild.namespaceURI)}function x(t){t-z>=j.preload||p(t+1,function(){x(t+1)})}function C(t){z-t>=j.preload||p(t-1,function(){C(t-1)})}function E(t,e,n,o){t.addEventListener?t.addEventListener(e,n,o):t.attachEvent("on"+e,function(t){t=t||window.event,t.target=t.target||t.srcElement,n(t)})}function B(t,e,n,o){t.removeEventListener?t.removeEventListener(e,n,o):t.detachEvent("on"+e,n)}function T(t){return document.getElementById(t)}function N(t){return document.createElement(t)}function A(){l(),n(),B(document,"keydown",a),document.getElementsByTagName("body")[0].removeChild(document.getElementById("baguetteBox-overlay")),U={},R=[],z=0}var S,P,F,H,L,I='',Y='',q='',j={},X={captions:!0,fullScreen:!1,noScrollbars:!1,titleTag:!1,buttons:"auto",async:!1,preload:2,animation:"slideIn",afterShow:null,afterHide:null,onChange:null,overlayBackgroundColor:"rgba(0,0,0,.8)"},M={},R=[],z=0,D={},O=!1,V=/.+\.(gif|jpe?g|png|webp)/i,U={},W=[],G=null,J=function(t){t.target.id.indexOf("baguette-img")!==-1&&m()},K=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,v()},Q=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,h()},Z=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,m()},$=function(t){D.count++,D.count>1&&(D.multitouch=!0),D.startX=t.changedTouches[0].pageX,D.startY=t.changedTouches[0].pageY},_=function(t){if(!O&&!D.multitouch){t.preventDefault?t.preventDefault():t.returnValue=!1;var e=t.touches[0]||t.changedTouches[0];e.pageX-D.startX>40?(O=!0,v()):e.pageX-D.startX<-40?(O=!0,h()):D.startY-e.pageY>100&&m()}},tt=function(){D.count--,D.count<=0&&(D.multitouch=!1),O=!1},et=function(t){"block"===S.style.display&&S.contains&&!S.contains(t.target)&&(t.stopPropagation(),d())};return[].forEach||(Array.prototype.forEach=function(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])}); -------------------------------------------------------------------------------- /app/static/js/easing.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php 3 | * 4 | * Uses the built In easIng capabilities added In jQuery 1.1 5 | * to offer multiple easIng options 6 | * 7 | * Copyright (c) 2007 George Smith 8 | * Licensed under the MIT License: 9 | * http://www.opensource.org/licenses/mit-license.php 10 | */ 11 | 12 | // t: current time, b: begInnIng value, c: change In value, d: duration 13 | 14 | jQuery.extend( jQuery.easing, 15 | { 16 | easeInQuad: function (x, t, b, c, d) { 17 | return c*(t/=d)*t + b; 18 | }, 19 | easeOutQuad: function (x, t, b, c, d) { 20 | return -c *(t/=d)*(t-2) + b; 21 | }, 22 | easeInOutQuad: function (x, t, b, c, d) { 23 | if ((t/=d/2) < 1) return c/2*t*t + b; 24 | return -c/2 * ((--t)*(t-2) - 1) + b; 25 | }, 26 | easeInCubic: function (x, t, b, c, d) { 27 | return c*(t/=d)*t*t + b; 28 | }, 29 | easeOutCubic: function (x, t, b, c, d) { 30 | return c*((t=t/d-1)*t*t + 1) + b; 31 | }, 32 | easeInOutCubic: function (x, t, b, c, d) { 33 | if ((t/=d/2) < 1) return c/2*t*t*t + b; 34 | return c/2*((t-=2)*t*t + 2) + b; 35 | }, 36 | easeInQuart: function (x, t, b, c, d) { 37 | return c*(t/=d)*t*t*t + b; 38 | }, 39 | easeOutQuart: function (x, t, b, c, d) { 40 | return -c * ((t=t/d-1)*t*t*t - 1) + b; 41 | }, 42 | easeInOutQuart: function (x, t, b, c, d) { 43 | if ((t/=d/2) < 1) return c/2*t*t*t*t + b; 44 | return -c/2 * ((t-=2)*t*t*t - 2) + b; 45 | }, 46 | easeInQuint: function (x, t, b, c, d) { 47 | return c*(t/=d)*t*t*t*t + b; 48 | }, 49 | easeOutQuint: function (x, t, b, c, d) { 50 | return c*((t=t/d-1)*t*t*t*t + 1) + b; 51 | }, 52 | easeInOutQuint: function (x, t, b, c, d) { 53 | if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; 54 | return c/2*((t-=2)*t*t*t*t + 2) + b; 55 | }, 56 | easeInSine: function (x, t, b, c, d) { 57 | return -c * Math.cos(t/d * (Math.PI/2)) + c + b; 58 | }, 59 | easeOutSine: function (x, t, b, c, d) { 60 | return c * Math.sin(t/d * (Math.PI/2)) + b; 61 | }, 62 | easeInOutSine: function (x, t, b, c, d) { 63 | return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; 64 | }, 65 | easeInExpo: function (x, t, b, c, d) { 66 | return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; 67 | }, 68 | easeOutExpo: function (x, t, b, c, d) { 69 | return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; 70 | }, 71 | easeInOutExpo: function (x, t, b, c, d) { 72 | if (t==0) return b; 73 | if (t==d) return b+c; 74 | if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; 75 | return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; 76 | }, 77 | easeInCirc: function (x, t, b, c, d) { 78 | return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; 79 | }, 80 | easeOutCirc: function (x, t, b, c, d) { 81 | return c * Math.sqrt(1 - (t=t/d-1)*t) + b; 82 | }, 83 | easeInOutCirc: function (x, t, b, c, d) { 84 | if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; 85 | return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; 86 | }, 87 | easeInElastic: function (x, t, b, c, d) { 88 | var s=1.70158;var p=0;var a=c; 89 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 90 | if (a < Math.abs(c)) { a=c; var s=p/4; } 91 | else var s = p/(2*Math.PI) * Math.asin (c/a); 92 | return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 93 | }, 94 | easeOutElastic: function (x, t, b, c, d) { 95 | var s=1.70158;var p=0;var a=c; 96 | if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; 97 | if (a < Math.abs(c)) { a=c; var s=p/4; } 98 | else var s = p/(2*Math.PI) * Math.asin (c/a); 99 | return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; 100 | }, 101 | easeInOutElastic: function (x, t, b, c, d) { 102 | var s=1.70158;var p=0;var a=c; 103 | if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); 104 | if (a < Math.abs(c)) { a=c; var s=p/4; } 105 | else var s = p/(2*Math.PI) * Math.asin (c/a); 106 | if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; 107 | return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; 108 | }, 109 | easeInBack: function (x, t, b, c, d, s) { 110 | if (s == undefined) s = 1.70158; 111 | return c*(t/=d)*t*((s+1)*t - s) + b; 112 | }, 113 | easeOutBack: function (x, t, b, c, d, s) { 114 | if (s == undefined) s = 1.70158; 115 | return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; 116 | }, 117 | easeInOutBack: function (x, t, b, c, d, s) { 118 | if (s == undefined) s = 1.70158; 119 | if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; 120 | return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; 121 | }, 122 | easeInBounce: function (x, t, b, c, d) { 123 | return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; 124 | }, 125 | easeOutBounce: function (x, t, b, c, d) { 126 | if ((t/=d) < (1/2.75)) { 127 | return c*(7.5625*t*t) + b; 128 | } else if (t < (2/2.75)) { 129 | return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; 130 | } else if (t < (2.5/2.75)) { 131 | return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; 132 | } else { 133 | return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; 134 | } 135 | }, 136 | easeInOutBounce: function (x, t, b, c, d) { 137 | if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; 138 | return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; 139 | } 140 | }); 141 | -------------------------------------------------------------------------------- /app/static/js/fileinput/locales/zh.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * FileInput Chinese Translations 3 | * 4 | * This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or 5 | * any HTML markup tags in the messages must not be converted or translated. 6 | * 7 | * @see http://github.com/kartik-v/bootstrap-fileinput 8 | * @author kangqf 9 | * 10 | * NOTE: this file must be saved in UTF-8 encoding. 11 | */ 12 | (function ($) { 13 | "use strict"; 14 | 15 | $.fn.fileinputLocales['zh'] = { 16 | fileSingle: '文件', 17 | filePlural: '个文件', 18 | browseLabel: '选择 …', 19 | removeLabel: '移除', 20 | removeTitle: '清除选中文件', 21 | cancelLabel: '取消', 22 | cancelTitle: '取消进行中的上传', 23 | pauseLabel: 'Pause', 24 | pauseTitle: 'Pause ongoing upload', 25 | uploadLabel: '上传', 26 | uploadTitle: '上传选中文件', 27 | msgNo: '没有', 28 | msgNoFilesSelected: '未选择文件', 29 | msgPaused: 'Paused', 30 | msgCancelled: '取消', 31 | msgPlaceholder: '选择 {files}...', 32 | msgZoomModalHeading: '详细预览', 33 | msgFileRequired: '必须选择一个文件上传.', 34 | msgSizeTooSmall: '文件 "{name}" ({size} KB) 必须大于限定大小 {minSize} KB.', 35 | msgSizeTooLarge: '文件 "{name}" ({size} KB) 超过了允许大小 {maxSize} KB.', 36 | msgFilesTooLess: '你必须选择最少 {n} {files} 来上传. ', 37 | msgFilesTooMany: '选择的上传文件个数 ({n}) 超出最大文件的限制个数 {m}.', 38 | msgFileNotFound: '文件 "{name}" 未找到!', 39 | msgFileSecured: '安全限制,为了防止读取文件 "{name}".', 40 | msgFileNotReadable: '文件 "{name}" 不可读.', 41 | msgFilePreviewAborted: '取消 "{name}" 的预览.', 42 | msgFilePreviewError: '读取 "{name}" 时出现了一个错误.', 43 | msgInvalidFileName: '文件名 "{name}" 包含非法字符.', 44 | msgInvalidFileType: '不正确的类型 "{name}". 只支持 "{types}" 类型的文件.', 45 | msgInvalidFileExtension: '不正确的文件扩展名 "{name}". 只支持 "{extensions}" 的文件扩展名.', 46 | msgFileTypes: { 47 | 'image': 'image', 48 | 'html': 'HTML', 49 | 'text': 'text', 50 | 'video': 'video', 51 | 'audio': 'audio', 52 | 'flash': 'flash', 53 | 'pdf': 'PDF', 54 | 'object': 'object' 55 | }, 56 | msgUploadAborted: '该文件上传被中止', 57 | msgUploadThreshold: '处理中...', 58 | msgUploadBegin: '正在初始化...', 59 | msgUploadEnd: '完成', 60 | msgUploadResume: 'Resuming upload...', 61 | msgUploadEmpty: '无效的文件上传.', 62 | msgUploadError: 'Upload Error', 63 | msgDeleteError: 'Delete Error', 64 | msgProgressError: '上传出错', 65 | msgValidationError: '验证错误', 66 | msgLoading: '加载第 {index} 文件 共 {files} …', 67 | msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.', 68 | msgSelected: '{n} {files} 选中', 69 | msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.', 70 | msgImageWidthSmall: '图像文件的"{name}"的宽度必须是至少{size}像素.', 71 | msgImageHeightSmall: '图像文件的"{name}"的高度必须至少为{size}像素.', 72 | msgImageWidthLarge: '图像文件"{name}"的宽度不能超过{size}像素.', 73 | msgImageHeightLarge: '图像文件"{name}"的高度不能超过{size}像素.', 74 | msgImageResizeError: '无法获取的图像尺寸调整。', 75 | msgImageResizeException: '调整图像大小时发生错误。
{errors}
', 76 | msgAjaxError: '{operation} 发生错误. 请重试!', 77 | msgAjaxProgressError: '{operation} 失败', 78 | msgDuplicateFile: 'File "{name}" of same size "{size} KB" has already been selected earlier. Skipping duplicate selection.', 79 | msgResumableUploadRetriesExceeded: 'Upload aborted beyond {max} retries for file {file}! Error Details:
{error}
', 80 | msgPendingTime: '{time} remaining', 81 | msgCalculatingTime: 'calculating time remaining', 82 | ajaxOperations: { 83 | deleteThumb: '删除文件', 84 | uploadThumb: '上传文件', 85 | uploadBatch: '批量上传', 86 | uploadExtra: '表单数据上传' 87 | }, 88 | dropZoneTitle: '拖拽文件到这里 …
支持多文件同时上传', 89 | dropZoneClickTitle: '
(或点击{files}按钮选择文件)', 90 | fileActionSettings: { 91 | removeTitle: '删除文件', 92 | uploadTitle: '上传文件', 93 | downloadTitle: '下载文件', 94 | uploadRetryTitle: '重试', 95 | zoomTitle: '查看详情', 96 | dragTitle: '移动 / 重置', 97 | indicatorNewTitle: '没有上传', 98 | indicatorSuccessTitle: '上传', 99 | indicatorErrorTitle: '上传错误', 100 | indicatorPausedTitle: 'Upload Paused', 101 | indicatorLoadingTitle: '上传 ...' 102 | }, 103 | previewZoomButtonTitles: { 104 | prev: '预览上一个文件', 105 | next: '预览下一个文件', 106 | toggleheader: '缩放', 107 | fullscreen: '全屏', 108 | borderless: '无边界模式', 109 | close: '关闭当前预览' 110 | } 111 | }; 112 | })(window.jQuery); 113 | -------------------------------------------------------------------------------- /app/static/js/fileinput/plugins/purify.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.DOMPurify=t()}(this,function(){"use strict";function e(e,t){for(var n=t.length;n--;)"string"==typeof t[n]&&(t[n]=t[n].toLowerCase()),e[t[n]]=!0;return e}function t(e){var t={},n=void 0;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:A(),S=function(e){return r(e)};if(S.version="1.0.7",S.removed=[],!x||!x.document||9!==x.document.nodeType)return S.isSupported=!1,S;var k=x.document,w=!1,L=!1,E=x.document,O=x.DocumentFragment,M=x.HTMLTemplateElement,N=x.Node,_=x.NodeFilter,D=x.NamedNodeMap,C=void 0===D?x.NamedNodeMap||x.MozNamedAttrMap:D,R=x.Text,F=x.Comment,z=x.DOMParser;if("function"==typeof M){var H=E.createElement("template");H.content&&H.content.ownerDocument&&(E=H.content.ownerDocument)}var I=E,j=I.implementation,P=I.createNodeIterator,W=I.getElementsByTagName,U=I.createDocumentFragment,B=k.importNode,G={};S.isSupported=j&&void 0!==j.createHTMLDocument&&9!==E.documentMode;var q=m,V=p,Y=h,K=g,X=v,$=b,J=y,Q=null,Z=e({},[].concat(n(o),n(i),n(a),n(l),n(s))),ee=null,te=e({},[].concat(n(c),n(d),n(u),n(f))),ne=null,re=null,oe=!0,ie=!0,ae=!1,le=!1,se=!1,ce=!1,de=!1,ue=!1,fe=!1,me=!1,pe=!1,he=!0,ge=!0,ye=!1,ve={},be=e({},["audio","head","math","script","style","template","svg","video"]),Te=e({},["audio","video","img","source","image"]),Ae=e({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),xe=null,Se=E.createElement("form"),ke=function(r){"object"!==(void 0===r?"undefined":T(r))&&(r={}),Q="ALLOWED_TAGS"in r?e({},r.ALLOWED_TAGS):Z,ee="ALLOWED_ATTR"in r?e({},r.ALLOWED_ATTR):te,ne="FORBID_TAGS"in r?e({},r.FORBID_TAGS):{},re="FORBID_ATTR"in r?e({},r.FORBID_ATTR):{},ve="USE_PROFILES"in r&&r.USE_PROFILES,oe=!1!==r.ALLOW_ARIA_ATTR,ie=!1!==r.ALLOW_DATA_ATTR,ae=r.ALLOW_UNKNOWN_PROTOCOLS||!1,le=r.SAFE_FOR_JQUERY||!1,se=r.SAFE_FOR_TEMPLATES||!1,ce=r.WHOLE_DOCUMENT||!1,fe=r.RETURN_DOM||!1,me=r.RETURN_DOM_FRAGMENT||!1,pe=r.RETURN_DOM_IMPORT||!1,ue=r.FORCE_BODY||!1,he=!1!==r.SANITIZE_DOM,ge=!1!==r.KEEP_CONTENT,ye=r.IN_PLACE||!1,J=r.ALLOWED_URI_REGEXP||J,se&&(ie=!1),me&&(fe=!0),ve&&(Q=e({},[].concat(n(s))),ee=[],!0===ve.html&&(e(Q,o),e(ee,c)),!0===ve.svg&&(e(Q,i),e(ee,d),e(ee,f)),!0===ve.svgFilters&&(e(Q,a),e(ee,d),e(ee,f)),!0===ve.mathMl&&(e(Q,l),e(ee,u),e(ee,f))),r.ADD_TAGS&&(Q===Z&&(Q=t(Q)),e(Q,r.ADD_TAGS)),r.ADD_ATTR&&(ee===te&&(ee=t(ee)),e(ee,r.ADD_ATTR)),r.ADD_URI_SAFE_ATTR&&e(Ae,r.ADD_URI_SAFE_ATTR),ge&&(Q["#text"]=!0),ce&&e(Q,["html","head","body"]),Q.table&&e(Q,["tbody"]),Object&&"freeze"in Object&&Object.freeze(r),xe=r},we=function(e){S.removed.push({element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=""}},Le=function(e,t){try{S.removed.push({attribute:t.getAttributeNode(e),from:t})}catch(e){S.removed.push({attribute:null,from:t})}t.removeAttribute(e)},Ee=function(t){var n=void 0;if(ue&&(t=""+t),w)try{n=(new z).parseFromString(t,"text/html")}catch(e){}if(L&&e(ne,["title"]),!n||!n.documentElement){var r=(n=j.createHTMLDocument("")).body;r.parentNode.removeChild(r.parentNode.firstElementChild),r.outerHTML=t}return W.call(n,ce?"html":"body")[0]};S.isSupported&&(function(){try{Ee('

').querySelector("svg img")&&(w=!0)}catch(e){}}(),function(){try{Ee("</title><img>").querySelector("title").textContent.match(/<\/title/)&&(L=!0)}catch(e){}}());var Oe=function(e){return P.call(e.ownerDocument||e,e,_.SHOW_ELEMENT|_.SHOW_COMMENT|_.SHOW_TEXT,function(){return _.FILTER_ACCEPT},!1)},Me=function(e){return!(e instanceof R||e instanceof F)&&!("string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof C&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute)},Ne=function(e){return"object"===(void 0===N?"undefined":T(N))?e instanceof N:e&&"object"===(void 0===e?"undefined":T(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},_e=function(e,t,n){G[e]&&G[e].forEach(function(e){e.call(S,t,n,xe)})},De=function(e){var t=void 0;if(_e("beforeSanitizeElements",e,null),Me(e))return we(e),!0;var n=e.nodeName.toLowerCase();if(_e("uponSanitizeElement",e,{tagName:n,allowedTags:Q}),!Q[n]||ne[n]){if(ge&&!be[n]&&"function"==typeof e.insertAdjacentHTML)try{e.insertAdjacentHTML("AfterEnd",e.innerHTML)}catch(e){}return we(e),!0}return!le||e.firstElementChild||e.content&&e.content.firstElementChild||!/</g.test(e.textContent)||(S.removed.push({element:e.cloneNode()}),e.innerHTML?e.innerHTML=e.innerHTML.replace(/</g,"<"):e.innerHTML=e.textContent.replace(/</g,"<")),se&&3===e.nodeType&&(t=(t=(t=e.textContent).replace(q," ")).replace(V," "),e.textContent!==t&&(S.removed.push({element:e.cloneNode()}),e.textContent=t)),_e("afterSanitizeElements",e,null),!1},Ce=function(e,t,n){if(he&&("id"===t||"name"===t)&&(n in E||n in Se))return!1;if(se&&(n=(n=n.replace(q," ")).replace(V," ")),ie&&Y.test(t));else if(oe&&K.test(t));else{if(!ee[t]||re[t])return!1;if(Ae[t]);else if(J.test(n.replace($,"")));else if("src"!==t&&"xlink:href"!==t||0!==n.indexOf("data:")||!Te[e]){if(ae&&!X.test(n.replace($,"")));else if(n)return!1}else;}return!0},Re=function(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0;_e("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ee};for(i=a.length;i--;){var s=(t=a[i]).name;if(n=t.value.trim(),r=s.toLowerCase(),l.attrName=r,l.attrValue=n,l.keepAttr=!0,_e("uponSanitizeAttribute",e,l),n=l.attrValue,"name"===r&&"IMG"===e.nodeName&&a.id)o=a.id,a=Array.prototype.slice.apply(a),Le("id",e),Le(s,e),a.indexOf(o)>i&&e.setAttribute("id",o.value);else{if("INPUT"===e.nodeName&&"type"===r&&"file"===n&&(ee[r]||!re[r]))continue;"id"===s&&e.setAttribute(s,""),Le(s,e)}if(l.keepAttr){var c=e.nodeName.toLowerCase();if(Ce(c,r,n))try{e.setAttribute(s,n),S.removed.pop()}catch(e){}}}_e("afterSanitizeAttributes",e,null)}},Fe=function e(t){var n=void 0,r=Oe(t);for(_e("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)_e("uponSanitizeShadowNode",n,null),De(n)||(n.content instanceof O&&e(n.content),Re(n));_e("afterSanitizeShadowDOM",t,null)};return S.sanitize=function(e,t){var n=void 0,r=void 0,o=void 0,i=void 0,a=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw new TypeError("toString is not a function");if("string"!=typeof(e=e.toString()))throw new TypeError("dirty is not a string, aborting")}if(!S.isSupported){if("object"===T(x.toStaticHTML)||"function"==typeof x.toStaticHTML){if("string"==typeof e)return x.toStaticHTML(e);if(Ne(e))return x.toStaticHTML(e.outerHTML)}return e}if(de||ke(t),S.removed=[],ye);else if(e instanceof N)1===(r=(n=Ee("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName?n=r:n.appendChild(r);else{if(!fe&&!ce&&-1===e.indexOf("<"))return e;if(!(n=Ee(e)))return fe?null:""}n&&ue&&we(n.firstChild);for(var l=Oe(ye?e:n);o=l.nextNode();)3===o.nodeType&&o===i||De(o)||(o.content instanceof O&&Fe(o.content),Re(o),i=o);if(ye)return e;if(fe){if(me)for(a=U.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return pe&&(a=B.call(k,a,!0)),a}return ce?n.outerHTML:n.innerHTML},S.setConfig=function(e){ke(e),de=!0},S.clearConfig=function(){xe=null,de=!1},S.isValidAttribute=function(e,t,n){xe||ke({});var r=e.toLowerCase(),o=t.toLowerCase();return Ce(r,o,n)},S.addHook=function(e,t){"function"==typeof t&&(G[e]=G[e]||[],G[e].push(t))},S.removeHook=function(e){G[e]&&G[e].pop()},S.removeHooks=function(e){G[e]&&(G[e]=[])},S.removeAllHooks=function(){G={}},S}var o=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"],i=["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"],a=["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"],l=["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmuliscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mpspace","msqrt","mystyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"],s=["#text"],c=["accept","action","align","alt","autocomplete","background","bgcolor","border","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","coords","crossorigin","datetime","default","dir","disabled","download","enctype","face","for","headers","height","hidden","high","href","hreflang","id","integrity","ismap","label","lang","list","loop","low","max","maxlength","media","method","min","multiple","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","type","usemap","valign","value","width","xmlns"],d=["accent-height","accumulate","additivive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"],u=["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"],f=["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"],m=/\{\{[\s\S]*|[\s\S]*\}\}/gm,p=/<%[\s\S]*|[\s\S]*%>/gm,h=/^data-[\-\w.\u00B7-\uFFFF]/,g=/^aria-[\-\w]+$/,y=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,v=/^(?:\w+script|data):/i,b=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A=function(){return"undefined"==typeof window?null:window};return r()}); -------------------------------------------------------------------------------- /app/static/js/index.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('nav#menu').mmenu(); 3 | $("#back-to-top").click(function(){ 4 | //$('body,html').animate({scrollTop:0},1000); 5 | if ($('html').scrollTop()) { 6 | $('html').animate({ scrollTop: 0 }, 1000); 7 | $("#testList").click(); 8 | return false; 9 | } 10 | $('body').animate({ scrollTop: 0 }, 1000); 11 | return false; 12 | }); 13 | 14 | }); 15 | jQuery(document).ready(function($) { 16 | $(".scroll").click(function(event){ 17 | event.preventDefault(); 18 | $('html,body').animate({scrollTop:$(this.hash).offset().top},1000); 19 | }); 20 | }); 21 | $().UItoTop({ easingType: 'easeOutQuart' }); 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/static/js/jquery.easing.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ 3 | * 4 | * Uses the built in easing capabilities added In jQuery 1.1 5 | * to offer multiple easing options 6 | * 7 | * TERMS OF USE - EASING EQUATIONS 8 | * 9 | * Open source under the BSD License. 10 | * 11 | * Copyright © 2001 Robert Penner 12 | * All rights reserved. 13 | * 14 | * TERMS OF USE - jQuery Easing 15 | * 16 | * Open source under the BSD License. 17 | * 18 | * Copyright © 2008 George McGinley Smith 19 | * All rights reserved. 20 | * 21 | * Redistribution and use in source and binary forms, with or without modification, 22 | * are permitted provided that the following conditions are met: 23 | * 24 | * Redistributions of source code must retain the above copyright notice, this list of 25 | * conditions and the following disclaimer. 26 | * Redistributions in binary form must reproduce the above copyright notice, this list 27 | * of conditions and the following disclaimer in the documentation and/or other materials 28 | * provided with the distribution. 29 | * 30 | * Neither the name of the author nor the names of contributors may be used to endorse 31 | * or promote products derived from this software without specific prior written permission. 32 | * 33 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 34 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 35 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 36 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 37 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 38 | * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 39 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 40 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 41 | * OF THE POSSIBILITY OF SUCH DAMAGE. 42 | * 43 | */ 44 | jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,f,a,h,g){return jQuery.easing[jQuery.easing.def](e,f,a,h,g)},easeInQuad:function(e,f,a,h,g){return h*(f/=g)*f+a},easeOutQuad:function(e,f,a,h,g){return -h*(f/=g)*(f-2)+a},easeInOutQuad:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f+a}return -h/2*((--f)*(f-2)-1)+a},easeInCubic:function(e,f,a,h,g){return h*(f/=g)*f*f+a},easeOutCubic:function(e,f,a,h,g){return h*((f=f/g-1)*f*f+1)+a},easeInOutCubic:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f+a}return h/2*((f-=2)*f*f+2)+a},easeInQuart:function(e,f,a,h,g){return h*(f/=g)*f*f*f+a},easeOutQuart:function(e,f,a,h,g){return -h*((f=f/g-1)*f*f*f-1)+a},easeInOutQuart:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f+a}return -h/2*((f-=2)*f*f*f-2)+a},easeInQuint:function(e,f,a,h,g){return h*(f/=g)*f*f*f*f+a},easeOutQuint:function(e,f,a,h,g){return h*((f=f/g-1)*f*f*f*f+1)+a},easeInOutQuint:function(e,f,a,h,g){if((f/=g/2)<1){return h/2*f*f*f*f*f+a}return h/2*((f-=2)*f*f*f*f+2)+a},easeInSine:function(e,f,a,h,g){return -h*Math.cos(f/g*(Math.PI/2))+h+a},easeOutSine:function(e,f,a,h,g){return h*Math.sin(f/g*(Math.PI/2))+a},easeInOutSine:function(e,f,a,h,g){return -h/2*(Math.cos(Math.PI*f/g)-1)+a},easeInExpo:function(e,f,a,h,g){return(f==0)?a:h*Math.pow(2,10*(f/g-1))+a},easeOutExpo:function(e,f,a,h,g){return(f==g)?a+h:h*(-Math.pow(2,-10*f/g)+1)+a},easeInOutExpo:function(e,f,a,h,g){if(f==0){return a}if(f==g){return a+h}if((f/=g/2)<1){return h/2*Math.pow(2,10*(f-1))+a}return h/2*(-Math.pow(2,-10*--f)+2)+a},easeInCirc:function(e,f,a,h,g){return -h*(Math.sqrt(1-(f/=g)*f)-1)+a},easeOutCirc:function(e,f,a,h,g){return h*Math.sqrt(1-(f=f/g-1)*f)+a},easeInOutCirc:function(e,f,a,h,g){if((f/=g/2)<1){return -h/2*(Math.sqrt(1-f*f)-1)+a}return h/2*(Math.sqrt(1-(f-=2)*f)+1)+a},easeInElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return -(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e},easeOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k)==1){return e+l}if(!j){j=k*0.3}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}return g*Math.pow(2,-10*h)*Math.sin((h*k-i)*(2*Math.PI)/j)+l+e},easeInOutElastic:function(f,h,e,l,k){var i=1.70158;var j=0;var g=l;if(h==0){return e}if((h/=k/2)==2){return e+l}if(!j){j=k*(0.3*1.5)}if(g<Math.abs(l)){g=l;var i=j/4}else{var i=j/(2*Math.PI)*Math.asin(l/g)}if(h<1){return -0.5*(g*Math.pow(2,10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j))+e}return g*Math.pow(2,-10*(h-=1))*Math.sin((h*k-i)*(2*Math.PI)/j)*0.5+l+e},easeInBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*(f/=h)*f*((g+1)*f-g)+a},easeOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}return i*((f=f/h-1)*f*((g+1)*f+g)+1)+a},easeInOutBack:function(e,f,a,i,h,g){if(g==undefined){g=1.70158}if((f/=h/2)<1){return i/2*(f*f*(((g*=(1.525))+1)*f-g))+a}return i/2*((f-=2)*f*(((g*=(1.525))+1)*f+g)+2)+a},easeInBounce:function(e,f,a,h,g){return h-jQuery.easing.easeOutBounce(e,g-f,0,h,g)+a},easeOutBounce:function(e,f,a,h,g){if((f/=g)<(1/2.75)){return h*(7.5625*f*f)+a}else{if(f<(2/2.75)){return h*(7.5625*(f-=(1.5/2.75))*f+0.75)+a}else{if(f<(2.5/2.75)){return h*(7.5625*(f-=(2.25/2.75))*f+0.9375)+a}else{return h*(7.5625*(f-=(2.625/2.75))*f+0.984375)+a}}}},easeInOutBounce:function(e,f,a,h,g){if(f<g/2){return jQuery.easing.easeInBounce(e,f*2,0,h,g)*0.5+a}return jQuery.easing.easeOutBounce(e,f*2-g,0,h,g)*0.5+h*0.5+a}}); -------------------------------------------------------------------------------- /app/static/js/move-top.js: -------------------------------------------------------------------------------- 1 | /* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */ 2 | (function($){$.fn.UItoTop=function(options){var defaults={text:'To Top',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1200,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append('<a href="#" id="'+settings.containerID+'">'+settings.text+'</a>');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('<span id="'+settings.containerHoverID+'"></span>').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});} 3 | if(sd>settings.min) 4 | $(containerIDhash).fadeIn(settings.inDelay);else 5 | $(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery); -------------------------------------------------------------------------------- /app/static/uploadFile/776671timg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/uploadFile/776671timg.jpg -------------------------------------------------------------------------------- /app/static/zipFile/776671timg.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wangxinleo/flask-background-remove/01542df9128444c45951802340698501b416ed3c/app/static/zipFile/776671timg.zip -------------------------------------------------------------------------------- /app/templates/401.html: -------------------------------------------------------------------------------- 1 | <!doctype html> 2 | <html> 3 | <head> 4 | <meta charset="utf-8"> 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"> 6 | <title>404 not found 7 | 8 | 9 | 10 | 303 | 304 | 305 |

306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 | 314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 | 330 |
331 |
332 |
401错误!
333 |
你不可以违规访问哦!
334 |
335 | 336 | 返回 337 | 338 |
339 | 340 |
341 | 342 | 362 | 363 | 364 | 365 | -------------------------------------------------------------------------------- /app/templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 404 not found 7 | 8 | 9 | 10 | 303 | 304 | 305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 | 314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 | 330 |
331 |
332 |
404错误!
333 |
找不到你要找的那页
334 |
335 | 336 | 返回 337 | 338 |
339 | 340 |
341 | 342 | 362 | 363 | 364 | 365 | -------------------------------------------------------------------------------- /app/templates/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 404 not found 7 | 8 | 9 | 10 | 303 | 304 | 305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 | 314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 | 330 |
331 |
332 |
500错误!
333 |
服务器出错啦!怎么办T T
334 |
335 | 336 | 返回 337 | 338 |
339 | 340 |
341 | 342 | 362 | 363 | 364 | 365 | -------------------------------------------------------------------------------- /app/templates/base.html: -------------------------------------------------------------------------------- 1 | 2 | UpGoRemove 3 | {% with messages = get_flashed_messages() %} 4 | {% if messages %} 5 |
    6 | {% for message in messages %} 7 |
  • {{ message }}
  • 8 | {% endfor %} 9 |
10 | {% endif %} 11 | {% endwith %} 12 | {% block body %}{% endblock %} -------------------------------------------------------------------------------- /app/templates/complete.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UpGoRemove 6 | 7 | {##} 8 | {##} 9 | 10 | {##} 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 | 20 |
21 | 27 |
28 |
29 |
30 |

您的图片已就绪,可点击下载 为保护您的图片隐私安全,当您离开本页后,将会立即删除您的所有图片信息。请妥善保存好您需要的图片。

31 | {#
#} 32 | {# yoJo博客 #} 33 | {# Gtihub #} 34 | {#
#} 35 | {#
#} 36 | {# 打包下载#} 37 | {#
#} 38 |
39 | 45 |
46 |
47 | 48 | 49 |
50 | 56 |
57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | {##} 67 | {##} 68 | 69 | 70 | 71 | 72 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /app/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UpGoRemove 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 | 18 |
19 | 26 |
27 |

欢迎你使用UpGoRemove

28 | 29 |


30 |
31 | {% if keyExist == 1 or keyExist == 2 %} 32 | 33 |

34 | {% if keyExist == 2 %} 35 | 密钥次数还剩: {{ count }} 次 36 | {% endif %} 37 | 添加密钥 38 |

39 | 40 | {% else %} 41 | 42 |

43 | {% if count == 0 %} 44 | 数据库中密钥不可用,请添加密钥 45 | {% endif %} 46 | 获得密钥? 47 | {# 使用免密钥体验版#} 48 |

49 | {% endif %} 50 |
51 |
52 | 53 |
54 |
55 |
56 |
57 |
58 |

UpGoRemove是什么?

59 | 60 |

Underpainting Remove

61 |

利用RemoveBG的人工智能算法帮您快速剔除所有有前景图片的背景,拥有堪比专业抠图大师的水平甚至超越人工处理图片的水准,整个过程仅需数秒的时间。

62 |

快速输出你需要的 底证件照!

63 |
64 |
65 |
66 |
67 | 我要上传 68 | 69 |
70 |
71 |
72 |
73 |

UpGoRemove更新日志

74 | 75 |
76 |
77 |
78 |

2019-09-17:

79 |
80 |
81 |

1.修复填入私钥无法跳转进服务页面的bug(感谢a675286277的issue)
2.优化跳转逻辑,删除体验按钮,更加适合私人搭建

82 |
83 |
84 |
85 |
86 |

2019-08-13:

87 |
88 |
89 |

添加sql文件,架设试用地址,更改readme中的描述

90 |
91 |
92 |
93 |
94 |

2019-08-09:

95 |
96 |
97 |

1.新增3种图片格式['jfif', 'pjpeg', 'pjp']
2.增加体验模式,免密钥使用全部功能

98 |
99 |
100 |
101 |
102 |

2019-08-08:

103 |
104 |
105 |

1.使用蓝图重构项目结构
2.上传演示文件
3.更新描述图片、依赖及项目说明
4.github发布v0.1试用版本

106 |
107 |
108 |
109 |
110 |

2019-08-07:

111 |
112 |
113 |

1.修改了项目名称,更名为UPGOMOVE
2.尝试引入mysql数据库以及尝试解决密钥限制问题

114 |
115 |
116 |
117 |
118 |

2019-08-06:

119 |
120 |
121 |

1.新增用户自备密钥模态窗口,用户可以使用自己的密钥使用本应用
2.保护用户隐私,退出图片下载页后会立即执行删除代理删除用户图片

122 |
123 |
124 |
125 |
126 |

2019-08-05:

127 |
128 |
129 |

修复多浏览器对图片链接只执行浏览不执行下载的问题

130 |
131 |
132 |
133 |
134 |

2019-08-03:

135 |
136 |
137 |

1.更新上载框架,优化图片处理逻辑
2.完成图片长廊模块,图像处理结束后会传递到图像长廊,方便用户自由下载已完成图片

138 |
139 |
140 |
141 |
142 |

2019-08-02:

143 |
144 |
145 |

1.图片上传后可以返回下载链接到本地
2.修改了上传控件,选用了bootstrap-fileinput

146 |
147 |
148 |
149 |
150 |

2019-08-01:

151 |
152 |
153 |

1.index首页布局完成
2.背景删除逻辑完成,已经可以成功输出无背景图片
3.修复依赖漏洞,提升应用安全性

154 |
155 |
156 |
157 |
158 |

2019-07-31:

159 |
160 |
161 |

新增依赖文件描述,方便一键导入依赖

162 |
163 |
164 |
165 |
166 |

2019-07-30:

167 |
168 |
169 |

完成文件上传模块

170 |
171 |
172 |
173 |
174 |
175 | 我要上传 176 | 177 |
178 |
179 | 180 |
181 | 187 |
188 | 189 | 190 | 222 | 223 | 231 | 232 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /app/templates/upError.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 404 Page 7 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 |
123 |

哇!没想到你到这里来了!

124 |

真是抱歉哦,你来到这里可能是因为以下其中原因:

125 |

1.你的图片可能没有前景哦~AI没办法识别出来你图片突出的主体呢~用其他的照片试试吧~

126 |

2.你的密钥的使用次数可能已达到上限咯~需要更换密钥啦!(密钥每个月只能使用50次)

127 |

3.你该不会随便输了一串字符当中密钥来唬我吧T T

128 |
129 | 133 |
134 |
135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | # 程序的配置 2 | import os 3 | 4 | basedir = os.path.abspath(os.path.dirname(__file__)) 5 | 6 | 7 | class Config: # 通用配置 8 | API_KEY = "" 9 | KEYEXIST = 0 10 | UPGOREMOVE_COUNT = 0 11 | UPLOAD_FOLDER = '%s/app/static/uploadFile' % os.getcwd() # 上传路径 12 | DOWNLOAD_FOLDER = '%s/app/static/downloadFile' % os.getcwd() # 下载路径 13 | ZIP_FOLDER = '%s/app/static/zipFile' % os.getcwd() # 压缩路径 14 | ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'jfif', 'pjpeg', 'pjp']) # 允许上传的文件类型 15 | SECRET_KEY = os.environ.get('SECRET_KEY') or 'I7\xcd\xadu_\xf2\x87\xe4\xca%)\xa5O)C' 16 | SQLALCHEMY_COMMIT_ON_TEARDOWN = True # 设置是否在每次连接结束后自动提交数据库中的变动 17 | SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://upGoremove:xxxxxxxxxxxxx@49.232.48.54:3306/upGoremove' 18 | FLASKY_MAIL_SUBJECT_PREFIX = '[UpGoRemove]' # 集成邮件功能,这个类似于主题概要的意思,但不是主题,只是在主题前面加个修饰前缀 19 | FLASKY_MAIL_SENDER = 'UpGoRemove Admin ' # 这个是发件人,而<>前面的内容,实际上就相当于昵称的作用 20 | FLASKY_ADMIN = os.environ.get('FLASKY_ADMIN') or 'wangxinleo' 21 | 22 | @staticmethod # 使类不需要实例化就可以被调用 23 | def init_app(app): 24 | pass 25 | 26 | 27 | class DevelopmentConfig(Config): 28 | DEBUG = True 29 | MAIL_SERVER = 'smtp.googlemail.com' 30 | MAIL_PORT = 587 31 | MAIL_USE_TLS = True 32 | MAIL_USERNAME = os.environ.get('MAIL_USERNAME') 33 | MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') 34 | # SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \ 35 | # 'sqllite:///' + os.path.join(basedir, 'data-dev.sqlite') 36 | 37 | 38 | class ProductionConfig(Config): 39 | DEBUG = True 40 | # SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ 41 | # 'sqlite:///' + os.path.join(basedir, 'data.sqlite') 42 | 43 | 44 | class TestingConfig(Config): 45 | TESTING = True 46 | # SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \ 47 | # 'sqlite:///' + os.path.join(basedir, 'data-test.sqlite') 48 | 49 | 50 | config = { 51 | 'development': DevelopmentConfig, 52 | 'testing': TestingConfig, 53 | 'production': ProductionConfig, 54 | 'default': DevelopmentConfig 55 | } 56 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 启动脚本 3 | import os 4 | from app import create_app 5 | 6 | app = create_app(os.getenv('FLASK_CONFIG') or 'default') 7 | 8 | if __name__ == '__main__': 9 | 10 | app.run() -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | certifi==2019.9.11 2 | chardet==3.0.4 3 | Click==7.0 4 | Flask==1.1.1 5 | Flask-SQLAlchemy==2.4.0 6 | idna==2.8 7 | itsdangerous==1.1.0 8 | Jinja2==2.11.3 9 | MarkupSafe==1.1.1 10 | Pillow==8.1.1 11 | PyMySQL==0.9.3 12 | removebg==0.3 13 | requests==2.22.0 14 | SQLAlchemy==1.3.8 15 | urllib3==1.25.3 16 | Werkzeug==0.15.6 17 | -------------------------------------------------------------------------------- /sql/upGoremove.sql: -------------------------------------------------------------------------------- 1 | # Host: 127.0.0.1 (Version: 5.5.15) 2 | # Date: 2019-09-18 10:07:43 3 | # Generator: MySQL-Front 5.3 (Build 4.269) 4 | 5 | /*!40101 SET NAMES utf8 */; 6 | 7 | # 8 | # Structure for table "ug_keybox" 9 | # 10 | 11 | DROP TABLE IF EXISTS `ug_keybox`; 12 | CREATE TABLE `ug_keybox` ( 13 | `id` int(12) NOT NULL AUTO_INCREMENT, 14 | `Rkey` varchar(32) NOT NULL, 15 | `num` int(4) NOT NULL, 16 | PRIMARY KEY (`id`) 17 | ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; 18 | 19 | # 20 | # Data for table "ug_keybox" 21 | # 22 | 23 | -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | import os,zipfile,base64 2 | 3 | 4 | 5 | UPLOAD_FOLDER = '%s\\uploadFile' %os.getcwd() # 上传路径 6 | DOWNLOAD_FOLDER = '%s\\downloadFile' %os.getcwd() # 下载路径 7 | ZIP_FOLDER = '%s\\zipFile' %os.getcwd() # 压缩路径 8 | ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg']) # 允许上传的文件类型 9 | 10 | 11 | def main(): 12 | encodestr = base64.b64encode('RDovcHJvamVjdC9weXRob24vYXV4c3lzX3d6L2FwcC9zdGF0aWMvTUlTRmlsZS/pu4Tmlofkuq4yMDE4MDQyM++8iDgyMTYwOe+8iS5qcGc='.encode('utf-8')) 13 | print(str(encodestr, 'utf-8')) 14 | print(str(base64.b64decode(encodestr), 'utf-8')) 15 | print(os.urandom(16)) 16 | 17 | 18 | if __name__ == '__main__': 19 | main() --------------------------------------------------------------------------------