Merge pull request #1276 from BuhtigithuB/Improve/web2py-com-display
Improve/web2py com display
This commit is contained in:
@@ -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():
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
<h3>Instructions</h3>
|
||||
<p>After download, unzip it and click on web2py.exe (windows) or web2py.app (osx).
|
||||
To run from source, type:</p>
|
||||
{{=CODE("python2.7 web2py.py",language=None,counter='>',_class='boxCode')}}
|
||||
{{=CODE("python2.7 web2py.py", language=None, counter='>', _class='boxCode')}}
|
||||
<p>or for more info type:</p>
|
||||
{{=CODE("python2.7 web2py.py -h",language=None,counter='>',_class='boxCode')}}
|
||||
{{=CODE("python2.7 web2py.py -h", language=None, counter='>', _class='boxCode')}}
|
||||
|
||||
|
||||
<h3>Caveats</h3>
|
||||
@@ -84,7 +84,7 @@
|
||||
<p>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.</p>
|
||||
<p>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.</p>
|
||||
<p>web2py is copyrighted by Massimo Di Pierro. The web2py trademark is owned by Massimo Di Pierro.</p>
|
||||
<a class="btn btn-small" href="{{=URL('license')}}">read more</a>
|
||||
<a class="btn btn-small rounded" href="{{=URL('license')}}">read more</a>
|
||||
|
||||
<h3>Artwork</h3>
|
||||
<center>
|
||||
|
||||
Reference in New Issue
Block a user