Package: css.css3githubbuttons
css.css3githubbuttonsIntroductionThis library packagesCSS3 GitHub Buttonsforfanstatic. Check out
ademoof this library - it’s really nice. This library provides
the default buttons and various extensions as per the demo.  As a bonus, this
library also packages up minified versions of the library’s CSS.There’s alotof versions of this CSS library floating around,
so we’re currently using the one provided byCodeFusion, a fork
of the library originally provided bynecolas, on GitHub.If development moves elsewhere, we can adjust the library accordingly.
If you’re using this package and notice a change in development athttps://github.com/CodeFusion/css3-github-buttons/network(such as
someone has taken over development more than original author or is otherwise
doing more work) before we do, let us know or send a pull request.UsageInstall using your favourite method (pip,easy_install,buildout,
etc) and then in your code do this:import css.css3githubbuttons
css.css3githubbuttons.buttons.need()This requires integration between your web framework andfanstatic,
and making sure that the original resources (shipped in theresourcesdirectory incss.css3githubbuttons) are published to some URL.For Pyramid, this can be as simple as installing and utilisingpyramid_fanstatic.ExtensionsCodeFusionhas provided a number of improvements and extensions to the
original library.  This Fanstatic package provides access to these extensions
like so:from css.css3githubbuttons import buttons_ext_sizes, buttons_ext_icons, buttons_ext_allFor extra button sizes (seehttp://demo.codefusionlab.com/css3-github-buttons/ext_button_size/index.html):buttons_ext_sizes.need()For extra (larger) icons (seehttp://demo.codefusionlab.com/css3-github-buttons/ext_button_icons/index.html):buttons_ext_icons.need()Or for everything, do this:buttons_ext_all.need()Keep in mind that extensions automatically depend on the original CSS so
you don’t need toneed()that again!Updating this packageGiven this package uses the latest (at the time of writing) GitHub master
of the CSS library, it may (will) need updating at some point.This process requires installation of the package for development - the
suggested method to do this is via the Buildout within this package:cd css.css3githubbuttons
python boostrap.py
./bin/buildoutFor minification of resources to succeed, you require a Java installation
as this process uses the YUI Compressor library (via theminifyandyuicompressorPython packages).Do this at the base of the repository:pushd css/css3githubbuttons/resources
wget https://github.com/CodeFusion/css3-github-buttons/archive/master.tar.gz
rm -rf css3-github-buttons
tar xf master.tar.gz
rm master.tar.gz
git mv css3-github-buttons-master css3-github-buttons
git add css3-github-buttons
popd
#Minify the CSS
python setup.py minify_buttons
python setup.py minify_buttons_ext_icons
python setup.py minify_buttons_ext_size
git commit -a -m "Updated to latest version"
git pushNoteWe could use Git submodules but setuptools seems tohatethem,setuptools-gitreally doesn’t want to agree with them,zest.releaserdoesn’t support recursive cloning (yet; pull request
sent), and so forth. Feel free to help improve this situation! Yikes!So, let’s resort to manually taking a copy of the files out of GitHub.Tests - How to useYou can importbuttonsfromcss.css3githubbuttonsandneedit
where you want these resources to be included on a page:>>> from css.css3githubbuttons import buttons
>>> buttons.need()Changelog2.1 (2012-12-10)Add minified versions of library and extensions and details how to produce
minified versions.
[davidjb]2.0 (2012-12-07)Switched to using CodeFusion’s fork of necolas’ GitHub buttons.
See demo athttp://demo.codefusionlab.com/css3-github-buttons/. As well as
several fixes, this now provides disabled buttons, no text buttons, colours,
more icons, and more sizes. Backwards compatibility should be maintained if
you are not using new features (some extra CSS is introduced in the basic
file).
[davidjb]1.0.2 (2012-09-05)Fixanotherfailed release. Switch away from using a Git submodule
because of various pieces failing around them.
[davidjb]1.0.1 (2012-09-05)Fix brown bag release.
[davidjb]1.0 (2012-09-05)Initial release.
[davidjb]