Initial commit?

This commit is contained in:
misabiko 2020-07-14 21:00:52 -04:00
parent 1772ad6159
commit 49f396a2e0
36 changed files with 2876 additions and 16 deletions

17
.gitignore vendored
View File

@ -2,19 +2,4 @@ vendor/
node_modules/
npm-debug.log
# Laravel 4 specific
bootstrap/compiled.php
app/storage/
# Laravel 5 & Lumen specific
public/storage
public/hot
storage/*.key
.env.*.php
.env.php
.env
Homestead.yaml
Homestead.json
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/
.idea/

36
dist/App.js vendored Normal file
View File

@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express = require("express");
const logger = require("morgan");
const bodyParser = require("body-parser");
//import * as ExpressSession from 'express-session';
// Creates and configures an ExpressJS web server.
class App {
//Run configuration methods on the Express instance.
constructor() {
this.expressApp = express();
this.middleware();
this.routes();
this.expressApp.set('view engine', 'pug');
}
// Configure Express middleware.
middleware() {
this.expressApp.use(logger('dev'));
this.expressApp.use(bodyParser.json());
this.expressApp.use(bodyParser.urlencoded({ extended: false }));
/*this.expressApp.use(ExpressSession(
{
secret: 'My Secret Key',
resave: false,
saveUninitialized: true
}));*/
}
// Configure API endpoints.
routes() {
let router = express.Router();
router.get('/', (req, res) => res.render('index'));
this.expressApp.use('/', router);
}
}
exports.default = new App().expressApp;
//# sourceMappingURL=App.js.map

1
dist/App.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"App.js","sourceRoot":"","sources":["../src/App.ts"],"names":[],"mappings":";;AAAA,mCAAmC;AACnC,iCAAiC;AACjC,0CAA0C;AAC1C,oDAAoD;AAEpD,kDAAkD;AAClD,MAAM,GAAG;IAGR,oDAAoD;IACpD;QACC,IAAI,CAAC,UAAU,GAAG,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,gCAAgC;IACxB,UAAU;QACjB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAC,CAAC;QAC9D;;;;;kBAKO;IACR,CAAC;IAED,2BAA2B;IACnB,MAAM;QACb,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAE9B,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QAEnD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAClC,CAAC;CACD;AAED,kBAAe,IAAI,GAAG,EAAE,CAAC,UAAU,CAAC"}

44
dist/server.js vendored Normal file
View File

@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const http = require("http");
const debug = require("debug");
const App_1 = require("./App");
debug('ts-express:server');
const port = normalizePort(process.env.PORT || 3000);
App_1.default.set('port', port);
const server = http.createServer(App_1.default);
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
function normalizePort(val) {
let port = (typeof val === 'string') ? parseInt(val, 10) : val;
if (isNaN(port))
return val;
else if (port >= 0)
return port;
else
return false;
}
function onError(error) {
if (error.syscall !== 'listen')
throw error;
const bind = (typeof port === 'string') ? 'Pipe ' + port : 'Port ' + port;
switch (error.code) {
case 'EACCES':
console.error(`${bind} requires elevated privileges`);
process.exit(1);
break;
case 'EADDRINUSE':
console.error(`${bind} is already in use`);
process.exit(1);
break;
default:
throw error;
}
}
function onListening() {
let addr = server.address();
let bind = (typeof addr === 'string') ? `pipe ${addr}` : `port ${addr.port}`;
debug(`Listening on ${bind}`);
}
//# sourceMappingURL=server.js.map

1
dist/server.js.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,+BAA+B;AAE/B,+BAAwB;AAExB,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAE3B,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC;AACrD,aAAG,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAEtB,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,aAAG,CAAC,CAAC;AACtC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC5B,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAEpC,SAAS,aAAa,CAAC,GAAkB;IACxC,IAAI,IAAI,GAAW,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;IACvE,IAAI,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,GAAG,CAAC;SACvB,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;;QAC3B,OAAO,KAAK,CAAC;AACnB,CAAC;AAED,SAAS,OAAO,CAAC,KAA4B;IAC5C,IAAI,KAAK,CAAC,OAAO,KAAK,QAAQ;QAAE,MAAM,KAAK,CAAC;IAE5C,MAAM,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC;IAC1E,QAAO,KAAK,CAAC,IAAI,EAAE;QAClB,KAAK,QAAQ;YACZ,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,+BAA+B,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,MAAM;QACP,KAAK,YAAY;YAChB,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,oBAAoB,CAAC,CAAC;YAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,MAAM;QACP;YACC,MAAM,KAAK,CAAC;KACb;AACF,CAAC;AAED,SAAS,WAAW;IACnB,IAAI,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAC5B,IAAI,IAAI,GAAG,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;IAC7E,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;AAC/B,CAAC"}

1984
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

24
package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "interface-admin",
"version": "0.1.0",
"main": "dist/server.js",
"scripts": {
"start": "node dist/server.js",
"test": "mocha --reporter spec --require ts-node/register 'test/**/*.ts' --exit",
"build": "tsc",
"coverage": "nyc npm run test",
"coverage:coveralls": "nyc --reporter=lcov --reporter=text-lcov npm run test | coveralls",
"build-start": "npm run build && npm start"
},
"license": "ISC",
"dependencies": {
"@types/node": "^14.0.23",
"chai": "^4.2.0",
"express": "^4.17.1",
"mocha": "^8.0.1",
"morgan": "^1.10.0",
"pug": "^3.0.0",
"pug-bootstrap": "0.0.16",
"typescript": "^3.9.6"
}
}

41
src/App.ts Normal file
View File

@ -0,0 +1,41 @@
import * as express from 'express';
import * as logger from 'morgan';
import * as bodyParser from 'body-parser';
//import * as ExpressSession from 'express-session';
// Creates and configures an ExpressJS web server.
class App {
public expressApp : express.Application;
//Run configuration methods on the Express instance.
constructor() {
this.expressApp = express();
this.middleware();
this.routes();
this.expressApp.set('view engine', 'pug');
}
// Configure Express middleware.
private middleware() : void {
this.expressApp.use(logger('dev'));
this.expressApp.use(bodyParser.json());
this.expressApp.use(bodyParser.urlencoded({extended: false}));
/*this.expressApp.use(ExpressSession(
{
secret: 'My Secret Key',
resave: false,
saveUninitialized: true
}));*/
}
// Configure API endpoints.
private routes() : void {
let router = express.Router();
router.get('/', (req, res) => res.render('index'));
this.expressApp.use('/', router);
}
}
export default new App().expressApp;

45
src/server.ts Normal file
View File

@ -0,0 +1,45 @@
import * as http from 'http';
import * as debug from 'debug';
import App from './App';
debug('ts-express:server');
const port = normalizePort(process.env.PORT || 3000);
App.set('port', port);
const server = http.createServer(App);
server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
function normalizePort(val: number|string): number|string|boolean {
let port: number = (typeof val === 'string') ? parseInt(val, 10) : val;
if (isNaN(port)) return val;
else if (port >= 0) return port;
else return false;
}
function onError(error: NodeJS.ErrnoException): void {
if (error.syscall !== 'listen') throw error;
const bind = (typeof port === 'string') ? 'Pipe ' + port : 'Port ' + port;
switch(error.code) {
case 'EACCES':
console.error(`${bind} requires elevated privileges`);
process.exit(1);
break;
case 'EADDRINUSE':
console.error(`${bind} is already in use`);
process.exit(1);
break;
default:
throw error;
}
}
function onListening(): void {
let addr = server.address();
let bind = (typeof addr === 'string') ? `pipe ${addr}` : `port ${addr.port}`;
debug(`Listening on ${bind}`);
}

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"outDir": "dist",
"sourceMap": true
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}

1
views/index.pug Normal file
View File

@ -0,0 +1 @@
extends sb-admin-2/blank

33
views/sb-admin-2/404.pug Normal file
View File

@ -0,0 +1,33 @@
include pug_inc/mixins/mixins
doctype html
html(lang="en")
head
include pug_inc/meta
include pug_inc/link
include pug_inc/ga_tracking
title 404 test
body#page-top
#content-wrapper(class="d-flex flex-column")
.
<div class="container-fluid">
<!-- 404 Error Text -->
<div class="text-center">
<div class="error mx-auto" data-text="404">404</div>
<p class="lead text-gray-800 mb-5">Page Not Found</p>
<p class="text-gray-500 mb-0">It looks like you found a glitch in the matrix...</p>
<a href="index.html">&larr; Back to Dashboard</a>
</div>
</div>
//include pug_inc/footer
include pug_inc/scripts

View File

@ -0,0 +1,29 @@
//- blank.pug
include pug_inc/mixins/mixins
include pug_inc/mixins/cards
include pug_inc/mixins/buttons
include ../mixins
doctype html
html
head
include pug_inc/meta
include pug_inc/link
include pug_inc/ga_tracking
body#page-top
#wrapper
block sidebar
include pug_inc/sidebar
#content-wrapper(class="d-flex flex-column")
include pug_inc/content
include pug_inc/footer
+scroll_to_top_btn
include pug_inc/logout_modal
include pug_inc/scripts

View File

@ -0,0 +1,20 @@
include pug_inc/mixins/mixins
doctype html
html(lang="en")
head
include pug_inc/meta
include pug_inc/link
include pug_inc/ga_tracking
body(class="bg-gradient-primary")
.container
.row(class="justify-content-center")
div(class="col-xl-10 col-lg-12 col-md-9")
.card(class="o-hidden border-0 shadow-lg my-5")
.card-body(class="p-0")
+forgot_password_card_body
//include pug_inc/footer
include pug_inc/scripts

View File

@ -0,0 +1,21 @@
include pug_inc/mixins/mixins
doctype html
html(lang="en")
head
include pug_inc/meta
include pug_inc/link
include pug_inc/ga_tracking
body(class="bg-gradient-primary")
.container
.row(class="justify-content-center")
div(class="col-xl-10 col-lg-12 col-md-9")
.card(class="o-hidden border-0 shadow-lg my-5")
.card-body(class="p-0")
+login_card_body
//include pug_inc/footer
include pug_inc/scripts

View File

@ -0,0 +1,12 @@
div#content
include header/header
div.container-fluid
// Page Heading
.d-sm-flex.align-items-center.justify-content-between.mb-4
h1.h3.mb-0.text-gray-800 #{title}
//a.d-none.d-sm-inline-block.btn.btn-sm.btn-primary.shadow-sm(href='#')
// i.fas.fa-download.fa-sm.text-white-50
// | Generate Report
block content

View File

@ -0,0 +1,4 @@
footer.sticky-footer.bg-white
.container.my-auto
.copyright.text-center.my-auto
.span Some copyrights here and there, 2020

View File

@ -0,0 +1,15 @@
//- ga_tracking.pug
.
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-73146416-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push( arguments );
}
gtag( 'js', new Date() );
gtag( 'config', 'UA-73146416-6' );
</script>

View File

@ -0,0 +1,32 @@
li.nav-item.dropdown.no-arrow.mx-1
a#alertsDropdown.nav-link.dropdown-toggle(href='#' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
i.fas.fa-bell.fa-fw
// Counter - Alerts
span.badge.badge-danger.badge-counter 3+
// Dropdown - Alerts
.dropdown-list.dropdown-menu.dropdown-menu-right.shadow.animated--grow-in(aria-labelledby='alertsDropdown')
h6.dropdown-header
| Alerts Center
a.dropdown-item.d-flex.align-items-center(href='#')
.mr-3
.icon-circle.bg-primary
i.fas.fa-file-alt.text-white
div
.small.text-gray-500 December 12, 2019
span.font-weight-bold A new monthly report is ready to download!
a.dropdown-item.d-flex.align-items-center(href='#')
.mr-3
.icon-circle.bg-success
i.fas.fa-donate.text-white
div
.small.text-gray-500 December 7, 2019
| $290.29 has been deposited into your account!
a.dropdown-item.d-flex.align-items-center(href='#')
.mr-3
.icon-circle.bg-warning
i.fas.fa-exclamation-triangle.text-white
div
.small.text-gray-500 December 2, 2019
| Spending Alert: We&apos;ve noticed unusually high spending for your account.
a.dropdown-item.text-center.small.text-gray-500(href='#') Show All Alerts

View File

@ -0,0 +1,18 @@
nav.navbar.navbar-expand.navbar-light.bg-white.topbar.mb-4.static-top.shadow
// Sidebar Toggle (Topbar)
button#sidebarToggleTop.btn.btn-link.d-md-none.rounded-circle.mr-3
i.fa.fa-bars
//include search
// Topbar Navbar
ul.navbar-nav.ml-auto
//include search-mobile
//include alerts
//include messages
//.topbar-divider.d-none.d-sm-block
include user-info

View File

@ -0,0 +1,41 @@
li.nav-item.dropdown.no-arrow.mx-1
a#messagesDropdown.nav-link.dropdown-toggle(href='#' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
i.fas.fa-envelope.fa-fw
// Counter - Messages
span.badge.badge-danger.badge-counter 7
// Dropdown - Messages
.dropdown-list.dropdown-menu.dropdown-menu-right.shadow.animated--grow-in(aria-labelledby='messagesDropdown')
h6.dropdown-header
| Message Center
a.dropdown-item.d-flex.align-items-center(href='#')
.dropdown-list-image.mr-3
img.rounded-circle(src='https://source.unsplash.com/fn_BT9fwg_E/60x60' alt='')
.status-indicator.bg-success
.font-weight-bold
.text-truncate Hi there! I am wondering if you can help me with a problem I&apos;ve been having.
.small.text-gray-500 Emily Fowler &middot; 58m
a.dropdown-item.d-flex.align-items-center(href='#')
.dropdown-list-image.mr-3
img.rounded-circle(src='https://source.unsplash.com/AU4VPcFN4LE/60x60' alt='')
.status-indicator
div
.text-truncate
| I have the photos that you ordered last month, how would you like them sent to you?
.small.text-gray-500 Jae Chun &middot; 1d
a.dropdown-item.d-flex.align-items-center(href='#')
.dropdown-list-image.mr-3
img.rounded-circle(src='https://source.unsplash.com/CS2uCrpNzJY/60x60' alt='')
.status-indicator.bg-warning
div
.text-truncate
| Last month&apos;s report looks great, I am very happy with the progress so far, keep up the good work!
.small.text-gray-500 Morgan Alvarez &middot; 2d
a.dropdown-item.d-flex.align-items-center(href='#')
.dropdown-list-image.mr-3
img.rounded-circle(src='https://source.unsplash.com/Mv9hjnEUHR4/60x60' alt='')
.status-indicator.bg-success
div
.text-truncate
| Am I a good boy? The reason I ask is because someone told me that people say this to all dogs, even if they aren&apos;t good...
.small.text-gray-500 Chicken the Dog &middot; 2w
a.dropdown-item.text-center.small.text-gray-500(href='#') Read More Messages

View File

@ -0,0 +1,11 @@
li.nav-item.dropdown.no-arrow.d-sm-none
a#searchDropdown.nav-link.dropdown-toggle(href='#' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
i.fas.fa-search.fa-fw
// Dropdown - Messages
.dropdown-menu.dropdown-menu-right.p-3.shadow.animated--grow-in(aria-labelledby='searchDropdown')
form.form-inline.mr-auto.w-100.navbar-search
.input-group
input.form-control.bg-light.border-0.small(type='text' placeholder='Search for...' aria-label='Search' aria-describedby='basic-addon2')
.input-group-append
button.btn.btn-primary(type='button')
i.fas.fa-search.fa-sm

View File

@ -0,0 +1,6 @@
form.d-none.d-sm-inline-block.form-inline.mr-auto.ml-md-3.my-2.my-md-0.mw-100.navbar-search
.input-group
input.form-control.bg-light.border-0.small(type='text' placeholder='Search for...' aria-label='Search' aria-describedby='basic-addon2')
.input-group-append
button.btn.btn-primary(type='button')
i.fas.fa-search.fa-sm

View File

@ -0,0 +1,19 @@
li.nav-item.dropdown.no-arrow
a#userDropdown.nav-link.dropdown-toggle(href='#' role='button' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false')
span.mr-2.d-none.d-lg-inline.text-gray-600.small #{user.prenom} #{user.nom}
img.img-profile.rounded-circle(src='https://source.unsplash.com/QAB-WJcbgJk/60x60')
// Dropdown - User Information
.dropdown-menu.dropdown-menu-right.shadow.animated--grow-in(aria-labelledby='userDropdown')
//a.dropdown-item(href='#')
// i.fas.fa-user.fa-sm.fa-fw.mr-2.text-gray-400
// | Profile
//a.dropdown-item(href='#')
// i.fas.fa-cogs.fa-sm.fa-fw.mr-2.text-gray-400
// | Settings
//a.dropdown-item(href='#')
// i.fas.fa-list.fa-sm.fa-fw.mr-2.text-gray-400
// | Activity Log
//.dropdown-divider
a.dropdown-item(href='#' data-toggle='modal' data-target='#logoutModal')
i.fas.fa-sign-out-alt.fa-sm.fa-fw.mr-2.text-gray-400
| Logout

View File

@ -0,0 +1,12 @@
//- link.pug
<!-- Custom fonts for this template-->
link(href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css" rel="stylesheet" type="text/css")
link(href="//fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet")
<!-- Custom styles for this template-->
link(href="/css/sb-admin-2.min.css" rel="stylesheet")
script(src='http://code.jquery.com/jquery-3.5.1.slim.min.js' integrity='sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=' crossorigin='anonymous')
script(src='/lib/main.js')
link(href='/css/style.css' rel='stylesheet')

View File

@ -0,0 +1,14 @@
//- logout_modal.pug
div#logoutModal(class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true")
.modal-dialog(role="document")
.modal-content
.modal-header
h5#exampleModalLabel(class="modal-title") Ready to Leave?
bhtton.close(type="button" data-dismiss="modal" aria-label="Close")
span(aria-hidden="true") ×
.modal-body Select "Logout" below if you are ready to end your current session.
.modal-footer
button(class="btn btn-secondary" type="button" data-dismiss="modal") Cancel
a(class="btn btn-primary" href="login.html") Logout

View File

@ -0,0 +1,3 @@
//- menu.pug
include menu/utilities

View File

@ -0,0 +1,17 @@
//- utilities.pug
<li class="nav-item">
<a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities" aria-expanded="true" aria-controls="collapseUtilities">
<i class="fas fa-fw fa-wrench"></i>
<span>Utilities</span>
</a>
<div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Custom Utilities:</h6>
<a class="collapse-item" href="utilities-color.html">Colors</a>
<a class="collapse-item" href="utilities-border.html">Borders</a>
<a class="collapse-item" href="utilities-animation.html">Animations</a>
<a class="collapse-item" href="utilities-other.html">Other</a>
</div>
</div>
</li>

View File

@ -0,0 +1,6 @@
//- meta.pug
meta(charset="utf-8")
meta(http-equiv="X-UA-Compatible" content="IE=edge")
meta(name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no")
meta(name="description" content="")
meta(name="author" content="")

View File

@ -0,0 +1,23 @@
mixin a_primary(label, icon, href)
a.btn.btn-primary.btn-icon-split(href=href)&attributes(attributes)
span.icon.text-white-50
i.fas(class=icon)
span.text= label
mixin button_primary(label, icon, id)
button.btn.btn-primary.btn-icon-split(id!=id)&attributes(attributes)
span.icon.text-white-50
i.fas(class=icon)
span.text= label
mixin a_danger(label, icon, href)
a.btn.btn-danger.btn-icon-split(href=href)&attributes(attributes)
span.icon.text-white-50
i.fas(class=icon)
span.text= label
mixin button_danger(label, icon, id)
button.btn.btn-danger.btn-icon-split(id!=id)&attributes(attributes)
span.icon.text-white-50
i.fas(class=icon)
span.text= label

View File

@ -0,0 +1,38 @@
mixin basic_card(title)
.card.shadow.mb-4&attributes(attributes)
.card-header.py-3
h6.m-0.font-weight-bold.text-primary= title
.card-body
block
mixin card_collapsable(id, title, expanded=true, message='')
.card.shadow.mb-4&attributes(attributes)
// Card Header - Accordion
a.d-block.card-header.py-3(class=(expanded ? '' : 'collapsed') href='#collapseCard' + id data-toggle='collapse' role='button' aria-expanded=expanded aria-controls='collapseCard' + id)
h6.m-0.font-weight-bold.text-primary= title
span.float-right.text-primary= message
// Card Content - Collapse
.collapse(class=(expanded ? 'show' : ''), id='collapseCard' + id)
.card-body
block
mixin card_collapsable_message(id, title, expanded, message, bg_color, text_color)
.card.shadow.mb-4&attributes(attributes)
// Card Header - Accordion
a.d-block.card-header.py-3(class=(expanded ? '' : 'collapsed ') + bg_color href='#collapseCard' + id data-toggle='collapse' role='button' aria-expanded=expanded aria-controls='collapseCard' + id)
h6.m-0.font-weight-bold(class=text_color)= title
span.float-right(class=text_color)= message
// Card Content - Collapse
.collapse(class=(expanded ? 'show' : ''), id='collapseCard' + id)
.card-body
block
mixin border_card_primary(title, value, icon)
.card.border-left-primary.shadow.h-100.py-2&attributes(attributes)
.card-body
.row.no-gutters.align-items-center
.col.mr-2
.text-xs.font-weight-bold.text-primary.text-uppercase.mb-1= title
.h5.mb-0.font-weight-bold.text-gray-800= value
.col-auto
i.fas.fa-2x.text-gray-300(class=icon)

View File

@ -0,0 +1,264 @@
//- mixins.pug
mixin link_btn(btn_text, btn_href)
div(class="text-center")
a(class="small" href!= btn_href)= btn_text
mixin social_login_btn(btn_icon, btn_text, btn_href)
a(href!= btn_href class="btn btn-facebook btn-user btn-block")= btn_text
//- i.fab.fa-fw(class!= btn_icon)
mixin tick_box(text)
div(class="custom-control custom-checkbox small")
input(type="checkbox" class="custom-control-input" id="customCheck")
label(class="custom-control-label" for="customCheck")= text
mixin username_textbox(text_placeholder)
input(type="email" class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder!= text_placeholder name="username" required)
mixin password_textbox(text_placeholder)
input(type="password" class="form-control form-control-user" id="exampleInputPassword" placeholder!= text_placeholder name="password" required)
mixin login_btn(login_text, login_href)
a(href!= login_href class="btn btn-primary btn-user btn-block")= login_text
mixin login_submit_btn(login_text, login_href)
button.btn.btn-primary.btn-user.btn-block(href!= login_href type="submit")= login_text
mixin scroll_to_top_btn
a(class="scroll-to-top rounded" href="#page-top")
i(class="fas fa-angle-up")
mixin sidebar_divider_my0
<hr class="sidebar-divider my-0">
mixin sidebar_divider
<hr class="sidebar-divider">
mixin sidebar_brand(brand_text, brand_href)
a(class="sidebar-brand d-flex align-items-center justify-content-center" href!= brand_href)
.sidebar-brand-icon(class="rotate-n-15")
i(class="fas fa-laugh-wink")
div(class="sidebar-brand-text mx-3")= brand_text
mixin menu_1st_level(menu_text, menu_href, inside_text)
a(class="collapse-item" href="menu_href")= menu_text
mixin menu_2nd_level(menu_text, menu_href)
a(class="collapse-item" href="menu_href")= menu_text
mixin menu_label(menu_text, menu_icon, controls, targets)
a(class="nav-link collapsed" href="#" data-toggle="collapse" data-target!= targets aria-expanded="true" aria-controls!= controls)
i.fas.fa-fw(class!= menu_icon)
span= menu_text
mixin sidebar_heading(heading_text)
.sidebar-heading= heading_text
mixin collapse_header(header_text)
h6.collapse-header= header_text
mixin collapse_divider
.collapse-divider
mixin menu_pages1(expanded)
<li class="nav-item active">
<a class="nav-link" href="#" data-toggle="collapse" data-target="#collapsePages" aria-expanded="true" aria-controls="collapsePages">
<i class="fas fa-fw fa-folder"></i>
<span>Pages</span>
</a>
<div id="collapsePages" class="collapse show" aria-labelledby="headingPages" data-parent="#accordionSidebar">
<div class="bg-white py-2 collapse-inner rounded">
<h6 class="collapse-header">Login Screens:</h6>
<a class="collapse-item" href="login.html">Login</a>
<a class="collapse-item" href="register.html">Register</a>
<a class="collapse-item" href="forgot-password.html">Forgot Password</a>
<div class="collapse-divider"></div>
<h6 class="collapse-header">Other Pages:</h6>
<a class="collapse-item" href="404.html">404 Page</a>
<a class="collapse-item active" href="blank.html">Blank Page</a>
</div>
</div>
</li>
mixin helloworld
p helloworld
mixin menu_button(menu_text, menu_icon, menu_href)
li.nav-item
a(class="nav-link" href!= menu_href)
i.fas.fa-fw(class!= menu_icon)
span= menu_text
mixin sidebar_toggler
div(class="text-center d-none d-md-inline")
button#sidebarToggle(class="rounded-circle border-0")
mixin bottom_divider
<hr class="sidebar-divider d-none d-md-block">
mixin menu_components
li.nav-item
+menu_label("Components","fa-cog", "collapseTwo", "#collapseComponents")
div(id="collapseComponents" class="collapse" aria-labelledby="headingComponents" data-parent="#accordionSidebar")
div(class="bg-white py-2 collapse-inner rounded")
+collapse_header("Custom Components:")
a.collapse-item(href="buttons.html") Buttons
a.collapse-item(href="cards.html") Cards
mixin menu_pages(expanded)
li.nav-item
+menu_label("Pages","fa-folder", "collapseTwo", "#collapsePages")
div(id="collapsePages" class="collapse collapsed" aria-labelledby="headingPages" data-parent="#accordionSidebar")
div(class="bg-white py-2 collapse-inner rounded")
h6.collapse-header Login Screens:
a.collapse-item(href="login.html") Login
a.collapse-item(href="register.html") Register
a.collapse-item(href="forgot-password.html") Forgot Password
+collapse_divider
+collapse_header("Other Pages:")
a.collapse-item(href="404.html") 404 Page
a.collapse-item(href="blank.html") Blank Page
mixin menu_utilities
li.nav-item
+menu_label("Utilities","fa-wrench", "collapseTwo", "#collapseUtilities")
div(id="collapseUtilities" class="collapse collapsed" aria-labelledby="headingUtilities" data-parent="#accordionSidebar")
div(class="bg-white py-2 collapse-inner rounded")
h6.collapse-header Custom Utilities:
+menu_2nd_level("Colors", "utilities-color.html")
+menu_2nd_level("Borders", "utilities-border.html")
+menu_2nd_level("Animations", "utilities-animation.html")
+menu_2nd_level("Other", "utilities-other.html")
mixin forgot_password_card_body
//- forgot_password_card_body
.row
div(class="col-lg-6 d-none d-lg-block bg-password-image")
div(class="col-lg-6")
div(class="p-5")
div(class="text-center")
h1(class="h4 text-gray-900 mb-2") Forgot Your Password?
p.mb-4 We get it, stuff happens. Just enter your email address below and we'll send you a link to reset your password!
form.user
div(class="form-group")
input(type="email" class="form-control form-control-user" id="exampleInputEmail" aria-describedby="emailHelp" placeholder="Enter Email Address...")
a(href="login.html" class="btn btn-primary btn-user btn-block") Reset Password
</a>
<hr>
div(class="text-center")
a(class="small" href="register.html") Create an Account!
div(class="text-center")
a(class="small" href="login.html") Already have an account? Login!
mixin register_form_text(input_type ,id, placeholder)
input(type!= input_type class="form-control form-control-user" id!= id placeholder!= placeholder)
mixin register_login_card_body
//- register_login_card_body
.row
div(class="col-lg-5 d-none d-lg-block bg-register-image")
div(class="col-lg-7")
div(class="p-5")
div(class="text-center")
h1(class="h4 text-gray-900 mb-4") Create an Account!
form.user
div.row.form-group
div(class="col-sm-6 mb-3 mb-sm-0")
+register_form_text("text", "exampleFirstName", "First Name")
div(class="col-sm-6")
+register_form_text("text", "exampleFirstName", "Last Name")
div(class="form-group")
+register_form_text("email", "exampleInputEmail", "Email Address")
div(class="form-group row")
div(class="col-sm-6 mb-3 mb-sm-0")
+register_form_text("password", "exampleInputPassword", "Password")
div(class="col-sm-6")
+register_form_text("password", "exampleRepeatPassword", "Repeat Password")
+register_user_link
<hr>
+register_google_btn
+register_facebook_btn
<hr>
div(class="text-center")
+forgot_password_link
div(class="text-center")
+login_link
mixin login_card_body
//- login_card_body
.row
div(class="col-lg-6 d-none d-lg-block bg-login-image")
div(class="col-lg-6")
div(class="p-5")
div(class="text-center")
h1(class="h4 text-gray-900 mb-4") Welcome Back!
form.user(action="/", method="post")
.form-group
+username_textbox("Enter Email Address...")
.form-group
+password_textbox("Password")
//.form-group
// +tick_box("Remember Me")
+login_submit_btn("Login", "/")
//+social_login_btn("fa-google","Login with Google","index.html")
//+social_login_btn("fa-facebook-f","Login with Facebook","index.html")
//<hr>
//+link_btn("Forgot Password?","forgot-password.html")
//+link_btn("Create an Account!","register.html")
mixin register_google_btn
a(href="index.html" class="btn btn-google btn-user btn-block")
i(class="fab fa-google fa-fw")
p Register with Google
mixin register_facebook_btn
a(href="index.html" class="btn btn-facebook btn-user btn-block")
i(class="fab fa-facebook fa-fw")
p Register with Facebook
mixin register_user_link
a(href="login.html" class="btn btn-primary btn-user btn-block") Register Account
mixin forgot_password_link
a(href="forgot-password.html" class="small") Forgot Password?
mixin login_link
a(href="login.html" class="small") Already have an account? Login!
mixin menu_charts
+menu_button("Charts","fa-chart-area","charts.html")
mixin menu_tables
+menu_button("Tables","fa-table","tables.html")

View File

@ -0,0 +1,10 @@
//- scripts.pug
<!-- Bootstrap core JavaScript-->
script(src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js")
script(src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js")
<!-- Core plugin JavaScript-->
script(src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.4.1/jquery.easing.min.js")
<!-- Custom scripts for all pages-->
script(src="/js/sb-admin-2.min.js")

View File

@ -0,0 +1,15 @@
//- sidebar.pug
ul#accordionSidebar(class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion")
+sidebar_brand("SGA", "/")
+sidebar_divider_my0
block sidebar_menu_buttons
+sidebar_divider
+sidebar_toggler
</ul>

View File

@ -0,0 +1 @@
//- top-bar.pug

View File

@ -0,0 +1,20 @@
include pug_inc/mixins/mixins
doctype html
html(lang="en")
head
include pug_inc/meta
include pug_inc/link
include pug_inc/ga_tracking
body(class="bg-gradient-primary")
.container
.row(class="justify-content-center")
div(class="col-xl-10 col-lg-12 col-md-9")
.card(class="o-hidden border-0 shadow-lg my-5")
.card-body(class="p-0")
+register_login_card_body
include pug_inc/footer
include pug_inc/scripts