config.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <!--
  2. This file is part of centurio.work/commands.
  3. centurio.work/commands is free software: you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 3 of the License, or (at your
  6. option) any later version.
  7. centurio.work/commands is distributed in the hope that it will be useful, but
  8. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  10. more details.
  11. You should have received a copy of the GNU General Public License along with
  12. centurio.work/commands (file COPYING in the main directory). If not, see
  13. <http://www.gnu.org/licenses/>.
  14. -->
  15. <!DOCTYPE html>
  16. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  19. <title>Design</title>
  20. <!-- libs, do not modify. When local than load local libs. -->
  21. <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
  22. <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
  23. <script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
  24. <script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
  25. <script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
  26. <script type="text/javascript" src="/js_libs/util.js"></script>
  27. <script type="text/javascript" src="/js_libs/printf.js"></script>
  28. <script type="text/javascript" src="/js_libs/strftime.min.js"></script>
  29. <script type="text/javascript" src="/js_libs/parsequery.js"></script>
  30. <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
  31. <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
  32. <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
  33. <script type="text/javascript" src="/js_libs/relaxngui.js"></script>
  34. <script type="text/javascript" src="/js_libs/ui.js"></script>
  35. <script type="text/javascript" src="/js_libs/custommenu.js"></script>
  36. <link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
  37. <link rel="stylesheet" href="/js_libs/ui.css" type="text/css"/>
  38. <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
  39. <link rel="icon" href="favicon.ico">
  40. <link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
  41. <style>
  42. :root {
  43. --color: #1e90ff;
  44. --backgroundcolor: fff;
  45. --fontcolor: 000;
  46. }
  47. body {
  48. color: var(--fontcolor);
  49. background-color: var(--backgroundcolor);
  50. }
  51. </style>
  52. </head>
  53. <script>
  54. function newLink() {
  55. //get form element
  56. var formEl = document.forms.config;
  57. var formData = new FormData(formEl);
  58. const formElements = Array.from(formData);
  59. //get current url
  60. var href = window.location.href;
  61. var dir = href.substring(0, href.lastIndexOf('/')) + "/";
  62. var link = dir + "service.html?";
  63. //iterate form eles and build string
  64. formElements.forEach((element, index) => {
  65. if(index!=0){
  66. link+= "&";
  67. }
  68. if(element[0].includes("color")){
  69. link+= element[0] + "=" + element[1].substring(1);
  70. }
  71. else{
  72. link+= element[0] + "=" + element[1];
  73. }
  74. });
  75. //set new link
  76. document.getElementById("showurl").innerText =link;
  77. top.document.getElementById('previewframe').setAttribute("src",link);
  78. }
  79. $(document).ready(function() {
  80. newLink()
  81. });
  82. </script>
  83. <body >
  84. <form action="" id="config">
  85. Text Style:
  86. <select onchange="newLink()" name="type" id="type">
  87. <option value="left">Left</option>
  88. <option value="center">Center</option>
  89. <option value="right">right</option>
  90. </select><br>
  91. Text: <input onchange="newLink()" name="text" type="text" value="<h1>Your Header</h1>" ></input><br>
  92. Font Color: <input onchange="newLink()" name="fontcolor" type="color" value="#000000" /><br><br>
  93. Background Color: <input onchange="newLink()" name="backgroundcolor" type="color" value="#0081c6" /><br>
  94. Background Image Url: <input onchange="newLink()" name="backgroundImage" type="text" value="/global_ui/logo.png" /><br>
  95. Background Image Position:
  96. <select onchange="newLink()" name="backgroundPosition" id="backgroundPosition">
  97. <option value="right">Right</option>
  98. <option value="left">Left</option>
  99. <option value="left100size">Left Scaled</option>
  100. <option value="right100size">Right Scaled</option>
  101. </select><br>
  102. </form>
  103. <br>
  104. URL:<br>
  105. <span id="showurl"></span>
  106. <br><br>
  107. Iframe Preview:<br>
  108. <iframe width="100%" height="200" id="previewframe" src="https://centurio.evva.com/services/frames_support/spinner/service.html?text=Loading%20Serial%20Number&type=lds-spinner&color=000000&fontcolor=000" title="Spinner"></iframe>
  109. </div>
  110. </body>
  111. </html>