Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

643 rader
16 KiB

  1. {
  2. "functions": {
  3. "anime": {
  4. "requires": ["animejs"],
  5. "js": "let args = arguments[0]; if (!args.duration) {args.duration = 1000;} for (const callback of ['begin','complete','update']) {if (args[callback]) {var jsonCallback = args[callback]; args[callback] = function(anim) {js.callback({do:jsonCallback});} } }; anime(args);",
  6. "ref": "https://animejs.com/documentation/"
  7. },
  8. "RevealFx": {
  9. "requires": ["animejs", "revealFx"],
  10. "js": "let selector = arguments[0]; let args = arguments[1]; let rev = new RevealFx(document.querySelector(selector),args);"
  11. },
  12. "loadSVG": {
  13. "requires": ["snapsvg"],
  14. "js": "let args = arguments[0]; Snap.load(args.url, function (svgData) {Snap(args.selector).append(svgData); js.do(args.on.success)});"
  15. },
  16. "loadSVGImage": {
  17. "requires": ["snapsvg"],
  18. "js": "let args = arguments[0]; Snap.load(args.url, function (svgData) {Snap(args.selector).append(svgData); js.do(args.on.success)});"
  19. },
  20. "animateSVG": {
  21. "requires": ["snapsvg"],
  22. "js": "let args = arguments[0]; if(!args.engine || args.engine=='snap') {Snap.select(args.selector).animate(args.attrs, args.duration, mina[args.easing]);}"
  23. },
  24. "qrcode-svg": {
  25. "requires": ["qrcode-svg"],
  26. "js": "let args = arguments[0]; var qrcode = new QRCode(args.config); document.querySelector(args.selector).innerHTML = qrcode.svg();"
  27. },
  28. "sound": {
  29. "requires": ["howler.js"],
  30. "js": "let args = arguments[0]; let method = arguments[1] ||'play'; if (args.onend) {args.onend = js.do(args.onend)} var sound = new Howl(args); sound[method]();"
  31. },
  32. "rxjs": {
  33. "requires": ["rxjs"],
  34. "js": "let args = arguments[0]; const clicks = rxjs.fromEvent(document, args.event); clicks.subscribe(ev => { js.callback({do:args.do, var:'target', value: {x: ev.x, y:ev.y, el: ev.target} }) });"
  35. }
  36. },
  37. "parts": {
  38. "ui": {
  39. "hide": {
  40. "do": [
  41. {
  42. "console warn": "hide {arguments}"
  43. },
  44. {
  45. "attr": {
  46. "selector": "{arguments}",
  47. "addClass": "hidden"
  48. }
  49. }
  50. ]
  51. },
  52. "show": {
  53. "do": [
  54. {
  55. "console warn": "show {arguments}"
  56. },
  57. {
  58. "attr": {
  59. "selector": "{arguments}",
  60. "removeClass": "hidden"
  61. }
  62. }
  63. ]
  64. },
  65. "out": {
  66. "do": [
  67. {
  68. "anime": {
  69. "targets": "{arguments:selector}",
  70. "opacity": 0,
  71. "duration": "{arguments:duration}",
  72. "easing": "{arguments:easing}",
  73. "complete": [
  74. ]
  75. }
  76. }
  77. ]
  78. },
  79. "in": {
  80. "do": [
  81. {
  82. "anime": {
  83. "targets": "{arguments:selector}",
  84. "opacity": 1,
  85. "duration": "{arguments:duration}",
  86. "easing": "{arguments:easing}",
  87. "begin": [
  88. ]
  89. }
  90. }
  91. ]
  92. },
  93. "icon": {
  94. "do": [
  95. {
  96. "html": [
  97. {
  98. "if": "'{arguments:name}' !== ''",
  99. "span": {
  100. "attr": {
  101. "data-icon": "{arguments:name}",
  102. "class": "iconify text-[{arguments:size}px] m-[{arguments:margin}px] aspect-square"
  103. }
  104. }
  105. }
  106. ]
  107. }
  108. ]
  109. },
  110. "icon2": {
  111. "plugins": [
  112. {
  113. "name": "iconify",
  114. "type": "script",
  115. "version": "3.1.1",
  116. "url": "https://cdnjs.cloudflare.com/ajax/libs/iconify/3.1.1/iconify.min.js"
  117. }
  118. ],
  119. "div inline-block text-center": {
  120. "html": [
  121. {
  122. "div": {
  123. "attr": {
  124. "class": "mx-auto rounded-full {arguments:class}",
  125. "style": {
  126. "background": "{arguments:background}",
  127. "width": "{arguments:width}px",
  128. "height": "{arguments:height}px",
  129. "padding": "{js:{arguments:padding} ? '{arguments:padding}' : '5px'}",
  130. "box-sizing": "content-box"
  131. }
  132. },
  133. "style": "{arguments:style}",
  134. "span": {
  135. "attr": {
  136. "class": "{js:{arguments:inline} ? 'iconify-inline' : 'iconify'}",
  137. "data-icon": "{arguments:name}",
  138. "data-flip": "{arguments:flip}",
  139. "data-width": "{js:{arguments:width} ? {arguments:width} : 64}",
  140. "data-height": "{js:{arguments:height} ? {arguments:height} : 64}",
  141. "data-rotate": "{js:{arguments:rotate} ? '{arguments:rotate}deg' : ''}"
  142. },
  143. "style": {
  144. "float": "none",
  145. "color": "{arguments:color}"
  146. }
  147. }
  148. }
  149. },
  150. {
  151. "span": {
  152. "html": "{arguments:text}",
  153. "style": "{arguments:textStyle}"
  154. }
  155. }
  156. ]
  157. }
  158. },
  159. "buttonOld": {
  160. "plugins": [
  161. {
  162. "name": "iconify",
  163. "type": "script",
  164. "version": "3.1.1",
  165. "url": "https://cdnjs.cloudflare.com/ajax/libs/iconify/3.1.1/iconify.min.js"
  166. }
  167. ],
  168. "div": {
  169. "attr": {
  170. "class": "mx-1 my-auto py-0 px-[8px] h-[40px] rounded-full cursor-pointer inline-flex align-center items-center bg-[{arguments:background}] border-solid border-[1px] border-[{arguments:color}] text-[17px] text-[{arguments:color}] {arguments:class}",
  171. "id": "{arguments:id}",
  172. "data-value": "{arguments:data-value}"
  173. },
  174. "html": [
  175. {
  176. "i": {
  177. "if": "{arguments:icon}",
  178. "attr": {
  179. "class": "iconify text-[{arguments:size}] mx-0",
  180. "data-icon": "{arguments:icon}"
  181. }
  182. }
  183. },
  184. {
  185. "span hidden sm:block mx-0 px-[5px]": {
  186. "if": "'{arguments:text}' !== ''",
  187. "text": "{arguments:text}"
  188. }
  189. }
  190. ],
  191. "on": "{arguments:on}"
  192. }
  193. },
  194. "socialIcons": [
  195. {
  196. "html": [
  197. {
  198. "div id=socialIcons text-center pt-[30px]": {
  199. "for": {
  200. "name": "socialIcons",
  201. "of": "{arguments:icons}",
  202. "html": [
  203. {
  204. "span p-[10px]": {
  205. "html": [
  206. {
  207. "elio:icon": {
  208. "setup": {
  209. "width": 64,
  210. "height": 64,
  211. "inline": true,
  212. "name": "{socialIcons:icon}",
  213. "text": " ",
  214. "padding": "30px"
  215. }
  216. }
  217. }
  218. ] ,
  219. "on": {
  220. "mousedown": [
  221. {
  222. "js": "window.open('{socialIcons:url}', '_blank')"
  223. }
  224. ]
  225. }
  226. }
  227. }
  228. ]
  229. }
  230. }
  231. }
  232. ]
  233. }
  234. ],
  235. "headerIcons": [
  236. {
  237. "div id=headerIconUser mx-[5px]": {
  238. "html": [
  239. {
  240. "selector": "#headerIconUser",
  241. "elio:icon": {
  242. "setup": {
  243. "width": 40,
  244. "height": 40,
  245. "inline": true,
  246. "name": "jsonic:user",
  247. "text": " "
  248. }
  249. }
  250. }
  251. ],
  252. "on": {
  253. "mousedown": {
  254. "link": "/account"
  255. }
  256. }
  257. }
  258. },
  259. {
  260. "div mx-[5px]": {
  261. "attr": {
  262. "class": "currentLang",
  263. "data-value": "currentLang"
  264. },
  265. "elio:icon": {
  266. "setup": {
  267. "width": 32,
  268. "height": 32,
  269. "inline": true,
  270. "name": "jsonic:lang{setup.language}",
  271. "text": " "
  272. }
  273. },
  274. "on": {
  275. "mousedown": {
  276. "alert": {
  277. "title": "Select language",
  278. "showConfirmButton": false,
  279. "html": {
  280. "div": {
  281. "style": {
  282. "margin": "6px 10px 6px 0px",
  283. "text-align": "center"
  284. },
  285. "for": {
  286. "name": "langId",
  287. "of": "{setup.languages}",
  288. "html": {
  289. "div": {
  290. "attr": {
  291. "class": "langIcons inline-block",
  292. "data-value": "{langId}"
  293. },
  294. "elio:icon": {
  295. "setup": {
  296. "width": 64,
  297. "height": 64,
  298. "inline": true,
  299. "name": "jsonic:lang{langId}",
  300. "text": " "
  301. }
  302. },
  303. "on": {
  304. "mousedown": [
  305. {
  306. "do": {
  307. "selector": ".currentLang[data-value='currentLang']",
  308. "attr": {
  309. "data-icon": "jsonic:lang{on:target.dataset.value}"
  310. }
  311. }
  312. },
  313. {
  314. "data ext": "{js:('{langId}'=='en') ? 'com' : '{langId}'}"
  315. },
  316. {
  317. "link": "https://elioiot.{data ext}{window:location pathname}"
  318. },
  319. {
  320. "lang": "{on:target.dataset.value}"
  321. },
  322. {
  323. "alert": {
  324. "do": "close"
  325. }
  326. }
  327. ]
  328. }
  329. }
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. }
  337. }
  338. }
  339. ],
  340. "hamburger": {
  341. "div": {
  342. "attr": {
  343. "class": "jsonic-menu-btn hamburger z-[999]"
  344. },
  345. "a": {
  346. "i": {
  347. "attr": {
  348. "class": "iconify block text-[{arguments:colorhamburger}] dark:text-[{arguments:colorhamburgerdark}] bg-[transparent] text-[50px] w-[50px] h-[50px] cursor-pointer lg:hidden",
  349. "data-icon": "jsonic:menu",
  350. "data-inline": "false"
  351. }
  352. }
  353. },
  354. "on": {
  355. "mousedown": [
  356. {
  357. "attr": {
  358. "selector": ".jsonic-menu",
  359. "toggleClass": "left-[100%]"
  360. }
  361. },
  362. {
  363. "attr": {
  364. "selector": "nav",
  365. "toggleClass": "fixed"
  366. }
  367. }
  368. ]
  369. }
  370. }
  371. }
  372. },
  373. "slider": {
  374. "do": [
  375. {
  376. "div": {
  377. "attr": {
  378. "class": "swiper",
  379. "data-value": "{arguments:name}"
  380. },
  381. "style": {
  382. "--swiper-navigation-color": "#FFF",
  383. "--swiper-pagination-color": "#FFF",
  384. "--swiper-pagination-bullet-inactive-color": "#ccc",
  385. "width": "100%",
  386. "max-width": "1000px"
  387. },
  388. "div": [
  389. {
  390. "attr": {
  391. "class": "swiper-wrapper",
  392. "data-value": "{arguments:name}"
  393. },
  394. "for": {
  395. "name": "slide",
  396. "of": "{arguments:slides}",
  397. "html": {
  398. "div": {
  399. "attr": {
  400. "class": "swiper-slide"
  401. },
  402. "html": "{slide}"
  403. }
  404. }
  405. }
  406. },
  407. {
  408. "attr": {
  409. "class": "swiper-pagination"
  410. }
  411. },
  412. {
  413. "attr": {
  414. "class": "swiper-button-prev"
  415. }
  416. },
  417. {
  418. "attr": {
  419. "class": "swiper-button-next"
  420. }
  421. }
  422. ],
  423. "swiper init": "{setup}"
  424. }
  425. }
  426. ]
  427. }
  428. },
  429. "plugins": [
  430. {
  431. "name": "tailwindcss",
  432. "description": "A utility-first CSS framework for rapidly building custom user interfaces",
  433. "type": "script",
  434. "version": "4.1.12",
  435. "ondemand": false,
  436. "files": [
  437. {
  438. "type": "script",
  439. "url": "assets/plugins/tailwindcss.min.js",
  440. "cdn": "https://unpkg.com/@tailwindcss/browser@4"
  441. }
  442. ]
  443. },
  444. {
  445. "name": "iconify",
  446. "version": "3.1.1",
  447. "description": "Utility for using SVG images as icons on the web with pure CSS and/or DOM injection",
  448. "ondemand": false,
  449. "files": [
  450. {
  451. "type": "script",
  452. "url": "assets/plugins/iconify.min.js",
  453. "cdn": "https://cdnjs.cloudflare.com/ajax/libs/iconify/3.1.1/iconify.min.js"
  454. }
  455. ]
  456. },
  457. {
  458. "name": "animate.css",
  459. "description": "A cross-browser library of CSS animations",
  460. "version": "4.1.1",
  461. "ondemand": false,
  462. "files": [
  463. {
  464. "type": "link",
  465. "url": "assets/plugins/animate.min.css",
  466. "cdn": "https://cdn.jsdelivr.net/npm/animate.css@4.1.1/animate.min.css"
  467. }
  468. ]
  469. },
  470. {
  471. "name": "animejs",
  472. "description": "JavaScript animation engine",
  473. "version": "3.2.2",
  474. "ondemand": false,
  475. "files": [
  476. {
  477. "type": "script",
  478. "url": "assets/plugins/anime.min.js",
  479. "cdn": "https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.2/anime.min.js"
  480. }
  481. ]
  482. },
  483. {
  484. "name": "swiper",
  485. "description": "Most modern mobile touch slider and framework with hardware accelerated transitions",
  486. "version": "11.0.5",
  487. "ondemand": false,
  488. "files": [
  489. {
  490. "type": "script",
  491. "url": "assets/plugins/swiper-bundle.min.js",
  492. "cdn": "https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.js"
  493. },
  494. {
  495. "type": "link",
  496. "url": "assets/plugins/swiper-bundle.min.css",
  497. "cdn": "https://cdnjs.cloudflare.com/ajax/libs/Swiper/11.0.5/swiper-bundle.min.css"
  498. }
  499. ],
  500. "ref": "https://swiperjs.com/swiper-api"
  501. },
  502. {
  503. "name": "cally",
  504. "version": "0.8.0",
  505. "description": "Small, feature-rich calendar components",
  506. "ondemand": true,
  507. "files": [
  508. {
  509. "type": "module",
  510. "url": "https://unpkg.com/cally"
  511. }
  512. ]
  513. },
  514. {
  515. "name": "revealFx",
  516. "description": "This is a micro animation library based on anime.js to achieve smooth block reveal effects and has a simple API",
  517. "version": "0.0.2",
  518. "ondemand": true,
  519. "files": [
  520. {
  521. "type": "script",
  522. "url": "https://cdn.jsdelivr.net/npm/revealfx@0.0.2/src/revealFx.min.js"
  523. }
  524. ],
  525. "ref": "https://github.com/akhil0001/RevealFx"
  526. },
  527. {
  528. "name": "snapsvg",
  529. "description": "JavaScript Vector Library",
  530. "version": "0.5.1",
  531. "ondemand": true,
  532. "files": [
  533. {
  534. "type": "script",
  535. "url": "https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"
  536. }
  537. ]
  538. },
  539. {
  540. "name": "qrcode-svg",
  541. "description": "A simple QR Code generator in pure JavaScript",
  542. "version": "1.1.0",
  543. "ondemand": true,
  544. "files": [
  545. {
  546. "type": "script",
  547. "url": "https://cdn.jsdelivr.net/npm/qrcode-svg@1.1.0/lib/qrcode.min.js"
  548. }
  549. ],
  550. "ref": "https://papnkukn.github.io/qrcode-svg/"
  551. },
  552. {
  553. "name": "swup",
  554. "description": "Versatile and extensible page transition library for server-rendered websites",
  555. "version": "4.8.1",
  556. "ondemand": true,
  557. "files": [
  558. {
  559. "type": "script",
  560. "url": "https://unpkg.com/swup@4.8.1/dist/Swup.umd.js"
  561. }
  562. ]
  563. },
  564. {
  565. "name": "reveal.js",
  566. "description": "The HTML Presentation Framework",
  567. "version": "5.1.0",
  568. "ondemand": true,
  569. "files": [
  570. {
  571. "type": "script",
  572. "url": "https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.1.0/reveal.js"
  573. }
  574. ],
  575. "ref": "https://revealjs.com"
  576. },
  577. {
  578. "name": "video.js",
  579. "description": "An HTML5 video player that supports HLS and DASH with a common API and skin",
  580. "version": "8.21.0",
  581. "ondemand": true,
  582. "files": [
  583. {
  584. "type": "script",
  585. "url": "https://cdnjs.cloudflare.com/ajax/libs/video.js/8.21.1/video.min.js"
  586. }
  587. ],
  588. "ref": "https://docs.videojs.com"
  589. },
  590. {
  591. "name": "hls.js",
  592. "description": "JavaScript HLS client using MediaSourceExtension",
  593. "version": "1.5.18",
  594. "ondemand": true,
  595. "files": [
  596. {
  597. "type": "script",
  598. "url": "https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.5.18/hls.min.js"
  599. }
  600. ],
  601. "ref": "https://github.com/video-dev/hls.js/blob/master/docs/API.md"
  602. },
  603. {
  604. "name": "howler.js",
  605. "description": "Javascript audio library for the modern web",
  606. "version": "2.2.4",
  607. "ondemand": true,
  608. "files": [
  609. {
  610. "type": "script",
  611. "url": "https://cdn.jsdelivr.net/npm/howler@2.2.4/dist/howler.min.js"
  612. }
  613. ],
  614. "ref": "https://github.com/goldfire/howler.js#documentation"
  615. },
  616. {
  617. "name": "rxjs",
  618. "description": "Reactive Extensions For JavaScript",
  619. "version": "7.8.1",
  620. "ondemand": true,
  621. "files": [
  622. {
  623. "type": "script",
  624. "url": "https://cdnjs.cloudflare.com/ajax/libs/rxjs/7.8.1/rxjs.umd.min.js"
  625. }
  626. ],
  627. "ref": "https://rxjs.dev/api"
  628. },
  629. {
  630. "name": "cloudinary",
  631. "description": "",
  632. "version": "2.6.0",
  633. "ondemand": true,
  634. "files": [
  635. {
  636. "type": "script",
  637. "url": "https://cdn.jsdelivr.net/npm/cloudinary@2.6.0/cloudinary.min.js"
  638. }
  639. ],
  640. "ref": ""
  641. }
  642. ]
  643. }