Permalink
Browse files

initial work

  • Loading branch information...
ejucovy committed Apr 2, 2012
0 parents commit 33840a36978c833d16a55ed83782845b8c760cfe
Showing with 228 additions and 0 deletions.
  1. +7 −0 .gitignore
  2. +28 −0 LICENSE.txt
  3. +1 −0 README.rst
  4. +7 −0 README.txt
  5. +32 −0 lightertheme/__init__.py
  6. +126 −0 lightertheme/htdocs/theme.css
  7. +27 −0 setup.py
@@ -0,0 +1,7 @@
+*~
+*.pyc
+.#*
+#*
+*#
+*.egg-info
+dist/
@@ -0,0 +1,28 @@
+Copyright (C) 2012 Ethan Jucovy and Jacqueline Arasi
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the
+ distribution.
+ 3. The name of the author may not be used to endorse or promote
+ products derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,7 @@
+A light, Bootstrap-inspired theme
+=================================
+
+Description
+-----------
+
+It's a theme. Try it!
@@ -0,0 +1,32 @@
+from genshi.builder import tag
+from genshi.filters import Transformer
+from genshi.filters.transform import StreamBuffer
+
+from trac.core import *
+from trac.web.chrome import Chrome, add_stylesheet, add_script
+from trac.web.api import IRequestFilter, ITemplateStreamFilter
+
+class Theme(Component):
+ implements(IRequestFilter, ITemplateStreamFilter)
+
+ def pre_process_request(self, req, handler):
+ add_stylesheet(req, 'http://fonts.googleapis.com/css?family=Ubuntu')
+ add_stylesheet(req, 'lightertheme/theme.css')
+ return handler
+
+ def post_process_request(self, req, template, data, content_type):
+ return template, data, content_type
+
+ def filter_stream(self, req, method, filename, stream, data):
+ """
+ Wrap the banner and mainnav in a single banner_wrapper div
+ """
+ buffer = StreamBuffer()
+ filter = Transformer("//div[@id='banner']")
+ stream |= filter.wrap(tag.div(id="banner_wrapper")).end().select("//div[@id='mainnav']").cut(buffer, accumulate=True).end().buffer().select("//div[@id='banner_wrapper']").append(tag.hr()).a\
+ppend(buffer).end()
+
+ return stream
+
+
+
@@ -0,0 +1,126 @@
+#banner_wrapper {
+ width: 1200px;
+ margin-left: auto;
+ margin-right: auto;
+ background-color: #eef;
+ -mox-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ padding-left: 10px;
+ padding-right: 10px;
+ padding-bottom: 10px;
+}
+#banner_wrapper hr {
+ margin: 0;
+}
+#main {
+ width: 940px;
+ margin-left: auto;
+ margin-right: auto;
+}
+body, h1, h2, h3, h4, h5 {
+ font-family: Ubuntu;
+}
+h1, h2, h3 {
+ font-weight: normal;
+}
+#mainnav {
+ background: none;
+ border: none;
+}
+h1 {
+ font-size: 26px;
+}
+h2 {
+ font-size: 22px;
+ margin-top: 0;
+}
+input[type='submit'], input[type='button'], select {
+ display:inline-block;
+ padding:4px 10px 4px;
+ margin-bottom:0;
+ font-size:13px;
+ line-height:18px;
+ color:#333333;
+ text-align:center;
+ text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);
+ vertical-align:middle;
+ background-color:#f5f5f5;
+ background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+ background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);
+ background-image:linear-gradient(top, #ffffff, #e6e6e6);
+ background-repeat:repeat-x;
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+ border-color:#e6e6e6 #e6e6e6 #bfbfbf;
+ border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ border:1px solid #ccc;
+ border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow\
+:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
+ cursor:pointer;
+ filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ *margin-left:.3em;
+}
+.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;}
+.newform {
+ width: 60%;
+ background-color: #FFF7C0;
+ border: 1px solid green;
+ border-radius: 20px;
+ padding: 10px;
+ margin-bottom: 30px;
+}
+.newform form { padding-left: 35px; }
+
+.newform h2, .newform h3 { margin-left: 0;}.newform input { border-radius: 2px;}
+input[type='text'], textarea {
+ -mox-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+ background-clip: padding-box;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+}
+.btn.success, #ticket_clone {
+text-shadow: 0 -1px 0
+rgba(0, 0, 0, 0.25);
+color:
+white;
+background-color:
+#5BB75B;
+background-image: -moz-linear-gradient(top,
+#62C462,
+#51A351);
+background-image: -ms-linear-gradient(top,
+#62C462,
+#51A351);
+background-image: -webkit-gradient(linear, 0 0, 0 100%, from(
+#62C462), to(
+#51A351));
+background-image: -webkit-linear-gradient(top,
+#62C462,
+#51A351);
+background-image: -o-linear-gradient(top,
+#62C462,
+#51A351);
+background-image: linear-gradient(top,
+#62C462,
+#51A351);
+background-repeat: repeat-x;
+filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+border-color:
+#51A351
+#51A351
+#387038;
+border-color:
+rgba(0, 0, 0, 0.1)
+rgba(0, 0, 0, 0.1)
+rgba(0, 0, 0, 0.25);
+filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
@@ -0,0 +1,27 @@
+from setuptools import find_packages, setup
+
+version='0.1'
+
+try:
+ long_description = open("README.txt").read()
+except:
+ long_description = ''
+
+setup(name='trac-LighterTheme',
+ version=version,
+ description="A light, Bootstrap-inspired theme for Trac",
+ long_description=long_description,
+ author='Ethan Jucovy, Jacqueline Arasi',
+ author_email='ejucovy@gmail.com',
+ url='http://trac-hacks.org/wiki/LighterTheme',
+ keywords='trac plugin',
+ license="BSD",
+ packages=find_packages(exclude=['ez_setup', 'examples', 'tests*']),
+ include_package_data=True,
+ zip_safe=False,
+ entry_points = """
+ [trac.plugins]
+ lightertheme = lightertheme
+ """,
+ )
+

0 comments on commit 33840a3

Please sign in to comment.