Skip to content

Commit

Permalink
begun project
Browse files Browse the repository at this point in the history
  • Loading branch information
t8 committed May 2, 2018
1 parent 37c0d69 commit 1e681f7
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,4 @@ ENV/

# mypy
.mypy_cache/
.DS_Store
5 changes: 5 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/megaio-web-interface.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added app/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions app/index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from flask import Flask, render_template

app = Flask(__name__)

@app.route('/')
def home():
return render_template('dashboard.html')

if __name__ == '__main__':
app.run(debug=True)
15 changes: 15 additions & 0 deletions app/static/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.relay {
width: 100%;
height: 150px;
background-color: dodgerblue;
color: white;
border-radius: 10px;
transition: border linear 0.1s;
align-items: center;
display: flex;
}

.relay:hover {
/*box-shadow: 4px 4px 10px red;*/
border: 3px solid white;
}
104 changes: 104 additions & 0 deletions app/templates/dashboard.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.css">
<link rel="stylesheet" href="../static/css/style.css">
<title>MegaIO Dashboard</title>
</head>
<body>

<section class="hero is-light is-fullheight">
<!-- Hero head: will stick at the top -->
<div class="hero-head">
<nav class="navbar">
<div class="container">
<div class="navbar-brand">
<a class="navbar-item">
<b>Mega-IO Dashboard</b>
</a>
<span class="navbar-burger burger" data-target="navbarMenuHeroA">
<span></span>
<span></span>
<span></span>
</span>
</div>
<div id="navbarMenuHeroA" class="navbar-menu">
<div class="navbar-end">
<span class="navbar-item">
<a class="button is-dark is-inverted">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>Star it</span>
</a>
</span>
</div>
</div>
</div>
</nav>
</div>

<!-- Hero content: will be in the middle -->
<div class="hero-body">
<div class="container has-text-centered">
<h1 class="title" style="margin-bottom: 60px;">
Turn relays on and off:
</h1>
<div class="columns">
<div class="column"></div>
<div class="column relay">
<a id="relay-1">
<span style="color: white; text-align: center;">Relay 1</span>
</a>
</div>
<div class="column relay">
<a id="relay-2">
<span style="color: white; text-align: center;">Relay 2</span>
</a>
</div>
<div class="column relay">
<a id="relay-3">
<span style="color: white; text-align: center;">Relay 3</span>
</a>
</div>
<div class="column relay">
<a id="relay-4">
<span style="color: white; text-align: center;">Relay 4</span>
</a>
</div>
<div class="column"></div>
</div>
<div class="columns">
<div class="column"></div>
<div class="column relay">
<a id="relay-5">
<span style="color: white;">Relay 5</span>
</a>
</div>
<div class="column relay">
<a id="relay-6">
<span style="color: white;">Relay 6</span>
</a>
</div>
<div class="column relay">
<a id="relay-7">
<span style="color: white;">Relay 7</span>
</a>
</div>
<div class="column relay">
<a id="relay-8">
<span style="color: white;">Relay 8</span>
</a>
</div>
<div class="column"></div>
</div>
</div>
</div>
</section>

<script defer src="https://use.fontawesome.com/releases/v5.0.7/js/all.js"></script>

</body>
</html>

0 comments on commit 1e681f7

Please sign in to comment.