This example shows how easy you can use the Breakpoints of Bootstrap 3, which are different of the default Bootstrap 4 breakpoints
4 |
5 |
Extra small
6 |
Small
7 |
Middle
8 |
Large
9 |
10 |
11 | The sourcecode of the lines above:
12 |
13 |
14 |
15 |
16 |
17 |
18 |
32 |
33 |
42 |
--------------------------------------------------------------------------------
/Documentation/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | permalink: "/Documentation/"
3 | ---
4 |
5 | # Documentation for Vue-Responsive
6 | (WIP)
7 |
8 | ## Introduction
9 |
10 | This Plugin adds the ability to hide or show html-elements relative to the screen width. To specify when an element should be hidden it's necessary to define screen-widths as hidden or visible. As default everything is visible, possible parameters for bootstrap 4 breakpoints are:
11 |
12 | - **hiden-all**: This parameter hides the element in every resolution and has to be overriden in certain widths. Which results in combinations like: `"['hidden-all','xs']"` => The element is only visible at an extra small width (smartphones).
13 |
14 | - **hidden-xs**: The element is only hidden when the screen width is extra small but not on any larger width.
15 |
16 | - **hidden-sm**: The element is only hidden when the screen width is small but not on any smaller or larger width.
17 |
18 | - **hidden-md**: The element is only hidden when the screen width is medium but not on any smaller or larger width.
19 |
20 | - **hidden-lg**: The element is only hidden when the screen width is large but not on any smaller or larger width.
21 |
22 | - **hidden-xl**: The element is only hidden when the screen width is extra large but not on any smaller width. This parameter is not available when using bootstrap 3 breakpoints.
23 |
24 | - The parameter name without hidden makes the element visible, hidden-all is necessary in that case.
25 |
26 | Of course the parameters can be combined. For instance:
27 |
28 | ```javascript
29 |
30 |
This example shows how you can use classes instead of only hide/show elements
4 |
5 | Just add "v-responsive.class" into an element and it will always have class on it, consisting of the prefix of the choosen set of breakpoints and the current breakpoint.
6 | Bootstrap 4 and a middle size Scren will add the class "bs4-md".
7 |
13 |
14 |
15 |
71 |
72 |
93 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | // Template version: 1.3.1
3 | // see http://vuejs-templates.github.io/webpack for documentation.
4 |
5 | const path = require('path')
6 |
7 | module.exports = {
8 | dev: {
9 |
10 | // Paths
11 | assetsSubDirectory: 'static',
12 | assetsPublicPath: '/',
13 | proxyTable: {},
14 |
15 | // Various Dev Server settings
16 | host: 'localhost', // can be overwritten by process.env.HOST
17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
18 | autoOpenBrowser: false,
19 | errorOverlay: true,
20 | notifyOnErrors: true,
21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
22 |
23 | // Use Eslint Loader?
24 | // If true, your code will be linted during bundling and
25 | // linting errors and warnings will be shown in the console.
26 | useEslint: true,
27 | // If true, eslint errors and warnings will also be shown in the error overlay
28 | // in the browser.
29 | showEslintErrorsInOverlay: false,
30 |
31 | /**
32 | * Source Maps
33 | */
34 |
35 | // https://webpack.js.org/configuration/devtool/#development
36 | devtool: 'cheap-module-eval-source-map',
37 |
38 | // If you have problems debugging vue-files in devtools,
39 | // set this to false - it *may* help
40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting
41 | cacheBusting: true,
42 |
43 | cssSourceMap: true
44 | },
45 |
46 | build: {
47 | // Template for index.html
48 | index: path.resolve(__dirname, '../dist/index.html'),
49 |
50 | // Paths
51 | assetsRoot: path.resolve(__dirname, '../dist'),
52 | assetsSubDirectory: 'static/',
53 | assetsPublicPath: '',
54 |
55 | /**
56 | * Source Maps
57 | */
58 |
59 | productionSourceMap: true,
60 | // https://webpack.js.org/configuration/devtool/#production
61 | devtool: '#source-map',
62 |
63 | // Gzip off by default as many popular static hosts such as
64 | // Surge or Netlify already gzip all static assets for you.
65 | // Before setting to `true`, make sure to:
66 | // npm install --save-dev compression-webpack-plugin
67 | productionGzip: false,
68 | productionGzipExtensions: ['js', 'css'],
69 |
70 | // Run the build command with an extra argument to
71 | // View the bundle analyzer report after build finishes:
72 | // `npm run build --report`
73 | // Set to `true` or `false` to always turn it on or off
74 | bundleAnalyzerReport: process.env.npm_config_report
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/components/DemoOne.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
A Vue.js responsivity plugin
4 |
A Vue.js responsivity plugin
5 |
A Vue.js responsivity plugin
6 |
A Vue.js responsivity plugin
7 |
A Vue.js responsivity plugin
8 |
9 |
extra large
10 |
large
11 |
medium
12 |
small
13 |
extra small
14 |
15 |
16 |
v-responsive=
XS
SM
MD
LG
XL
17 |
['hidden-all', 'xs', 'xl']
.
.
18 |
['hidden-xs']
.
.
.
.
19 |
['hidden-xs', 'hidden-sm']
.
.
.
20 |
['hidden-all', 'lg', 'xl']
.
.
21 |
['hidden-all', 'xl']
.
22 |
['hidden-all', 'xs', 'md', 'xl']
.
.
.
23 |
24 |
25 | The sourcecode of the two lines above:
26 |
27 |
28 |
29 |
30 |
31 |
32 |
52 |
53 |
65 |
--------------------------------------------------------------------------------
/code-of-conduct.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, gender identity and expression, level of experience,
9 | nationality, personal appearance, race, religion, or sexual identity and
10 | orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team of the github repository. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at [http://contributor-covenant.org/version/1/4][version]
72 |
73 | [homepage]: http://contributor-covenant.org
74 | [version]: http://contributor-covenant.org/version/1/4/
75 |
--------------------------------------------------------------------------------
/dist/Vue-Responsive.min.js:
--------------------------------------------------------------------------------
1 | /*! Vue-Responsive v1.3.1
2 | * @Url: https://github.com/reinerBa/Vue-Responsive
3 | * @License: MIT, Reiner Bamberger
4 | */
5 | !function(e,s){"function"==typeof define&&define.amd?define(["exports","babel-runtime/helpers/typeof","babel-runtime/helpers/toConsumableArray"],s):"undefined"!=typeof exports?s(exports,require("babel-runtime/helpers/typeof"),require("babel-runtime/helpers/toConsumableArray")):(s(s={},e._typeof,e.toConsumableArray),e.index=s)}(this,function(e,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.vueResponsive=void 0;var r=n(s),P=n(i);function n(e){return e&&e.__esModule?e:{default:e}}var t,_={idIncrement:1,resizeListeners:null,init:!1,_rPermissions:{bs4:{xs:{min:-1,max:543},sm:{min:544,max:767},md:{min:768,max:991},lg:{min:992,max:1199},xl:{min:1200,max:1/0}},bs3:{xs:{min:-1,max:767},sm:{min:768,max:991},md:{min:992,max:1199},lg:{min:1200,max:1/0}}},allProperties:{}},a={bind:function(e,s,i){var r=!!_._rPermissions.default,n=!!s.modifiers.class;if(!_.init){for(var t in i.context.$data){if(0===t.indexOf("responsiveMarks$$")){var a,o=String(t).replace("responsiveMarks$$","").toLowerCase();for(a in _._rPermissions[o]={},i.context.$data[t])_._rPermissions[o][a]=i.context.$data[t][a]}"responsiveDefault$$"===t&&(r=i.context.$data[t])}_._rPermissions.undefined=r?_._rPermissions[r]:_._rPermissions.bs4,_.init++}var l,d=["hidden-all"],p=[],u=r?_._rPermissions.defaultName:s.arg||"bs4";for(l in _._rPermissions[s.arg])d.push(l),p.push(l),d.push("hidden-"+l);_.resizeListeners||(_.resizeListeners={},window.addEventListener("resize",function(){for(var e in _.resizeListeners)isNaN(e)||_.resizeListeners[e]()})),e.style.display&&(e.dataset.initialDisplay=e.style.display||getComputedStyle(e,null).display);var f=[],m=window.Object.keys(s.modifiers);if(!n)if(m.some(function(e){return~p.indexOf(e.replace(/\+|-/g,""))}))m.forEach(function(e){}),f.push.apply(f,(0,P.default)(m)),f.push("hidden-all"),f.sort();else if(Array.isArray(s.value)||"string"==typeof s.expression&&s.expression.match(/[*]/))(f=Array.isArray(s.value)?s.value:(m=s.expression.replace(/'/g,'"'),JSON.parse(m))).sort();else if(s.value instanceof Object)for(var c in s.value)s.value[c]&&f.push(c);else{if("string"!=typeof s.value&&"string"!=typeof s.expression)return;var v=s.value||s.expression.replace(/'"/g,"");(f=new Array(v)).sort()}v=String(_.idIncrement++);e.dataset.responsives=v;var y={lastBp:"",bpSet:u,useClass:n},n=f.indexOf("hidden-all");if(~n)for(var x in f.splice(n,1),_._rPermissions[s.arg])y[x]=0;else for(var b in _._rPermissions[s.arg])y[b]=1;for(var h=0;h=n[e].min&&i<=n[e].max){s.lastBp!==e&&(_.allProperties[o].useClass?(t.classList.add(s.bpSet+"-"+e),t.classList.remove(s.bpSet+"-"+s.lastBp)):s[e]?t.style.display=r:t.style.setProperty("display","none","important"),_.allProperties[o].lastBp=e);break}}null!=t.dataset.responsives&&(o=t.dataset.responsives,s(),_.resizeListeners[o]=s)},unbind:function(e,s,i){e=e.dataset.responsives;delete _.resizeListeners[e]},install:function(e,s){"object"===(void 0===s?"undefined":(0,r.default)(s))&&s.breakpoints&&(_._rPermissions.default=s.breakpoints),e.directive("responsive",a)}};e.vueResponsive=a,e.default=a;try{var o=(o=document.currentScript)||(t=document.getElementsByTagName("script"))[t.length-1];Boolean(o.getAttribute("notGlobal"))||"undefined"==typeof window||"function"!=typeof window.Vue||window.Vue.use(a)}catch(e){console.error(e)}});
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # Vue-Responsive
6 |
7 |
8 |
9 | [](https://vuejs.org/)
10 | [](https://www.npmjs.com/package/vue-responsive)
11 | [](https://npmjs.com/package/vue-responsive)
12 | [](https://github.com/reinerBa/vue-responsive/blob/master/LICENSE)
13 | [](https://raw.githubusercontent.com/reinerBa/Vue-Responsive/master/dist/Vue-Responsive.min.js)
14 | [](https://GitHub.com/reinerBa/vue-responsive/stargazers/)
15 |
16 |
17 | [](https://nodei.co/npm/vue-responsive/)
18 |
19 | **Breaking Changes for verison 1.x:**
20 |
21 | - **Tag is now `v-responsive` the old `v-responsiveness` is no longer supported.**
22 | - **The file `Vue_Responsive.common.js` does no longer exist**
23 |
24 | Is a directive to use responsive breakpoints on html elements. Because sometimes it's nice to have a chance to let the view do resolution specific things.
25 |
26 | - **No further Dependencies**
27 | - **🔧 Chrome, Firefox, IE11+**
28 |
29 |
30 | 📺 Check the [Demo](https://reinerba.github.io/Vue-Responsive/dist/)-link (IE11-[Demo](http://reinerba.github.io/Vue-Responsive/Demo.html) without webpack)
31 |
32 | 📖 [Docs](https://reinerba.github.io/Vue-Responsive/Documentation/)
33 |
34 | ## 🔧 Install
35 | `npm install vue-responsive`
36 |
37 | ```javascript
38 |
39 | import responsive from 'vue-responsive'
40 | Vue.use(responsive)
41 | ```
42 |
43 | or in your Browser as **CDN**:
44 | ``
45 |
46 | ## 👈 Shortest usecase
47 |
48 | Just put the breakpoint identifiers behind the directive with dots:
49 |
50 | ```html
51 |
52 |
67 | Only visible in small and extra-small windows
68 |
69 |
70 |
Big Jumbotron
71 |
72 |
73 |
74 |
82 | ```
83 |
84 | # Features
85 |
86 | This directive adds responsive Feautures to single HTML-Elements without CSS or @Media.
87 |
88 | The default Responsive breaks follow Bootstrap 4 [Responsive Utils](https://v4-alpha.getbootstrap.com/layout/responsive-utilities/).
89 |
90 | The Bootstrap 3 breakpoints are includes as well.
91 |
92 | ## Do you miss a feature?
93 | Take charge and file an issue or [add your idea](http://feathub.com/reinerBa/Vue-Responsive/features/new) or [vote for your favorite feature](http://feathub.com/reinerBa/Vue-Responsive) to be implemented:
94 |
95 | [](http://feathub.com/reinerBa/Vue-Responsive)
96 |
97 | # Usage
98 |
99 | In the browser just include the script and use the directive on a Html-Element inside a Vue Element
100 |
101 |
102 |
103 | **Advanced:** If you do not want the directive to be globally available just add the attribute *notGlobal* with a not empty value in the script tag and define it the components with:
104 |
105 |
106 | ```html
107 |
108 |
109 | ...
110 | directives:{
111 | // the global variable is 'index.vueResponsive'
112 | responsive: index.vueResponsive
113 | }
114 | ```
115 |
116 | ## For Bootstrap 4 breakpoints
117 | At default every resolution is visible, the hidden-all tag changes this to everything hidden (display:none). These tags are valid **hidden-all**, **xs**, **sm**, **md**, **lg**, **xl**, **hidden-xs**,...,**hidden-xl**.
118 |
119 | ```javascript
120 |
121 |
Big Title
122 |
Only visible in Middle and large Size View
123 |
Only hidden at lg
124 |
125 |
Jumbotron
126 | ... //in the vue object
127 | data:{
128 | middleSize:['hidden-all','lg','xl']
129 | }
130 |
131 | ```
132 |
133 | ## For Bootstrap 3 breakpoints
134 | Just add **:bs3** after the directive to use bootstrap 3 breakpoints:
135 |
136 | ```javascript
137 |
138 |
139 | As you can see on the big picture below.
140 |
141 |
142 | ```
143 |
144 | In this defintion the **xl** breakpoint doesn't exist.
145 |
146 | ## For self defined breakpoints
147 | First you have to declar your own breakpoints in the component/root wich wraps the html-elements with the directive. Every definition must start with **responsiveMarks$$** and a following name. So you can easily create breakpoints to differentiate between desktop and smartphones for instance, as you can see in the demo.html:
148 |
149 | ```javascript
150 |
151 |
152 | Visible on smartphone
153 |
154 |
155 |
156 | ... //in the vue object
157 | data:{
158 | responsiveMarks$$twoMarks: { //set a custom breakpoint with the name "twoMarks"
159 | smartphone: {
160 | show: true,
161 | min: -1,
162 | max: 767
163 | },
164 | desktop: {
165 | show: true,
166 | min: 768,
167 | max: Infinity
168 | }
169 | }
170 | }
171 |
172 | ```
173 |
174 | You can declar as much own definitions as you wish. Every defintion should have **min:-1** for its smalles breakpoint and **max:Infinity** for its biggest.
175 |
176 |
177 | ### Planned
178 | - Mixin to trigger methods on breakpoint change
179 | - Add and remove classes instead of changing only the style
180 |
181 | # License
182 | MIT [](/LICENSE.md)
183 |
--------------------------------------------------------------------------------
/dist/assets/main.8bea553f.css:
--------------------------------------------------------------------------------
1 |
2 | table td[data-v-46488d3e], table th[data-v-46488d3e] {
3 | border: 1px solid black;
4 | padding: 3px;
5 | }
6 | td[data-v-46488d3e]:not(:empty):not(:first-of-type){background-color:lime;color:transparent;}
7 | .demoOne[data-v-46488d3e]{
8 | max-width: 850px;
9 | margin: 0 auto;
10 | }
11 |
12 | p[data-v-5c23a6f4] {
13 | padding: 5px;
14 | background-color: rgba(76, 255, 0,.4);
15 | width: fit-content;
16 | margin-left: auto;
17 | margin-right: auto;
18 | }
19 | code[data-v-5c23a6f4] {
20 | text-align: left;
21 | }
22 | .demoTwo[data-v-5c23a6f4] {
23 | max-width: 850px;
24 | margin: 0 auto;
25 | }
26 |
27 | .demoThree[data-v-7313f052] {
28 | max-width: 850px;
29 | margin: 0 auto;
30 | }
31 | h4.title[data-v-7313f052] {
32 | margin-left: 6em;
33 | }
34 |
35 | .demoFour[data-v-f98d1a6c]{
36 | margin: auto;
37 | margin-left: 100px;
38 | }
39 | .demo-block[data-v-f98d1a6c]{
40 | width: 40%;
41 | border: 1px solid blue;
42 | padding: 1rem;
43 | position: relative;
44 | display: inline-block;
45 | margin: 1rem;
46 | }
47 |
48 | .demoFive[data-v-42ef45ee]{
49 | margin: auto;
50 | margin-left: 100px;
51 | }
52 | .demo-block[data-v-42ef45ee]{
53 | width: 40%;
54 | border: 1px solid blue;
55 | padding: 1rem;
56 | position: relative;
57 | display: inline-block;
58 | margin: 1rem;
59 | }
60 |
61 | .ul[data-v-7d57b4ce]{
62 | display: flex;
63 | flex-wrap: wrap;
64 | }
65 | .ul > div[data-v-7d57b4ce] {
66 | margin: 3px 0;
67 | }
68 | .ul > div > span[data-v-7d57b4ce] {
69 | width: 75%;
70 | background-color: lightblue;
71 | padding: 0 15%;
72 | }
73 | .bs4-lg[data-v-7d57b4ce], .bs4-xl[data-v-7d57b4ce] {
74 | color: darkblue;
75 | width: 33%;
76 | }
77 | .bs4-xl[data-v-7d57b4ce] {
78 | width: 25%
79 | }
80 | .bs4-md[data-v-7d57b4ce] {
81 | color: green;
82 | width: 50%;
83 | }
84 | .bs4-sm[data-v-7d57b4ce], .bs4-xs[data-v-7d57b4ce] {
85 | color: red;
86 | font-weight: bold;
87 | width: 100%;
88 | }
89 | p[data-v-7d57b4ce] {
90 | padding: 5px;
91 | width: fit-content;
92 | margin-left: auto;
93 | margin-right: auto;
94 | }
95 | code[data-v-7d57b4ce] {
96 | text-align: left;
97 | }
98 | .demoSix[data-v-7d57b4ce] {
99 | max-width: 850px;
100 | margin: 0 auto;
101 | margin-left: 6em;
102 | }
103 |
104 | .header[data-v-308776dc]{
105 | position: sticky;
106 | top: 0;
107 | border: 1px solid black;
108 | padding: .5rem;
109 | margin-left: 100px;
110 | background-color: white;
111 | }
112 | .header > span[data-v-308776dc] {
113 | margin: 3px;
114 | }
115 | .marked[data-v-308776dc]{
116 | background-color: darkorange;
117 | border-radius: 10%;
118 | padding: 3px;
119 | }
120 | input[type="radio"][data-v-308776dc] {
121 | display: none;
122 | }
123 |
124 | .topInfo[data-v-4013c930]{
125 | position: fixed;
126 | top: 0;
127 | left: 0;
128 | width: 75px;
129 | }
130 | .source-toggle[data-v-4013c930] {
131 | margin-top: .25rem;
132 | }
133 | #topInfo[data-v-4013c930] {
134 | padding: 4px;
135 | border: 3px dashed orange;
136 | background-color: rgba(76, 255, 0,.4);
137 | color: darkturquoise;
138 | }
139 | label[data-v-4013c930] {
140 | font-size: small;
141 | }
142 | pre[data-v-4013c930] {
143 | background-color: #f5f5f5e8;
144 | border: 1px solid black;
145 | padding: .25rem;
146 | font-size: smaller;
147 | width: fit-content;
148 | text-align: left;
149 | }
150 |
151 | footer {
152 | position: fixed;
153 | bottom: 0;
154 | padding: 2px;
155 | width: 100%;
156 | text-align: center;
157 | background-color: antiquewhite;
158 | }
159 | #app {
160 | font-family: 'Avenir', Helvetica, Arial, sans-serif;
161 | -webkit-font-smoothing: antialiased;
162 | -moz-osx-font-smoothing: grayscale;
163 | text-align: center;
164 | color: #2c3e50;
165 | }
166 | body {
167 | margin-bottom: 1em;
168 | background-color: ghostwhite;
169 | margin-top: 0;
170 | text-align: center;
171 | font-family:'Segoe UI','Franklin Gothic Medium', Arial
172 | }
173 | .hljs{display:block;overflow-x:auto;padding:0.5em;background:#F0F0F0}.hljs,.hljs-subst{color:#444}.hljs-comment{color:#888888}.hljs-keyword,.hljs-attribute,.hljs-selector-tag,.hljs-meta-keyword,.hljs-doctag,.hljs-name{font-weight:bold}.hljs-type,.hljs-string,.hljs-number,.hljs-selector-id,.hljs-selector-class,.hljs-quote,.hljs-template-tag,.hljs-deletion{color:#880000}.hljs-title,.hljs-section{color:#880000;font-weight:bold}.hljs-regexp,.hljs-symbol,.hljs-variable,.hljs-template-variable,.hljs-link,.hljs-selector-attr,.hljs-selector-pseudo{color:#BC6060}.hljs-literal{color:#78A960}.hljs-built_in,.hljs-bullet,.hljs-code,.hljs-addition{color:#397300}.hljs-meta{color:#1f7199}.hljs-meta-string{color:#4d99bf}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
174 | /**
175 | * prism.js default theme for JavaScript, CSS and HTML
176 | * Based on dabblet (http://dabblet.com)
177 | * @author Lea Verou
178 | */
179 |
180 | code[class*="language-"],
181 | pre[class*="language-"] {
182 | color: black;
183 | background: none;
184 | text-shadow: 0 1px white;
185 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
186 | font-size: 1em;
187 | text-align: left;
188 | white-space: pre;
189 | word-spacing: normal;
190 | word-break: normal;
191 | word-wrap: normal;
192 | line-height: 1.5;
193 |
194 | -moz-tab-size: 4;
195 | -o-tab-size: 4;
196 | tab-size: 4;
197 |
198 | -webkit-hyphens: none;
199 | -moz-hyphens: none;
200 | -ms-hyphens: none;
201 | hyphens: none;
202 | }
203 |
204 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
205 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
206 | text-shadow: none;
207 | background: #b3d4fc;
208 | }
209 |
210 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
211 | code[class*="language-"]::selection, code[class*="language-"] ::selection {
212 | text-shadow: none;
213 | background: #b3d4fc;
214 | }
215 |
216 | @media print {
217 | code[class*="language-"],
218 | pre[class*="language-"] {
219 | text-shadow: none;
220 | }
221 | }
222 |
223 | /* Code blocks */
224 | pre[class*="language-"] {
225 | padding: 1em;
226 | margin: .5em 0;
227 | overflow: auto;
228 | }
229 |
230 | :not(pre) > code[class*="language-"],
231 | pre[class*="language-"] {
232 | background: #f5f2f0;
233 | }
234 |
235 | /* Inline code */
236 | :not(pre) > code[class*="language-"] {
237 | padding: .1em;
238 | border-radius: .3em;
239 | white-space: normal;
240 | }
241 |
242 | .token.comment,
243 | .token.prolog,
244 | .token.doctype,
245 | .token.cdata {
246 | color: slategray;
247 | }
248 |
249 | .token.punctuation {
250 | color: #999;
251 | }
252 |
253 | .token.namespace {
254 | opacity: .7;
255 | }
256 |
257 | .token.property,
258 | .token.tag,
259 | .token.boolean,
260 | .token.number,
261 | .token.constant,
262 | .token.symbol,
263 | .token.deleted {
264 | color: #905;
265 | }
266 |
267 | .token.selector,
268 | .token.attr-name,
269 | .token.string,
270 | .token.char,
271 | .token.builtin,
272 | .token.inserted {
273 | color: #690;
274 | }
275 |
276 | .token.operator,
277 | .token.entity,
278 | .token.url,
279 | .language-css .token.string,
280 | .style .token.string {
281 | color: #9a6e3a;
282 | /* This background color was intended by the author of this theme. */
283 | background: hsla(0, 0%, 100%, .5);
284 | }
285 |
286 | .token.atrule,
287 | .token.attr-value,
288 | .token.keyword {
289 | color: #07a;
290 | }
291 |
292 | .token.function,
293 | .token.class-name {
294 | color: #DD4A68;
295 | }
296 |
297 | .token.regex,
298 | .token.important,
299 | .token.variable {
300 | color: #e90;
301 | }
302 |
303 | .token.important,
304 | .token.bold {
305 | font-weight: bold;
306 | }
307 | .token.italic {
308 | font-style: italic;
309 | }
310 |
311 | .token.entity {
312 | cursor: help;
313 | }
314 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | // For Bootstrap 4
2 | const bootstrap4Breakpoints = {
3 | xs: {
4 | min: -1,
5 | max: 543
6 | },
7 | sm: {
8 | min: 544,
9 | max: 767
10 | },
11 | md: {
12 | min: 768,
13 | max: 991
14 | },
15 | lg: {
16 | min: 992,
17 | max: 1199
18 | },
19 | xl: {
20 | min: 1200,
21 | max: Infinity
22 | }
23 | }
24 |
25 | // For Bootstrap 3
26 | const bootstrap3Breakpoints = {
27 | xs: {
28 | min: -1,
29 | max: 767
30 | },
31 | sm: {
32 | min: 768,
33 | max: 991
34 | },
35 | md: {
36 | min: 992,
37 | max: 1199
38 | },
39 | lg: {
40 | min: 1200,
41 | max: Infinity
42 | }
43 | }
44 |
45 | const self = {
46 | idIncrement: 1,
47 | resizeListeners: null,
48 | init: false,
49 | _rPermissions: {
50 | bs4: bootstrap4Breakpoints,
51 | bs3: bootstrap3Breakpoints
52 | },
53 | allProperties: {} // id: {lastBp:'', pointsName: '', dataset: {}}
54 | }
55 |
56 | var vueResponsive = {
57 | bind: function (el, binding, vnode) {
58 | // Bootstrap 4 Repsonsive Utils default
59 | var componentHasDefault = !!self._rPermissions.default
60 | let useClass = !!binding.modifiers.class
61 | if (!self.init) {
62 | for (let i in vnode.context.$data) {
63 | if (i.indexOf('responsiveMarks$$') === 0) {
64 | var name = String(i).replace('responsiveMarks$$', '').toLowerCase()
65 | self._rPermissions[name] = {}
66 |
67 | for (let ii in vnode.context.$data[i]) self._rPermissions[name][ii] = vnode.context.$data[i][ii]
68 | }
69 | if (i === 'responsiveDefault$$') componentHasDefault = vnode.context.$data[i]
70 | }
71 | // Set bs4 as default if not default is explicitly set
72 | self._rPermissions.undefined = componentHasDefault ? self._rPermissions[componentHasDefault] : self._rPermissions.bs4
73 | self.init++
74 | }
75 | var validInputs = ['hidden-all']
76 | let validPositiv = []
77 | let choosenBPointsName = componentHasDefault ? self._rPermissions.defaultName : (binding.arg || 'bs4')
78 | for (let key in self._rPermissions[binding.arg]) {
79 | validInputs.push(key)
80 | validPositiv.push(key)
81 | validInputs.push('hidden-' + key)
82 | }
83 |
84 | // if this is the first element with this directive that gets bound add the resize listener
85 | if (!self.resizeListeners) {
86 | self.resizeListeners = {}
87 |
88 | // adds a single resize listener for all elements
89 | window.addEventListener('resize', function () {
90 | // calls the checkDisplay function for all elements that are active in the DOM and use this directive
91 | for (let i in self.resizeListeners) if (!isNaN(i)) self.resizeListeners[i]()
92 | })
93 | }
94 |
95 | // if the element has a user defined css-value, save it!
96 | if (el.style.display) el.dataset.initialDisplay = el.style.display ? el.style.display : getComputedStyle(el, null).display
97 |
98 | let preParams = []
99 |
100 | // need a case for the short syntax
101 | // are the modifiers decisive?
102 | let modifiers = window.Object.keys(binding.modifiers)
103 | if (useClass);
104 | else if (modifiers.some(k => ~validPositiv.indexOf(k.replace(/\+|-/g, '')))) {
105 | modifiers.forEach(m => {
106 | // if (/^(\+|-)|(\+|-)$/g.test(modifiers))
107 | })
108 | preParams.push(...modifiers)
109 | preParams.push('hidden-all')
110 | preParams.sort()
111 | } else if (Array.isArray(binding.value) || (typeof binding.expression === 'string' && binding.expression.match(/[*]/))) {
112 | if (Array.isArray(binding.value)) {
113 | preParams = binding.value
114 | } else {
115 | var stringArray = binding.expression.replace(/'/g, '"')
116 | preParams = JSON.parse(stringArray)
117 | }
118 | preParams.sort()
119 | } else if (binding.value instanceof Object) {
120 | for (let i in binding.value) {
121 | if (binding.value[i]) preParams.push(i)
122 | }
123 | } else if (typeof binding.value === 'string' || typeof binding.expression === 'string') { // a single parameter
124 | var val = binding.value || binding.expression.replace(/'"/g, '')
125 | preParams = new Array(val)
126 | preParams.sort()
127 | } else {
128 | return // no parameter given, no work :/
129 | }
130 | // init the permission object with an id
131 | let rId = String(self.idIncrement++)
132 |
133 | // save the settings for this element in it's dataset
134 | el.dataset.responsives = rId
135 | var rPermissions = { lastBp: '', bpSet: choosenBPointsName, useClass }
136 |
137 | let hiddenAllIndex = preParams.indexOf('hidden-all')
138 | if (~hiddenAllIndex) {
139 | preParams.splice(hiddenAllIndex, 1)
140 | // disallow all breakpoints as initial value
141 | for (let i in self._rPermissions[binding.arg]) rPermissions[i] = 0
142 | } else {
143 | // allow all breakpoints as initial value
144 | for (let k in self._rPermissions[binding.arg]) rPermissions[k] = 1
145 | }
146 |
147 | for (let i = 0; i < preParams.length; i++) {
148 | let item = preParams[i]
149 | if (!~validInputs.indexOf(item)) continue
150 | if (item.indexOf('hidden') === 0) { // hidden-..
151 | var key = item.split('-')[1]
152 | rPermissions[key] = 0 // show = false
153 | } else {
154 | rPermissions[item] = 1 // show = true
155 | }
156 | }
157 |
158 | self.allProperties[rId] = rPermissions
159 | },
160 |
161 | /**
162 | * Is callend when the element is inserted into the DOM
163 | *
164 | * @param {object} el html element
165 | * @param {object} binding the parameters of the mixin
166 | * @param {object} vnode the virtual html elment
167 | */
168 | inserted: function (el, binding, vnode) {
169 | if (el.dataset.responsives == null) return
170 | // todo: throw error if isNaN
171 | let resizeListenerId = el.dataset.responsives
172 |
173 | /**
174 | * This function checks the current breakpoint constraints for this element
175 | */
176 | function checkDisplay () {
177 | var myPermissions = self.allProperties[resizeListenerId] // JSON.parse(el.dataset.responsives)
178 | var curWidth = window.innerWidth
179 | var initial = el.dataset.initialDisplay ? el.dataset.initialDisplay : ''
180 | var parameters = self._rPermissions[binding.arg]
181 | for (let i in parameters) {
182 | if (curWidth >= parameters[i].min && curWidth <= parameters[i].max) {
183 | if (myPermissions.lastBp !== i) {
184 | if (self.allProperties[resizeListenerId].useClass) {
185 | el.classList.add(myPermissions.bpSet + '-' + i)
186 | el.classList.remove(myPermissions.bpSet + '-' + myPermissions.lastBp)
187 | } else {
188 | if (myPermissions[i]) el.style.display = initial
189 | else el.style.setProperty('display', 'none', 'important');
190 | }
191 |
192 | self.allProperties[resizeListenerId].lastBp = i
193 | }
194 | break
195 | }
196 | }
197 | }
198 | checkDisplay()
199 | self.resizeListeners[resizeListenerId] = checkDisplay
200 | },
201 |
202 | /**
203 | * Is called when the html element is removed from DOM
204 | *
205 | * @param {object} el html element
206 | * @param {object} binding the parameters of the mixin
207 | * @param {object} vnode the virtual html elment
208 | */
209 | unbind: function (el, binding, vnode) {
210 | let resizeListenerId = el.dataset.responsives
211 | delete self.resizeListeners[resizeListenerId]
212 | }
213 | }
214 |
215 | /**
216 | * Install vue-responsive globally to Vue.js
217 | *
218 | * @param {object} Vue the constructor of the framework
219 | * @param {object} options parameter to modify the behavior of the plugin
220 | * @return {void} returns nothing
221 | */
222 | vueResponsive.install = function (Vue, options) {
223 | if (typeof (options) === 'object' && options.breakpoints) {
224 | self._rPermissions.default = options.breakpoints
225 | }
226 | Vue.directive('responsive', vueResponsive)
227 | }
228 |
229 | // https://babeljs.io/docs/plugins/transform-es2015-modules-umd/
230 | export {vueResponsive}
231 | export default vueResponsive
232 |
233 | // Check if the directive should be used globally
234 | try {
235 | var notGlobal = false
236 | var currScriptFn = document.currentScript
237 | currScriptFn = currScriptFn || (function () {
238 | var scripts = document.getElementsByTagName('script')
239 | return scripts[scripts.length - 1]
240 | })()
241 | notGlobal = Boolean(currScriptFn.getAttribute('notGlobal'))
242 | if (!notGlobal && typeof window !== 'undefined' && typeof window.Vue === 'function') window.Vue.use(vueResponsive)
243 | } catch (idk) { console.error(idk) }
244 |
--------------------------------------------------------------------------------
/dist/Vue-Responsive.js:
--------------------------------------------------------------------------------
1 | /*! Vue-Responsive v1.3.1
2 | * @Url: https://github.com/reinerBa/Vue-Responsive
3 | * @License: MIT, Reiner Bamberger
4 | */
5 | (function (global, factory) {
6 | if (typeof define === "function" && define.amd) {
7 | define(['exports', 'babel-runtime/helpers/typeof', 'babel-runtime/helpers/toConsumableArray'], factory);
8 | } else if (typeof exports !== "undefined") {
9 | factory(exports, require('babel-runtime/helpers/typeof'), require('babel-runtime/helpers/toConsumableArray'));
10 | } else {
11 | var mod = {
12 | exports: {}
13 | };
14 | factory(mod.exports, global._typeof, global.toConsumableArray);
15 | global.index = mod.exports;
16 | }
17 | })(this, function (exports, _typeof2, _toConsumableArray2) {
18 | 'use strict';
19 |
20 | Object.defineProperty(exports, "__esModule", {
21 | value: true
22 | });
23 | exports.vueResponsive = undefined;
24 |
25 | var _typeof3 = _interopRequireDefault(_typeof2);
26 |
27 | var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
28 |
29 | function _interopRequireDefault(obj) {
30 | return obj && obj.__esModule ? obj : {
31 | default: obj
32 | };
33 | }
34 |
35 | // For Bootstrap 4
36 | var bootstrap4Breakpoints = {
37 | xs: {
38 | min: -1,
39 | max: 543
40 | },
41 | sm: {
42 | min: 544,
43 | max: 767
44 | },
45 | md: {
46 | min: 768,
47 | max: 991
48 | },
49 | lg: {
50 | min: 992,
51 | max: 1199
52 | },
53 | xl: {
54 | min: 1200,
55 | max: Infinity
56 | }
57 |
58 | // For Bootstrap 3
59 | };var bootstrap3Breakpoints = {
60 | xs: {
61 | min: -1,
62 | max: 767
63 | },
64 | sm: {
65 | min: 768,
66 | max: 991
67 | },
68 | md: {
69 | min: 992,
70 | max: 1199
71 | },
72 | lg: {
73 | min: 1200,
74 | max: Infinity
75 | }
76 | };
77 |
78 | var self = {
79 | idIncrement: 1,
80 | resizeListeners: null,
81 | init: false,
82 | _rPermissions: {
83 | bs4: bootstrap4Breakpoints,
84 | bs3: bootstrap3Breakpoints
85 | },
86 | allProperties: {} // id: {lastBp:'', pointsName: '', dataset: {}}
87 | };
88 |
89 | var vueResponsive = {
90 | bind: function bind(el, binding, vnode) {
91 | // Bootstrap 4 Repsonsive Utils default
92 | var componentHasDefault = !!self._rPermissions.default;
93 | var useClass = !!binding.modifiers.class;
94 | if (!self.init) {
95 | for (var i in vnode.context.$data) {
96 | if (i.indexOf('responsiveMarks$$') === 0) {
97 | var name = String(i).replace('responsiveMarks$$', '').toLowerCase();
98 | self._rPermissions[name] = {};
99 |
100 | for (var ii in vnode.context.$data[i]) {
101 | self._rPermissions[name][ii] = vnode.context.$data[i][ii];
102 | }
103 | }
104 | if (i === 'responsiveDefault$$') componentHasDefault = vnode.context.$data[i];
105 | }
106 | // Set bs4 as default if not default is explicitly set
107 | self._rPermissions.undefined = componentHasDefault ? self._rPermissions[componentHasDefault] : self._rPermissions.bs4;
108 | self.init++;
109 | }
110 | var validInputs = ['hidden-all'];
111 | var validPositiv = [];
112 | var choosenBPointsName = componentHasDefault ? self._rPermissions.defaultName : binding.arg || 'bs4';
113 | for (var _key in self._rPermissions[binding.arg]) {
114 | validInputs.push(_key);
115 | validPositiv.push(_key);
116 | validInputs.push('hidden-' + _key);
117 | }
118 |
119 | // if this is the first element with this directive that gets bound add the resize listener
120 | if (!self.resizeListeners) {
121 | self.resizeListeners = {};
122 |
123 | // adds a single resize listener for all elements
124 | window.addEventListener('resize', function () {
125 | // calls the checkDisplay function for all elements that are active in the DOM and use this directive
126 | for (var _i in self.resizeListeners) {
127 | if (!isNaN(_i)) self.resizeListeners[_i]();
128 | }
129 | });
130 | }
131 |
132 | // if the element has a user defined css-value, save it!
133 | if (el.style.display) el.dataset.initialDisplay = el.style.display ? el.style.display : getComputedStyle(el, null).display;
134 |
135 | var preParams = [];
136 |
137 | // need a case for the short syntax
138 | // are the modifiers decisive?
139 | var modifiers = window.Object.keys(binding.modifiers);
140 | if (useClass) ;else if (modifiers.some(function (k) {
141 | return ~validPositiv.indexOf(k.replace(/\+|-/g, ''));
142 | })) {
143 | var _preParams;
144 |
145 | modifiers.forEach(function (m) {
146 | // if (/^(\+|-)|(\+|-)$/g.test(modifiers))
147 | });
148 | (_preParams = preParams).push.apply(_preParams, (0, _toConsumableArray3.default)(modifiers));
149 | preParams.push('hidden-all');
150 | preParams.sort();
151 | } else if (Array.isArray(binding.value) || typeof binding.expression === 'string' && binding.expression.match(/[*]/)) {
152 | if (Array.isArray(binding.value)) {
153 | preParams = binding.value;
154 | } else {
155 | var stringArray = binding.expression.replace(/'/g, '"');
156 | preParams = JSON.parse(stringArray);
157 | }
158 | preParams.sort();
159 | } else if (binding.value instanceof Object) {
160 | for (var _i2 in binding.value) {
161 | if (binding.value[_i2]) preParams.push(_i2);
162 | }
163 | } else if (typeof binding.value === 'string' || typeof binding.expression === 'string') {
164 | // a single parameter
165 | var val = binding.value || binding.expression.replace(/'"/g, '');
166 | preParams = new Array(val);
167 | preParams.sort();
168 | } else {
169 | return; // no parameter given, no work :/
170 | }
171 | // init the permission object with an id
172 | var rId = String(self.idIncrement++);
173 |
174 | // save the settings for this element in it's dataset
175 | el.dataset.responsives = rId;
176 | var rPermissions = { lastBp: '', bpSet: choosenBPointsName, useClass: useClass };
177 |
178 | var hiddenAllIndex = preParams.indexOf('hidden-all');
179 | if (~hiddenAllIndex) {
180 | preParams.splice(hiddenAllIndex, 1);
181 | // disallow all breakpoints as initial value
182 | for (var _i3 in self._rPermissions[binding.arg]) {
183 | rPermissions[_i3] = 0;
184 | }
185 | } else {
186 | // allow all breakpoints as initial value
187 | for (var k in self._rPermissions[binding.arg]) {
188 | rPermissions[k] = 1;
189 | }
190 | }
191 |
192 | for (var _i4 = 0; _i4 < preParams.length; _i4++) {
193 | var item = preParams[_i4];
194 | if (!~validInputs.indexOf(item)) continue;
195 | if (item.indexOf('hidden') === 0) {
196 | // hidden-..
197 | var key = item.split('-')[1];
198 | rPermissions[key] = 0; // show = false
199 | } else {
200 | rPermissions[item] = 1; // show = true
201 | }
202 | }
203 |
204 | self.allProperties[rId] = rPermissions;
205 | },
206 |
207 | /**
208 | * Is callend when the element is inserted into the DOM
209 | *
210 | * @param {object} el html element
211 | * @param {object} binding the parameters of the mixin
212 | * @param {object} vnode the virtual html elment
213 | */
214 | inserted: function inserted(el, binding, vnode) {
215 | if (el.dataset.responsives == null) return;
216 | // todo: throw error if isNaN
217 | var resizeListenerId = el.dataset.responsives;
218 |
219 | /**
220 | * This function checks the current breakpoint constraints for this element
221 | */
222 | function checkDisplay() {
223 | var myPermissions = self.allProperties[resizeListenerId]; // JSON.parse(el.dataset.responsives)
224 | var curWidth = window.innerWidth;
225 | var initial = el.dataset.initialDisplay ? el.dataset.initialDisplay : '';
226 | var parameters = self._rPermissions[binding.arg];
227 | for (var i in parameters) {
228 | if (curWidth >= parameters[i].min && curWidth <= parameters[i].max) {
229 | if (myPermissions.lastBp !== i) {
230 | if (self.allProperties[resizeListenerId].useClass) {
231 | el.classList.add(myPermissions.bpSet + '-' + i);
232 | el.classList.remove(myPermissions.bpSet + '-' + myPermissions.lastBp);
233 | } else {
234 | if (myPermissions[i]) el.style.display = initial;else el.style.setProperty('display', 'none', 'important');
235 | }
236 |
237 | self.allProperties[resizeListenerId].lastBp = i;
238 | }
239 | break;
240 | }
241 | }
242 | }
243 | checkDisplay();
244 | self.resizeListeners[resizeListenerId] = checkDisplay;
245 | },
246 |
247 | /**
248 | * Is called when the html element is removed from DOM
249 | *
250 | * @param {object} el html element
251 | * @param {object} binding the parameters of the mixin
252 | * @param {object} vnode the virtual html elment
253 | */
254 | unbind: function unbind(el, binding, vnode) {
255 | var resizeListenerId = el.dataset.responsives;
256 | delete self.resizeListeners[resizeListenerId];
257 | }
258 |
259 | /**
260 | * Install vue-responsive globally to Vue.js
261 | *
262 | * @param {object} Vue the constructor of the framework
263 | * @param {object} options parameter to modify the behavior of the plugin
264 | * @return {void} returns nothing
265 | */
266 | };vueResponsive.install = function (Vue, options) {
267 | if ((typeof options === 'undefined' ? 'undefined' : (0, _typeof3.default)(options)) === 'object' && options.breakpoints) {
268 | self._rPermissions.default = options.breakpoints;
269 | }
270 | Vue.directive('responsive', vueResponsive);
271 | };
272 |
273 | // https://babeljs.io/docs/plugins/transform-es2015-modules-umd/
274 | exports.vueResponsive = vueResponsive;
275 | exports.default = vueResponsive;
276 |
277 |
278 | // Check if the directive should be used globally
279 | try {
280 | var notGlobal = false;
281 | var currScriptFn = document.currentScript;
282 | currScriptFn = currScriptFn || function () {
283 | var scripts = document.getElementsByTagName('script');
284 | return scripts[scripts.length - 1];
285 | }();
286 | notGlobal = Boolean(currScriptFn.getAttribute('notGlobal'));
287 | if (!notGlobal && typeof window !== 'undefined' && typeof window.Vue === 'function') window.Vue.use(vueResponsive);
288 | } catch (idk) {
289 | console.error(idk);
290 | }
291 | });
--------------------------------------------------------------------------------
/dist/assets/main.793bb65e.js:
--------------------------------------------------------------------------------
1 | import { V as VuePrism } from "./vendor.5582453e.js";
2 | const p = function polyfill() {
3 | const relList = document.createElement("link").relList;
4 | if (relList && relList.supports && relList.supports("modulepreload")) {
5 | return;
6 | }
7 | for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
8 | processPreload(link);
9 | }
10 | new MutationObserver((mutations) => {
11 | for (const mutation of mutations) {
12 | if (mutation.type !== "childList") {
13 | continue;
14 | }
15 | for (const node of mutation.addedNodes) {
16 | if (node.tagName === "LINK" && node.rel === "modulepreload")
17 | processPreload(node);
18 | }
19 | }
20 | }).observe(document, { childList: true, subtree: true });
21 | function getFetchOpts(script) {
22 | const fetchOpts = {};
23 | if (script.integrity)
24 | fetchOpts.integrity = script.integrity;
25 | if (script.referrerpolicy)
26 | fetchOpts.referrerPolicy = script.referrerpolicy;
27 | if (script.crossorigin === "use-credentials")
28 | fetchOpts.credentials = "include";
29 | else if (script.crossorigin === "anonymous")
30 | fetchOpts.credentials = "omit";
31 | else
32 | fetchOpts.credentials = "same-origin";
33 | return fetchOpts;
34 | }
35 | function processPreload(link) {
36 | if (link.ep)
37 | return;
38 | link.ep = true;
39 | const fetchOpts = getFetchOpts(link);
40 | fetch(link.href, fetchOpts);
41 | }
42 | };
43 | p();
44 | var render$8 = function() {
45 | var _vm = this;
46 | var _h = _vm.$createElement;
47 | var _c = _vm._self._c || _h;
48 | return _c("div", { staticClass: "demoOne" }, [_c("h1", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "xl"], expression: "['hidden-all','xl']" }] }, [_vm._v("A Vue.js responsivity plugin")]), _c("h2", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "lg"], expression: "['hidden-all','lg']" }] }, [_vm._v("A Vue.js responsivity plugin")]), _c("h3", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "md"], expression: "['hidden-all','md']" }] }, [_vm._v("A Vue.js responsivity plugin")]), _c("h4", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "sm"], expression: "['hidden-all','sm']" }] }, [_vm._v("A Vue.js responsivity plugin")]), _c("h5", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "xs"], expression: "['hidden-all','xs']" }] }, [_vm._v("A Vue.js responsivity plugin")]), _c("h1", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "xl"], expression: "['hidden-all','xl']" }] }, [_vm._v("extra large")]), _c("h2", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "lg"], expression: "['hidden-all','lg']" }] }, [_vm._v("large")]), _c("h3", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "md"], expression: "['hidden-all','md']" }] }, [_vm._v("medium")]), _c("h4", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "sm"], expression: "['hidden-all','sm']" }] }, [_vm._v("small")]), _c("h5", { directives: [{ name: "responsive", rawName: "v-responsive", value: ["hidden-all", "xs"], expression: "['hidden-all','xs']" }] }, [_vm._v("extra small")]), _vm._m(0), _c("h4", [_vm._v(" The sourcecode of the two lines above: ")]), _c("pre", { staticClass: "language-html" }, [_c("code", { domProps: { "textContent": _vm._s(_vm.code) } })])]);
49 | };
50 | var staticRenderFns$8 = [function() {
51 | var _vm = this;
52 | var _h = _vm.$createElement;
53 | var _c = _vm._self._c || _h;
54 | return _c("table", { staticStyle: { "margin": "15px auto", "border-spacing": "0" } }, [_c("tr", [_c("th", [_vm._v("v-responsive=")]), _c("th", [_vm._v("XS")]), _c("th", [_vm._v("SM")]), _c("th", [_vm._v("MD")]), _c("th", [_vm._v("LG")]), _c("th", [_vm._v("XL")])]), _c("tr", [_c("td", [_vm._v("['hidden-all', 'xs', 'xl']")]), _c("td", [_vm._v(".")]), _c("td"), _c("td"), _c("td"), _c("td", [_vm._v(".")])]), _c("tr", [_c("td", [_vm._v("['hidden-xs']")]), _c("td"), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")])]), _c("tr", [_c("td", [_vm._v("['hidden-xs', 'hidden-sm']")]), _c("td"), _c("td"), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")])]), _c("tr", [_c("td", [_vm._v("['hidden-all', 'lg', 'xl']")]), _c("td"), _c("td"), _c("td"), _c("td", [_vm._v(".")]), _c("td", [_vm._v(".")])]), _c("tr", [_c("td", [_vm._v("['hidden-all', 'xl']")]), _c("td"), _c("td"), _c("td"), _c("td"), _c("td", [_vm._v(".")])]), _c("tr", [_c("td", [_vm._v("['hidden-all', 'xs', 'md', 'xl']")]), _c("td", [_vm._v(".")]), _c("td"), _c("td", [_vm._v(".")]), _c("td"), _c("td", [_vm._v(".")])])]);
55 | }];
56 | var DemoOne_vue_vue_type_style_index_0_scoped_true_lang = "";
57 | function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
58 | var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
59 | if (render2) {
60 | options.render = render2;
61 | options.staticRenderFns = staticRenderFns2;
62 | options._compiled = true;
63 | }
64 | if (functionalTemplate) {
65 | options.functional = true;
66 | }
67 | if (scopeId) {
68 | options._scopeId = "data-v-" + scopeId;
69 | }
70 | var hook;
71 | if (moduleIdentifier) {
72 | hook = function(context) {
73 | context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
74 | if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
75 | context = __VUE_SSR_CONTEXT__;
76 | }
77 | if (injectStyles) {
78 | injectStyles.call(this, context);
79 | }
80 | if (context && context._registeredComponents) {
81 | context._registeredComponents.add(moduleIdentifier);
82 | }
83 | };
84 | options._ssrRegister = hook;
85 | } else if (injectStyles) {
86 | hook = shadowMode ? function() {
87 | injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
88 | } : injectStyles;
89 | }
90 | if (hook) {
91 | if (options.functional) {
92 | options._injectStyles = hook;
93 | var originalRender = options.render;
94 | options.render = function renderWithStyleInjection(h, context) {
95 | hook.call(context);
96 | return originalRender(h, context);
97 | };
98 | } else {
99 | var existing = options.beforeCreate;
100 | options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
101 | }
102 | }
103 | return {
104 | exports: scriptExports,
105 | options
106 | };
107 | }
108 | const __vue2_script$8 = {
109 | name: "DemoOne",
110 | data() {
111 | return {
112 | code: `