For times where you are either lazy to write media queries or you don't have need for a mobile adaptive website
7 |
8 |
9 | nullResponsive is a customizable splash screen that replaces your sites view when breakpoints (mobile | desktop) are reached, essentially covering the mess your site is without media queries
10 |
11 |
12 |
13 |
14 |
15 |
16 | ## 💾 Installation
17 | ```
18 | $ npm install null-responsive-vue
19 | ```
20 |
21 |
22 | ## 📄 Usage
23 | ### Install in your main ts or js file
24 |
25 | ```jsx
26 | import nullResponsive from "null-responsive-vue" // import base css file
27 |
28 | import "null-responsive-vue/styles.css"
29 |
30 | Vue.use(nullResponsive) // install globally
31 | ```
32 |
33 |
34 |
35 | ## 🛠 Config
36 | Pass in the Config props to the component when you place it in any of your vue files
37 |
38 | ```vue
39 |
40 |
41 |
42 |
43 |
57 | ```
58 |
59 | Or you can pass in the config options when installing globally in your main ts or js file
60 |
61 |
62 |
63 |
64 | ```js
65 | // main.js
66 | const nullconfig = {
67 | inputText: "This is the face of a lazy developer, still working on the mobile view mfjpm🙏🏽",
68 | breakpoint: 1000,
69 | imgPath: "/src/assets/img.jpeg",
70 | bg_color: "#e6e6fb",
71 | text_color: "#858586",
72 | };
73 | Vue.use(nullResponsive, nullConfig)
74 | ```
75 |
76 |
77 | ## Props
78 | The props passed determines the splash screen that'd be displayed. Here's a table of all available props
79 |
80 |
81 |
82 | | Prop | Description | Type | Default
83 | | --- | --- | --- | --- |
84 | | inputText | Text content on the splash screen, could also include links using `` | *`string`* | none |
85 | | breakpoint | Sets the breakpoint at which the splash screen comes in px up e.g. `1000` | *`number`* | *`1000`* |
86 | | bg_color | Sets the background color of the splash screen e.g `#e6e6f9` | *`string`* | `#fffff`|
87 | | text_color | Sets the text color of the text content on the splash screen | *`string`* | *`black`*|
88 | | imgPath | Adds a custom image to the content of the splash screen Pass in the relative path to your image resource e.g `imgPath: "/src/assets/splash.png"` | *`string`* | none|
89 | | imglink | To be used when using external images not in your vue app e.g `imglink: "https://res.cloudinary.com/ferventdev/image/upload/.../jesse.svg"` | *`string`* | none|
90 |
91 |
92 | ## Issues
93 | If you experience any anomaly or bug while using the component, feel free to create an issue on this repo
94 | [issues](https://github.com/Akohjesse/nullResponsive/issues/new/choose)
95 |
96 |
97 | ## 👷🏽 Contribution Guide
98 |
99 | If you see any usecase or feature you'd like to explore & add to it, you can contribute by:
100 |
101 | 1. Forking this repository.
102 | 2. Clone the forked repository to your local machine.
103 | 3. Create a new branch with a name like this -feature/name-of-feature.
104 | 4. Run `npm` to install dependencies.
105 | 5. Write code and then commit changes.
106 | 6. Run `npm run build` to compile a build into the dist folder.
107 | 7. To test the feature or bug you've coded run ` npm link ` in your nullResponsive cloned root folder
108 | 8. On the local project you want to test the features on, run ` npm link null-responsive-vue`.
109 | 9. Now navigate back to the terminal on your cloned nullResponsive folder and then run `npm link ../path-to-test-project/node_modules/vue`. Now you can test your changes.
110 | 10. After all is done, push to your forked repository and then send a pull request.
111 |
112 |
113 |
114 | ## ⚖️ Licence
115 |
116 | MIT (c) [Jesse Akoh](https://akohjesse.com).
117 |
--------------------------------------------------------------------------------
/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite App
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/license:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Jesse Akoh
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "null-responsive-vue",
3 | "version": "1.1.4-alpha",
4 | "type": "module",
5 | "main": "dist/index.cjs",
6 | "module": "dist/index.js",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/Akohjesse/nullResponsive.git"
10 | },
11 | "keywords": [
12 | "vue",
13 | "vue-plugin",
14 | "frontend",
15 | "component",
16 | "vue component",
17 | "responsive web design",
18 | "splash screen"
19 | ],
20 | "exports": {
21 | ".": "./dist/index.js",
22 | "./styles.css": "./dist/style.css"
23 | },
24 | "browser": {
25 | "./styles.css": "./dist/style.css"
26 | },
27 | "types": "./dist/nullResponsive.d.ts",
28 | "files": [
29 | "dist"
30 | ],
31 | "author": {
32 | "name": "Jesse Akoh",
33 | "url": "https://akohjesse.com"
34 | },
35 | "scripts": {
36 | "dev": "vite",
37 | "build": "vue-tsc --noEmit && vite build",
38 | "preview": "vite preview --port 4173",
39 | "build-only": "vite build",
40 | "type-check": "vue-tsc --noEmit",
41 | "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
42 | "format": "prettier --write src/"
43 | },
44 | "peerDependencies": {
45 | "vue": "^3.2.37"
46 | },
47 | "license": "MIT",
48 | "devDependencies": {
49 | "@rushstack/eslint-patch": "^1.1.0",
50 | "@types/node": "^16.11.41",
51 | "@vitejs/plugin-vue": "^2.3.3",
52 | "@vue/eslint-config-prettier": "^7.0.0",
53 | "@vue/eslint-config-typescript": "^11.0.0",
54 | "@vue/tsconfig": "^0.1.3",
55 | "eslint": "^8.5.0",
56 | "rollup-plugin-typescript2": "^0.32.1",
57 | "eslint-plugin-vue": "^9.0.0",
58 | "npm-run-all": "^4.1.5",
59 | "prettier": "^2.5.1",
60 | "sass": "^1.26.5",
61 | "sass-loader": "^8.0.2",
62 | "typescript": "~4.7.4",
63 | "vite": "^2.9.12",
64 | "vue-tsc": "^0.38.1"
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |