Flask-Web-Base
簡述:具有基本工程結(jié)構(gòu)和模板樣式的工程模板
工程模板地址:https://cichar.github.io/Flask-Web-Base/
工程說明:
---app
|-- main
|-- __init__.py
|-- views.py
|-- static
|-- loader
|-- loader.css
|-- pace
|-- pace.min.js
|-- pace_flash.css
|-- pjax
|-- application.js
|-- jquery.pjax.min.js
|-- cichar_css.css
|-- favicon.ico
|-- templates
|-- index
|-- index.html
|-- base.html
|-- content.html
|-- file.html
|-- footer.html
|-- header.html
|-- __init__.py
|-- pjax.py
---config.py
---manage.py
APP:
main為在APP中注冊的藍圖瞻惋,其中包括index路由
-
static為靜態(tài)文件夾:
- 其中l(wèi)oader為一份頁面加載元素動畫
- pace是開源的頁面加載進度條插件
- pjax是開源的用于局部頁面加載的插件
- cichar_css.css中定義了基本的導(dǎo)航欄和頁腳
- 同時摘取了bootstrap中的柵格式系統(tǒng)。
-
templates為模板文件夾,file.html為樣式及js文件引入模板乌庶,base.html定義了header,content,footer三部分的劃分并齐。
- 其中header從header.html中加載
- footer從footer.html中加載
- content從路由中傳遞的模板加載舷蒲,例如:
- index.html從content.html中繼承對content的頁面劃分,index路由的主體內(nèi)容在Index.html中完成混驰。
- conteng.html只提供基本的content區(qū)域劃分。
-
init.py:
- app的初始化
-
pjax.py:
- 提供pjax函數(shù)供路由使用
APP配置:config.py
對APP的配置
APP啟動入口:manage.py
啟動APP