codevise / pageflow

Multimedia story telling for the web.
http://pageflow.io
MIT License
686 stars 125 forks source link

Theme generation doesn't apply $theme-name #384

Closed tilsammans closed 8 years ago

tilsammans commented 8 years ago

I've just generated a new theme but the $theme-name variable is still listed as default.

Isn't this supposed to become the theme name?

The contents of my app/assets/stylesheets/pageflow/themes/scrollytelling/variables.css.scss:

$theme-name: "default";

$main-color: #e84d2c;
$main-color-dark: #b14a08;

$focus-color: #c1c1c1;

$anchor-color: #e84d2c;

$basic-background-color: #353535;
$basic-background-color-transparent: rgba(53, 53, 53, 0.9);
$header-background-color: gray;

$addInfobox-text-color: #fff; /* for the description text inside the info box */
$addInfobox-controls-text-color: #ccc; /* for control text like durations */
$addInfobox-background-color: #191919;
$addInfobox-border-color: #505050;

$standard-font: SourceSansPro;
$standard-font-size: 16px;
tilsammans commented 8 years ago

Yep, confirmed, the generator gsubs the default.css.css but in a0ad811bf0f738e9f5881b992379e465dd7d977e this was refactored into variables.css.scss.

https://github.com/codevise/pageflow/blob/29867548d8efa876f0834c4855901c4b0694edac/lib/generators/pageflow/theme/theme_generator.rb#L15

tf commented 8 years ago

Right. I'd be happy to accept a PR.

tilsammans commented 8 years ago

I will fix. I meant to do it test-driven but I can't get the specs to run locally. No idea why.

bundle exec rspec spec/generators/pageflow/theme/theme_generator_spec.rb 
/Users/joost/.rbenv/versions/2.1.4/lib/ruby/gems/2.1.0/gems/actionpack-4.0.4/lib/action_view/template.rb:8:in `<class:Template>': uninitialized constant ActiveSupport::Autoload (NameError)
tf commented 8 years ago

Thanks. Have you tried using the binstubs in the exec directory? (I'll rename it to bin soon to match rubygems conventions). exec/rspec sets up the dummy app on first test run. See also the notes in CONTRIBUTING.md. You need to provide the DB password via an environment variable.