Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCSS Version of Navigataur #10

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 28 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@
##Demo
Live Demo: http://micjamking.github.com/Navigataur/

## Compiling
Navigataur ships with an SCSS version, as well as a CSS version compiled from the SCSS version. To compile the SCSS version on your machine, you need to have both [Ruby][1] & [Sass][2] installed. Once installed you can compile by using the following commands:

```
$ cd navigataur_directory
$ compass compile
```

##Usage
To use `navigataur.css`, reference the stylesheet in the `<head>` of your document (or you can place within your own stylesheet).

To work out of the box, you will need to make the following adjustments to your markup (classes can be changed in the stylesheet if you use something different):
* An outer `<div>` with a class of `header`
* An outer `<div>` with a class of `header`
* An `input[type=checkbox]` with an ID of `toggle` and a `div` wrapping around a `label[for=toggle]` with a class of `toggle` and an `onclick` attribute just above your list menu.
* The label also requires two data attributes for displaying the menu open/close text, allowing for complete localisation.
* A list menu (either ul or ol) with a class of `menu`, followed by the closing `div`

```
<input type="checkbox" id="toggle" />
<div>
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu" onclick></label>
``` html
<input type="checkbox" id="toggle">
<nav role="navigation">
<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu" aria-hidden="true" onclick></label>
<ul class="menu">
<li><a href="#">Google</a></li>
<li><a href="#">Facebook</a></li>
<li><a href="#">Youtube</a></li>
<li><a href="#">Facebook</a></li>
<li><a href="#">Youtube</a></li>
<li><a href="#">Twitter</a></li>
</ul>
</div>
</nav>
```

That's it! Everything works out of the box with this setup. However, like any CSS plugin/snippet, you will probably want to stylize it to match your sites theme. I've separated all functional CSS from the presentational CSS so you can jump right in and change everything you need without breaking the plugin. Just edit as needed below the following CSS comment:
Expand All @@ -47,13 +54,22 @@ WebKit rendering engine makes up the vast majority of mobile browsers (iOS, Andr
* iOS 4.0+
* Android 2.3+

*Internet Explorer 8 and below do not support media queries. If you need support for legacy IE versions, you can use an [IE specific stylesheet](http://css-tricks.com/how-to-create-an-ie-only-stylesheet/) to provide some styling support.*
*Internet Explorer 8 and below do not support media queries. If you need support for legacy IE versions, you can use an [IE specific stylesheet][3] to provide some styling support.*


##Details
* This plugin was created in response to [Menutron](https://github.com/micjamking/Menutron), a jquery plugin for responsive navigation menus. While I believe Menutron is more functional, as it provides access to native picker controls on mobile devices, `<select>` controls are not very attractive. Navigataur.css is for those that want the same responsive capabilities, but with more control over the styling.
* If you have any suggestions, comments, or creative insults for my code, [add an issue](https://github.com/micjamking/Navigataur/issues/new) or [fork the repo](https://github.com/micjamking/Navigataur/fork_select).
* This plugin was created in response to [Menutron][4], a jquery plugin for responsive navigation menus. While I believe Menutron is more functional, as it provides access to native picker controls on mobile devices, `<select>` controls are not very attractive. Navigataur.css is for those that want the same responsive capabilities, but with more control over the styling.
* If you have any suggestions, comments, or creative insults for my code, [add an issue][5] or [fork the repo][6].


##Copyright
[BSD license](http://opensource.org/licenses/bsd-license.php) Copyright (c) 2012 Mike King ([@micjamking](http://twitter.com/micjamking))
[BSD license][7] Copyright (c) 2012 Mike King ([@micjamking][8])

[1]: https://www.ruby-lang.org/
[2]: http://www.sass-lang.com/
[3]: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/
[4]: https://github.com/micjamking/Menutron
[5]: https://github.com/micjamking/Navigataur/issues/new
[6]: https://github.com/micjamking/Navigataur/fork_select
[7]: http://opensource.org/licenses/bsd-license.php
[8]: https://twitter.com/micjamking
25 changes: 25 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Require any additional compass plugins here.

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"

# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = :expanded

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false


# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
154 changes: 0 additions & 154 deletions navigataur.css

This file was deleted.

Loading