Skip to content

Commit

Permalink
Serve bootstrap locally
Browse files Browse the repository at this point in the history
  • Loading branch information
lancew committed Jun 2, 2018
1 parent 6339a50 commit eb3ea8d
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 19 deletions.
4 changes: 4 additions & 0 deletions lib/Routes.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -254,5 +254,9 @@ sub routes() is export {
get -> 'js', *@path {
static 'static/js/', @path;
}

get -> 'css', *@path {
static 'static/css/', @path;
}
}
}
6 changes: 3 additions & 3 deletions service.p6
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class CSPolicy does Cro::Transform {
$response.append-header:
'Content-Security-Policy-Report-Only',
"default-src 'none';"
~ "font-src https://use.fontawesome.com;"
~ "font-src 'self';"
~ "img-src 'self' data:;"
~ "object-src 'none';"
~ "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.gstatic.com https://code.jquery.com https://cdnjs.cloudflare.com https://maxcdn.bootstrapcdn.com;"
~ "style-src 'self' 'unsafe-inline' https://maxcdn.bootstrapcdn.com https://www.gstatic.com;"
~ "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.gstatic.com https://code.jquery.com https://cdnjs.cloudflare.com;"
~ "style-src 'self' 'unsafe-inline' https://www.gstatic.com;"
~ "report-uri /csp-violation/;";
emit $response;
}
Expand Down
7 changes: 7 additions & 0 deletions static/css/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/bootstrap.min.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions static/js/bootstrap.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/js/bootstrap.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions views/index.tm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -137,6 +137,6 @@ The software is build with and as open source software, so you are able to read
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/login.tm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -101,6 +101,6 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/password-change.tm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -96,6 +96,6 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/password-reset.tm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -101,6 +101,6 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/register.tm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -123,6 +123,6 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/user/home.tm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -307,6 +307,6 @@ function myFunction() {
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions views/user/training-session/add_edit.tm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -219,7 +219,7 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>

4 changes: 2 additions & 2 deletions views/user/training-sessions.tm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
Expand Down Expand Up @@ -106,6 +106,6 @@
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
</body>
</html>

0 comments on commit eb3ea8d

Please sign in to comment.