[web2py] Re: css help

2013-06-04 Thread Massimo Di Pierro
Thank you Paolo!

On Tuesday, 4 June 2013 19:14:18 UTC-5, Paolo Caruccio wrote:
>
> In order to eliminate the issue under point 1, we could modify slightly 
> the interested code in layout.html in: 
>
> 
> 
>   
> 
> 
> {{if response.title is not None:}}
> {{=response.title}}
> {{=response.subtitle or ''}}{{pass}}
> 
> 
> 
>
>
> 
>
> About point 2, in order to change the color of the links it's enough to 
> set the following rules in web2py_bootstrap.css (preferibly on top of the 
> file below the first rule):
>
> a{color: magenta;}
> a:visited{color: pink;}
> a:hover{color: red;}
> a:focus{color: brown;}
> a:active{color: darkmagenta;}
>
> Of course please change the color value at your taste.
>
> The same for the color of headers:
>
> h1{color: green;}
> h2{color: lightgreen;}
> h3{}
> h4{}
> h5{}
> h6{}
>
> Finally, for the image under menu there are several ways in order to 
> obtain the same result.
>
> Replace the title with a big image:
>
> 
> 
>   
> 
> 
> {{response.title = XML(' />' % (URL('static','images/big_image.jpg'))) # this is only for example}}
> {{response.subtitle = None # this is only for example}}
> {{if response.title is not None:}}
> {{=response.title}}
> {{=response.subtitle or ''}}{{pass}}
> 
> 
> 
>
>
> 
>
> In this case the image will not be as wide as the page width.
> To obtain the right result we have to add a new element in layout.html and 
> some css rules to web2py_bootstrap.css. Here attached the patched files.
>
> Please note that the code has not been deeply tested, so please let me 
> know if you'll find bugs.
>
>
> Il giorno martedì 4 giugno 2013 16:20:21 UTC+2, Massimo Di Pierro ha 
> scritto:
>>
>> I would like help with two css issues:
>>
>> 1) In layout.html if there is no response.title, the page content slides 
>> up and may disappear under the menu banner. Can we prevent this?
>>
>> 2) In web2py_bootstrap.css I would like to have example code to change 
>> the colors without changing the bootstrap.css (specifically color of links, 
>> headers, menu banner, and add a page wide image under the menu banner. 
>> These seems to be recurrent needs. 
>>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: css help

2013-06-04 Thread Paolo Caruccio
In order to eliminate the issue under point 1, we could modify slightly the 
interested code in layout.html in: 



  


{{if response.title is not None:}}
{{=response.title}}
{{=response.subtitle or ''}}{{pass}}







About point 2, in order to change the color of the links it's enough to set 
the following rules in web2py_bootstrap.css (preferibly on top of the file 
below the first rule):

a{color: magenta;}
a:visited{color: pink;}
a:hover{color: red;}
a:focus{color: brown;}
a:active{color: darkmagenta;}

Of course please change the color value at your taste.

The same for the color of headers:

h1{color: green;}
h2{color: lightgreen;}
h3{}
h4{}
h5{}
h6{}

Finally, for the image under menu there are several ways in order to obtain 
the same result.

Replace the title with a big image:



  


{{response.title = XML('' 
% (URL('static','images/big_image.jpg'))) # this is only for example}}
{{response.subtitle = None # this is only for example}}
{{if response.title is not None:}}
{{=response.title}}
{{=response.subtitle or ''}}{{pass}}







In this case the image will not be as wide as the page width.
To obtain the right result we have to add a new element in layout.html and 
some css rules to web2py_bootstrap.css. Here attached the patched files.

Please note that the code has not been deeply tested, so please let me know 
if you'll find bugs.


Il giorno martedì 4 giugno 2013 16:20:21 UTC+2, Massimo Di Pierro ha 
scritto:
>
> I would like help with two css issues:
>
> 1) In layout.html if there is no response.title, the page content slides 
> up and may disappear under the menu banner. Can we prevent this?
>
> 2) In web2py_bootstrap.css I would like to have example code to change the 
> colors without changing the bootstrap.css (specifically color of links, 
> headers, menu banner, and add a page wide image under the menu banner. 
> These seems to be recurrent needs. 
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Title: {{=response.title or request.application}}







  



  
  
{{=response.flash or ''}}

  


  
  
  

	{{=response.logo or ''}}
{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}

  {{is_mobile=request.user_agent().is_mobile}}
  {{if response.menu:}}
  {{=MENU(response.menu, _class='mobile-menu nav' if is_mobile else 'nav',mobile=is_mobile,li_class='dropdown',ul_class='dropdown-menu')}}
  {{pass}}

  

  
  

  


  


{{#response.title = XML('' % (URL('static','images/bootstrap_idea2.png'))) # this is only for example}}
{{#response.subtitle = None # this is only for example}}
{{if response.title is not None:}}
{{=response.title}}
{{=response.subtitle or ''}}{{pass}}







{{if left_sidebar_enabled:}}

{{block left_sidebar}}
Left Sidebar

{{end}}

{{pass}}


{{block center}}
{{include}}
{{end}}


{{if right_sidebar_enabled:}}

{{block right_sidebar}}
Right Sidebar

{{end}}

{{pass}}






{{block footer}} 
{{=T('Copyright')}} © {{=request.now.year}}

{{=T('Powered by')}}
web2py

{{end}}




   

  
  
  
  
  
  {{if response.google_analytics_id:}}
  
  
  {{pass}}
  



/*=
   CUSTOM RULES
==*/

body{height:auto;} /* to avoid vertical scroll bar */

a{}
a:visited{}
a:hover{}
a:focus{}
a:active{}

h1{}
h2{}
h3{}
h4{}
h5{}
h6{}

div.flash.flash-center{left:25%;right:25%;}
div.flash.flash-top,div.flash.flash-top:hover{
  position:relative;
  display:block;
  margin:0;
  padding:1em;
  top:0;
  left:0;
  width:100%;
  text-align:center;
  text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
  color:#865100;
  background:#feea9a;
  border:1px solid;
  border-top:0px;
  border-left:0px;
  border-right:0px;
  border-radius:0;
  opacity:1;
}
#header{ma