Posts Tagged ‘CSS’

Fun stuff with MODx output filters

Friday, November 9th, 2012

Here’s a quick tip about one of the great built in features with MODx. Let’s say that you have a few pages that need some different code in the header of a site. Maybe it is some custom CSS or Javascript. With MODx’s powerful output filters, you can do some pretty cool stuff that will make your like much easier.

Let’s say that you have a part in your template that looks like this:

1
2
3
4
5
6
7
8
<!DOCTYPE HTML>
<html lang='en'>
<head>
    <title>[[*pagetitle]] | [[++site_url]]</title>
    <meta charset="utf-8">
    <base href="[[++site_url]]" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script>
</head>

This is a super basic HTML5 head area. There’s definitely some more meta tags we’d want in there, and I’m including the google hosted jQuery, but this will work for now. Anyway, we want to put in some CSS code in there that only gets applied on certain pages. Here’s one way to do that pretty simply:

First, let’s add that style block to your template.

1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE HTML>
<html lang='en'>
<head>
    <title>[[*pagetitle]] | [[++site_url]]</title>
    <meta charset="utf-8">
    <base href="[[++site_url]]" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script>
    <style type='text/css'>
 
        [[*Inline Style]]
 
    </style>
</head>

Now we can add a Template Variable named “Inline Style” to the system. I like to use textareas for these kinds of things so that you have a little bit more room to type in your new CSS rules. Don’t forget to allow this template to access this Template Variable.

Each page using this template will now be able to have some custom CSS injected into the head, through the use of this Template Variable. Now, let’s say that you want to have a default bit of CSS in there to start with. Well, you can do that with the Output Filter “default”. It looks like this:

8
9
10
11
12
    <style type='text/css'>
 
        [[*Inline Style:default=`body { background-color: #f00; }` ]]
 
    </style>

So now each page will have this CSS by default, and you can override that default CSS by putting something into the Template Variable. Pretty cool, eh?

There are a ton of different output filters, so you can do things like addition, check for value, basic if/else logic, convert strings to dates, and more! Check out the docs, and have fun with your MODx coding!


Mark up your markup with schema.org

Friday, July 20th, 2012

If you haven’t already heard about it, schema.org provides a method to give additional semantic meaning to your markup. One of the benefits to using microdata on your markup is the possibility of a rich snippet being displayed on a search engine’s results page.

Here is how an address could be marked up with HTML:

1941 NW Quimby St. Portland, OR

And the styles applied to it:

.address { font-weight: bold; }
.address em { font-style: normal; color: orange; }

Results in the following:

1941 NW Quimby St. Portland, OR

This is how microdata can be applied using the above example:

1941 NW Quimby St. Portland, OR

The idea here is nothing new. Microformats such has hCard and hRecipe have been around for some time. One of the things that sets schema.org apart from the others is wide variety of objects it supports. Read more information at schema.org to get started!


Beautiful, Dynamic Words with Aierbazzi, jQuery, and @font-face kit

Thursday, May 10th, 2012

Roberto Cecchi created and posted his Aierbazzi (which means “weeds”) font to his web site back in 2008. He has been experimenting with fonts creating illustrations in a simple format, and he has posted creative use of this font for non-commercial applications. The letters in the font are placed one above the other, layering and building a new shape. It’s an interesting concept, and I wanted to re-share it here.

Demo:
Enter a word or phrase in to the box below to see how the illustration begins to emerge. On load, the illustration shows what “ZoomCreates” looks like. Numbers and symbols won’t work, so you must only use upper and lowercase A-Z characters. Also, no spaces allowed.

:ZoomCreates

(more…)


2011 Web Trend: Parallax Scrolling

Monday, January 10th, 2011

First seen in side scrolling video games from the 80′s, Parallax Scrolling is a special technique that gives an illusion of depth in a video game, or in today’s case, a web site. Parallax scrolling uses multiple layers to create the illusion of a 3D space, where background images move slower than foreground images. When used in web design, it can add a great sense of depth to the look of your site and is best used as a header, footer, or background. The effect can be created using CSS and some JQuery plugins (I’ll leave that up the the dev team). To experience this technique in action, check out Silver Back App. You’ll have to scale your screen width to get the full experience. Also, The Old Pulteney Row to the Pole web site uses a top down parallax that is super sweet. Be on the lookout for more designs like these popping up in 2011. For more info and how it can be done, check out Think Vitamin’s post on how to recreate the silverbacks parallax effect.


Cufon vs CSS3 vs Google Font API

Thursday, June 10th, 2010

Dynamic
Fonts are fun!

(this box built with CSS)

As Greg has mentioned in a previous post, using Google’s Font API you’re are no longer limited to “web-safe” fonts! We all love Arial and Times, but there are thousands of other really cool fonts to play with too. Here I’ll compare some options for using custom fonts on the web.
(more…)


Build A Better Dialog Box With jQuery

Tuesday, December 15th, 2009

dialogboxfailLet’s face it…  JavaScript “alert” notifications are boring and can be annoying.  They are ugly and make ding-y sounds when appearing. However, you still need to notify the user upon certain events.  What is a better way to display a dialog box to web users?  Using  jQuery, of course!

EXAMPLES:

First, let’s have an example of the “old” way of doing things with an alert box.  Click Here

Now, the new hotness example:  Click Here

The script is fairly simple, and requires very little code to implement.  No additional images are required, although they can be added on the DIV for an even more-stylized look. The effect is very smooth in comparison to the traditional alert box.  Also, this event can be applied to nearly any HTML element, including links, divs, images, buttons, etc. (more…)


Back to the Basics

Wednesday, December 9th, 2009

iStock_000005624791XSmallWe have an intern coming in next week to hang out with us nerds. He’s a highschool student that would like to see what the day to day tasks of a web programmer are. I’ve talked to him about what he will be doing and what to brush up on. Here are a list of sites that I recommended him click through to brush up on some of the basics of the tools that we use. These are in no particular order.

  • HTML Goodies – This site was one of the first that I used to help me understand HTML and JavaScript. A little outdated, but still great for fundamental learning.
  • Tizag PHP Tutorial – Basics of PHP. This website does an amazing job of putting complex concepts into words that everyone can understand.
  • MySQL Introduction – From the MySQL website, an introduction.
  • W3Schools – Straight from the people who make the standards we love and use, you can learn a bunch on their site about the RIGHT way to do things. Topics in PHP, MySQL, JavaScript, jQuery, CSS and XHTML are where you can learn the tools we use.
  • PHP Screncasts – Some good free video screencasts that show you some of the basic aspects of PHP. Buy it for the advanced videos.

There are more places online that can teach you our toolset. Google is great if you know what you are searching for. The internet is a great thing, and can teach you just about anything you want, especially if it relates to computers and programming.


E-Commerce 101

Thursday, August 13th, 2009

ecommerceThe web sure is great. Can you tell that we love the Internet? You can do so much with it. Need to learn something? Google. Want to buy something? Amazon, eBay or Newegg. Want to sell something? Time to do some research. We are here to help.

If you just want to sell things easily, you can set up an eBay store in a matter of hours. Set each of your items to Buy it Now Only and you can ask the price you want. Are you selling something in the handmade goods niche market? Try out Etsy.com. It’s pretty sweet. Now, if you have a whole catalog of items with a steady inventory and want to use the internet to allow for credit card transactions, shopping carts and more, you’ve got a lot of choices.

There are some tools out there that will help you get your store up and running with an easy system to maintain your customer and item databases. These are usually buy-in systems and we really don’t like them much. Our latest ecommerce project uses a tool called Americommerce. With this system, you can log in and track basically everything. The only trouble is making the thing look pretty. If you have a design that you are trying to follow, then forget about it. You’ll make more progress banging your head against a wall than trying to fight the CSS that is auto-generated with this system. If you don’t care what your site looks like, then this system could be just the right fit. Customizable templates are available and it boasts quite powerful back end functionality.

If you do have a design that you want to follow, then by all means get set up with a foxy cart account. They have the best tools for developers to integrate ecommerce solutions into both existing websites and brand new sites. It works a lot like paypal buttons, except you can style everything according to your client’s colors and logos. It uses a slightly modified jQuery library to connect to their servers so that you don’t have to worry about SSL, HTMLS, secure connections, blah blah blah… they do it for you so you can spend time engaging in fun coding.

So, if you are a developer, next time you get approached with an ecommerce project, don’t choose Americommerce, and choose foxy cart. Spread the word—it’s the best ecommerce solution out there.


W3C Validation & Testing

Thursday, July 30th, 2009
W3C

W3C

Here at Zoom Creates, we’re fanatical about testing & validation of the web sites we produce. Before a web site is launched, our team performs a site-wide validation check for HTML & CSS compliance using the globally-recognized standards taken from the W3C (World Wide Web Consortium).

What the W3C does:
The World Wide Web Consortium (W3C) develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential. W3C is a forum for information, commerce, communication, and collective understanding. It is the organization which all web standards are derived from and should adhere to.

Valid XHTML 1.0 Transitional

Top 3 reasons why validation and testing of a web site is important:

  1. Multi-browser, multi-version, multi-OS compatibility:  Ensure that the site will look the same on every web browser and operating system being used. However, there are some limitations to this (see below).
  2. Search engine indexing: A compliant web site allows search engines to more easily index the contents of a web site, making for superior organic SEO results.
  3. Maintenance and scalability: When future edits need to be made to a web site, starting off with a compliant site provides the developer with a “clean slate” to work from. Not having to go back and fix junky code saves valuable time and costs. (more…)