-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Mar 24, 2022
1 parent
12b96cd
commit 2bd9bf9
Showing
27 changed files
with
510 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Make sure these boxes are checked before submitting your issue -- thank you! | ||
|
||
- [ ] Check [FAQ](https://github.com/noraesae/perfect-scrollbar/wiki/FAQ) | ||
- [ ] Search if there's already one reported in Issues | ||
- [ ] Prepare a JSFiddle reproducing the issue | ||
- Perfect Scrollbar JSFiddle: https://jsfiddle.net/DanielApt/xv0rrxv3/ | ||
- With jQuery: https://jsfiddle.net/DanielApt/gbfLazpx/ | ||
- [ ] Provide a page or source code where the issue can be checked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Thank you very much for your contribution! Please make sure the followings | ||
are checked. | ||
|
||
- [ ] Read [CONTRIBUTING.md](../CONTRIBUTING.md) | ||
- [ ] Run `gulp` to make sure it builds and lints successfully | ||
- [ ] Provide the scenario this PR will address(some JSFiddles will be perfect) | ||
- Perfect Scrollbar JSFiddle: https://jsfiddle.net/DanielApt/xv0rrxv3/ | ||
- With jQuery: https://jsfiddle.net/DanielApt/gbfLazpx/ | ||
- [ ] Refer to concerning issues if exist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributing | ||
|
||
I *really* welcome contributions! Please feel free to fork and issue pull requests when... | ||
|
||
* You have a very nice idea to improve this plugin! | ||
* You found a bug! | ||
* You're good at English and can help my bad English! | ||
|
||
For IE problems, please refer to [IE Support](https://github.com/noraesae/perfect-scrollbar#ie-support). | ||
|
||
## Introduction | ||
First of all, thank you in advance for your contribution! | ||
|
||
This document will introduce something you should know before making some contributions to **perfect-scrollbar**. I'll try to explain as easy as possible. If there are something missed or not well-documented, please let me know. | ||
|
||
Email: [email protected] | ||
|
||
## Directory Structure | ||
Please don't edit files in the `out` subdirectory as they are generated via Gulp. You'll find source code in the `src` subdirectory! | ||
|
||
`examples` directory is for the example sources. If you have any example you want to add with a new feature, please add it in the directory. | ||
|
||
## Code Conventions | ||
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.** | ||
|
||
Basically, I try to follow [Douglas Crockford's JavaScript Code Conventions](http://javascript.crockford.com/code.html). | ||
|
||
You can check if your code fits in the convention with `gulp lint`. | ||
|
||
## Getting Started | ||
First, ensure that you have stable [Node.js](https://nodejs.org/) and [npm](https://npmjs.com) installed. | ||
|
||
Test if Gulp CLI is installed by running `gulp --version`. If the command isn't found, run `npm install -g gulp`. For more information about installing Gulp, see the Gulp's [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md). | ||
|
||
If `gulp` is installed, follow the steps below. | ||
|
||
1. Fork and clone the repo. | ||
1. Run `npm install` to install all dev dependencies. | ||
1. Run `gulp` to check if Gulp works well. | ||
|
||
Assuming that you don't see any error, you're ready to go. | ||
|
||
## Linting Sources | ||
|
||
You can use `gulp lint` command to lint the source files. If there're warnings with the command, it means that there are something that don't fit into the convention. Please modify the source to fit. | ||
|
||
## Building Sources | ||
|
||
You can use the `gulp build` command to build source files into output files. | ||
|
||
If you want to watch the modification and build automatically during development, use the `gulp serve` command. It'll automatically rebuild the code when there's any change in it. It will also reload example pages, which is quite helpful. | ||
|
||
## Submitting pull requests | ||
|
||
1. Create a new branch. Working in your `master` branch is okay, but not recommended. | ||
1. Modify the sources. | ||
1. Run `gulp` to see if the code fit into the code convention and build without an error. Repeat steps 2-3 until done. | ||
1. Update the documentation to reflect any changes. | ||
1. Create examples if needed. | ||
1. Push to your fork and submit a pull request. | ||
|
||
For further information about pull requests, please refer to GitHub's [Using Pull Requests](https://help.github.com/articles/using-pull-requests). | ||
|
||
## Code Review | ||
|
||
When the pull request is created, anyone can review the source code. After the review is finished and the patch doesn't have any problem, it'll be merged. | ||
|
||
## Conclusion | ||
|
||
The process looks somewhat difficult, but it's necessary to avoid maintanance issues and make the code easy to read and use. | ||
|
||
If there is any opinion or question, please feel free to contact me. | ||
|
||
Email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<title>perfect-scrollbar example</title> | ||
<link href="../dist/css/perfect-scrollbar.css" rel="stylesheet"> | ||
<script src="../dist/js/perfect-scrollbar.js"></script> | ||
<style> | ||
.contentHolder { position:relative; margin:0px auto; padding:0px; width: 600px; height: 400px; overflow: auto; } | ||
.contentHolder .content { background-image: url('./azusa.jpg'); width: 1280px; height: 720px; } | ||
.my-list, textarea { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 130px; | ||
height: 200px; | ||
overflow: scroll; | ||
background-color: rgba(255,255,255,0.6); | ||
} | ||
|
||
.my-list { | ||
left: 140px; | ||
} | ||
|
||
.my-list-two { | ||
left: 280px; | ||
overflow: auto; | ||
} | ||
|
||
ul { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
li { | ||
box-sizing: border-box; | ||
padding: 10px 5px; | ||
border-width: 0 0 1px 0; | ||
list-style-type: none; | ||
margin: 0; | ||
} | ||
|
||
li:nth-child(even) { | ||
background-color: rgba(0,0,0,0.5); | ||
} | ||
|
||
textarea { | ||
font-size: 120%; | ||
} | ||
</style> | ||
</head> | ||
<div id="Default" class="contentHolder"> | ||
<div class="content"> | ||
<textarea cols="20" rows="50"> | ||
Children inside perfect scrollbar can be natively scrolled by the mousewheel. It automatically works for textarea elements, other elements need the .ps-child class. | ||
</textarea> | ||
<div class="ps-child my-list"> | ||
<code>overflow: scroll</code> | ||
<ul><li>One</li><li>Two</li><li>Three</li><li>Four</li><li>Five</li><li>Six</li><li>Seven</li><li>Eight</li></ul> | ||
</div> | ||
<div class="ps-child my-list my-list-two"> | ||
<code>overflow: auto</code> | ||
<ul><li>One</li><li>Two</li><li>Three</li><li>Four</li><li>Five</li><li>Six</li><li>Seven</li><li>Eight</li></ul> | ||
</div> | ||
</div> | ||
</div> | ||
<script type="text/javascript"> | ||
window.onload = function () { | ||
Ps.initialize(document.querySelector('#Default')); | ||
}; | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.