Here is that Flask layout translated to web2py:
<!DOCTYPE html>
<html>
<head>
<title>web2py</title>
<strong><link rel="stylesheet" href="{{=URL('static', 'css/main.css')}}"
></strong>
</head>
<body>
<header>
<div class="container">
<h1 class="logo">Flask App</h1>
</div>
</header>
<div class="container">
{{include}}
</div>
</body>
</html>
And the home page:
{{extend "layout.html"}}
<div class="jumbo">
<h2>Welcome to the Flask app<h2>
<h3>This is the home page for the Flask app<h3>
</div>
Anthony
On Sunday, December 15, 2013 9:37:12 PM UTC-5, Anthony wrote:
>
> OK, maybe I was fast to take a look at the link you posted but, here is
>> the thing: It feels like I've never see an HTML/CSS codes, ...
>>
>
> I'm not sure what you mean. The Page Layout section of the book includes
> sample template code, which is of course a mixture of HTML and the web2py
> template syntax (just like the sample template code in the Flask tutorial).
> The book doesn't show any CSS samples because you use normal CSS files in
> web2py and simply link them in the head of the layout, as you would in any
> web page.
>
>
>> It's a little bit hard to explain what I want but here is the thing:
>> After flowing this tutorial for
>> Flask<http://net.tutsplus.com/tutorials/python-tutorials/an-introduction-to-pythons-flask-framework>,
>>
>> I have a full understanding on how the View side work.
>>
>
> Note, the beginning of the Page Layout section of the books shows a simple
> layout.html:
>
> <html>
> <head>
> <title>Page Title</title>
> </head>
> <body>
> {{include}}
> </body>
> </html>
>
> as well as a simple page that extends the layout:
>
> {{extend 'layout.html'}}
> <h1>Hello World</h1>
> {{include 'page.html'}}
>
>
> It works much like the Flask example, with somewhat different syntax.
>
>
>> So now, *How to completely scrap the default layout.html and start from
>> SCRATCH?*
>>
>> I think those Bootstrap stuff should be optional, It make things more
>> confusing for beginner IMO,
>>
>
> The Bootstrap stuff *is* optional. As noted, you can create your own
> layout.html from scratch (see the simple example above).
>
> Since it's not quite clear what you're looking for, it might be easier if
> you get started on your custom layout and come back with specific questions
> as you run into difficulties.
>
> Anthony
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.