Skip to content

Commit

Permalink
Merge pull request #5 from bcastlel/feature/demo
Browse files Browse the repository at this point in the history
add a demo
  • Loading branch information
bcastlel committed Apr 1, 2023
2 parents 6a31372 + f5eae23 commit f12f5c6
Show file tree
Hide file tree
Showing 30 changed files with 6,187 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

**A scroll lock tool for Vue 3.** Works fine on all devices (and browsers). Uses [body-scroll-lock](https://github.com/willmcpo/body-scroll-lock) under the hood. Designed by analogy with [v-scroll-lock](https://github.com/phegman/v-scroll-lock), but intended for Vue 3. I've decided to make it separate from [v-scroll-lock](https://github.com/phegman/v-scroll-lock) because I'm going to improve this tool in the near future.

## Demo
You're welcome to see how it works by clicking on the following link — https://bcastlel.github.io/v3-scroll-lock/

## Installation & Setup
#### NPM
```bash
Expand Down
37 changes: 37 additions & 0 deletions demo-src/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'../.eslintrc.cjs',
'plugin:vue/vue3-recommended',
'@vue/typescript/recommended',
],
rules: {
/* see https://eslint.vuejs.org/rules/#priority-b-strongly-recommended-improving-readability */
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/max-attributes-per-line': ['error', {
singleline: 2,
multiline: 1,
}],

/* see https://eslint.vuejs.org/rules/#uncategorized */
'vue/require-name-property': 'error',

/* see https://eslint.vuejs.org/rules/#extension-rules */
'vue/eqeqeq': 'error',
},
overrides: [
{
files: ['*.ts', '*.vue'],
rules: {
/* see https://www.npmjs.com/package/@typescript-eslint/eslint-plugin */
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
};
13 changes: 13 additions & 0 deletions demo-src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>v3-scroll-lock demo</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit f12f5c6

Please sign in to comment.