Giter Site home page Giter Site logo

alavetelitheme's Introduction

Alavetelitheme

This is a "hello world" type theme package for Alaveteli.

The intention is to support simple overlaying of templates and resources without the need to touch the core Alaveteli software.

Typical usage should be limited to that described in the documentation:

To install:

In the Alaveteli general.yml configuration file change the default mysociety theme repository to your theme repository in the THEME_URLS setting:

THEME_URLS:
  - 'git://github.com/YOUR_GITHUB_USERNAME/YOUR_THEME_NAME.git'

You can then switch the theme the application is using:

bundle exec rake themes:install

To run tests:

To run tests, in the Alaveteli Rails.root (with this theme installed):

    bundle exec rspec lib/themes/alavetelitheme/spec

Copyright (c) 2011 mySociety, released under the MIT license

alavetelitheme's People

Contributors

crowbot avatar garethrees avatar gbp avatar lizconlan avatar mhl avatar mlandauer avatar nigeljonez avatar robinhouston avatar scjody avatar sebbacon avatar wrightmartin avatar zarino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

alavetelitheme's Issues

A theme name with a hyphen breaks the automagic setting up of view paths

When I have a theme named (for example) panama-theme, I get the following error on loading a view:

undefined local variable or method `set_view_paths_for_panama'

Presumably because something goes awry in the meta-programming that should create this method: https://github.com/mysociety/alavetelitheme/blob/master/lib/alavetelitheme.rb#L1-L13

Copying the section from wtdk's theme which is more explicit: https://github.com/mysociety/whatdotheyknow-theme/blob/master/lib/alavetelitheme.rb#L4-L15 works fine however.

Sorry I can't be of more help. FWIW, adding some puts statements into the alavetelitheme.rb tells me that:

  • THEME_NAME is correctly deduced to be panama-theme
  • path_function_name becomes set_view_paths_for_panama-theme

So I guess the problem is in the define_method bit?

Fix user dropdown menu target

The arrow to open the dropdown is in slightly the wrong place, clicking on the username goes to the profile page instead:

screen shot 2017-03-08 at 17 41 56

Overriding of public_body_categories_en.rb doesn't happen as documented

There is a lib/public_body_categories_en.rb file in alavetelitheme as an example but it looks like that file actually needs to be in lib/lib/public_body_categories_en.rb.

I've looked through a couple of alaveteli themes. See for example:
https://github.com/dcabo/asktheeu-theme/blob/master/lib/lib/public_body_categories_en.rb

If this is expected then it would be good to move the file in this example alavetelitheme and change the documentation in alaveteli.

Check for accidental regressions of css enhancements from 0.27

  • The user menu dropdown appears blank as it's white text on a white background
  • The arrow to open the dropdown is in slightly the wrong place, clicking on the username goes to the profile page instead
    screen shot 2017-03-08 at 17 41 56
  • Follow buttons need styling
  • New request call to action text on the request page should be black
  • Status description text on request page should be black

AssetNotPrecompiled exception

screen shot 2017-09-12 at 15 35 40

Sprockets::Rails::Helper::AssetNotPrecompiled in RequestController#show

Asset was not declared to be precompiled in production. Add
`Rails.application.config.assets.precompile += %w( logo-opengraph.png )` 
to `config/initializers/assets.rb` and restart your server

When loading any page under 0dee8c3 on mysociety/alaveteli@c8f2707.

Refactor alavetelitheme

  • Strip out some of the customisations - make it less opinionated
  • Porting over button styles, and colour variable setup from whatdotheyknow-theme

Footer is always detached from the literal foot of page

This fragment...

<a href="#content" class="show-with-keyboard-focus-only skip-to-link">Back to content</a>

...sits outside and after the footer on WDTK and lots of other sites, and causes a white space of approx 1em to appear underneath the footer. It's hideous. And if it's required, shouldn't it be above the footer anyway?

Dev server doesn't autoreload/re-apply theme's monkey patches

It would be a nicer experience developing an alaveteli theme if the dev server auto-reloaded the code you're working on. Currently if you change something in, say, controller_patches.rb you have to stop and start the server before it's picked up and applied. It looks like this is the intention, with sections like: https://github.com/mysociety/alavetelitheme/blob/master/lib/controller_patches.rb#L1-L9 but it doesn't seem to work as intended. Perhaps it's something about when/how this is run? https://github.com/mysociety/alavetelitheme/blob/master/lib/alavetelitheme.rb#L24-L29 (I'm afraid my rails knowledge is a bit too limited to be of more help here)

before_filter is deprecated

Required by mysociety/alaveteli#3969

$ BUNDLE_GEMFILE="Gemfile.rails5" bundle exec rspec spec/models/
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from <class:Base> at /home/vagrant/alaveteli/lib/themes/alavetelitheme/lib/alavetelitheme.rb:12)

Mobile nav menu cannot be closed once it is opened

sort

Looking at the page source, I think it might be a CSS specificity issue, where the proper behaviour (eg: display: none for a.open when the menu is open) is getting overridden by a slightly more specific selector from somewhere else. And likewise, the .close button is affected by the same bug.

screen shot 2015-10-23 at 11 51 27

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.