Giter Site home page Giter Site logo

bacanapps / patternlab-php-drupal7 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from magique/patternlab-php-drupal7

0.0 2.0 0.0 1.18 MB

Drupal 7 framework version of Pattern Lab (PHP version)

PHP 68.68% JavaScript 6.43% CSS 15.14% Shell 0.08% HTML 9.38% Ruby 0.29%

patternlab-php-drupal7's Introduction

Drupal 7 flavour of Pattern Lab PHP

This is a Drupal 7 flavour of Pattern Lab PHP

We have cloned the v0.3.5 version of this repo and made some folder structure changes, stripped out some of the examples that was bloating it as a framework and added in some Drupal specific markup

Structure principles

The structure of the Pattern Lab navigation (atoms, molecules, organisms) is using Brad Frosts 'Atomic Design'

CSS

Use of SASS, Compass and Singularitygs is used as a standard on our projects

We code using the SMACSS methodology: http://smacss.com/

Setting up a project from this repo

PHP 5.3+ must be installed while you are generating patterns and building the public version of the website (either locally or on a server) Singularitygs is our preferred grid system: https://github.com/Team-Sass/Singularity/wiki

  1. Download this repo into the folder you wish to work in
  2. Ensure sass, compass and singularitygs is installed (you may need to run the commands with sudo in front)
gem install sass
gem install compass
gem install singularitygs
  1. You now need to generate the site for the first time - this will populate the public folder. Run the following command (from the project folder root) or open the following script: scripts/generateSite.command
php builder/builder.php -g
  1. You should now be able to view our out of the box version of Pattern Lab website by opening the following file
public/index.html
  1. Make edits to the generated code from inside the source folder
  2. To get the changes you make reflected in the public version of the website you'll need to watch that folder for changes by using the following command (from the project folder root)
php builder/builder.php -w
  1. Making edits/additions to the scss files requires you to watch the source folder to compile the CSS, using the following command from inside the source folder
compass watch

Viewing a page without the Pattern Lab navigation

We will need to show the client the files inside the pages folder without the Pattern Lab navigation, when opening these pages we should be able to jump around the links to other pages in the site

  1. Open the file directly from inside the public folder, so to open the Homepage we'd just open the following file
public/patterns/04-pages-00-homepage/04-pages-00-homepage.html
  1. The pages folder also has a .json file for each .mustache file allows us to add in real data into the pages that the client would be viewing as a representation of their site, there are more details available on this of the Pattern Lab PHP wiki

Front end specifics

  1. Fitvids.js can be used for responsive videos assets/js/vendor/jquery.fitvids.js
  2. Drupal 7 can have the jQuery version updated to 1.8.2 currently (this is the version running by default on the style guide - see pattern-header-footer/footer.html)
  3. We will be using the Drupal 7 picture module to serve different images by breakpoint so follow the same output and detail out inside the images atom
  4. Use icomoon for handling icons - this will allow they to be easily scalable, treated with CSS and quality maintained for retina devices. The Pattern Lab already have an example of icons using icomoon
  5. Use compass spiriting to generate sprite(s) for use in the CSS, use a mixin that allows for retina sprites too (This is a good one as a starting point: https://github.com/AdamBrodzinski/Retina-Sprites-for-Compass)

patternlab-php-drupal7's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.