Skip to content

Commit 59643d4

Browse files
base of urls
1 parent b8cccf7 commit 59643d4

File tree

10 files changed

+33
-847
lines changed

10 files changed

+33
-847
lines changed

src/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@
1111
from src.routers.sales_routes import router as sales_router
1212

1313
app = FastAPI(debug=True, reload=True)
14+
app.mount("/static", StaticFiles(directory="src/static"), name="static")
15+
1416

1517
origins = [
1618
"*"
1719
]
1820

1921
app.add_middleware(
2022
CORSMiddleware,
21-
allow_origins = origins
23+
allow_origins = origins
2224
)
2325

2426
BASE_PATH = Path(__file__).resolve().parent

src/templates/accounts/login.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h3 class="font-weight-bolder text-info text-gradient">
7272
</div>
7373
<div class="col-md-6">
7474
<div class="oblique position-absolute top-0 h-100 d-md-block d-none me-n8">
75-
<!-- <div class="oblique-image bg-cover position-absolute fixed-top ms-auto h-100 z-index-0 ms-n6" style="background-image:url('{{ config.ASSETS_ROOT }}/img/curved-images/curved6.jpg')"></div> -->
75+
<div class="oblique-image bg-cover position-absolute fixed-top ms-auto h-100 z-index-0 ms-n6" style="background-image:url("{{url_for('static', path='/img/curved-images/curved6.jpg') }}')"></div>
7676
</div>
7777
</div>
7878
</div>
@@ -86,4 +86,4 @@ <h3 class="font-weight-bolder text-info text-gradient">
8686
{% endblock content %}
8787

8888
<!-- Specific JS goes HERE -->
89-
{% block javascripts %}{% endblock javascripts %}
89+
{% block javascripts %}{% endblock javascripts %}

src/templates/accounts/register.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<main class="main-content mt-0">
2121

2222
<section class="min-vh-100 mb-8">
23-
<!-- <div class="page-header align-items-start min-vh-50 pt-5 pb-11 m-3 border-radius-lg" style="background-image: url('{{ config.ASSETS_ROOT }}/img/curved-images/curved14.jpg');"> -->
23+
<div class="page-header align-items-start min-vh-50 pt-5 pb-11 m-3 border-radius-lg" style="background-image: url('{{ url_for('static', path='img/curved-images/curved14.jpg') }}');">
2424
<span class="mask bg-gradient-dark opacity-6"></span>
2525
<div class="container">
2626
<div class="row justify-content-center">

src/templates/home/index.html

Lines changed: 0 additions & 808 deletions
Large diffs are not rendered by default.

src/templates/home/page-404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h3 class="font-weight-bolder text-danger text-gradient">
3838
</div>
3939
<div class="col-md-6">
4040
<div class="oblique position-absolute top-0 h-100 d-md-block d-none me-n8">
41-
<!-- <div class="oblique-image bg-cover position-absolute fixed-top ms-auto h-100 z-index-0 ms-n6" style="background-image:url('{{ config.ASSETS_ROOT }}/img/curved-images/curved6.jpg')"></div> -->
41+
<div class="oblique-image bg-cover position-absolute fixed-top ms-auto h-100 z-index-0 ms-n6" style="background-image:url('{{ url_for('static', path='img/curved-images/curved6.jpg') }}')"></div>
4242
</div>
4343
</div>
4444
</div>

src/templates/includes/navigation.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
</div>
1919
<ul class="navbar-nav justify-content-end">
2020
<li class="nav-item d-flex align-items-center">
21-
<a href="{{ url_for('authentication_blueprint.logout') }}" class="nav-link text-body font-weight-bold px-0">
2221
<i class="fa fa-user me-sm-1"></i>
2322
<span class="d-sm-inline d-none">LOGOUT</span>
24-
</a>
2523
</li>
2624
<li class="nav-item d-xl-none ps-3 d-flex align-items-center">
2725
<a href="javascript:;" class="nav-link text-body p-0" id="iconNavbarSidenav">
@@ -46,7 +44,7 @@
4644
<a class="dropdown-item border-radius-md" href="javascript:;">
4745
<div class="d-flex py-1">
4846
<div class="my-auto">
49-
<!-- <img src="{{ config.ASSETS_ROOT }}/img/team-2.jpg" class="avatar avatar-sm me-3 "> -->
47+
<img src="{{ url_for('static', path='img/team-2.jpg') }}" class="avatar avatar-sm me-3 ">
5048
</div>
5149
<div class="d-flex flex-column justify-content-center">
5250
<h6 class="text-sm font-weight-normal mb-1">
@@ -64,7 +62,7 @@ <h6 class="text-sm font-weight-normal mb-1">
6462
<a class="dropdown-item border-radius-md" href="javascript:;">
6563
<div class="d-flex py-1">
6664
<div class="my-auto">
67-
<!-- <img src="{{ config.ASSETS_ROOT }}/img/small-logos/logo-spotify.svg" class="avatar avatar-sm bg-gradient-dark me-3 "> -->
65+
<img src="{{ url_for('static', path='img/small-logos/logo-spotify.svg') }}" class="avatar avatar-sm bg-gradient-dark me-3 ">
6866
</div>
6967
<div class="d-flex flex-column justify-content-center">
7068
<h6 class="text-sm font-weight-normal mb-1">
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!-- Core JS Files -->
2-
<!-- <script src="{{ config.ASSETS_ROOT }}/js/core/popper.min.js"></script>
3-
<script src="{{ config.ASSETS_ROOT }}/js/core/bootstrap.min.js"></script>
2+
<script src="{{ url_for('static', path='js/core/popper.min.js') }}"></script>
3+
<script src="{{ url_for('static', path='js/core/bootstrap.min.js') }}"></script>
44

5-
<script src="{{ config.ASSETS_ROOT }}/js/plugins/perfect-scrollbar.min.js"></script>
6-
<script src="{{ config.ASSETS_ROOT }}/js/plugins/smooth-scrollbar.min.js"></script>
5+
<script src="{{ url_for('static', path='js/plugins/perfect-scrollbar.min.js') }}"></script>
6+
<script src="{{ url_for('static', path='js/plugins/smooth-scrollbar.min.js') }}"></script>
77

8-
<script src="{{ config.ASSETS_ROOT }}/js/dark-mode-handler.js"></script>
8+
<script src="{{ url_for('static', path='js/dark-mode-handler.js') }}"></script>
99

10-
-->
10+

src/templates/includes/sidebar.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="sidenav-header">
33
<i class="fas fa-times p-3 cursor-pointer text-secondary opacity-5 position-absolute end-0 top-0 d-none d-xl-none" aria-hidden="true" id="iconSidenav"></i>
44
<a class="navbar-brand m-0" href="/">
5-
<!-- <img src="{{ config.ASSETS_ROOT }}/img/logo-ct-dark.png" class="navbar-brand-img h-100" alt="main_logo"> -->
5+
<img src="{{ url_for('static', path='img/logo-ct-dark.png') }}" class="navbar-brand-img h-100" alt="main_logo">
66
<span class="ms-1 font-weight-bold">Soft UI Dashboard</span>
77
</a>
88
</div>
@@ -136,7 +136,6 @@ <h6 class="ps-4 ms-2 text-uppercase text-xs font-weight-bolder opacity-6">Accoun
136136
</a>
137137
</li>
138138
<li class="nav-item">
139-
<a class="nav-link " href="{{ url_for('authentication_blueprint.logout') }}">
140139
<div class="icon icon-shape icon-sm shadow border-radius-md bg-white text-center me-2 d-flex align-items-center justify-content-center">
141140
<svg width="12px" height="20px" viewBox="0 0 40 40" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
142141
<title>spaceship</title>
@@ -155,13 +154,12 @@ <h6 class="ps-4 ms-2 text-uppercase text-xs font-weight-bolder opacity-6">Accoun
155154
</svg>
156155
</div>
157156
<span class="nav-link-text ms-1">Logout</span>
158-
</a>
159157
</li>
160158
</ul>
161159
</div>
162160
<div class="sidenav-footer mx-3 ">
163161
<div class="card card-background shadow-none card-background-mask-secondary" id="sidenavCard">
164-
<!-- <div class="full-background" style="background-image: url('{{ config.ASSETS_ROOT }}/img/curved-images/white-curved.jpg')"></div> -->
162+
<div class="full-background" style="background-image: url( '{{ url_for('static', path='img/curved-images/white-curved.jpg') }}' )"></div>
165163
<div class="card-body text-start p-3 w-100">
166164
<div class="icon icon-shape icon-sm bg-white shadow text-center mb-3 d-flex align-items-center justify-content-center border-radius-md">
167165
<i class="ni ni-diamond text-dark text-gradient text-lg top-0" aria-hidden="true" id="sidenavCardIcon"></i>

src/templates/layouts/base-fullscreen.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
<head>
1919
<meta charset="utf-8" />
2020
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
21-
<!-- <link rel="apple-touch-icon" sizes="76x76" href="{{ config.ASSETS_ROOT }}/img/apple-icon.png"> -->
22-
<!-- <link rel="icon" type="image/png" href="{{ config.ASSETS_ROOT }}/img/favicon.png"> -->
21+
<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', path='img/apple-icon.png') }}">
22+
<link rel="icon" type="image/png" href="{{ url_for('static', path='img/favicon.png') }}">
2323

2424
<title>
2525
Soft UI Dashboard - {% block title %}{% endblock %} | AppSeed
@@ -28,14 +28,14 @@
2828
<!-- Fonts and icons -->
2929
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
3030
<!-- Nucleo Icons -->
31-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-icons.css" rel="stylesheet" /> -->
32-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-svg.css" rel="stylesheet" /> -->
31+
<link href="{{ url_for('static', path='css/nucleo-icons.css') }}" rel="stylesheet" />
32+
<link href="{{ url_for('static', path='css/nucleo-svg.css') }}" rel="stylesheet" />
3333
<!-- Font Awesome Icons -->
3434
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
35-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-svg.css" rel="stylesheet" /> -->
35+
<link href="{{ url_for('static', path='css/nucleo-svg.css') }}" rel="stylesheet" />
3636
<!-- CSS Files -->
37-
<!-- <link id="pagestyle" href="{{ config.ASSETS_ROOT }}/css/soft-ui-dashboard.css?v=1.0.6" rel="stylesheet" /> -->
38-
<!-- <link id="pagestyle_dark" href="{{ config.ASSETS_ROOT }}/css/dark-theme-core.css" rel="stylesheet" /> -->
37+
<link id="pagestyle" href="{{ url_for('static', path='css/soft-ui-dashboard.css?v=1.0.6') }}" rel="stylesheet" />
38+
<link id="pagestyle_dark" href="{{ url_for('static', path='css/dark-theme-core.css') }}" rel="stylesheet" />
3939

4040
<!-- Specific CSS goes HERE -->
4141
{% block stylesheets %}{% endblock stylesheets %}
@@ -63,7 +63,7 @@
6363
<!-- Github buttons -->
6464
<script async defer src="https://buttons.github.io/buttons.js"></script>
6565
<!-- Control Center for Soft Dashboard: parallax effects, scripts for the example pages etc -->
66-
<!-- <script src="{{ config.ASSETS_ROOT }}/js/soft-ui-dashboard.min.js?v=1.0.6"></script> -->
66+
<script src="{{ url_for('static', path='js/soft-ui-dashboard.min.js?v=1.0.6') }}"></script>
6767

6868
</body>
6969
</html>

src/templates/layouts/base.html

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
<head>
1919
<meta charset="utf-8" />
2020
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
21-
<!-- <link rel="apple-touch-icon" sizes="76x76" href="{{ config.ASSETS_ROOT }}/img/apple-icon.png"> -->
22-
<!-- <link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', filename='img/apple-icon.png') }}"> -->
23-
<!-- <link rel="icon" type="image/png" href="{{ config.ASSETS_ROOT }}/img/favicon.png"> -->
21+
<link rel="apple-touch-icon" sizes="76x76" href="{{ url_for('static', path='img/apple-icon.png') }}">
22+
<link rel="icon" type="image/png" href="{{ url_for('static', path='img/favicon.png') }}">
2423

2524
<title>
2625
Soft UI Dashboard - {% block title %}{% endblock %} | AppSeed
@@ -29,16 +28,14 @@
2928
<!-- Fonts and icons -->
3029
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet" />
3130
<!-- Nucleo Icons -->
32-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-icons.css" rel="stylesheet" /> -->
33-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-svg.css" rel="stylesheet" /> -->
31+
<link href="{{ url_for('static', path='css/nucleo-icons.css') }}" rel="stylesheet" />
32+
<link href="{{ url_for('static', path='css/nucleo-svg.css') }}" rel="stylesheet" />
3433
<!-- Font Awesome Icons -->
3534
<script src="https://kit.fontawesome.com/42d5adcbca.js" crossorigin="anonymous"></script>
36-
<!-- <link href="{{ config.ASSETS_ROOT }}/css/nucleo-svg.css" rel="stylesheet" /> -->
35+
<link href="{{ url_for('static', path='css/nucleo-svg.css') }}" rel="stylesheet" />
3736
<!-- CSS Files -->
38-
<!-- <link id="pagestyle" href="{{ config.ASSETS_ROOT }}/css/soft-ui-dashboard.css?v=1.0.6" rel="stylesheet" /> -->
39-
40-
<!-- <link id="pagestyle_dark" href="{{ config.ASSETS_ROOT }}/css/dark-theme-core.css" rel="stylesheet" /> -->
41-
37+
<link id="pagestyle" href="{{ url_for('static', path='css/soft-ui-dashboard.css?v=1.0.6') }}" rel="stylesheet" />
38+
<link id="pagestyle_dark" href="{{ url_for('static', path='css/dark-theme-core.css') }}" rel="stylesheet" />
4239
<!-- Specific CSS goes HERE -->
4340
{% block stylesheets %}{% endblock stylesheets %}
4441

@@ -56,7 +53,6 @@
5653
</main>
5754

5855
<!-- APP Configurator -->
59-
{% include "includes/fixed-plugin.html" %}
6056

6157
<!-- Core JS Files -->
6258
{% include "includes/scripts.html" %}
@@ -76,7 +72,7 @@
7672
<!-- Github buttons -->
7773
<script async defer src="https://buttons.github.io/buttons.js"></script>
7874
<!-- Control Center for Soft Dashboard: parallax effects, scripts for the example pages etc -->
79-
<!-- <script src="{{ config.ASSETS_ROOT }}/js/soft-ui-dashboard.min.js?v=1.0.6"></script> -->
75+
<script src="{{ url_for('static', path='js/soft-ui-dashboard.min.js?v=1.0.6') }}"></script>
8076

8177
</body>
8278
</html>

0 commit comments

Comments
 (0)