master
Kaitlyn Parkhurst 3 years ago
parent f667873cba
commit 58d8bd5df9
  1. 100
      Web/public/assets/css/dashboard.css
  2. 7
      Web/public/assets/js/dashboard.js
  3. 195
      Web/templates/layouts/standard.html.ep
  4. 10
      Web/templates/root/index.html.ep

@ -0,0 +1,100 @@
body {
font-size: .875rem;
}
.feather {
width: 16px;
height: 16px;
vertical-align: text-bottom;
}
/*
* Sidebar
*/
.sidebar {
position: fixed;
top: 0;
/* rtl:raw:
right: 0;
*/
bottom: 0;
/* rtl:remove */
left: 0;
z-index: 100; /* Behind the navbar */
padding: 48px 0 0; /* Height of navbar */
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}
@media (max-width: 767.98px) {
.sidebar {
top: 5rem;
}
}
.sidebar-sticky {
position: relative;
top: 0;
height: calc(100vh - 48px);
padding-top: .5rem;
overflow-x: hidden;
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
}
.sidebar .nav-link {
font-weight: 500;
color: #333;
}
.sidebar .nav-link .feather {
margin-right: 4px;
color: #727272;
}
.sidebar .nav-link.active {
color: #007bff;
}
.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
color: inherit;
}
.sidebar-heading {
font-size: .75rem;
text-transform: uppercase;
}
/*
* Navbar
*/
.navbar-brand {
padding-top: .75rem;
padding-bottom: .75rem;
font-size: 1rem;
background-color: rgba(0, 0, 0, .25);
box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}
.navbar .navbar-toggler {
top: .25rem;
right: 1rem;
}
.navbar .form-control {
padding: .75rem 1rem;
border-width: 0;
border-radius: 0;
}
.form-control-dark {
color: #fff;
background-color: rgba(255, 255, 255, .1);
border-color: rgba(255, 255, 255, .1);
}
.form-control-dark:focus {
border-color: transparent;
box-shadow: 0 0 0 3px rgba(255, 255, 255, .25);
}

@ -0,0 +1,7 @@
/* globals Chart:false, feather:false */
(function () {
'use strict'
feather.replace()
})()

@ -0,0 +1,195 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TodayChecklist<%= $title ? " - " . $title : "" %></title>
<!-- Bootstrap core CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x"
crossorigin="anonymous"
>
<!-- Favicons -->
<link rel="apple-touch-icon" href="/docs/5.0/assets/img/favicons/apple-touch-icon.png" sizes="180x180">
<link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-32x32.png" sizes="32x32" type="image/png">
<link rel="icon" href="/docs/5.0/assets/img/favicons/favicon-16x16.png" sizes="16x16" type="image/png">
<link rel="manifest" href="/docs/5.0/assets/img/favicons/manifest.json">
<link rel="mask-icon" href="/docs/5.0/assets/img/favicons/safari-pinned-tab.svg" color="#7952b3">
<link rel="icon" href="/docs/5.0/assets/img/favicons/favicon.ico">
<meta name="theme-color" content="#7952b3">
<!-- Custom styles for this template -->
<link href="/assets/css/dashboard.css" rel="stylesheet">
<!-- ChartJS -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@3.7.1/dist/chart.min.js"></script>
%#= include '_base/bootstrap-datepicker'
</head>
<body>
<header class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
<a class="navbar-brand col-md-3 col-lg-2 me-0 px-3" href="/">WeightGrapher</a>
<button class="navbar-toggler position-absolute d-md-none collapsed" type="button"
data-bs-toggle="collapse"
data-bs-target="#sidebarMenu"
aria-controls="sidebarMenu"
aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
% if ( $c->stash->{person} ) {
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap"><a class="nav-link" href="<%= $c->url_for('do_logout') %>">Sign out</a></li>
</ul>
% } else {
<ul class="navbar-nav px-3">
<li class="nav-item text-nowrap"><a class="nav-link" href="<%= $c->url_for('show_login') %>">Login</a></li>
</ul>
% }
</header>
<div class="container-fluid">
<div class="row">
<nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
<div class="position-sticky pt-3">
% if ( $c->stash->{person} ) {
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "dashboard" ? "active" : "" %>" aria-current="page" href="<%= $c->url_for( 'show_dashboard' ) %>">
<span data-feather="home"></span>
Dashboard
</a>
</li>
</ul>
% }
<ul class="nav flex-column">
% if ( ! $c->stash->{person} ) {
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "home" ? "active" : "" %>" aria-current="page" href="<%= $c->url_for( 'show_homepage' ) %>">
<span data-feather="home"></span>
Home
</a>
</li>
% }
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "about" ? "active" : "" %>" aria-current="page" href="<%= $c->url_for( 'show_about' ) %>">
<span data-feather="info"></span>
About
</a>
</li>
% if ( ! $c->stash->{person} ) {
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "pricing" ? "active" : "" %>" aria-current="page" href="<%= $c->url_for( 'show_pricing' ) %>">
<span data-feather="dollar-sign"></span>
Pricing
</a>
</li>
% }
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "contact" ? "active" : "" %>" aria-current="page" href="<%= $c->url_for( 'show_contact' ) %>">
<span data-feather="mail"></span>
Contact
</a>
</li>
</ul>
% if ( $c->stash->{person} ) {
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Create New</span>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "document" ? "active" : "" %>" href="<%= $c->url_for( 'show_documents' ) %>">
<span data-feather="file-plus"></span>
Document
</a>
</li>
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "template" ? "active" : "" %>" href="<%= $c->url_for( 'show_template_create' ) %>">
<span data-feather="file-text"></span>
Template
</a>
</li>
</ul>
% }
% if ( $c->stash->{person} ) {
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>My Info</span>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "subscription" ? "active" : "" %>" href="<%= $c->url_for( 'show_subscription' ) %>">
<span data-feather="credit-card"></span>
Subscription
</a>
</li>
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "profile" ? "active" : "" %>" href="<%= $c->url_for( 'show_profile' ) %>">
<span data-feather="user"></span>
Profile
</a>
</li>
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "password" ? "active" : "" %>" href="<%= $c->url_for( 'show_change_password' ) %>">
<span data-feather="lock"></span>
Change Password
</a>
</li>
</ul>
% } else {
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Your Account</span>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "login" ? "active" : "" %>" href="<%= $c->url_for( 'show_login' ) %>">
<span data-feather="user"></span>
Login
</a>
</li>
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "register" ? "active" : "" %>" href="<%= $c->url_for( 'show_register' ) %>">
<span data-feather="log-in"></span>
Register
</a>
</li>
<li class="nav-item">
<a class="nav-link <%= $sb_active eq "forgot" ? "active" : "" %>" href="<%= $c->url_for( 'show_forgot' ) %>">
<span data-feather="help-circle"></span>
Forgot Password
</a>
</li>
</ul>
% }
</div>
</nav>
<main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
<%= content %>
</main>
</div>
<div class="row" style="height: 15em"> <!-- Don't bottom out -->
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js"
integrity="sha384-uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE"
crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"
integrity="sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha"
crossorigin="anonymous">
</script>
<script src="/assets/js/dashboard.js"></script>
</body>
</html>

@ -0,0 +1,10 @@
% layout 'standard', title => 'Homepage', sb_active => 'home';
<header>
<div class="pricing-header mt-5 mb-3 p-3 pb-md-4 mx-auto text-center">
<h1 class="display-4 fw-normal mb-3">Welcome To WeightGrapher</h1>
<p class="fs-5 text-muted">
WeightGrapher gives you the insight to understand how your activity impacts your weight
</p>
</div>
</header>
Loading…
Cancel
Save