Growing Venture Solutions - GVS - theming http://growingventuresolutions.com/taxonomy/term/50/0 en Newbie Adventures in Theming http://growingventuresolutions.com/blog/newbie-adventures-theming <p><img src="http://growingventuresolutions.com/gvsfiles/site-top_0.png" alt="top section of site" /></p> <p>We recently redesigned the Growing Venture Solutions site and I was given the task of completing and theming the new design. This was only my second theming assignment and it was a tremendous challenge and learning experience; I'd like to use this post to pass on some of the resources that helped me along the way. Maybe they'll help someone else?</p> <p>The original GVS site was running the Marvin theme; since we’ve been growing it was time for a custom look. The first passes at the design and new logo were done by <a href="http://www.terracreative.com/">Don Hajicek</a> and everyone was pleased with the overall style and particularly the leaves on the logo and on the “more” links. When I joined GVS I continued where Don left off by expanding his design to include more content elements, adding the navigation tabs and the footer area. (I like the little set apart yellow tab, although we're not sure if that color choice will stay.) I then moved on to Adventures in Theming.</p> <p><img src="http://growingventuresolutions.com/gvsfiles/greggles-diagram.png" style="float: left; padding-right: 10px;" alt="greggles diagram" width="200" height="247" />Adventures, indeed. This image is a diagram Greg drew for me to explain the roles of the system administrator, site builder, developer, and designer. (<em>“There are these overlapping bubbles, see?”</em>) This pretty much sums up where I was starting from.</p> <p>About a week in, when I was near the nadir of my learning curve confidence, I found <a href="http://www.nicklewis.org/node/850">this</a> on Nick Lewis' site and I felt some relief; I was not alone: "When you first start, its going to suck: its going to be both boring, and confusing. Can you endure the unpleasant experience of watching yourself suck, while both confused and bored?"</p> <p>Being a newbie, I'm trying to keep in mind all the questions I've had and concepts I needed time to grasp in the hope that I'll be a good teacher to someone else someday. In that spirit I wanted to list some resources that were particularly helpful to me, besides <a href="http://drupal.org/handbooks">drupal.org</a> and "The Google":<br /> <br style="clear: left" /></p> <h3>1. Steve Harley:</h3> <p><a href="http://growingventuresolutions.com/about/team/steve-harley">My colleague and a patient teacher</a> whose depth of knowledge does not obscure his ability to see things through new eyes. We spent many days implementing a very basic theme together for a client prototype site, and in this process Steve gave me a solid conceptual understanding of how Drupal is structured. Access to <a href="http://growingventuresolutions.com/about/team/greg-knaddison">Greg</a> and <a href="http://growingventuresolutions.com/about/team/ezra-barnett-gildesgame">Ezra</a> was also fortunate. The benefit of having an experienced Drupal developer to answer questions cannot be underestimated!</p> <h3>2. Books:</h3> <ul> <li><a href="http://growingventuresolutions.com/blog/drupal-classic-review-using-drupal">Using Drupal</a> – especially chapter 11 on theming.</li> <li><a href="http://growingventuresolutions.com/blog/all-things-theming-review-drupal-6-themes">Drupal 6 Themes</a></li> </ul> <h3>3. Tutorials</h3> <ul> <li><a href="http://mustardseedmedia.com/podcast">mustardseedmedia.com</a>, like, all of them. (Bob – I’m sending a chip in.)</li> <li><a href="http://www.nicklewis.org">Nick Lewis: The Blog</a></li> </ul> <h3>4. Zen theme documentation</h3> <p><a href="http://drupal.org/node/193318">Yep</a>. Handy as hell.</p> <h3>Final note for Drupal theme newbies</h3> <p>This note is for folks like me who come from a solo freelance background serving smallish clients and not worrying too much about coding standards. Validation, sure, but not whether selectors need to be on separate lines. Did I hear a gasp? When Ezra pointed out that my css was not formatted according to Drupal coding standards I said something like, “Well I prefer it THIS way.” Everyone in the room was horrified. So I read the <a href="http://drupal.org/coding-standards">coding standards</a> page in the manual and <a href="http://groups.drupal.org/node/14421">this discussion</a> about why there should be css standards in Drupal, and I now understand the broader picture and I changed my css formatting. That’s one of the biggest shifts in methodology I have made as a designer/coder moving into Drupal: working with the understanding that these are (usually) more powerful sites built by a community where standards and version control make the process run much better for all.</p> http://growingventuresolutions.com/blog/newbie-adventures-theming#comments Planet Drupal front end development theming zen theme Wed, 16 Sep 2009 18:07:04 +0000 evelyn 669 at http://growingventuresolutions.com Designing the site: CrackingDrupal.com - How to build a "speaking" navigation http://growingventuresolutions.com/blog/designing-site-crackingdrupal-com-how-build-speaking-navigation <div style="float: right;"><img src="http://growingventuresolutions.com/gvsfiles/imagecache/bio_small/hs-mezcal_0.jpg" alt="Evelyn's photo" /></div> <p>Hello - I'm Evelyn and I have recently joined GVS as a designer and usability tester. I have been working as a freelancer for the past seven years, and now that my daughter is entering 1st grade I am excited to be spending more face time with grown-ups!</p> <p>My first task as a designer with GVS was to design a site for Greg's book: "Cracking Drupal". This was also my first real-world experience theming for Drupal and with some help, it was pretty simple.</p> <p>I began by chatting with Greg about what he wanted the site to do and how it should look. I also gave him a simple design worksheet to complete with questions such as "Who is your target audience?" and "How do you want people to describe your site?" (If I could ask only one question, this last one would be it.) Greg wanted the site to draw on the cover of the book, and wanted it to be elegant, streamlined and easy to navigate.</p> <p><strong>Book Cover:</strong> As a starting point it was an obvious choice to take the book cover and modify it into the header and footer. I pulled the color palette from the cover as well, and added a burnt orange accent to offset the strong blues and blacks. In general I try to avoid black text on white, so the body copy and some headers are actually a dark blue.</p> <p><strong>Elegant:</strong> I always strive for elegance. By elegance I don't mean just "tasteful, refined or dignified" (Oxford American Dictionary.) For me, elegance in web design is integral to good usability. Even grungy, busy sites, when done well, can be described as elegant. So for Cracking Drupal that meant a clear hierarchy and harmonious color scheme taken from the book.</p> <p><strong>Streamlined and easy to navigate:</strong> Putting myself in the position of the site user, I looked at the main navigation areas Greg wanted. I have to admit that while I sort of knew what "errata" meant, I wouldn't have bet money on it. That led to the use of "Speaking Tabs" - navigation tabs that have a subtext area that describes what one will find on that page. I've seen these tabs here and there and wanted to try them out. I thought they'd be a perfect way to clarify some terminology, but they serve several other purposes as well:</p> <ol> <li>liven up the header area of the site, </li> <li>promote "Growing Venture Solutions" with a prominent position,</li> <li>explain that clicking "purchase" will take you to Amazon.com, and</li> <li>simplify the user experience by letting people know specifics like <em>what excerpts</em> exactly, <em>what downloads</em> are available, etc., without them having to poke around. (Less clicking for some folks = better user experience.)</li> </ol> <p><img src="http://growingventuresolutions.com/gvsfiles/speaking_nav.png" alt="speaking navigation in cracking Drupal menu" /></p> <h3>Create Speaking Navigation in Drupal</h3> <p>For this site we could have just hardcoded the "speaking tabs" text into the theme, but we wanted to do this in a more sustainable way that we could actually use for clients some day. So, how to get the text onto the tabs in a way that is admin editable? We used the Primary Links and put the "speaking" part of the tabs into the "Description:" element of each menu item. Next up was to override the default <a href="http://api.drupal.org/api/function/theme_links">theme_links</a> function to show that text.</p> <p>We created a theme specific override of the function, copied over the default code, and replaced the default line:</p> <p><code>$output .= l($link[&#039;title&#039;], $link[&#039;href&#039;], $link);</code></p> <p>With a bit more code:</p> <p><div class="codeblock"><code>if (isset($link[&#039;attributes&#039;][&#039;title&#039;]) &amp;&amp; $attributes[&#039;class&#039;] != &#039;links inline&#039;) {<br />&nbsp; $link[&#039;html&#039;] = TRUE;<br />&nbsp; $output .= l(check_plain($link[&#039;title&#039;]) . &#039;&lt;span class=&quot;speaking-nav&quot;&gt;&#039;.&nbsp; filter_xss_admin($link[&#039;attributes&#039;][&#039;title&#039;])&nbsp; &#039;&lt;/span&gt;&#039;, $link[&#039;href&#039;], $link);<br />}<br />else {<br />&nbsp; $output .= l($link[&#039;title&#039;], $link[&#039;href&#039;], $link);<br />}</code></div></p> <p>The first line is an important one. The theme_links function is used for a lot of things so this conditional checks for menus that have a description set and where it's not an inline link (you know, those things under a node or comment). For this site that's a solid enough check that it only applies to the primary links, but you may need to do something more.</p> <p>The fun part is inside that conditional where we tell the l function to expect HTML so that we can add a little span with the description in it and then run <a href="http://api.drupal.org/api/function/check_plain">check_plain</a> and <a href="http://api.drupal.org/api/function/filter_xss_admin">filter_xss_admin</a> on the user entered bits to stay safe (naturally).</p> <p>The final result is a site that remains with the style of the book while adding a little extra fun.</p> http://growingventuresolutions.com/blog/designing-site-crackingdrupal-com-how-build-speaking-navigation#comments Planet Drupal cracking drupal design theming Wed, 24 Jun 2009 04:27:13 +0000 evelyn 495 at http://growingventuresolutions.com