Skip to content

Commit 621e54a

Browse files
authored
Match Django
1 parent eb9a71f commit 621e54a

File tree

5 files changed

+67
-3
lines changed

5 files changed

+67
-3
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"customizations": {
1818
"codespaces": {
1919
"openFiles": [
20-
"app.py"
20+
"templates/index.html"
2121
]
2222
},
2323
"vscode": {

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from flask import Flask
1+
from flask import Flask, render_template
22

33
app = Flask(__name__)
44

55
@app.route("/")
66
def hello_world():
7-
return "<p>Hello, World!</p>"
7+
return render_template("index.html", title="Hello")

static/Octocat.png

2.03 MB
Loading

static/main.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
body {
2+
margin: 0;
3+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4+
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5+
sans-serif;
6+
-webkit-font-smoothing: antialiased;
7+
-moz-osx-font-smoothing: grayscale;
8+
}
9+
10+
code {
11+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12+
monospace;
13+
}
14+
15+
.App {
16+
text-align: center;
17+
}
18+
19+
.App-logo {
20+
height: 40vmin;
21+
pointer-events: none;
22+
}
23+
24+
.App-header {
25+
background-color: #282c34;
26+
min-height: 100vh;
27+
display: flex;
28+
flex-direction: column;
29+
align-items: center;
30+
justify-content: center;
31+
font-size: calc(10px + 2vmin);
32+
color: white;
33+
}
34+
35+
.App-link {
36+
color: #61dafb;
37+
}
38+
39+
.heart {
40+
color: #ff0000;
41+
}
42+
43+
.small {
44+
font-size: 0.75rem;
45+
}

templates/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<head>
2+
<title>{{ title }}</title>
3+
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
4+
5+
<body>
6+
<div class="App">
7+
<header class="App-header">
8+
<img src="{{ url_for('static', filename='Octocat.png') }}" class="App-logo" alt="logo" />
9+
<p>
10+
GitHub Codespaces <span class="heart">♥️</span> Flask
11+
</p>
12+
<p class="small">
13+
Edit <code>templates/index.html</code> and refresh to see your changes!
14+
</p>
15+
</header>
16+
</div>
17+
</body>
18+
19+
</html>

0 commit comments

Comments
 (0)