44 <meta charset =" utf-8" >
55 <meta name =" viewport" content =" width=device-width, initial-scale=1" >
66 <link href =" https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel =" stylesheet" >
7+ <link href =" /app.css" rel =" stylesheet" >
78 <
script src =
" https://cdn.jsdelivr.net/npm/[email protected] /dist/vue.js" ></
script >
89
910 <link rel =" apple-touch-icon" sizes =" 180x180" href =" /favicon/apple-touch-icon.png" >
@@ -83,9 +84,10 @@ class="mb-2 w-full bg-white text-gray-400 font-semibold hover:text-gray-700 font
8384
8485 <div class =" relative" >
8586 @if (config (' app.buggregator_url' ) )
86- <div class =" sticky top-0 p-0 lg:px-10" id =" demo" >
87- <iframe src =" {{ config (' app.buggregator_url' ) } }" frameborder =" 0" height =" 600px" class =" transform sm:scale-75 lg:scale-100 w-full bg-white border-4 border-blue-600 rounded-lg sticky top-0 w-full shadow-2xl" >
88- </iframe >
87+ <div class =" p-0 lg:px-10" id =" demo" >
88+ <preview >
89+ <iframe src =" {{ config (' app.buggregator_url' ) } }" frameborder =" 0" ></iframe >
90+ </preview >
8991 </div >
9092 @endif
9193
@@ -129,6 +131,42 @@ class="mb-2 w-full bg-white text-gray-400 font-semibold hover:text-gray-700 font
129131</div >
130132@verbatim
131133 <script >
134+ Vue .component (' preview' , {
135+ props: {
136+ device: {
137+ default () {
138+ return ' desktop'
139+ }
140+ }
141+ },
142+ computed: {
143+ deviceClass () {
144+ return ` device-${ this .device } `
145+ }
146+ },
147+ template: `
148+ <div class="flex flex-col items-center h-full">
149+ <div class="flex justify-center mb-5">
150+ <button class="p-1 rounded" @click ="device = 'mobile'" :class="{'bg-blue-50 text-blue-600': device == 'mobile'}">
151+ <svg class="w-10 h-6 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 53"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 1H2a1 1 0 0 0-1 1v49c0 .6.4 1 1 1h24c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-7c0 .6-.4 1-1 1h-8a1 1 0 0 1-1-1ZM2 0a2 2 0 0 0-2 2v49c0 1.1.9 2 2 2h24a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2Zm14 49a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" /></svg>
152+ </button>
153+ <button @click ="device = 'tablet'" class="p-1 rounded" :class="{'bg-blue-50 text-blue-600': device == 'tablet'}">
154+ <svg class="w-10 h-6 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 53"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 1H2a1 1 0 0 0-1 1v49c0 .6.4 1 1 1h34c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H24c0 .6-.4 1-1 1h-8a1 1 0 0 1-1-1ZM2 0a2 2 0 0 0-2 2v49c0 1.1.9 2 2 2h34a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2Zm32 4H4a1 1 0 0 0-1 1v39c0 .6.4 1 1 1h30c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1ZM4 3a2 2 0 0 0-2 2v39c0 1.1.9 2 2 2h30a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2H4Zm15 48a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" /></svg>
155+ </button>
156+ <button @click ="device = 'desktop'" class="p-1 rounded" :class="{'bg-blue-50 text-blue-600': device == 'desktop'}">
157+ <svg class="w-10 h-7 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 58 53"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 1h54c.6 0 1 .4 1 1v36.5H1V2c0-.6.4-1 1-1ZM1 39.5V43c0 .6.4 1 1 1h54c.6 0 1-.4 1-1v-3.5H1Zm57 0V43a2 2 0 0 1-2 2H36.5l1 4.9v.1H40c.6 0 1 .4 1 1v1c0 .6-.4 1-1 1H19a1 1 0 0 1-1-1v-1c0-.6.4-1 1-1h2.5v-.1l1-4.9H2a2 2 0 0 1-2-2V2C0 .9.9 0 2 0h54a2 2 0 0 1 2 2v37.5ZM36.5 50l-1-4.9V45h-12v.1l-1 4.9h14ZM54 42a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm-35 9h21v1H19v-1Z" /></svg>
158+ </button>
159+ </div>
160+
161+ <div :class="deviceClass">
162+ <div>
163+ <slot></slot>
164+ </div>
165+ </div>
166+ </div>
167+ `
168+ })
169+
132170 Vue .component (' button-action' , {
133171 props: {
134172 action: String
@@ -145,7 +183,11 @@ class="mb-2 w-full bg-white text-gray-400 font-semibold hover:text-gray-700 font
145183 .then (data => console .log (data));
146184 }
147185 },
148- template: ' <button @click ="callAction" type="button" class="border rounded-full text-blue-600 md:py-1 md:px-3 px-2 lg:px-3 border-blue-400 hover:bg-blue-500 hover:text-white transition-all duration-300"><slot></slot></button>'
186+ template: `
187+ <button @click ="callAction" type="button" class="border rounded-full text-blue-600 md:py-1 md:px-3 px-2 lg:px-3 border-blue-400 hover:bg-blue-500 hover:text-white transition-all duration-300">
188+ <slot></slot>
189+ </button>
190+ `
149191 })
150192
151193 new Vue ({
0 commit comments