config.html 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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 if(element[0] == "buttons"){
  72. link+= element[0] + "=" + element[1].replace(/(\r\n|\n|\r)/gm,"")
  73. }
  74. else{
  75. link+= element[0] + "=" + element[1];
  76. }
  77. });
  78. //set new link
  79. document.getElementById("showurl").innerText =link;
  80. top.document.getElementById('previewframe').setAttribute("src",link);
  81. }
  82. $(document).ready(function() {
  83. newLink()
  84. });
  85. </script>
  86. <body >
  87. <form action="" id="config">
  88. Use Header: <input onchange="newLink()" type="checkbox" id="header" name="header"><br>
  89. Text Style:
  90. <select onchange="newLink()" name="type" id="type">
  91. <option value="left">Left</option>
  92. <option value="center">Center</option>
  93. <option value="right">right</option>
  94. </select><br>
  95. Text: <input onchange="newLink()" name="text" type="text" value="<h1>Your Header</h1>" ></input><br>
  96. Font Color: <input onchange="newLink()" name="fontcolor" type="color" value="#000000" /><br><br>
  97. Button Style:
  98. <select onchange="newLink()" name="buttonstyle" id="buttonstyle">
  99. <option value="small">Small</option>
  100. <option value="discrete">Discrete</option>
  101. <option value="elippse">Elippse</option>
  102. <option value="reoundedrectangle">Rounded Rectangle</option>
  103. <option value="centurio">Centurio</option>
  104. </select><br>
  105. Alignment:
  106. <select onchange="newLink()" name="alignment" id="alignment">
  107. <option value="left">left</option>
  108. <option value="center">center</option>
  109. <option value="right">right</option>
  110. <option value="spread">spread</option>
  111. </select><br>
  112. Align Bottom: <input onchange="newLink()" type="checkbox" id="alignbot" name="alignbot"><br>
  113. <textarea onchange="newLink()" id="buttons" name="buttons" rows="4" cols="50">Seperate,
  114. Buttons,
  115. By,
  116. Comma</textarea><br>
  117. Active Button: <input onchange="newLink()" name="activebutton" type="text" value="Comma" /><br>
  118. Button Spacing: <input onchange="newLink()" name="buttonspacing" type="text" value="2em" /> If alignment Spread is used this does not have any effect.<br>
  119. Button Text Color: <input onchange="newLink()" name="buttontextcolor" type="color" value="#000000" /><br>
  120. Button Background Color: <input onchange="newLink()" name="buttonmaincolor" type="color" value="#FCE500" /><br>
  121. Button Border Color: <input onchange="newLink()" name="button2color" type="color" value="#000000" /><br>
  122. <!--
  123. Button Third Color: <input onchange="newLink()" name="button3color" type="color" value="#000000" /><br>
  124. Button Fourth Color: <input onchange="newLink()" name="button4color" type="color" value="#000000" /><br>
  125. -->
  126. Background Color: <input onchange="newLink()" name="backgroundcolor" type="color" value="#0081c6" /><br>
  127. Background Image Url: <input onchange="newLink()" name="backgroundImage" type="text" value="/global_ui/logo.png" /><br>
  128. Background Image Position:
  129. <select onchange="newLink()" name="backgroundPosition" id="backgroundPosition">
  130. <option value="right">Right</option>
  131. <option value="left">Left</option>
  132. <option value="left100size">Left Scaled</option>
  133. <option value="right100size">Right Scaled</option>
  134. </select><br>
  135. Background Image Size: <input onchange="newLink()" name="backgroundImageSize" type="text" value="auto 80%" /><br>
  136. </form>
  137. <br>
  138. URL:<br>
  139. <span id="showurl"></span>
  140. <br><br>
  141. Iframe Preview:<br>
  142. <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>
  143. </div>
  144. </body>
  145. </html>