Skip to content

Commit

Permalink
feat(_Layout.cshtml, site.css): move external resources to local (#227)
Browse files Browse the repository at this point in the history
- Move Bootstrap, FontAwesome, jQuery, and Popper.js from CDN to local files in _Layout.cshtml for better control and offline access.
- Replace Google Fonts import with local font files in site.css to reduce external dependencies and improve load times.
  • Loading branch information
Jossec101 authored Jul 6, 2023
1 parent 598314c commit c6ae540
Show file tree
Hide file tree
Showing 29 changed files with 9,623 additions and 15 deletions.
16 changes: 10 additions & 6 deletions src/Pages/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
<base href="~/" />
<link href="css/site.css" rel="stylesheet" />
<link href="FundsManager.styles.css" rel="stylesheet" />
@*[email protected]*@
<link rel="stylesheet" href="css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn">
@*[email protected]*@
<link rel="stylesheet" href="css/all.css">
@*blazorise*@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css">
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />
<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
Expand Down Expand Up @@ -53,10 +55,12 @@
<a class="dismiss">🗙</a>
</div>
@*blazorise*@

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2" crossorigin="anonymous"></script>
@*[email protected]*@
<script src="js/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"></script>
@*[email protected]*@
<script src="js/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN"></script>
@*[email protected]*@
<script src="js/bootstrap.min.js" integrity="sha384-VHvPCCyXqtD5DqJeNxl2dtTyhF78xXNXdkwX1CZeRusQfRKp+tA7hAShOK/B/fQ2"></script>
@*blazorise*@

<script src="_framework/blazor.server.js"></script>
Expand Down
5 changes: 5 additions & 0 deletions src/wwwroot/css/all.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/wwwroot/css/bootstrap.min.css

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions src/wwwroot/css/bootstrap/bootstrap.min.css

This file was deleted.

1 change: 0 additions & 1 deletion src/wwwroot/css/bootstrap/bootstrap.min.css.map

This file was deleted.

36 changes: 35 additions & 1 deletion src/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
@import url('https://fonts.googleapis.com/css2?family=Baloo+Da+2:wght@400;500;600;700&display=swap');
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

@font-face {
font-family: 'Baloo 2';
src: url('static/Baloo2-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Baloo 2';
src: url('static/Baloo2-Medium.ttf') format('truetype');
font-weight: 500;
font-style: normal;
}

@font-face {
font-family: 'Baloo 2';
src: url('static/Baloo2-SemiBold.ttf') format('truetype');
font-weight: 600;
font-style: normal;
}

@font-face {
font-family: 'Baloo 2';
src: url('static/Baloo2-Bold.ttf') format('truetype');
font-weight: 700;
font-style: normal;
}

@font-face {
font-family: 'Baloo 2';
src: url('static/Baloo2-ExtraBold.ttf') format('truetype');
font-weight: 800;
font-style: normal;
}

html, body {
font-family: 'Baloo Da 2', cursive !important;
}
Expand Down
7 changes: 7 additions & 0 deletions src/wwwroot/js/bootstrap.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/wwwroot/js/jquery.slim.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/wwwroot/js/popper.min.js

Large diffs are not rendered by default.

Binary file added src/wwwroot/static/Baloo2-Bold.ttf
Binary file not shown.
Binary file added src/wwwroot/static/Baloo2-ExtraBold.ttf
Binary file not shown.
Binary file added src/wwwroot/static/Baloo2-Medium.ttf
Binary file not shown.
Binary file added src/wwwroot/static/Baloo2-Regular.ttf
Binary file not shown.
Binary file added src/wwwroot/static/Baloo2-SemiBold.ttf
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-brands-400.eot
Binary file not shown.
3,717 changes: 3,717 additions & 0 deletions src/wwwroot/webfonts/fa-brands-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/wwwroot/webfonts/fa-brands-400.ttf
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-brands-400.woff
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-brands-400.woff2
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-regular-400.eot
Binary file not shown.
801 changes: 801 additions & 0 deletions src/wwwroot/webfonts/fa-regular-400.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/wwwroot/webfonts/fa-regular-400.ttf
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-regular-400.woff
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-regular-400.woff2
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-solid-900.eot
Binary file not shown.
5,034 changes: 5,034 additions & 0 deletions src/wwwroot/webfonts/fa-solid-900.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/wwwroot/webfonts/fa-solid-900.ttf
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-solid-900.woff
Binary file not shown.
Binary file added src/wwwroot/webfonts/fa-solid-900.woff2
Binary file not shown.

0 comments on commit c6ae540

Please sign in to comment.