Skip to content

Commit 269c5d2

Browse files
committed
home page design done.
1 parent 17347b3 commit 269c5d2

File tree

3 files changed

+119
-9
lines changed

3 files changed

+119
-9
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,87 @@
11
body {
2+
font-family: Source Sans Pro, Helvetica, Arial, sans-serif;
3+
font-size: 17px;
4+
}
5+
6+
.hero {
7+
background-color: #006dad;
8+
color: #fff;
9+
padding: 50px 0;
10+
text-align: center;
11+
line-height: 1.0em;
12+
font-size: 18px;
13+
}
14+
15+
.starter-template .content .hero h1 {
16+
font-size: 32px;
17+
font-weight: 400;
18+
line-height: 1.3em;
19+
text-align: center;
20+
max-width: 810px;
21+
padding: 0 20px 20px;
22+
margin-left: auto;
23+
margin-right: auto;
24+
}
25+
26+
.form-control {
27+
width: 550px;
28+
display: inline-block;
29+
border-radius: 2px;
30+
font-size: 20px;
31+
padding: 20px;
32+
}
33+
34+
.hero a {
35+
color: white;
36+
text-decoration: underline;
37+
}
38+
39+
.pypi-stats {
40+
padding: 10px 0;
41+
background-color: #ececec;
42+
border-bottom: 1px solid #d3d3d3;
43+
border-top: 1px solid #d3d3d3;
44+
text-align: center;
45+
}
46+
47+
.pypi-stats .stat {
48+
display: inline-block;
49+
min-width: 170px;
50+
padding: 10px;
51+
font-size: 16px;
52+
color: #003d61;
53+
}
54+
55+
.project-list h2 {
56+
font-size: 24px;
57+
font-weight: bold;
58+
color: #222;
59+
}
60+
61+
.project-list .subtitle {
62+
font-style: italic;
63+
}
64+
65+
.project-list .project {
66+
border: 1px solid #d3d3d3;
67+
padding: 10px;
68+
background-color: #ececec;
69+
min-height: 45px;
70+
margin-top: 15px;
71+
color: black;
72+
margin-bottom: 15px;
73+
}
74+
75+
.project-list .project .title {
76+
font-size: 20px;
77+
}
78+
79+
.project-list .project .title a {
80+
color: #006dad;
81+
}
82+
83+
.project-list .project .desc {
84+
font-style: italic;
85+
font-weight: normal;
86+
font-size: 16px;
287
}

src/ch8-adding_design/final/pypi_design/pypi/templates/home/index.pt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</h1>
1111

1212
<input type="text" class="form-control"
13-
placeholder=" Search projects">
13+
placeholder=" Search projects">
1414

1515
<br>
1616
<br>
@@ -28,6 +28,11 @@
2828
<div class="row">
2929
<div class="col-md-3"></div>
3030
<div class="col-md-6">
31+
32+
<h2>New releases</h2>
33+
<span class="subtitle">Hot off the press: the newest project releases</span>
34+
35+
3136
<div class="project" tal:repeat="p packages">
3237
<div class="title"><a href="">${p.name}</a> ${p.version}</div>
3338
<div class="desc">THE DESCRIPTION TBD</div>

src/ch8-adding_design/final/pypi_design/pypi/templates/shared/_layout.pt

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html metal:define-macro="layout">
22
<html lang="{{request.locale_name}}">
3-
<head>
3+
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,32 +13,52 @@
1313
<!-- Bootstrap core CSS -->
1414
<link href="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
1515

16+
<link rel="stylesheet"
17+
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic|Source+Code+Pro:500">
18+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css"
19+
integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
20+
21+
1622
<!-- Custom styles for this scaffold -->
1723
<link href="${request.static_url('pypi:static/css/theme.css')}" rel="stylesheet">
1824
<link href="${request.static_url('pypi:static/css/theme-overrides.css')}" rel="stylesheet">
1925
<link href="${request.static_url('pypi:static/css/site.css')}" rel="stylesheet">
2026

2127
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
2228
<!--[if lt IE 9]>
23-
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js" integrity="sha384-0s5Pv64cNZJieYFkXYOTId2HMA2Lfb6q2nAcx2n0RTLUnCAoTTsS0nKEO27XyKcY" crossorigin="anonymous"></script>
24-
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js" integrity="sha384-f1r2UzjsxZ9T4V1f2zBO/evUqSEOpeaUUZcMTz1Up63bl4ruYnFYeM+BxI4NhyI0" crossorigin="anonymous"></script>
29+
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"
30+
integrity="sha384-0s5Pv64cNZJieYFkXYOTId2HMA2Lfb6q2nAcx2n0RTLUnCAoTTsS0nKEO27XyKcY"
31+
crossorigin="anonymous"></script>
32+
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"
33+
integrity="sha384-f1r2UzjsxZ9T4V1f2zBO/evUqSEOpeaUUZcMTz1Up63bl4ruYnFYeM+BxI4NhyI0"
34+
crossorigin="anonymous"></script>
2535
<![endif]-->
2636

27-
<div metal:define-slot="additional-css" tal:omit-tag></div>
37+
<div metal:define-slot="additional-css" tal:omit-tag></div>
2838
</head>
2939

3040
<body>
3141

32-
<div class="starter-template">
33-
<div metal:define-slot="content">No content</div>
42+
<div id="page-content">
43+
44+
45+
46+
<div class="starter-template">
47+
<div metal:define-slot="content">No content</div>
48+
</div>
49+
3450
</div>
3551

3652

3753
<!-- Bootstrap core JavaScript
3854
================================================== -->
3955
<!-- Placed at the end of the document so the pages load faster -->
40-
<script src="//oss.maxcdn.com/libs/jquery/1.10.2/jquery.min.js" integrity="sha384-aBL3Lzi6c9LNDGvpHkZrrm3ZVsIwohDD7CDozL0pk8FwCrfmV7H9w8j3L7ikEv6h" crossorigin="anonymous"></script>
41-
<script src="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js" integrity="sha384-s1ITto93iSMDxlp/79qhWHi+LsIi9Gx6yL+cOKDuymvihkfol83TYbLbOw+W/wv4" crossorigin="anonymous"></script>
56+
<script src="//oss.maxcdn.com/libs/jquery/1.10.2/jquery.min.js"
57+
integrity="sha384-aBL3Lzi6c9LNDGvpHkZrrm3ZVsIwohDD7CDozL0pk8FwCrfmV7H9w8j3L7ikEv6h"
58+
crossorigin="anonymous"></script>
59+
<script src="//oss.maxcdn.com/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js"
60+
integrity="sha384-s1ITto93iSMDxlp/79qhWHi+LsIi9Gx6yL+cOKDuymvihkfol83TYbLbOw+W/wv4"
61+
crossorigin="anonymous"></script>
4262

4363
<div metal:define-slot="additional-js" tal:omit-tag></div>
4464
</body>

0 commit comments

Comments
 (0)