Browse Source

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 years ago
parent
commit
9d06e0c442
7 changed files with 48 additions and 0 deletions
  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 View File

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

# github premade rules
*.py[cod]

# C extensions


+ 14
- 0
app.py View File

@@ -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
View File


+ 2
- 0
static/css/main.css View File

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

+ 2
- 0
static/css/main.sass View File

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

+ 9
- 0
templates/index.html View File

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

= block title
Home
= endblock

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

+ 18
- 0
templates/layout.html View File

@@ -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>

Loading…
Cancel
Save