Giter Club home page Giter Club logo

peroxide's Introduction

Code Incarnate

๐Ÿ‘‹ Hi, Iโ€™m Kyle!

I'm a software engineer and user experience designer. I've had a lifetime passion for technology that began with legos, taking apart electronics, and building computers. That passion has continued with over 15 years of professional experience in the tech industry, helping organizations all over the world makes things easier, more convenient, and more civilized.

Find me in the following places:

peroxide's People

Contributors

brynbellomy avatar codeincarnate avatar idflood avatar joshchngs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

peroxide's Issues

Breaking when using Drush

When using a peroxide based theme and trying to do a 'drush dl' I get the following error:

Error: Class 'SassParser' not found in /peroxide/peroxide.engine, line 186

I have Sass (ruby gem version of) installed and there a is check done in your engine code that fails to load The SassParser when in a Drush run.

  // Test for Ruby version first
  @exec("sass -v", $op, $ret);
  if($ret != 0) {
    include_once $path . 'phamlp/sass/SassParser.php';
  }

I can, for now, easily mitigate that by removing the check.

Stylesheet order and CSS caching support

Hi,

I've been having issues with the order my generated files get inserted into $styles, as well as all the generated CSS disappearing when I enable CSS compression/aggregation in Drupal.

I think the best fix is to use the stylesheets[] array in the theme info to supply source files, and process them individually using hook_css_alter. Unfortunately that hook isn't available to theme engines, so you'd have to put a 1-liner in your theme's template.php to get that to work.

I can add the necessary functions if you'll accept a patch.

I'm suggesting adding _peroxide_process_sass()/_peroxide_process_less() functions, and a peroxide_css_alter() implementation which passes any file in stylesheets[] with a scss/sass/less extension to the appropriate function.

You'd just need to put in the theme's template.php
function THEME_css_alter(&$css) {peroxide_css_alter($css);}

Could maybe put it in oxygen's template.php as well, to keep it clean.

Caveat: this obviously only works on D7.

peroxide_render_template() mistakenly calls 'include_once' on templates instead of 'include'

peroxide_render_template() calls the following:
include_once $parser->parse($template, $cached_haml_path, 0755, '.haml', '.tpl.php');

As a result, when trying to render more than one block on a page, you only end up with one block. This goes for any other template that occurs more than once per page. This code needs to be changed to:
include $parser->parse($template, $cached_haml_path, 0755, '.haml', '.tpl.php');

Relative paths (to images, etc) in CSS are broken in most use cases

Because Peroxide (rightly) outputs cached CSS in the files directory, any SASS that uses relative paths to refer to images, etc. ceases to work. We could ask users to configure Peroxide to output its cached CSS into the theme directory, but I don't think this is a very workable solution for most users. Plus, it dirties up each theme's directory when the whole idea behind HAML and SASS is cleanliness.

Two possible solutions:

  1. Rewrite relative paths when SASS is parsed into CSS
  2. Automatically create a symlink in the cached CSS directory to point back to the theme directory (this might be tricky, though, because Peroxide might have trouble knowing for sure that "url(../img)" means that it should create a "{$FILES_DIR}/peroxide/css/img" symlink, and also, this could easily cause output from different themes to clash (theme1/img, theme2/img).

Option 2 sucks, and I only mention it because I manually implemented it on a site I'm about to go live with. I vote for the rewrite option, and I'm happy to implement it if that's what you want to go with.

Port to drupal 6?

Hi, nice theme. Any reasons why this couldn't run in drupal 6. Looking for a cool theme to play with for a project, but it must stay on d6 because of some other modules.

Are you still using / maintaining peroxide?

I'm looking into using your theming engine for a new project but I was wondering if this is something you still plan on caring for in the future since there doesn't seem to be any activity in the past year or so.

Thanks for a great engine.

SASS Extension config classes are included twice when Peroxide engine has to work with a theme that has a base theme

Drupal core's theme.inc calls the theme engine's hook_init() one time for every base theme that's enabled and one time for the current theme. peroxide_init() calls _peroxide_set_sass_options(), which calls SassParser::construct(), which calls
include dirname(FILE).DIRECTORY_SEPARATOR.'extensions'.DIRECTORY_SEPARATOR.$extension.DIRECTORY_SEPARATOR.'config.php';

This means that any extension configuration classes get included multiple times if the current theme happens to have a base theme. To be honest, the bug is really in PHamlP, but Peroxide should probably safeguard against this faulty behavior either by creating a hook that themes can implement to override the default SASS options or by only specifying default extensions for the base theme (or maybe not at all).

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.