Skip to content

Commit b97e916

Browse files
authored
Merge pull request #34 from vuLgAr/bootstrap4
Bootstrap4
2 parents 235133b + 6dd4830 commit b97e916

File tree

5 files changed

+46
-45
lines changed

5 files changed

+46
-45
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Flask starter project for [Cookiecutter](https://github.com/audreyr/cookiecutter).
44

5-
[![Build Status](https://travis-ci.org/realpython/flask-skeleton.svg?branch=master)](https://travis-ci.org/realpython/flask-skeleton)
5+
[![Build Status](https://travis-ci.org/realpython/cookiecutter-flask-skeleton.svg?branch=master)](https://travis-ci.org/realpython/cookiecutter-flask-skeleton)
66

77
## Quick Start
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* custom css */
22

33
.site-content {
4-
padding-top: 75px;
4+
padding-top: 6rem;
55
}

{{cookiecutter.app_slug}}/project/client/templates/_base.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<meta name="author" content="">
1010
<meta name="viewport" content="width=device-width,initial-scale=1">
1111
<!-- styles -->
12-
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.1/yeti/bootstrap.min.css" rel="stylesheet" media="screen">
12+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
1313
<link href="{{url_for('static', filename='main.css')}}" rel="stylesheet" media="screen">
1414
{% block css %}{% endblock %}
1515
</head>
@@ -56,8 +56,9 @@
5656
{% include 'footer.html' %}
5757

5858
<!-- scripts -->
59-
<script src="//code.jquery.com/jquery-1.11.2.min.js" type="text/javascript"></script>
60-
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
59+
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
60+
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
61+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
6162
<script src="{{url_for('static', filename='main.js')}}" type="text/javascript"></script>
6263
{% block js %}{% endblock %}
6364

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<footer>
2-
<div class="container">
3-
<small>
4-
<span>© <a href="mailto:[email protected]">Real Python</a></span>
5-
</small>
6-
</div>
2+
<nav class="navbar fixed-bottom navbar-light bg-light">
3+
<div class="container">
4+
<small>
5+
<span>©
6+
<a href="mailto:[email protected]">Real Python</a>
7+
</span>
8+
</small>
9+
</div>
10+
</nav>
711
</footer>
Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1-
<header class="site-header">
2-
<!-- Navigation -->
3-
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
4-
<div class="container">
5-
<!-- Brand and toggle get grouped for better mobile display -->
6-
<div class="navbar-header">
7-
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
8-
<span class="sr-only">Toggle navigation</span>
9-
<span class="icon-bar"></span>
10-
<span class="icon-bar"></span>
11-
<span class="icon-bar"></span>
12-
</button>
13-
<a class="navbar-brand" href="{{ url_for('main.home') }}">{{ config.APP_NAME }}</a>
14-
</div>
15-
<!-- Collect the nav links, forms, and other content for toggling -->
16-
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
17-
<ul class="nav navbar-nav">
18-
<li><a href="{{ url_for('main.about') }}">About</a></li>
19-
{% if current_user.is_authenticated %}
20-
<li><a href="{{ url_for('user.members') }}">Members</a></li>
21-
{% endif %}
22-
</ul>
23-
<ul class="nav navbar-nav navbar-right">
24-
{% if current_user.is_authenticated %}
25-
<li><a href="{{ url_for('user.logout') }}">Logout</a></li>
26-
{% else %}
27-
<li><a href="{{ url_for('user.login') }}"><span class="glyphicon glyphicon-user"></span>&nbsp;Register/Login</a></li>
28-
{% endif %}
29-
</ul>
30-
</div>
31-
<!-- /.navbar-collapse -->
32-
</div>
33-
<!-- /.container -->
34-
</nav>
35-
</header>
1+
<!-- Navigation -->
2+
<nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark">
3+
<!-- Navbar Brand -->
4+
<a class="navbar-brand" href="{{ url_for('main.home') }}">{{ config.APP_NAME }}</a>
5+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
6+
<span class="navbar-toggler-icon"></span>
7+
</button>
8+
<div class="collapse navbar-collapse" id="navbarNav">
9+
<!-- Main Navigation -->
10+
<ul class="navbar-nav">
11+
<li class="nav-item active">
12+
<a class="nav-link" href="{{ url_for('main.about') }}">About <span class="sr-only">(current)</span></a>
13+
</li>
14+
{% if current_user.is_authenticated %}
15+
<li class="nav-item">
16+
<a class="nav-link" href="{{ url_for('user.members') }}">Members</a>
17+
</li>
18+
{% endif %}
19+
</ul>
20+
<!-- Login/Logout -->
21+
<ul class="navbar-nav ml-auto">
22+
<li class="nav-item">
23+
{% if current_user.is_authenticated %}
24+
<a class="nav-link" href="{{ url_for('user.logout') }}">Logout</a>
25+
{% else %}
26+
<a class="nav-link" href="{{ url_for('user.login') }}">Login</a>
27+
{% endif %}
28+
</li>
29+
</ul>
30+
</div>
31+
</nav>

0 commit comments

Comments
 (0)