Skip to content

Commit adfe7ab

Browse files
Antonio LunghiAntonio Lunghi
Antonio Lunghi
authored and
Antonio Lunghi
committed
Initial commit
0 parents  commit adfe7ab

File tree

7 files changed

+350
-0
lines changed

7 files changed

+350
-0
lines changed

README.md

Whitespace-only changes.

routes.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from flask import Flask, render_template
2+
3+
app = Flask(__name__)
4+
5+
6+
@app.route("/")
7+
def index():
8+
return render_template("index.html")
9+
10+
if __name__ == "__main__":
11+
app.run(debug=True)

static/css/main.css

+288
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
/*
2+
* General
3+
*/
4+
5+
html, body, h1 {
6+
margin: 0;
7+
padding: 0;
8+
}
9+
10+
body {
11+
background-color: #f4f4f4;
12+
font-family: 'Open Sans', sans-serif;
13+
}
14+
15+
h2 {
16+
17+
font-weight: 300;
18+
19+
letter-spacing: -1.2px;
20+
}
21+
22+
a {
23+
text-decoration: none;
24+
display: inline-block;
25+
}
26+
27+
.container {
28+
width: 1000px;
29+
margin: 0 auto;
30+
}
31+
32+
.pull-left {
33+
float: left;
34+
}
35+
36+
.pull-right {
37+
float: right;
38+
}
39+
40+
.clearfix {
41+
clear: both;
42+
}
43+
44+
.section-content {
45+
color: #3a3a3a;
46+
float: left;
47+
width: 340px;
48+
}
49+
50+
.section-device {
51+
float: right;
52+
position: relative;
53+
top: 65px;
54+
}
55+
56+
.section-device img {
57+
width: 600px;
58+
}
59+
60+
.btn-primary {
61+
background: #4285f4;
62+
border: 1px solid #1266f1;
63+
color: #ffffff;
64+
font-family: 'Open Sans', sans-serif;
65+
font-size: 13px;
66+
font-weight: 600;
67+
letter-spacing: 0.23px;
68+
padding: 12px 32px;
69+
text-align: center;
70+
text-decoration: none;
71+
text-transform: uppercase;
72+
}
73+
74+
.btn-secondary {
75+
background: #ffffff;
76+
border: 1px solid #e6e6e6;
77+
color: #3372df;
78+
font-family: 'Open Sans', sans-serif;
79+
font-size: 13px;
80+
font-weight: 600;
81+
letter-spacing: 0.23px;
82+
padding: 12px 32px;
83+
text-align: center;
84+
text-decoration: none;
85+
text-transform: uppercase;
86+
}
87+
88+
89+
90+
/*
91+
* Header
92+
*/
93+
94+
header {
95+
background-color: #fff;
96+
padding: 25px 0;
97+
}
98+
99+
.title {
100+
float: left;
101+
font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;
102+
font-size: 17px;
103+
letter-spacing: 2.5px;
104+
text-transform: uppercase;
105+
}
106+
107+
.title a, .title a:visited {
108+
color: #3a3a3a;
109+
}
110+
111+
.main-nav {
112+
float: right;
113+
}
114+
115+
.main-nav ul {
116+
list-style: none;
117+
margin: 0;
118+
padding: 0;
119+
}
120+
121+
.main-nav li {
122+
display: inline-block;
123+
font-family: 'Open Sans', sans-serif;
124+
font-size: 13px;
125+
font-weight: 600;
126+
text-transform: uppercase;
127+
}
128+
129+
.main-nav li a {
130+
color: #3a3a3a;
131+
}
132+
133+
134+
/*
135+
* Hero section
136+
*/
137+
138+
.hero-section .section-content {
139+
position: relative;
140+
top: 100px;
141+
}
142+
143+
.hero-section .section-content h2 {
144+
font-size: 40px;
145+
}
146+
147+
.hero-section .section-content .btn-primary {
148+
margin-right: 10px;
149+
}
150+
151+
152+
/*
153+
* Sign up
154+
*/
155+
156+
.signup-section .section-content h2 {
157+
font-size: 30px;
158+
}
159+
160+
.signup-section .section-content {
161+
position: relative;
162+
top: 53px;
163+
}
164+
165+
.form-group {
166+
margin-bottom: 20px;
167+
}
168+
169+
.form-group label {
170+
color: #3a3a3a;
171+
display: block;
172+
font-family: 'Open Sans', sans-serif;
173+
font-size: 15px;
174+
font-weight: 600;
175+
margin-bottom: 5px;
176+
}
177+
178+
.form-group input {
179+
border: none;
180+
border-bottom: 2px solid #4285f4;
181+
background-color: transparent;
182+
color: #3a3a3a;
183+
font-size: 18px;
184+
padding: 5px 0;
185+
width: 100%;
186+
}
187+
188+
.form-group input:focus {
189+
outline: 0;
190+
}
191+
192+
.form-group .error-message {
193+
margin: 10px 0;
194+
color: #db4437;
195+
}
196+
197+
.form-group .error-message + input {
198+
border-bottom: 2px solid #db4437;
199+
}
200+
201+
.error-message {
202+
color: #db4437;
203+
}
204+
205+
206+
/*
207+
* Sign up
208+
*/
209+
210+
.about-section h2 {
211+
font-size: 30px;
212+
margin-bottom: 0;
213+
}
214+
215+
.about-section p {
216+
font-size: 16px;
217+
}
218+
219+
220+
/*
221+
* Home
222+
*/
223+
224+
.section-tabs {
225+
float: left;
226+
width: 340px;
227+
}
228+
229+
.section-tabs .places {
230+
margin-top: 62px;
231+
padding-right: 20px;
232+
}
233+
234+
.section-tabs .places a,
235+
.section-tabs .places a:visited {
236+
color: #3372df;
237+
}
238+
239+
240+
.section-tabs article {
241+
margin-bottom: 20px;
242+
}
243+
244+
.section-tabs article .name {
245+
font-size: 18px;
246+
}
247+
248+
.section-tabs article .walking-distance {
249+
color: #6e6e6e;
250+
font-size: 13px;
251+
margin: 0;
252+
}
253+
254+
.section-map {
255+
float: right;
256+
width: 660px;
257+
}
258+
259+
.section-map .nav {
260+
padding: 20px 0;
261+
}
262+
263+
.section-map .form-group {
264+
display: inline;
265+
}
266+
267+
.section-map #address {
268+
font-size: 14px;
269+
margin-right: 10px;
270+
width: 87%;
271+
}
272+
273+
.section-map #submit {
274+
font-size: 10px;
275+
padding: 5px 15px;
276+
}
277+
278+
#map {
279+
height: 500px;
280+
}
281+
282+
.leaflet-popup-content h3 {
283+
margin: 0;
284+
}
285+
286+
.leaflet-popup-content p {
287+
margin: 10px 0 ;
288+
}

static/img/device.png

409 KB
Loading

templates/about.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{% extends "layout.html" %}
2+
3+
{% block content %}
4+
<main class="about-section">
5+
<div class="container">
6+
7+
<h2>About Learning Flask</h2>
8+
<p>In Learning Flask, you'll build an app that let's you find new places around you. With this app you can find places you like, and discover new points of interest wherever you are.</p>
9+
10+
</div>
11+
</main>
12+
{% endblock %}

templates/index.html

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{% extends "layout.html" %}
2+
3+
{% block content %}
4+
<main class="hero-section">
5+
<div class="container">
6+
7+
<div class="section-content">
8+
<h2>Discover places near you.</h2>
9+
<a href="#" class="btn-primary">Sign up</a>
10+
<a href="#" class="btn-secondary">Learn more</a>
11+
</div>
12+
13+
<div class="section-device">
14+
<img src="static/img/device.png">
15+
</div>
16+
17+
<div class="clearfix"></div>
18+
19+
</div>
20+
</main>
21+
{% endblock %}

templates/layout.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400,600' rel='stylesheet'>
5+
<link href="{{ url_for('static', filename='css/main.css') }}" rel="stylesheet">
6+
</head>
7+
<body>
8+
<header>
9+
<div class="container">
10+
<h1 class="title">Learning Flask</h1>
11+
</div>
12+
</header>
13+
14+
{% block content %}sys
15+
{% endblock %}
16+
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)