浏览代码

Add skeleton dir-structure, content to files.

Add:
	app.py
		-add boilerplate Flask source.

	bitshift/
		-directory for all python source.

	templates/(layout, index).html
		-add global layout template, and placeholder home page.

	static/css/main.sass
		-add placeholder main SASS file.
tags/v1.0
Severyn Kozak 10 年前
父节点
当前提交
9d06e0c442
共有 7 个文件被更改,包括 48 次插入0 次删除
  1. +3
    -0
      .gitignore
  2. +14
    -0
      app.py
  3. +0
    -0
     
  4. +2
    -0
      static/css/main.css
  5. +2
    -0
      static/css/main.sass
  6. +9
    -0
      templates/index.html
  7. +18
    -0
      templates/layout.html

+ 3
- 0
.gitignore 查看文件

@@ -1,3 +1,6 @@
.sass-cache

# github premade rules
*.py[cod]

# C extensions


+ 14
- 0
app.py 查看文件

@@ -0,0 +1,14 @@
from flask import Flask
from flask import render_template

app = Flask(__name__)

env = app.jinja_env
app.jinja_env.line_statement_prefix = "="

@app.route("/")
def index():
return render_template("index.html")

if __name__ == "__main__":
app.run()

+ 0
- 0
查看文件


+ 2
- 0
static/css/main.css 查看文件

@@ -0,0 +1,2 @@
p {
font-size: 1.5em; }

+ 2
- 0
static/css/main.sass 查看文件

@@ -0,0 +1,2 @@
p
font-size: 1.5em

+ 9
- 0
templates/index.html 查看文件

@@ -0,0 +1,9 @@
= extends "layout.html"

= block title
Home
= endblock

= block body
<p>Hello, world.</p>
= endblock

+ 18
- 0
templates/layout.html 查看文件

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>
= block title
= endblock
</title>

= block head
<link rel="stylesheet" type="text/css"
href={{ url_for('static', filename='css/main.css') }}>
= endblock
</head>
<body>
= block body
= endblock
</body>
</html>

正在加载...
取消
保存