Skip to content

Commit 0545dc2

Browse files
Add bootstrap styles
1 parent df0e3ec commit 0545dc2

File tree

9 files changed

+113
-104
lines changed

9 files changed

+113
-104
lines changed

static/bootstrap.min.css

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/main.css

+58-83
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,6 @@ body {
22
font-size: 90%;
33
}
44

5-
#main{
6-
background-color: #FFB6C1;
7-
margin: 0 15%;
8-
}
9-
10-
.blogposts, form , .welcome{
11-
margin: 0% 9%;
12-
padding: 2%;
13-
font-family: monospace;
14-
}
15-
16-
17-
header#blog-top h1,footer{
18-
padding: 3%;
19-
background-color: #DDDDDD;
20-
text-align: center;
21-
font-family: cursive;
22-
}
23-
24-
.submitlink{
25-
position: relative;
26-
left: 2.5%;
27-
28-
}
29-
30-
header#blog-top h1 a{
31-
background-color: transparent;
32-
outline: none;
33-
}
34-
35-
.loginlogout{
36-
position: relative;
37-
left: 80%
38-
}
39-
40-
article header p#post-title{
41-
font-size: 1.5em;
42-
font-weight: bolder;
43-
padding-bottom: 0%;
44-
margin-bottom: 0%;
45-
border-bottom: solid medium black;
46-
}
47-
48-
article header p#post-title a{
49-
margin-left: 0%;
50-
padding-left: 0%;
51-
}
52-
article header p#post-date{
53-
/*position: relative;*/
54-
/*left: 82%;*/
55-
color: #444444;
56-
margin-top: 0%;
57-
padding-top: 0%;
58-
float: right;
59-
}
60-
61-
article div.post-content pre{
62-
margin-top: 0%;
63-
padding-top: 0%;
64-
font-size: 1.3em;
65-
width:50%;
66-
word-wrap:break-word;
67-
}
68-
695
a{
706
text-decoration: none;
717
padding: 1%;
@@ -88,50 +24,89 @@ a:hover{
8824
background-color: #FF69B4;
8925
}
9026

91-
a.newpost{
92-
margin-left: 8%;
93-
background-color: transparent;
94-
text-decoration: underline;
95-
}
96-
9727
.error {
9828
color: red;
9929
}
10030

10131
label {
10232
display: block;
103-
font-size: 20px;
33+
font-size: 0.8em;
10434
}
10535

106-
label + label {
107-
margin-top: 20px;
36+
form{
37+
font-size: medium;
10838
}
10939

110-
input[type=text] {
40+
#main{
41+
background-color: #FFB6C1;
42+
margin: 0 0.8em;
11143
}
11244

113-
pre {
45+
46+
.blogposts , .welcome{
47+
margin: 0% 9%;
48+
padding: 2%;
49+
font-family: monospace;
11450
}
11551

116-
input[type=submit] {
52+
53+
.loginlogout{
54+
font-size: 1.5em;
55+
position: relative;
56+
left: 45vw
11757
}
11858

119-
.main-title {
59+
60+
.submitlink{
61+
font-size: 1.5em;
62+
position: relative;
63+
left: 2.5%;
64+
12065
}
12166

122-
.post + .post {
123-
margin-top: 15px;
67+
header#blog-top h1,footer{
68+
padding: 3%;
69+
background-color: #DDDDDD;
70+
text-align: center;
71+
font-family: cursive;
12472
}
12573

126-
.post-heading {
74+
header#blog-top h1 a{
75+
background-color: transparent;
76+
outline: none;
12777
}
12878

129-
.post-title {
79+
80+
div .post-header{
81+
border-bottom: solid medium black;
13082
}
13183

132-
.post-date {
84+
div p#post-title{
85+
font-size: 1.5em;
86+
font-weight: bolder;
87+
padding-bottom: 0%;
88+
margin-bottom: 0%;
89+
margin-left: 0%;
90+
padding-left: 0%;
91+
}
92+
div p#post-date{
93+
/*position: relative;*/
94+
/*left: 82%;*/
95+
color: #111111;
96+
margin-bottom: 0%;
97+
padding-bottom: 0%;
98+
}
13399

100+
div .post-content pre{
101+
margin-top: 0%;
102+
padding-top: 0%;
103+
font-size: 1.3em;
134104
}
135105

136-
.post-content {
106+
107+
a.newpost{
108+
margin-left: 8%;
109+
background-color: transparent;
110+
text-decoration: underline;
137111
}
112+

templates/base.html

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
<link rel="stylesheet" type="text/css" href="/static/bootstrap.min.css">
46
<link rel="stylesheet" type="text/css" href="/static/main.css">
57
<title>A Seesaw Blog!</title>
68
</head>
79
<body>
8-
<div id="main" >
10+
<div class="container">
11+
<div id="main" class="row">
912
<header id="blog-top">
1013
<h1><a href="/blog">Seesaw Blog</a> </h1>
1114
</header>
12-
<div class="loginlogout">
13-
<p>
15+
<div class="row loginlogout">
16+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
1417
{% if UserLogin != 'login' %}
1518
<a href="/blog">{{ UserLogin }}</a>
1619
{% else %}
1720
<a href="/blog/login">{{ UserLogin }}</a>
1821
{% endif %} | <a href="/blog/{{LogoutSignup}}">{{ LogoutSignup }}</a>
19-
</p>
22+
</div>
2023
</div>
2124
{% block content %}
2225
{% endblock %}
@@ -25,5 +28,6 @@ <h1><a href="/blog">Seesaw Blog</a> </h1>
2528
<h1><a href="https://www.facebook.com/seesawstory/">Follow Seesaw on Facebook</a> </h1>
2629
</footer>
2730
</div>
31+
</div>
2832
</body>
2933
</html>

templates/login.html

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{% extends "base.html" %}
22

33
{% block content %}
4-
5-
<form method="post" style="text-align: left;">
6-
<h2>Login</h2>
4+
<div class="row">
5+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
6+
<form method="post" >
7+
<h4>Login</h4>
78
<table>
89
<tr>
910
<td style="text-align:right">
@@ -31,4 +32,6 @@ <h2>Login</h2>
3132
<br>
3233
<input type="submit" name="submit">
3334
</form>
35+
</div>
36+
</div>
3437
{% endblock %}

templates/newpost.html

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% extends "base.html" %}
22

33
{% block content %}
4+
<div class="row">
5+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
46
<form method="post">
57
<h2>Add new post</h2>
68
<label>Subject<br>
@@ -15,5 +17,6 @@ <h2>Add new post</h2>
1517
<input type="submit" name="submit" value="Submit">
1618

1719
</form>
18-
20+
</div>
21+
</div>
1922
{% endblock %}

templates/permalink.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "base.html" %}
22

33
{% block content %}
4-
<div class="blogposts" >
4+
<div class="blogposts row" >
55
{{ blogposts.render() | safe }}
66
</div>
77
{% endblock %}

templates/post.html

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{% if blogposts %}
2-
<article>
3-
<header class="post-header">
4-
<p id="post-date">{{ blogposts.created.strftime("%b %d, %Y") }}</p>
2+
<div class="row post-header">
3+
<div class="col-lg-6 col-md-5 col-sm-6 col-xs-6 text-left">
54
<p id="post-title"> <a href="/blog/{{blogposts.key().id()}}">{{ blogposts.subject }}</a></p>
6-
7-
</header>
5+
</div>
6+
<div class="col-lg-6 col-md-5 col-sm-6 col-xs-6 text-right">
7+
<p id="post-date">{{ blogposts.created.strftime("%b %d, %Y") }}</p>
8+
</div>
9+
</div>
10+
<div class="row">
11+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
812
<div class="post-content">
913
<pre >{{ blogposts.content }}</pre>
1014
</div>
11-
</article>
15+
</div>
16+
</div>
1217
{% endif %}

templates/signup.html

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{% extends "base.html" %}
22

33
{% block content %}
4-
5-
<form method="post" style="text-align: left;">
6-
<h2>Signup</h2>
4+
<div class="row">
5+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
6+
<form method="post">
7+
<h4>Signup</h4>
78
<table>
89
<!--
910
<tr>
@@ -83,4 +84,6 @@ <h2>Signup</h2>
8384
<br>
8485
<input type="submit" name="submit">
8586
</form>
87+
</div>
88+
</div>
8689
{% endblock %}

templates/welcome.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
{% block content %}
44

5-
<div class="welcome">
6-
<h2>Welcome, {{ name }}!</h2>
5+
<div class="row welcome">
6+
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
7+
<h4>Welcome, {{ name }}!</h4>
8+
<a href="/blog">Go To Homepage</a>
9+
</div>
710
</div>
8-
911
{% endblock %}

0 commit comments

Comments
 (0)