Commit 5d3cc6be authored by Taylor Otwell's avatar Taylor Otwell

template changes.

parent 2af60594
...@@ -13,15 +13,12 @@ ...@@ -13,15 +13,12 @@
<h1>Laravel</h1> <h1>Laravel</h1>
<h2>A Framework For Web Artisans</h2> <h2>A Framework For Web Artisans</h2>
<p class="intro-text"> <p class="intro-text" style="margin-top: 45px;">
You have successfully installed the Laravel framework. Laravel is a simple framework
that helps web artisans create beautiful, creative applications using elegant, expressive
syntax. You'll love using it.
</p> </p>
</header> </header>
<div role="main" class="main"> <div role="main" class="main">
<div class="home"> <div class="home">
<h3>Learn the terrain.</h3> <h2>Learn the terrain.</h3>
<p> <p>
You've landed yourself on our default home page. The route that You've landed yourself on our default home page. The route that
...@@ -34,13 +31,22 @@ ...@@ -34,13 +31,22 @@
<pre>{{ path('app') }}views/home/index.php</pre> <pre>{{ path('app') }}views/home/index.php</pre>
<h3>Read the docs.</h3> <h2>Grow in knowledge.</h2>
<p> <p>
The docs are now included with the source package, you can {{ HTML::link('docs', 'read them offline here') }}. Leaning to use Laravel is amazingly simple thanks to
its {{ HTML::link('docs', 'wonderful documentation') }}.
Here are the basics:
</p> </p>
<h3>Create something beautiful.</h3> <ul>
<li>{{ HTML::link('docs/routing#the-basics', 'Defining Routes') }}</li>
<li>{{ HTML::link('docs/controllers#the-basics', 'Building Controllers') }}</li>
<li>{{ HTML::link('docs/views#the-basics', 'Creating Views') }}</li>
<li>{{ HTML::link('docs/database/eloquent', 'Eloquent ORM') }}</li>
</ul>
<h2>Create something beautiful.</h2>
<p> <p>
Now that you're up and running, it's time to start creating! Now that you're up and running, it's time to start creating!
......
<?php <?php
/**
* Load the Markdown library.
*/
require_once __DIR__.'/libraries/markdown.php'; require_once __DIR__.'/libraries/markdown.php';
/**
* Get the parsed Markdown contents of a given page.
*
* @param string $page
* @return string
*/
function document($page)
{
return Markdown(file_get_contents(path('storage').'documentation/'.$page.'.md'));
}
/**
* Determine if a documentation page exists.
*
* @param string $page
* @return bool
*/
function document_exists($page)
{
return file_exists(path('storage').'documentation/'.$page.'.md');
}
/**
* Attach the sidebar to the documentatoin template.
*/
View::composer('docs::template', function($view) View::composer('docs::template', function($view)
{ {
Asset::add('stylesheet', 'laravel/css/style.css'); $view->with('sidebar', document('contents'));
Asset::add('modernizr', 'laravel/js/modernizr-2.5.3.min.js');
Asset::container('footer')->add('prettify', 'laravel/js/prettify.js');
$view->with('sidebar', Markdown(file_get_contents(path('storage').'documentation/contents.md')));
}); });
/**
* Handle the documentation homepage.
*
* This page contains the "introduction" to Laravel.
*/
Route::get('(:bundle)', function() Route::get('(:bundle)', function()
{ {
return View::make('docs::home'); return View::make('docs::page')->with('content', document('home'));
}); });
Route::get('docs/(:any)/(:any?)', function($section, $page = null) /**
* Handle documentation routes for sections and pages.
*
* @param string $section
* @param string $page
* @return mixed
*/
Route::get('(:bundle)/(:any)/(:any?)', function($section, $page = null)
{ {
$root = path('storage').'documentation/'; $file = rtrim(implode('/', func_get_args()), '/');
$file = rtrim(implode('/', array($section, $page)), '/').'.md'; // If no page was specified, but a "home" page exists for the section,
// we'll set the file to the home page so that the proper page is
if (file_exists($path = $root.$file)) // display back out to the client for the requested doc page.
if (is_null($page) and document_exists($file.'/home'))
{ {
$content = Markdown(file_get_contents($path)); $file .= '/home';
} }
elseif (file_exists($path = $root.$section.'/home.md'))
if (document_exists($file))
{ {
$content = Markdown(file_get_contents($path)); return View::make('docs::page')->with('content', document($file));
} }
else else
{ {
return Response::error('404'); return Response::error('404');
} }
return View::make('docs::page')->with('content', $content);
}); });
\ No newline at end of file
@layout('docs::template')
@section('content')
<h1>Learn the terrain.</h1>
<p>
You've landed yourself on our default home page. The route that
is generating this page lives in the main routes file. You can
find it here:
</p>
<pre>APP_PATH/routes.php</pre>
<!--
<pre class="prettyprint lang-php linenums">
return array(
'welcome' => 'Welcome to our website!',
);
</pre>
-->
<p>And the view sitting before you can be found at:</p>
<pre>APP_PATH/views/home/index.php</pre>
<h1>Create something beautiful.</h1>
<p>
Now that you're up and running, it's time to start creating!
Here are some links to help you get started:
</p>
<ul>
<li><a href="http://laravel.com">Official Website</a></li>
<li><a href="http://forums.laravel.com">Laravel Forums</a></li>
<li><a href="http://github.com/laravel/laravel">GitHub Repository</a></li>
</ul>
@endsection
<h2>Documentation</h2>
<ul>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a>
<ul>
<li><a href="#">Sub Menu Item</a></li>
<li><a href="#">Sub Menu Item</a></li>
</ul>
</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a>
<ul>
<li><a href="#">Sub Menu Item</a></li>
<li><a href="#">Sub Menu Item</a></li>
<li><a href="#">Sub Menu Item</a></li>
</ul>
</li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
<li><a href="#">Menu Item</a></li>
</ul>
\ No newline at end of file
...@@ -5,8 +5,9 @@ ...@@ -5,8 +5,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Laravel: A Framework For Web Artisans</title> <title>Laravel: A Framework For Web Artisans</title>
<meta name="viewport" content="width=device-width"> <meta name="viewport" content="width=device-width">
{{ Asset::styles(); }}
{{ Asset::scripts(); }} {{ HTML::style('laravel/css/style.css') }}
{{ HTML::style('laravel/js/modernizr-2.5.3.min.js') }}
</head> </head>
<body onload="prettyPrint()"> <body onload="prettyPrint()">
<div class="wrapper"> <div class="wrapper">
...@@ -14,10 +15,7 @@ ...@@ -14,10 +15,7 @@
<h1>Laravel</h1> <h1>Laravel</h1>
<h2>A Framework For Web Artisans</h2> <h2>A Framework For Web Artisans</h2>
<p class="intro-text"> <p class="intro-text" style="margin-top: 45px;">
You have successfully installed the Laravel framework. Laravel is a simple framework
that helps web artisans create beautiful, creative applications using elegant, expressive
syntax. You'll love using it.
</p> </p>
</header> </header>
<div role="main" class="main"> <div role="main" class="main">
...@@ -30,6 +28,6 @@ ...@@ -30,6 +28,6 @@
</div> </div>
</div> </div>
{{ HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') }} {{ HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') }}
{{ Asset::container('footer')->scripts(); }} {{ HTML::script('laravel/js/prettify.js') }}
</body> </body>
</html> </html>
...@@ -141,6 +141,14 @@ body ...@@ -141,6 +141,14 @@ body
margin-top:2.2em; margin-top:2.2em;
} }
div.home>h2:not(:first-child) {
margin-top:2.2em;
}
div.home>h2 {
font-size: 14pt;
}
.content>h3 { .content>h3 {
font-size: 12pt; font-size: 12pt;
} }
...@@ -159,6 +167,12 @@ body ...@@ -159,6 +167,12 @@ body
margin-bottom:1em; margin-bottom:1em;
} }
div.home li
{
line-height:1.5em;
margin-bottom:1em;
}
a, a:visited a, a:visited
{ {
color:#2972A3; color:#2972A3;
...@@ -235,11 +249,6 @@ code ...@@ -235,11 +249,6 @@ code
text-shadow:1px 1px 0 #fff; text-shadow:1px 1px 0 #fff;
} }
.home
{
font-size:1.1em;
}
.out-links .out-links
{ {
margin:0; margin:0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment