mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-30 15:10:40 +00:00
49
web/dashboard-contact.html
Normal file
49
web/dashboard-contact.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{{template "header" .}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard-marketdepth">Template Trading Platform v0.0</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/dashboard-marketdepth">Market Depth</a></li>
|
||||
<li><a href="/dashboard-ordermanagement">Order Management</a></li>
|
||||
<li><a href="/dashboard-reports">Reports</li>
|
||||
<li><a href="/dashboard-settings">Settings</a></li>
|
||||
<li class="active"><a href="/dashboard-contact">Contact<span class="sr-only">(current)</span></a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Contact Us</h1>
|
||||
|
||||
<h2 class="sub-header">Contact us @ https://github.com/thrasher-/gocryptotrader</h2>
|
||||
<div>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
89
web/dashboard-marketdepth.html
Normal file
89
web/dashboard-marketdepth.html
Normal file
@@ -0,0 +1,89 @@
|
||||
{{template "header" .}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard-marketdepth">Template Trading Platform v0.0</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li class="active"><a href="/dashboard-marketdepth">Market Depth<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/dashboard-ordermanagement">Order Management</a></li>
|
||||
<li><a href="/dashboard-reports">Reports</a></li>
|
||||
<li><a href="/dashboard-settings">Settings</a></li>
|
||||
<li><a href="/dashboard-contact">Contact</a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Current Market Depth & Analysis</h1>
|
||||
|
||||
<div class="row placeholders">
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Asset Allocation Pie Graph</h4>
|
||||
<span class="text-muted">Currencies owned and tracked.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Profit/Loss/Initial Pie Graph</h4>
|
||||
<span class="text-muted">Current portfolio health.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Exchanges Pie Graph</h4>
|
||||
<span class="text-muted">Based on current daily volume and analysis.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Market Capitalisation Pie Graph</h4>
|
||||
<span class="text-muted">In USD terms per deemed weighted currencies.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="sub-header">Tickers table</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Exchange</th>
|
||||
<th>LAST - BTC/USD</th>
|
||||
<th>LAST - LTC/USD</th>
|
||||
<th>LAST - BTC/LTC</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
70
web/dashboard-ordermanagement.html
Normal file
70
web/dashboard-ordermanagement.html
Normal file
@@ -0,0 +1,70 @@
|
||||
{{template "header" .}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard-marketdepth">Template Trading Platform v0.0</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/dashboard-marketdepth">Market Depth</a></li>
|
||||
<li class="active"><a href="/dashboard-ordermanagement">Order Management<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/dashboard-reports">Reports</a></li>
|
||||
<li><a href="/dashboard-settings">Settings</a></li>
|
||||
<li><a href="/dashboard-contact">Contact</a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Order Management</h1>
|
||||
|
||||
<p>
|
||||
<h3>Order Management Tools Go Here.</h3>
|
||||
</p>
|
||||
|
||||
<h2 class="sub-header">Prior Trades</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DATE/TIME</th>
|
||||
<th>EXCHANGE</th>
|
||||
<th>CURRENCIES USED</th>
|
||||
<th>PROFIT LOSS</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
89
web/dashboard-reports.html
Normal file
89
web/dashboard-reports.html
Normal file
@@ -0,0 +1,89 @@
|
||||
{{template "header" .}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard-marketdepth">Template Trading Platform v0.0</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/dashboard-marketdepth">Market Depth</a></li>
|
||||
<li><a href="/dashboard-ordermanagement">Order Management</a></li>
|
||||
<li class="active"><a href="/dashboard-reports">Reports<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/dashboard-settings">Settings</a></li>
|
||||
<li><a href="/dashboard-contact">Contact</a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Reports</h1>
|
||||
|
||||
<div class="row placeholders">
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Asset Allocation Pie Graph</h4>
|
||||
<span class="text-muted">Currencies owned and tracked.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Profit/Loss/Initial Pie Graph</h4>
|
||||
<span class="text-muted">Current portfolio health.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Exchanges Pie Graph</h4>
|
||||
<span class="text-muted">Based on current daily volume and analysis.</span>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 placeholder">
|
||||
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAHd3dwAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==" width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">
|
||||
<h4>Market Capitalisation Pie Graph</h4>
|
||||
<span class="text-muted">In USD terms per deemed weighted currencies.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="sub-header">Running Report. Subdivided in monthly/yearly/quarter</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Trade Execution date</th>
|
||||
<th>Trade Exchange</th>
|
||||
<th>Trade Type</th>
|
||||
<th>Initial Investment</th>
|
||||
<th>PROFIT/LOSS</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
<td>SOMETHING HERE</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
44
web/dashboard-settings.html
Normal file
44
web/dashboard-settings.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{{template "header" .}}
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/dashboard-marketdepth">Template Trading Platform v0.0</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li><a href="/logout">Logout</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-md-2 sidebar">
|
||||
<ul class="nav nav-sidebar">
|
||||
<li><a href="/dashboard-marketdepth">Market Depth</a></li>
|
||||
<li><a href="/dashboard-ordermanagement">Order Management</a></li>
|
||||
<li><a href="/dashboard-reports">Reports</a></li>
|
||||
<li class="active"><a href="/dashboard-settings">Settings<span class="sr-only">(current)</span></a></li>
|
||||
<li><a href="/dashboard-contact">Contact</a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<h1 class="page-header">Settings</h1>
|
||||
|
||||
<h2 class="sub-header">Settings Table</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "footer" .}}
|
||||
37
web/error.html
Normal file
37
web/error.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{{template "header" .}}
|
||||
|
||||
<div class="site-wrapper">
|
||||
|
||||
<div class="site-wrapper-inner">
|
||||
|
||||
<div class="cover-container">
|
||||
|
||||
<div class="masthead clearfix">
|
||||
<div class="inner">
|
||||
<nav>
|
||||
<ul class="nav masthead-nav">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inner cover">
|
||||
<h1 class="cover-heading">ERROR</h1>
|
||||
<p class="lead">The error {{.Error}} has occured.</p>
|
||||
<p class="lead">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mastfoot">
|
||||
<div class="inner">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{template "footer" .}}
|
||||
BIN
web/favicon.ico
Normal file
BIN
web/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
@@ -3,13 +3,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{.title}}</title>
|
||||
<!-- latest compiled and minified jquery -- >
|
||||
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script>
|
||||
<title>{{.Title}}</title>
|
||||
<!-- Latest compiled and minified CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
<!-- Latest compiled and minified jquery -->
|
||||
<script src="https://code.jquery.com/jquery-2.2.2.min.js" integrity="sha256-36cp2Co+/62rEAAYHLmRCPIych47CvdM+uTBJwSzWjI=" crossorigin="anonymous"></script>
|
||||
<!-- Latest compiled and minified JavaScript -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
<!-- Static internal stylesheets -->
|
||||
{{.StaticStylesheet}}
|
||||
<!-- Favourite Icon.ico -->
|
||||
<link rel="icon" href="web/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
{{end}}
|
||||
|
||||
@@ -1,5 +1,37 @@
|
||||
{{template "header" .}}
|
||||
|
||||
<p>Index</p>
|
||||
<div class="site-wrapper">
|
||||
|
||||
{{template "footer" .}}
|
||||
<div class="site-wrapper-inner">
|
||||
|
||||
<div class="cover-container">
|
||||
|
||||
<div class="masthead clearfix">
|
||||
<div class="inner">
|
||||
<nav>
|
||||
<ul class="nav masthead-nav">
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inner cover">
|
||||
<h1 class="cover-heading">Template Trading Platform v0.0</h1>
|
||||
<p class="lead">Login Test</p>
|
||||
<p class="lead">
|
||||
<a href="/login" class="btn btn-lg btn-default">Login Test Page</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="mastfoot">
|
||||
<div class="inner">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{template "footer" .}}
|
||||
|
||||
6
web/login.html
Normal file
6
web/login.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{template "header" .}}
|
||||
<p>
|
||||
This is the login page....
|
||||
</p>
|
||||
<a href="/dashboard-marketdepth" class="btn btn-lg btn-default">goto dashboard</a>
|
||||
{{template "footer" .}}
|
||||
163
web/static/css/cover.css
Normal file
163
web/static/css/cover.css
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
|
||||
/* Links */
|
||||
a,
|
||||
a:focus,
|
||||
a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Custom default button */
|
||||
.btn-default,
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
color: #333;
|
||||
text-shadow: none; /* Prevent inheritence from `body` */
|
||||
background-color: #fff;
|
||||
border: 1px solid #fff;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
background-color: #333;
|
||||
}
|
||||
body {
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
/* Extra markup and styles for table-esque vertical and horizontal centering */
|
||||
.site-wrapper {
|
||||
display: table;
|
||||
width: 100%;
|
||||
height: 100%; /* For at least Firefox */
|
||||
min-height: 100%;
|
||||
-webkit-box-shadow: inset 0 0 100px rgba(0,0,0,.5);
|
||||
box-shadow: inset 0 0 100px rgba(0,0,0,.5);
|
||||
}
|
||||
.site-wrapper-inner {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
}
|
||||
.cover-container {
|
||||
margin-right: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
/* Padding for spacing */
|
||||
.inner {
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Header
|
||||
*/
|
||||
.masthead-brand {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.masthead-nav > li {
|
||||
display: inline-block;
|
||||
}
|
||||
.masthead-nav > li + li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.masthead-nav > li > a {
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #fff; /* IE8 proofing */
|
||||
color: rgba(255,255,255,.75);
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
.masthead-nav > li > a:hover,
|
||||
.masthead-nav > li > a:focus {
|
||||
background-color: transparent;
|
||||
border-bottom-color: #a9a9a9;
|
||||
border-bottom-color: rgba(255,255,255,.25);
|
||||
}
|
||||
.masthead-nav > .active > a,
|
||||
.masthead-nav > .active > a:hover,
|
||||
.masthead-nav > .active > a:focus {
|
||||
color: #fff;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.masthead-brand {
|
||||
float: left;
|
||||
}
|
||||
.masthead-nav {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Cover
|
||||
*/
|
||||
|
||||
.cover {
|
||||
padding: 0 20px;
|
||||
}
|
||||
.cover .btn-lg {
|
||||
padding: 10px 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Footer
|
||||
*/
|
||||
|
||||
.mastfoot {
|
||||
color: #999; /* IE8 proofing */
|
||||
color: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Affix and center
|
||||
*/
|
||||
|
||||
@media (min-width: 768px) {
|
||||
/* Pull out the header and footer */
|
||||
.masthead {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
}
|
||||
.mastfoot {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
/* Start the vertical centering */
|
||||
.site-wrapper-inner {
|
||||
vertical-align: middle;
|
||||
}
|
||||
/* Handle the widths */
|
||||
.masthead,
|
||||
.mastfoot,
|
||||
.cover-container {
|
||||
width: 100%; /* Must be percentage or pixels for horizontal alignment */
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.masthead,
|
||||
.mastfoot,
|
||||
.cover-container {
|
||||
width: 700px;
|
||||
}
|
||||
}
|
||||
105
web/static/css/dashboard.css
Normal file
105
web/static/css/dashboard.css
Normal file
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Base structure
|
||||
*/
|
||||
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Global add-ons
|
||||
*/
|
||||
|
||||
.sub-header {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
/*
|
||||
* Top navigation
|
||||
* Hide default border to remove 1px line.
|
||||
*/
|
||||
.navbar-fixed-top {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sidebar
|
||||
*/
|
||||
|
||||
/* Hide for mobile, show later */
|
||||
.sidebar {
|
||||
display: none;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
top: 51px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1000;
|
||||
display: block;
|
||||
padding: 20px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
|
||||
background-color: #f5f5f5;
|
||||
border-right: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
/* Sidebar navigation */
|
||||
.nav-sidebar {
|
||||
margin-right: -21px; /* 20px padding + 1px border */
|
||||
margin-bottom: 20px;
|
||||
margin-left: -20px;
|
||||
}
|
||||
.nav-sidebar > li > a {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.nav-sidebar > .active > a,
|
||||
.nav-sidebar > .active > a:hover,
|
||||
.nav-sidebar > .active > a:focus {
|
||||
color: #fff;
|
||||
background-color: #428bca;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Main content
|
||||
*/
|
||||
|
||||
.main {
|
||||
padding: 20px;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.main {
|
||||
padding-right: 40px;
|
||||
padding-left: 40px;
|
||||
}
|
||||
}
|
||||
.main .page-header {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Placeholder dashboard ideas
|
||||
*/
|
||||
|
||||
.placeholders {
|
||||
margin-bottom: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
.placeholders h4 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.placeholder {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.placeholder img {
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
}
|
||||
83
webserver.go
83
webserver.go
@@ -2,11 +2,24 @@ package main
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type Page struct {
|
||||
Title string
|
||||
StaticStylesheet template.HTML
|
||||
Body []byte
|
||||
Error string
|
||||
}
|
||||
|
||||
const (
|
||||
coverCSS = `<link rel="stylesheet" href="web/static/css/cover.css">`
|
||||
dashboardCSS = `<link rel="stylesheet" href="web/static/css/dashboard.css">`
|
||||
)
|
||||
|
||||
func GetWebserverHost() string {
|
||||
host := SplitStrings(bot.config.Webserver.ListenAddress, ":")[0]
|
||||
if host == "" {
|
||||
@@ -22,6 +35,8 @@ func GetWebserverPort() int {
|
||||
}
|
||||
|
||||
func StartWebserver() error {
|
||||
fs := http.FileServer(http.Dir("web"))
|
||||
http.Handle("/web/", http.StripPrefix("/web/", fs))
|
||||
http.HandleFunc("/", index)
|
||||
var err error
|
||||
go func() {
|
||||
@@ -39,16 +54,62 @@ func ServerHTTPError(w http.ResponseWriter, err error) {
|
||||
func index(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
|
||||
tmpl, err := template.ParseFiles("web/index.html", "web/header.html", "web/footer.html")
|
||||
if err != nil {
|
||||
ServerHTTPError(w, err)
|
||||
return
|
||||
}
|
||||
|
||||
tmplValues := map[string]interface{}{"title": "Home"}
|
||||
tmpl.Execute(w, tmplValues)
|
||||
if err != nil {
|
||||
ServerHTTPError(w, err)
|
||||
return
|
||||
switch r.URL.Path {
|
||||
case "/":
|
||||
renderTemplate(w, "index.html", readPage("/index"))
|
||||
case "/login":
|
||||
renderTemplate(w, "login.html", readPage(r.URL.Path))
|
||||
case "/logout":
|
||||
renderTemplate(w, "index.html", readPage("/index"))
|
||||
case "/dashboard-marketdepth":
|
||||
renderTemplate(w, "dashboard-marketdepth.html", readPage(r.URL.Path))
|
||||
case "/dashboard-ordermanagement":
|
||||
renderTemplate(w, "dashboard-ordermanagement.html", readPage(r.URL.Path))
|
||||
case "/dashboard-contact":
|
||||
renderTemplate(w, "dashboard-contact.html", readPage(r.URL.Path))
|
||||
case "/dashboard-settings":
|
||||
renderTemplate(w, "dashboard-settings.html", readPage(r.URL.Path))
|
||||
case "/dashboard-reports":
|
||||
renderTemplate(w, "dashboard-reports.html", readPage(r.URL.Path))
|
||||
default:
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
renderTemplate(w, "error.html", readPage("/error"))
|
||||
}
|
||||
}
|
||||
|
||||
func readPage(client string) *Page {
|
||||
filename := "web/" + client[1:] + ".html"
|
||||
body, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Println("Webserver: Failed to open file -- ", err, "client string is: ", client)
|
||||
return nil
|
||||
}
|
||||
stylesheet := setStylesheet(client)
|
||||
return &Page{Title: client[1:], StaticStylesheet: stylesheet, Body: body}
|
||||
}
|
||||
|
||||
func setStylesheet(client string) template.HTML {
|
||||
if len(client) >= 10 {
|
||||
if client[:10] == "/dashboard" {
|
||||
return template.HTML(dashboardCSS)
|
||||
}
|
||||
}
|
||||
return template.HTML(coverCSS)
|
||||
}
|
||||
|
||||
func renderTemplate(w http.ResponseWriter, pageName string, p *Page) {
|
||||
tmpl, err := template.ParseFiles("web/index.html", "web/header.html",
|
||||
"web/footer.html", "web/dashboard-marketdepth.html", "web/login.html",
|
||||
"web/dashboard-ordermanagement.html", "web/dashboard-reports.html",
|
||||
"web/dashboard-settings.html", "web/dashboard-contact.html", "web/error.html")
|
||||
|
||||
if err != nil {
|
||||
log.Println("Webserver: Could not parsefile -- ", err)
|
||||
ServerHTTPError(w, err)
|
||||
return
|
||||
}
|
||||
err = tmpl.ExecuteTemplate(w, pageName, p)
|
||||
if err != nil {
|
||||
log.Println("Webserver: Could not execute template -- ", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user