Skip to content

Commit

Permalink
Some changes to the views.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Apr 8, 2012
1 parent deca994 commit a374ebb
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 144 deletions.
164 changes: 41 additions & 123 deletions Shrtr/views/index.tt
@@ -1,145 +1,63 @@

<!--
Credit goes to the Ruby on Rails team for this page
has been heavily based on the default Rails page that is
built with a scaffolded application.

Thanks a lot to them for their work.

See Ruby on Rails if you want a kickass framework in Ruby:
http://www.rubyonrails.org/
-->

<div id="page">
<div id="sidebar">
<ul id="sidebar-items">
<li>
<h3>Join the community</h3>
<ul class="links">

<li><a href="http://perldancer.org/">PerlDancer</a></li>
<li><a href="http://twitter.com/PerlDancer/">Official Twitter</a></li>
<li><a href="http://github.com/sukria/Dancer/">GitHub Community</a></li>
</ul>
</li>
<div id="sidebar">
<ul id="sidebar-items">
<li>
<h3>Shortcuts</h3>
<ul class="links">
<li><a href="/register">Register as a user</a></li>
<li><a href="/login">Login</a></li>
<li><a href="/submit">Submit a URL</a></li>
</ul>
</li>

<li>
<h3>Browse the documentation</h3>

<ul class="links">
<li><a
href="http://search.cpan.org/dist/Dancer/lib/Dancer/Introduction.pod">Introduction</a></li>
<li><a href="http://search.cpan.org/dist/Dancer/lib/Dancer/Cookbook.pod">Cookbook</a></li>
<li><a href="http://search.cpan.org/dist/Dancer/lib/Dancer/Deployment.pod">Deployment Guide</a></li>
<li><a
href="http://search.cpan.org/dist/Dancer/lib/Dancer/Tutorial.pod"
title="a tutorial to build a small blog engine with Dancer">Tutorial</a></li>
</ul>
</li>

<li>
<h3>Your application's environment</h3>

<ul>
<li>Location: <code>/home/dave/git/shrtr/Shrtr</code></li>
<li>Template engine: <code><% settings.template %></code></li>
<li>Logger: <code><% settings.logger %></code></li>
<li>Environment: <code><% settings.environment %></code></li>
</ul>

</li>
<h3>More Details</h3>
<ul class="links">
<li><a href="/about">About Shrtr</a></li>
<li><a href="/about/team">About the Team</a></li>
</ul>
</li>

<li>
<h3>Blogroll</h3>

</div>

<div id="content">
<div id="header">
<h1>Perl is dancing</h1>
<h2>You&rsquo;ve joined the dance floor!</h2>
</div>
<ul class="links">
<li><a href="">A blog</a></li>
<li><a href="">Another blog</a></li>
</ul>
</li>
</ul>
</div>

<div id="content">
<div id="header">
<h1>Shrtr</h1>
<h2>URL shortening without the Googlejuice</h2>
</div>

<div id="getting-started">
<h1>Getting started</h1>
<h2>Here&rsquo;s how to get dancing:</h2>
<h2>Here&rsquo;s how to get started:</h2>

<h3><a href="#" id="about_env_link">About your application's environment</a></h3>

<div id="about-content" style="display: none;">
<table>
<tbody>
<tr>
<td>Perl version</td>
<td><tt><% perl_version %></tt></td>
</tr>
<tr>
<td>Dancer version</td>
<td><tt><% dancer_version %></tt></td>
</tr>
<tr>
<td>Backend</td>
<td><tt><% settings.apphandler %></tt></td>
</tr>
<tr>
<td>Appdir</td>
<td><tt>/home/dave/git/shrtr/Shrtr</tt></td>
</tr>
<tr>
<td>Template engine</td>
<td><tt><% settings.template %></tt></td>
</tr>
<tr>
<td>Logger engine</td>
<td><tt><% settings.logger %></tt></td>
</tr>
<tr>
<td>Running environment</td>
<td><tt><% settings.environment %></tt></td>
</tr>
</tbody>
</table>
</div>

<script type="text/javascript">
$('#about_env_link').click(function() {
$('#about-content').slideToggle('fast', function() {
// ok
});
return( false );
});
</script>


<ol>
<li>
<h2>Tune your application</h2>
<h2>Register as a user</h2>

<p>
Your application is configured via a global configuration file,
<tt>config.yml</tt> and an "environment" configuration file,
<tt>environments/development.yml</tt>. Edit those files if you
want to change the settings of your application.
</p>
<p>Only registered users can use Shrtr's URL shortening
service. You can <a href="/register">register here</a>.</p>
</li>

<li>
<h2>Add your own routes</h2>
<h2>Submit URLs</h2>

<p>
The default route that displays this page can be removed,
it's just here to help you get started. The template used to
generate this content is located in
<code>views/index.tt</code>.
You can add some routes to <tt>lib/Shrtr.pm</tt>.
</p>
<p>Once you're registered and logged in, you can
<a href="/submit">submit a URL</a>.</p>
</li>

<li>
<h2>Enjoy web development again</h2>
<h2>Profit!</h2>

<p>
Once you've made your changes, restart your standalone server
(bin/app.pl) and you're ready to test your web application.
</p>
<p>Or, more accurately, stop other people profiting from
you linking to them.</p>
</li>

</ol>
Expand Down
34 changes: 13 additions & 21 deletions Shrtr/views/layouts/main.tt
@@ -1,22 +1,14 @@
<!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>Shrtr</title>
<link rel="stylesheet" href="[% request.uri_base %]/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="[% request.uri_base %]/javascripts/jquery.js"><\/script>')
/* ]]> */</script>

</head>
<body>
[% content %]
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a> [% dancer_version %]
</div>
</body>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=[% settings.charset %]" />
<title>Shrtr</title>
<link rel="stylesheet" href="[% request.uri_base %]/css/style.css" />
</head>
<body>
[% content %]
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a> [% dancer_version %]
</div>
</body>
</html>

0 comments on commit a374ebb

Please sign in to comment.