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

Mise à jour du fork #1

Merged
merged 10 commits into from May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
.idea
.idea
node_modules
26 changes: 13 additions & 13 deletions README.md
@@ -1,5 +1,4 @@
# slimMenu jQuery Navigation Menu Plugin.
***

### slimMenu is a lightweight jQuery plugin, which is made to create responsive and multi-level navigation menus on the fly.

Expand All @@ -12,7 +11,7 @@ With slimMenu, you'll no longer struggle with media queries to create responsive
* Multiple slimMenu navigations on the same page.
* Tap areas to toggle sub menus easily in touch devices.
* Hover option and effects for desktop version.
* Submenu indentation options for responsive version.
* Sub menu indentation options for responsive version.

## Browser Support:
(Tested on following browsers and confirmed that the slimMenu is working.)
Expand All @@ -25,14 +24,12 @@ With slimMenu, you'll no longer struggle with media queries to create responsive
* Android 2.2+
* Mobile Safari

**Note About IE Support:** I don't have time to deal with lower versions of that ancient piece of work. You can fork the project and make it compatible with lower versions of IE if you want. I'll pull it if you send a request.

## Installation:
Add *slimmenu.css* to the head of your document:
Add *dist/css/slimmenu.min.css* to the head of your document:

<link rel="stylesheet" href="slimmenu.css" type="text/css">
<link rel="stylesheet" href="slimmenu.min.css" type="text/css">

Add *jquery.slimmenu.js* after jQuery plugin and before closing body tag.
Add *dist/js/jquery.slimmenu.min.js* after jQuery plugin and before closing body tag.

<script src="jquery.slimmenu.min.js"></script>

Expand All @@ -42,14 +39,17 @@ Create your navigation menu using an ordered list and add *slimmenu* class:

Initilalize the plugin:

$('ul.slimmenu').slimmenu(
$('.slimmenu').slimmenu(
{
resizeWidth: '800', /* Navigation menu will be collapsed when document width is below this size or equal to it. */
resizeWidth: '767', /* Navigation menu will be collapsed when document width is below this size or equal to it. */
initiallyVisible: false, /* Make main navigation menu initially visible on mobile devices without the need to click on expand/collapse icon. */
collapserTitle: 'Main Menu', /* Collapsed menu title. */
animSpeed: 'medium', /* Speed of the submenu expand and collapse animation. */
easingEffect: null, /* Easing effect that will be used when expanding and collapsing menu and submenus. */
indentChildren: false, /* Indentation option for the responsive collapsed submenus. If set to true, all submenus will be indented with the value of the option below. */
childrenIndenter: '&nbsp;' /* Responsive submenus will be indented with this character according to their level. */
animSpeed: 'medium', /* Speed of the sub menu expand and collapse animation. */
easingEffect: null, /* Easing effect that will be used when expanding and collapsing menu and sub menus. */
indentChildren: false, /* Indentation option for the responsive collapsed sub menus. If set to true, all sub menus will be indented with the value of the option below. */
childrenIndenter: '&nbsp;' /* Responsive sub menus will be indented with this character according to their level. */
expandIcon: '<i>&#9660;</i>', /* An icon to be displayed next to parent menu of collapsed sub menus. */
collapseIcon: '<i>&#9650;</i>' /* An icon to be displayed next to parent menu of expanded sub menus. */
});

**Optional** Add easing plugin after jQuery plugin and before closing body tag if you want to use easing effects.
Expand Down
9 changes: 4 additions & 5 deletions demo.html
Expand Up @@ -5,15 +5,15 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="http://meyerweb.com/eric/tools/css/reset/reset.css">
<link rel="stylesheet" type="text/css" href="slimmenu.css">
<link rel="stylesheet" type="text/css" href="dist/css/slimmenu.min.css">
<style>
body {
font-family: 'Lucida Sans Unicode', 'Lucida Console', sans-serif;
padding: 0;
}
a, a:active { text-decoration: none }
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
<ul class="slimmenu">
Expand Down Expand Up @@ -53,14 +53,13 @@
<li><a href="#">Slim Menu 4</a></li>
</ul>

<script src="jquery.slimmenu.js"></script>
<script src="src/js/jquery.slimmenu.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script>
$('ul.slimmenu').slimmenu(
$('.slimmenu').slimmenu(
{
resizeWidth: '800',
collapserTitle: 'Main Menu',
easingEffect:'easeInOutQuint',
animSpeed:'medium',
indentChildren: true,
childrenIndenter: '&raquo;'
Expand Down
1 change: 1 addition & 0 deletions dist/css/slimmenu.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/js/jquery.slimmenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions gulpfile.js
@@ -0,0 +1,30 @@
"use strict";

var gulp = require('gulp'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify');

gulp.task('compile-scss', function () {
gulp.src('./src/scss/*.scss')
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('./dist/css'));
});

gulp.task('minify-js', function () {
gulp.src('./src/js/*.js')
.pipe(uglify())
.pipe(rename({
suffix: '.min'
}))
.pipe(gulp.dest('./dist/js'));
});

gulp.task('watch', function () {
gulp.watch('./src/scss/*.scss', ['compile-scss']);
});

gulp.task('build', ['compile-scss', 'minify-js']);
155 changes: 0 additions & 155 deletions jquery.slimmenu.js

This file was deleted.

8 changes: 0 additions & 8 deletions jquery.slimmenu.min.js

This file was deleted.

10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -2,13 +2,13 @@
"name": "slimmenu",
"version": "1.0.0",
"description": "A lightweight jQuery plugin to help you create responsive and multi-level navigation menus on the fly.",
"main": "jquery.slimmenu.min.js",
"main": "dist/js/jquery.slimmenu.min.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Yproximite/slimmenu.git"
"url": "git+https://github.com/adnantopal/slimmenu.git"
},
"keywords": [
"jquery",
Expand All @@ -21,13 +21,13 @@
"author": "Adnan Topal",
"license": "MIT",
"bugs": {
"url": "https://github.com/Yproximite/slimmenu/issues"
"url": "https://github.com/adnantopal/slimmenu/issues"
},
"homepage": "https://github.com/Yproximite/slimmenu#readme",
"homepage": "https://github.com/adnantopal/slimmenu#readme",
"devDependencies": {
"gulp": "^3.9.0",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.1.0",
"gulp-uglify": "^1.4.2"
}
}
}