Skip to content

Commit

Permalink
removed whitespace from css file, added myself to CREDITS file, and
Browse files Browse the repository at this point in the history
modified util.py to add back in example comment, as well as copy contents
of static directory to __output__.
  • Loading branch information
bearney74 committed Jun 21, 2012
1 parent 651fb7e commit 9c58699
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions CREDITS
Expand Up @@ -82,6 +82,7 @@ James Hedley <jameskhedley@gmail.com>
Daniel Hopkins <drhops@gmail.com>
Bob Hampton <bobh@optimizations.com>
João Ventura <joaojonesventura@gmail.com>
Billy Earney <billy.earney@gmail.com>

Erik gets a special mention for the contribution of the "Showcase".

Expand Down
5 changes: 0 additions & 5 deletions examples/_examples/static/examples.css
Expand Up @@ -18,22 +18,17 @@ p {
margin: 0px 0px 0px 10px;
padding: 0px;
}

tr:nth-child(even) {background: #EBECE4;}
tr:nth-child(odd) {background: #FFF;}

table tbody tr:hover {
background: #FDFCDC;
word-wrap:break-word
}

table, th { border: 1px solid black;}

th { text-align: left;
background: #000;
color: #FFF;
}

#pyicon {
background-image:url("source-py-icon.png");
display:block;
Expand Down
2 changes: 1 addition & 1 deletion examples/_examples/template/index.html.tpl
Expand Up @@ -4,7 +4,7 @@
<meta name="keywords" content="Python Pyjs Examples, Python Web widgets" />
<meta name="description" content="Python Pyjs Examples" />
<meta name="title" content="Python Web Toolkit Examples - Javascript Translator and AJAX Widgets" />
<link rel="stylesheet" type="text/css" href="../_examples/static/examples.css" />
<link rel="stylesheet" type="text/css" href="static/examples.css" />
</head>
<body>
<h1 id='title'>Pyjs Examples</h1>
Expand Down
14 changes: 14 additions & 0 deletions examples/_examples/util.py
Expand Up @@ -9,6 +9,7 @@
#import bz2
import zipfile
#import tarfile
import shutil
from optparse import OptionParser


Expand Down Expand Up @@ -81,6 +82,7 @@ def sub(m):

INDEX = {
'example': r'''
<!-- start {name} {{example.{name}._comment_end}}
<tr>{{example.{name}.demo1}}
<td rowspan="{{example.{name}.numdemos}}">
Expand All @@ -92,6 +94,7 @@ def sub(m):
</td>
</tr>
{{example.{name}.demos}}
{{example.{name}._comment_start}} -->
''',
'demo': r'''
<td><a href="{target}.html">{target}</a></td>
Expand Down Expand Up @@ -376,3 +379,14 @@ def install(package=None, **packages):
idx_out_fd.write(index_new)
finally:
idx_out_fd.close()


_static_dir = os.path.join(ENV['BASE_EXAMPLES'], '_examples', 'static')
_output_dir = os.path.join(ENV['BASE_EXAMPLES'], '__output__', 'static')

if not os.path.exists(_output_dir):
try:
shutil.copytree(_static_dir, _output_dir)
except Exception, e:
sys.stdout.write("Error copying static directory to output directory\n")
sys.stdout.write("%s\n" % e)

0 comments on commit 9c58699

Please sign in to comment.