Permalink
Browse files

Improve the full screen display for isvhsopen.com

  • Loading branch information...
1 parent dbdadc6 commit 3eb97e326e41384b71bcc209e949c331e15097b6 @lukec lukec committed Dec 5, 2012
Showing with 64 additions and 5 deletions.
  1. +2 −1 vhsapi/lib/VHSAPI.pm
  2. +62 −4 vhsapi/views/data-full.tt
View
@@ -55,7 +55,8 @@ get '/s/:spacename/data/:dataname.js' => sub {
get '/s/:spacename/data/:dataname/fullpage' => sub {
my $space = vars->{space} or redirect '/';
- template 'data-full', { datapoint => $space->datapoint(params->{dataname}) };
+ template 'data-full', { datapoint => $space->datapoint(params->{dataname}) },
+ {layout => undef};
};
get '/s/:spacename/data/:dataname' => sub {
View
@@ -1,4 +1,62 @@
-<div class="row">
- <h1>The [% space.title %] [% datapoint.name %] is [% datapoint.value %].</h1>
- Last updated: <abbr class="timeago" title="[% datapoint.datetime.iso8601 %]">[% datapoint.datetime %]</abbr>
-</div>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-type" content="text/html; charset=[% settings.charset %]" />
+ <title>[% space.title %] [% datapoint.name %]</title>
+
+ <link rel="stylesheet" href="http://api.hackspace.ca/css/bootstrap.css" />
+ <link rel="stylesheet" href="http://api.hackspace.ca/css/style.css" />
+
+ <!-- Grab Google CDN's jQuery. fall back to local if necessary -->
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
+ <script type="text/javascript">/* <![CDATA[ */
+ !window.jQuery && document.write('<script type="text/javascript" src="http://api.hackspace.ca/javascripts/jquery.js"><\/script>')
+ /* ]]> */</script>
+ <script src="http://api.hackspace.ca/javascripts/jquery.timeago.js" type="text/javascript"></script>
+
+ <style type="text/css">
+ h1 {
+ font-size: 144pt;
+ }
+ #fact {
+ position: fixed;
+ left: 50%;
+ margin-left: -250px;
+ top: 50%;
+ margin-top: -50px;
+ }
+ #facttime {
+ margin-top: 80px;
+ }
+ .footer {
+position: fixed;
+bottom: 0px;
+ }
+
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <div id="fact">
+ <h1>[% datapoint.value %]</h1>
+ <div id="facttime" class="label pull-right">As of <abbr class="timeago" title="[% datapoint.datetime.iso8601 %]">[% datapoint.datetime %]</abbr></div>
+ </div>
+ </div>
+
+ <footer class="footer">
+ <div class="container">
+ <p class="pull-right">
+ <a href="http://api.hackspace.ca">VHS API</a>
+ </p>
+ </div>
+ </footer>
+
+ <script type="text/javascript">
+ jQuery(function() {
+ jQuery("abbr.timeago").timeago();
+ });
+ </script>
+
+ </body>
+</html>

0 comments on commit 3eb97e3

Please sign in to comment.