Git Product home page Git Product logo

nameless's Introduction

Nameless Drupal theme

devDependency Status

Starting point for drupal theme development and to allow a clean output of content.

Technical goals

  • HTML 5
  • basic html elements should be styled normalized and simple but pretty
  • all Drupal elements should be styled or explicitly left out -> normalize
  • basic Drupal theme scaffolding, preprocessing and resets should be done
  • Cross-browser and device support (IE8+, Firefox, Chrome, Safari, Opera, iOS, Android. IE7 is partly supported)

Usage

  1. Add to %drupalroot%/sites/all/themes
  2. Rename theme and hooks to a project specific name
  3. Update README to contain project specific information
  4. Run bower install to download the required libraries
  5. Run npm install to install the required npm plugins for automation
  6. Delete the .gitignore file or remove the line ignoring the libraries folder
  7. Run grunt to generate the first version of your css files

Quick install via command line

Replace the [placeholder] with your new theme name.

# Go into your theme directory
cd /your/drupal/folder/sites/all/themes/

# Prepare the theme template
git clone [email protected]:wunderkraut/nameless.git
cp -r nameless [placeholder]
cd [placeholder]
rm -rdf .git*

# Rename files
find . -depth -name '*nameless*' -execdir bash -c 'mv -i "$1" "${1//nameless/[placeholder]}"' bash {} \;

# Replace the theme name recursive
find . -depth -type f \( -name '*.info' -o -name 'bower.json' -o -name '*.php' -o -name '*.js' \) -exec sed -i '' s%nameless%[placeholder]% {} +

# Install libraries
bower install

# Compile the css files the first time
compass compile	

Automation with Grunt

@see: Grunt documentation

pre-requisites:

usage in a local dev environment

  • to lint your JavaScript files once, you run grunt jshint

  • to minify images and SVGs, place files in ./images_originals folder and run grunt imagemin or grunt svgmin

  • to compile CSS files from your SASS, run grunt compass:localdev

  • to constantly monitor your theme directory and execute all necessary tasks while developing, you run grunt

  • to lint your SCSS files once, you run grunt scsslint

usage in a CI/production environment

run grunt dist to

  • lint JS files
  • compile compressed CSS from SASS

roadmap

  • compass compile tasks for server/CI with grunt
  • uglifying of JS scripts
  • performance monitoring with phantomas

nameless's People

Contributors

axe312ger avatar

Watchers

Mathieu Spillebeen 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.