Olemis Lang avatar Olemis Lang committed 7545539

TracMac: Active handler identified. Fixed issues with styles. Icons added.

Comments (0)

Files changed (11)

 
 Outstanding tasks are :
 
-- Add icon (apple) for active item in navs.
-- Change icon for `About Trac` item in metanav.
-- Add definitive image for first letter.
-- Add image for external links.
-- Add image for download links.
++ Add icon (apple) for active item in navs.
+- Fix the problem with active mainnav item.
++ Change icon for `About Trac` item in metanav (blank/ichat).
++ Add definitive image for first letter (blank/angel).
++ Add image for external links (blank/stuffitexpander).
++ Add image for download links (box/Download).
 - Add styles for buttons.
 - Render .menu li(s) using display: block rule.
 - Add timeline icons.
 - Specify all images using config options.
 - Use single image (or reduce number) in styles.
-- Resize anchors in drop-down menus to fit width.
++ Resize anchors in drop-down menus to fit width.
 - Add images for metanav icons under `more` drop-down menu.
+  * RPC
+  + Developer Tools
+  + Log
+- Look for (main|meta)nav items @TH.org and add icons 
+  for each one of them (for toolbar, dock menu & metanav).
 
 setup(
   name = 'TracMacOSTheme',
-  version = '1.0',
+  version = '1.0.1',
   author = "Olemis Lang",
   author_email = 'olemis+trac@gmail.com',
   maintainer = 'Olemis Lang',
Add a comment to this file

tracmacos/htdocs/about_trac_16_x_16.png

Old
Old image
New
New image
Add a comment to this file

tracmacos/htdocs/dev_trac_16_x_16.png

Added
New image
Add a comment to this file

tracmacos/htdocs/downl_trac_16_x_16.png

Added
New image
Add a comment to this file

tracmacos/htdocs/extlink.png

Added
New image
Add a comment to this file

tracmacos/htdocs/fl_alt.png

Added
New image
Add a comment to this file

tracmacos/htdocs/logging_trac_16_x_16.png

Added
New image

tracmacos/htdocs/mac.css

 }
 
 :link:hover, :visited:hover, .nav li:hover, 
-.nav li:hover>:link, .nav li:hover>:visited {
+.nav li:hover>:link, .nav li:hover>:visited,
+a.prev:hover, a.next:hover {
   background-color: #3366ff;
   color: #FFFFFF;
 }
   color: #FFFFFF;
 }
 
+a.ext-link .icon {
+  background-image: url(extlink.png);
+}
+
+a.trac-rawlink {
+  background-image: url(downl_trac_16_x_16.png);
+  background-repeat: no-repeat;
+  padding: 0 9px;
+}
+
+a.trac-rawlink img {
+  display:none;
+}
+
 .nav li {
   border-right: none;
 }
 #mainnav .active :link, #mainnav .active :visited {
   background: none no-repeat scroll 0 0 transparent ;
   border: medium none;
+  display: list-item;
 }
 
 #mainnav .active :link, #mainnav .active :visited {
+  font-weight: bold;
+}
+
+#mainmenu #mainnav .active :link, #mainmenu #mainnav .active :visited {
+  background-image: url(active.png);
+  background-repeat: no-repeat;
   color: #000000;
-  font-weight: bold;
 }
 
 #mainnav li:hover :link, #mainnav li:hover :visited, 
   display: none;
 }
 
+.more>ul.menu ul>li>a {
+  display: list-item;
+}
+
 .more:hover>ul.menu {
   display: block;
 }
 }
 
 /* Main panel */
+
 #fixed-wrapper {
   background-color: #FFFFFF;
   clear: both;
   padding: 0.4em 0pt 0.1em 0pt;
 }
 
-#mainpanel {
-}
-
 #mainbutton {
   background-color: #E1E1E1;
   display: block; 
 
 /* Background images */
 
-#metanav .login,
-#metanav .openidlogin {
+#metanav .id_login,
+#metanav .id_openidlogin {
   background-image: url(login_trac_16_x_16.png);
 }
 
-#metanav .prefs {
+#metanav .id_prefs {
   background-image: url(prefs_trac_16_x_16.png);
 }
 
-#metanav .help {
+#metanav .id_help {
   background-image: url(help_trac_16_x_16.png);
 }
 
-#metanav .about {
+#metanav .id_about {
   background-image: url(about_trac_16_x_16.png);
 }
 
-#metanav .logout {
+#metanav .id_logout {
   background-image: url(logout_trac_16_x_16.png);
 }
 
+#metanav .id_developer {
+  background-image: url(dev_trac_16_x_16.png);
+}
+
+#metanav #tracdeveloper-logbutton {
+  background-image: url(logging_trac_16_x_16.png);
+  background-repeat: no-repeat;
+  margin-left: -16px;
+  padding: 2px 0 2px 21px;
+}
+
 /* Banner & header */
 
 #banner {
 
 .wikipage>h1:first-child+p:first-letter, h1:first-child+p+div.wiki-toc+p+p:first-letter {
   color: #000000;
-  background-image: url(fl.png);
+  background-image: url(fl_alt.png);
   background-position: left;
   background-repeat: no-repeat;
   float: left;
   font-family: 'Palatino Linotype',Palatino,'Times New Roman',serif;
   font-weight: bold;
   margin: 0px 0.05em 0.2em 0px; 
-  padding: 23px 29px 23px 18px;
+  padding: 20px 37px 26px 15px;
 }
 
 .wikipage>h1+p+h2, h1+p+div.wiki-toc+p+p+h2 {
   list-style-type: none;
   padding-left: 3px;
   position: relative;
-  width: auto;
+/*  width: auto; */
   z-index: 1;
 }
 
 }
 
 #mactb .id_wiki a {
-  background-image: url(tb_mac.png);
+  background-image: url(tb_mac.png) !important;
 }
 
 #mactb .id_roadmap a {
-  background-image: url(tb_roadmap.png);
+  background-image: url(tb_roadmap.png) !important;
 }
 
 #mactb .id_timeline a {
-  background-image: url(tb_timeline.png);
+  background-image: url(tb_timeline.png) !important;
 }
 
 #mactb .id_browser a {
-  background-image: url(tb_finder2.png);
+  background-image: url(tb_finder2.png) !important;
 }
 
 #mactb .id_tickets a {
-  background-image: url(tb_list.png);
+  background-image: url(tb_list.png) !important;
 }
 
 #mactb .id_newticket a {
-  background-image: url(tb_bug.gif);
+  background-image: url(tb_bug.gif) !important;
 }
 
 #mactb .id_search a {
-  background-image: url(tb_search.png);
+  background-image: url(tb_search.png) !important;
 }
 
 #mactb .id_builds a {
-  background-image: url(tb_builds.png);
+  background-image: url(tb_builds.png) !important;
 }
 
 #mactb .id_admin a {
-  background-image: url(tb_admin.png);
+  background-image: url(tb_admin.png) !important;
 }
 
 #mactb .id_pydoc a {
-  background-image: url(tb_py.png);
+  background-image: url(tb_py.png) !important;
 }
 
 #tb_more {
   vertical-align: bottom;
 }
 
+#tb_more > ul > li > ul > li:hover {
+  background-color: #9FA7AE;
+}
+
 #tb_more>ul>li>ul>li :link,
 #tb_more>ul>li>ul>li :visited {
   color: #FFFFFF;

tracmacos/templates/mac_theme.html

               id="metanav" class="nav">
           <ul py:if="chrome.nav['metanav']">
             <li py:for="idx, item in  enumerate(chrome.nav['metanav'])" py:if="item.name in metaitems"
-                class="${(classes(first_last(idx, chrome.nav['metanav']), active=item.active) or '') + ' ' + item.name}">
+                class="${classes(first_last(idx, chrome.nav['metanav']), active=item.active)} id_${item.name}">
               ${item.label}
             </li>
             <li class="more"> <span style="clear:both;"> <em>more</em></span> ${navigation("metanav", metaitems)}</li>

tracmacos/theme.py

     
     # IRequestFilter methods
     def pre_process_request(self, req, handler):
+        self._prepare_request(req)
+        self._prepare_chrome_for_fail(req)
+        return handler
+    
+    def post_process_request(self, req, template, data, content_type):
+#        self._prepare_request(req)
+        self._add_macos_scripts(req)
+        return template, data, content_type
+    
+    # Internal methods
+    def _add_macos_scripts(self, req):
+        add_script(req, '/chrome/theme/jquery.jqDock.min.js')
+        add_script(req, '/chrome/theme/animatedcollapse.js')
+        add_script(req, '/chrome/theme/jquery.cookie.js')
+        
+    def _prepare_request(self, req):
         def to_text(fragment):
           if isinstance(fragment, (Element, Fragment, Markup)):
             return striptags(unicode(fragment))
             if x[0] == 'START' :
                return x[1][1].get('href')
         
-        add_script(req, '/chrome/theme/jquery.jqDock.min.js')
-        add_script(req, '/chrome/theme/animatedcollapse.js')
-        add_script(req, '/chrome/theme/jquery.cookie.js')
         req.macos = {
               'opts' : {
                   'coefficient' : self.dock_coefficient,
                   'dock' : self.dock_images,
                   },
             }
-        return handler
     
-    def post_process_request(self, req, template, data, content_type):
-        return template, data, content_type
+    def _prepare_chrome_for_fail(self, req):
+        old_prepare_chrome = req.callbacks['chrome']
+        
+        def macos_prepare_request(_):
+            req.chrome = value = old_prepare_chrome(req)
+            self._add_macos_scripts(req)
+            return value
+            
+        req.callbacks['chrome'] = macos_prepare_request
+        
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.