Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

64 lines (42 sloc) 2.326 kb

Skeleton CSS ZF2 Module

From http://getskeleton.com:

Skeleton is a small collection of well-organized CSS that can help you rapidly develop sites that look beautiful at any size, be it a 17" laptop screen or an iPhone.

This module provides the assets for Skeleton in a format that can be readily dropped into a Zend Framework 2 application as a module.

Installation

Simply drop this into your "module/" directory. To expose the CSS and images under your document root, you have several options:

1 - Copy them

Probably the easiest way is to simply copy them:

cp -a module/SkeletonModuleCss/public/css public/css/SkeletonCssModule
cp -a module/SkeletonModuleCss/public/images public/images/SkeletonCssModule

2- Symlink them

If you are on a *nix-based system, you can symlink.

cd public/css/
ln -s ../../../module/SkeletonCssModule/public/css SkeletonCssModule
cd ../images
ln -s ../../../module/SkeletonCssModule/public/images SkeletonCssModule

This is also possible on Windows Server 2003 and above; however, you will have to look up the methodology yourself at this time.

3- Use server-based aliasing

On Apache, you can use mod_alias to accomplish this. The most direct way is to specify aliases for each module:

Alias /css/SkeletonCssModule/ /path/to/site/module/SkeletonCssModule/public/css/
Alias /images/SkeletonCssModule/ /path/to/site/module/SkeletonCssModule/public/images/

Alternately, you could use AliasMatch to condense this and serve many modules, assuming they follow the same directory layout:

AliasMatch /(css|images)/([^/]+)/(.*) /path/to/site/module/$2/public/$1/$3

I personally like this approach as it makes it trivial for me to keep my assets module-specific, and thus managed as separate submodule projects.

Similar functionality exists on other web servers; check your server's documentation for ideas on how you might accomplish this.

Notes

You typically should not directly alter the files under a module. As such, the last two examples above (symlinking and aliasing) are very good techniques. However, if you must alter the files, I recommend method 1 above (copying), and then altering the copies. This allows you to version those files, while retaining the module's integrity.

Jump to Line
Something went wrong with that request. Please try again.