diff --git a/applications/examples/controllers/default.py b/applications/examples/controllers/default.py index 9f41403f..129c071a 100644 --- a/applications/examples/controllers/default.py +++ b/applications/examples/controllers/default.py @@ -10,7 +10,7 @@ session.forget() cache_expire = not request.is_local and 300 or 0 -#@cache.action(time_expire=300, cache_model=cache.ram, quick='P') +# @cache.action(time_expire=300, cache_model=cache.ram, quick='P') def index(): return response.render() @@ -19,14 +19,13 @@ def index(): def what(): import urllib try: - images = XML(urllib.urlopen( - 'http://www.web2py.com/poweredby/default/images').read()) + images = XML(urllib.urlopen('http://www.web2py.com/poweredby/default/images').read()) except: images = [] return response.render(images=images) -#@cache.action(time_expire=300, cache_model=cache.ram, quick='P') +# @cache.action(time_expire=300, cache_model=cache.ram, quick='P') def download(): return response.render() @@ -74,14 +73,15 @@ def license(): filename = os.path.join(request.env.gluon_parent, 'LICENSE') return response.render(dict(license=MARKMIN(read_file(filename)))) + def version(): - if request.args(0)=='raw': + if request.args(0) == 'raw': return request.env.web2py_version from gluon.fileutils import parse_version (a, b, c, pre_release, build) = parse_version(request.env.web2py_version) - return 'Version %i.%i.%i (%.4i-%.2i-%.2i %.2i:%.2i:%.2i) %s' % ( - a,b,c,build.year,build.month,build.day, - build.hour,build.minute,build.second,pre_release) + return 'Version %i.%i.%i (%.4i-%.2i-%.2i %.2i:%.2i:%.2i) %s' % \ + (a, b, c, build.year, build.month, build.day, build.hour, build.minute, build.second, pre_release) + @cache.action(time_expire=300, cache_model=cache.ram, quick='P') def examples(): diff --git a/applications/examples/static/css/examples.css b/applications/examples/static/css/examples.css index 293b8b89..cedb5c83 100644 --- a/applications/examples/static/css/examples.css +++ b/applications/examples/static/css/examples.css @@ -1,12 +1,34 @@ -h1,h2,h3,h4,h5,h6{color: #111; text-transform:none} +/* Gray the black as suggested by Anthony */ +h1,h2,h3,h4,h5,h6 {color: rgb(35, 35, 35); text-transform:none} +.black { + color: rgb(35, 35, 35); + background-color: rgb(35, 35, 35); +} + +/* Spacing between thead and tbody */ +/* Ref: http://stackoverflow.com/questions/9258754/spacing-between-thead-and-tbody */ +tbody:before { + content: "-"; + display: block; + line-height: 1em; + color: transparent; +} + +/* Improve buttons in download page */ +th, td {padding: 0} + -th, td {color: black} tbody tr:hover {background-color:transparent} tbody tr {border-bottom: none} p {text-align: left} p, li { line-height: 1.6em} -pre {background-color: black!important;border-radius:5px; color:white; padding:10px} -a.btn.btn180 {padding:20px; font-size:1.2em; width:200px} + +/* Improve CODE() display though padding has no effect as some PRE are hardcoded somewhere can't find it */ +/* padding of 10px should make it... */ +pre {background-color: rgb(35, 35, 35)!important; border-radius:5px; color:white; padding: 10px} + +/* Improve buttons in download page */ +a.btn.btn180 {padding:10px; font-size:1.2em; width:200px} .menu .web2py-menu-active a { color: #26a69a; @@ -25,4 +47,23 @@ a.noeffect img:hover { .btn, a.noeffect img { transition: all .2s ease-in-out; -} +} + +/* Lower saturation of color #26a69a - 20 points lower */ +/* The below change to color #26a69a should come before other color change or they override all buttons background-color */ +/* The color should maybe change at stupid.css level as it herited from there also in stupid.css it would be better + to define this color at one place actually color is defined all over the place */ +a {color:#47a69d} +.btn, button, [type=button], [type=submit] {background-color:#47a69d} +.progress .determinate {background-color:#47a69d} +.progress .indeterminate {background-color:#47a69d} +a:not(.btn):not(.noeffect):hover {color:#47a69d} +a:not(.btn):not(.noeffect):after {background-color:#47a69d} +.tags > span {background-color:#47a69d} +.tags.dismissible > span.off:hover {background-color:#47a69d} +.aquamarine{background-color:#47a69d} + +/* Lower the saturation of 20 points */ +.green {background-color: #58cc65} +.yellow {background-color: #ffe333} +.red {background-color: #cc4229} diff --git a/applications/examples/views/default/download.html b/applications/examples/views/default/download.html index eaca3a8e..99acd476 100644 --- a/applications/examples/views/default/download.html +++ b/applications/examples/views/default/download.html @@ -69,9 +69,9 @@

Instructions

After download, unzip it and click on web2py.exe (windows) or web2py.app (osx). To run from source, type:

-{{=CODE("python2.7 web2py.py",language=None,counter='>',_class='boxCode')}} +{{=CODE("python2.7 web2py.py", language=None, counter='>', _class='boxCode')}}

or for more info type:

-{{=CODE("python2.7 web2py.py -h",language=None,counter='>',_class='boxCode')}} +{{=CODE("python2.7 web2py.py -h", language=None, counter='>', _class='boxCode')}}

Caveats

@@ -84,7 +84,7 @@

Applications built with web2py can be released under any license the author wishes as long they do not contain web2py code. They can link unmodified web2py libraries and they can be distributed with official web2py binaries. In particular web2py applications can be distributed in closed source. The admin interface provides a button to byte-code compile.

It is fine to distribute web2py (source or compiled) with your applications as long as you make it clear in the license where your application ends and web2py starts.

web2py is copyrighted by Massimo Di Pierro. The web2py trademark is owned by Massimo Di Pierro.

-read more +read more

Artwork