From 5d3cc6beb0bb1ebf46384afbd6ba98d81307a960 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 3 Apr 2012 09:17:18 -0500 Subject: [PATCH] template changes. --- application/views/home/index.blade.php | 22 ++++++--- bundles/docs/routes.php | 67 ++++++++++++++++++++------ bundles/docs/views/home.blade.php | 37 -------------- bundles/docs/views/menu.blade.php | 27 ----------- bundles/docs/views/template.blade.php | 12 ++--- public/laravel/css/style.css | 19 ++++++-- 6 files changed, 85 insertions(+), 99 deletions(-) delete mode 100644 bundles/docs/views/home.blade.php delete mode 100644 bundles/docs/views/menu.blade.php diff --git a/application/views/home/index.blade.php b/application/views/home/index.blade.php index 47782ff6..dd26ad93 100644 --- a/application/views/home/index.blade.php +++ b/application/views/home/index.blade.php @@ -13,15 +13,12 @@

Laravel

A Framework For Web Artisans

-

- 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. +

-

Learn the terrain.

+

Learn the terrain.

You've landed yourself on our default home page. The route that @@ -34,13 +31,22 @@

{{ path('app') }}views/home/index.php
-

Read the docs.

+

Grow in knowledge.

- 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:

-

Create something beautiful.

+
    +
  • {{ HTML::link('docs/routing#the-basics', 'Defining Routes') }}
  • +
  • {{ HTML::link('docs/controllers#the-basics', 'Building Controllers') }}
  • +
  • {{ HTML::link('docs/views#the-basics', 'Creating Views') }}
  • +
  • {{ HTML::link('docs/database/eloquent', 'Eloquent ORM') }}
  • +
+ +

Create something beautiful.

Now that you're up and running, it's time to start creating! diff --git a/bundles/docs/routes.php b/bundles/docs/routes.php index 43641286..184656cc 100644 --- a/bundles/docs/routes.php +++ b/bundles/docs/routes.php @@ -1,38 +1,75 @@ add('prettify', 'laravel/js/prettify.js'); - $view->with('sidebar', Markdown(file_get_contents(path('storage').'documentation/contents.md'))); + $view->with('sidebar', document('contents')); }); +/** + * Handle the documentation homepage. + * + * This page contains the "introduction" to Laravel. + */ 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 (file_exists($path = $root.$file)) + // 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 + // 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 { return Response::error('404'); } - - return View::make('docs::page')->with('content', $content); }); \ No newline at end of file diff --git a/bundles/docs/views/home.blade.php b/bundles/docs/views/home.blade.php deleted file mode 100644 index 86670159..00000000 --- a/bundles/docs/views/home.blade.php +++ /dev/null @@ -1,37 +0,0 @@ -@layout('docs::template') - -@section('content') -

Learn the terrain.

- -

- 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: -

- -
APP_PATH/routes.php
- - -

And the view sitting before you can be found at:

- -
APP_PATH/views/home/index.php
- -

Create something beautiful.

- -

- Now that you're up and running, it's time to start creating! - Here are some links to help you get started: -

- - -@endsection diff --git a/bundles/docs/views/menu.blade.php b/bundles/docs/views/menu.blade.php deleted file mode 100644 index 164556da..00000000 --- a/bundles/docs/views/menu.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -

Documentation

- \ No newline at end of file diff --git a/bundles/docs/views/template.blade.php b/bundles/docs/views/template.blade.php index e49556d3..fd4a0a9d 100644 --- a/bundles/docs/views/template.blade.php +++ b/bundles/docs/views/template.blade.php @@ -5,8 +5,9 @@ Laravel: A Framework For Web Artisans - {{ Asset::styles(); }} - {{ Asset::scripts(); }} + + {{ HTML::style('laravel/css/style.css') }} + {{ HTML::style('laravel/js/modernizr-2.5.3.min.js') }}
@@ -14,10 +15,7 @@

Laravel

A Framework For Web Artisans

-

- 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. +

@@ -30,6 +28,6 @@
{{ 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') }} diff --git a/public/laravel/css/style.css b/public/laravel/css/style.css index acb53a0f..1b598b9b 100755 --- a/public/laravel/css/style.css +++ b/public/laravel/css/style.css @@ -141,6 +141,14 @@ .content>h2 { margin-top:2.2em; } +div.home>h2:not(:first-child) { + margin-top:2.2em; +} + +div.home>h2 { + font-size: 14pt; +} + .content>h3 { font-size: 12pt; } @@ -159,6 +167,12 @@ .content li margin-bottom:1em; } +div.home li +{ + line-height:1.5em; + margin-bottom:1em; +} + a, a:visited { color:#2972A3; @@ -235,11 +249,6 @@ code text-shadow:1px 1px 0 #fff; } -.home -{ - font-size:1.1em; -} - .out-links { margin:0;