Skip to content

Commit

Permalink
[WebUI IntelliHome#7] assets updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dgikiller committed Jul 3, 2014
1 parent 05bc9f3 commit 43bc101
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 1 deletion.
13 changes: 13 additions & 0 deletions assets/templates/components/footer.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="container" id="footer">
<footer>
<ul class="list-inline">
<li class="pull-right"><a href="#top">Back to top</a></li>
<li><a href="https://github.com/IntelliHome/Google-at-Home" target="_new">GitHub page</a></li>
</ul>
<div class="row">
<div class="col-md-12">
<p>IntelliHome Web Interface</p>
</div>
</div>
</footer>
</div>
15 changes: 15 additions & 0 deletions assets/templates/components/head.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<head>
<meta charset="utf-8">
<title><%= title %></title>
%= content 'head'
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
%= asset "bootstrap.js"
%= asset "bootstrap.css"
%= asset "style.css"
<link rel="alternate" type="application/atom+xml" title="ATOM feed" href="/feed">
% if (defined stash 'tag_feed_url') {
<link rel="alternate" type="application/atom+xml" title="ATOM tag feed" href="<%= stash 'tag_feed_url' %>">
% }
<link href="http://fonts.googleapis.com/css?family=Skranji" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet" type="text/css">
</head>
57 changes: 57 additions & 0 deletions assets/templates/components/menu.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!-- Navbar
================================================== -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to config('name') => 'index' => (class => 'navbar-brand') %>
</div>
<div class="navbar-collapse collapse navbar-responsive-collapse" id="navbar-main">
<ul class="nav navbar-nav">
<li><%= link_to Home => 'index' %></li>

<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes">
Submenu<span class="caret" />
</a>
<ul class="dropdown-menu categories-menu" role="menu" aria-labelledby="themes">
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" id="themes" >
Another Menu<span class="caret" />
</a>
<ul class="dropdown-menu categories-menu" role="menu" aria-labelledby="themes" style=" height: auto;
max-height: 200px;">
<li>
<a href='#' > Item 1</a>
</li>
<li>
<a href='#' > Item 2</a>
</li>

<li>
<a href='#' > Item 3</a>
</li>
<li>
<a href='#' > Item 4</a>
</li>
</ul>
</li>
</ul>

<form class="navbar-form navbar-right" action="/search/" method="GET">
<div class="form-group">
<input type="text" name="term" placeholder="Search" class="form-control">
</div>
<button type="submit" class="btn btn-success">Search</button>
</form>
</div>
</div>
</div>
</nav>
10 changes: 10 additions & 0 deletions assets/templates/components/scripts.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
%= asset "web.js"
%= asset "app.js"
<!--[if lte IE 8]>
<script>
$(document).ready(function() {
// IE8 compatibility of pseudo-class
$('#iso .row').first().css({margin:'0'});
});
</script>
<![endif]-->
2 changes: 1 addition & 1 deletion assets/templates/index.html.ep
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
% layout 'default' ;
% title config('name'). ' - '.config('slogan').' ';
% title config('name');
% content_for head => begin
<meta name="keywords" content="Index" />
% end
Expand Down
1 change: 1 addition & 0 deletions assets/templates/layouts/default.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%= layout 'test'
22 changes: 22 additions & 0 deletions assets/templates/layouts/test.html.ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
%= include 'components/head'
<body>
%= include 'components/menu'
<div class="jumbotron header-logo">
<div class="container">
<div class="row">
<div class="col-md-12">
<%= link_to index => begin %>
<%= image '/img/bender.png' => (class => 'img-responsive col-md-4 pull-left') %>
<% end %>
<h3 class="col-md-8"> this is my best shot </h3>
</div>
</div>
</div>
</div>
%= content
%= include 'components/footer'
%= include 'components/scripts'
</body>
</html>
32 changes: 32 additions & 0 deletions bin/intellihome-webui
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env perl
use lib './lib';

use File::Basename 'dirname';

use File::Spec;

push @INC,
join( '/', File::Spec->splitdir( dirname(__FILE__) ), '..', 'lib' );
use IntelliHome::IntelliHomeNodeMaster;
use Getopt::Long;
use Carp::Always;

# Check if Mojolicious is installed;

die <<EOF unless eval 'use Mojolicious::Commands; 1';
It looks like you don't have the Mojolicious framework installed.
Please visit http://mojolicio.us for detailed installation instructions.
EOF

# Application

$ENV{MOJO_APP} ||= 'IntelliHome::IntelliHomeWebUI';

# Start commands

Mojolicious::Commands->start_app('IntelliHome::IntelliHomeWebUI');

0 comments on commit 43bc101

Please sign in to comment.