service.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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. <link rel="icon" href="favicon.ico">
  24. <link rel="icon" type="image/png" sizes="96x96" href="favicon-96x96.png">
  25. <style>
  26. :root {
  27. --color: #1e90ff;
  28. --backgroundcolor: fff;
  29. --fontcolor: 000;
  30. --buttontextcolor: 000;
  31. --buttonmaincolor: 000;
  32. --button2color: 000;
  33. --buttonspacing: 2em;
  34. --outer2margin: 2em;
  35. --backgroundImageSize: auto 80%;
  36. }
  37. body {
  38. color: var(--fontcolor);
  39. background-color: var(--backgroundcolor);
  40. overflow: hidden;
  41. }
  42. body{
  43. background-repeat: no-repeat;
  44. background-size: var(--backgroundImageSize);
  45. background-position: calc(100% - 18px);;
  46. }
  47. .outer{
  48. width:100%
  49. }
  50. .left{
  51. display: table;
  52. margin: 0 0;
  53. }
  54. .center{
  55. display: table;
  56. margin: 0 auto;
  57. }
  58. .right{
  59. display: table;
  60. margin: 0px 0px 0px auto;
  61. }
  62. .rendered-form {
  63. position: absolute;
  64. top: 50%;
  65. margin: -1.7em;
  66. }
  67. .navigation ul {
  68. list-style: none;
  69. margin: 0;
  70. padding: 0;
  71. display: flex;
  72. flex-wrap: wrap;
  73. }
  74. .navigation li{
  75. text-align: center;
  76. }
  77. .outer2{
  78. margin: var(--outer2margin) 0em;
  79. width: 100%;
  80. }
  81. a, a:link, a:visited, a:hover, a:active {
  82. text-decoration: none;
  83. color: var(--buttontextcolor);
  84. }
  85. </style>
  86. </head>
  87. <script>
  88. $(document).ready(function() {
  89. const queryString = window.location.search;
  90. const urlParams = new URLSearchParams(queryString);
  91. const header = urlParams.get('header')
  92. const text = urlParams.get('text')
  93. const type = urlParams.get('type')
  94. const color = urlParams.get('color')
  95. const backgroundcolor = urlParams.get('backgroundcolor')
  96. const fontcolor = urlParams.get('fontcolor')
  97. const backgroundImage = urlParams.get('backgroundImage')
  98. const backgroundPosition = urlParams.get('backgroundPosition')
  99. const backgroundImageSize = urlParams.get('backgroundImageSize')
  100. const buttonstyle = urlParams.get('buttonstyle')
  101. const alignment = urlParams.get('alignment')
  102. const alignbot = urlParams.get('alignbot')
  103. const buttons = urlParams.get('buttons')
  104. const activebutton = urlParams.get('activebutton')
  105. const buttonspacing = urlParams.get('buttonspacing')
  106. const buttontextcolor = urlParams.get('buttontextcolor')
  107. const buttonmaincolor = urlParams.get('buttonmaincolor')
  108. const button2color = urlParams.get('button2color')
  109. const button3color = urlParams.get('button3color')
  110. const button4color = urlParams.get('button4color')
  111. var colors = {color: color, backgroundcolor: backgroundcolor, fontcolor: fontcolor, buttontextcolor: buttontextcolor, buttonmaincolor: buttonmaincolor, button2color: button2color, button3color: button3color, button4color: button4color};
  112. var r = document.documentElement;
  113. for (var singlecolor in colors) {
  114. var value = colors[singlecolor];
  115. if(value != null){
  116. r.style.setProperty('--' + singlecolor, "#" + value);
  117. }
  118. }
  119. if(header != null){
  120. if(text != null){
  121. document.getElementById("header").innerHTML=text;
  122. }
  123. if(type != null){
  124. document.getElementById("header").classList.add(type);
  125. }
  126. }
  127. else{
  128. $('#headerouter2').remove();
  129. }
  130. if(backgroundImage != null){
  131. document.body.style.backgroundImage = "url('" + backgroundImage +"')";
  132. }
  133. if(backgroundPosition != null){
  134. if(backgroundPosition == "left"){
  135. document.body.style.backgroundPosition = "18px";
  136. }
  137. else if(backgroundPosition == "left100size"){
  138. document.body.style.backgroundPosition = "18px";
  139. document.querySelector('html').style.setProperty('height', '100%')
  140. }
  141. else if(backgroundPosition == "right100size"){
  142. document.body.style.backgroundPosition = "calc(100% - 18px)";
  143. document.querySelector('html').style.setProperty('height', '100%')
  144. }
  145. else{
  146. document.body.style.backgroundPosition = "calc(100% - 18px)";
  147. }
  148. }
  149. if(backgroundPosition != backgroundImageSize){
  150. document.body.style.backgroundImageSize = backgroundImageSize;
  151. r.style.setProperty('--backgroundImageSize', backgroundImageSize);
  152. }
  153. if(alignment != null){
  154. if(alignment == "spread"){
  155. var styles = `
  156. .navigation li {
  157. flex: 3;
  158. }
  159. `
  160. var styleSheet = document.createElement("style")
  161. styleSheet.innerText = styles
  162. document.head.appendChild(styleSheet)
  163. }
  164. if(alignment == "center"){
  165. var styles = `
  166. .navigation ul {
  167. justify-content: center
  168. }
  169. `
  170. var styleSheet = document.createElement("style")
  171. styleSheet.innerText = styles
  172. document.head.appendChild(styleSheet)
  173. }
  174. if(alignment == "right"){
  175. var styles = `
  176. .navigation ul {
  177. justify-content: flex-end
  178. }
  179. `
  180. var styleSheet = document.createElement("style")
  181. styleSheet.innerText = styles
  182. document.head.appendChild(styleSheet)
  183. }
  184. }
  185. if(alignbot != null){
  186. var styles = `
  187. html {
  188. height: 100%;
  189. }
  190. .outer2{
  191. position: absolute;
  192. bottom: 0;
  193. }
  194. `
  195. var styleSheet = document.createElement("style")
  196. styleSheet.innerText = styles
  197. document.head.appendChild(styleSheet)
  198. }
  199. if(buttons != null){
  200. var buttonlist = buttons.split(',');
  201. buttonlist.forEach(element => $( "#itemlist" ).append( "<li id='Button" + element + "'><a href='' >" + element + "</a></li>" ));
  202. }
  203. if(activebutton != null){
  204. if(buttonstyle == "centurio"){
  205. var styles = `
  206. #Button${activebutton} {
  207. border-bottom: 1pt solid var(--buttonmamaincolor);
  208. }
  209. `
  210. var styleSheet = document.createElement("style")
  211. styleSheet.innerText = styles
  212. document.head.appendChild(styleSheet)
  213. }
  214. }
  215. if(buttonspacing != null){
  216. r.style.setProperty('--buttonspacing', buttonspacing);
  217. }
  218. if(buttonstyle != null){
  219. var styles
  220. if(buttonstyle == "small"){
  221. styles = `
  222. a {
  223. margin: 0 var(--buttonspacing); border: 0.1em solid var(--button2color); background-color: var(--buttonmaincolor); font-weight: bold; font-size: 1em; padding: 0.5em 1em 0.5em 1em; color: var(--buttontextcolor); display: inline-block;
  224. }
  225. `
  226. r.style.setProperty('--outer2margin', "0.2em");
  227. }
  228. if(buttonstyle == "discrete"){
  229. styles = `
  230. li:not(:last-child) { border-right: 0.1em solid var(--button2color); }
  231. a {
  232. margin: 0 var(--buttonspacing); background-color: var(--buttonmaincolor); font-weight: bold; font-size: 1em; padding: 0.5em 1em 0.5em 1em; color: var(--buttontextcolor); display: inline-block;
  233. }
  234. `
  235. r.style.setProperty('--outer2margin', "0.2em");
  236. }
  237. if(buttonstyle == "elippse"){
  238. styles = `
  239. a {
  240. margin: 0 var(--buttonspacing); border: 0.3em solid var(--button2color); border-radius: 50%; background-color: var(--buttonmaincolor); font-weight: bold; font-size: 1.3em; padding: 0.8em 1em 0.8em 1em; color: var(--buttontextcolor); display: inline-block;
  241. }
  242. `
  243. }
  244. if(buttonstyle == "reoundedrectangle"){
  245. styles = `
  246. a {
  247. margin: 0 var(--buttonspacing); border: 0.2em solid var(--button2color); border-radius: 1em; background-color: var(--buttonmaincolor); font-weight: bold; font-size: 1em; padding: 0.5em 1em 0.5em 1em; color: var(--buttontextcolor); display: inline-block;
  248. }
  249. `
  250. r.style.setProperty('--outer2margin', "0.2em");
  251. }
  252. if(buttonstyle == "centurio"){
  253. styles = `
  254. body{
  255. margin: 0em;
  256. }
  257. ul{
  258. display: flex;
  259. align-items: stretch;
  260. flex-direction: row;
  261. padding-left: 0.5em;
  262. padding-right: 0.5em;
  263. margin: 0;
  264. padding-top: 0.5em;
  265. -webkit-user-select: none;
  266. -moz-user-select: none;
  267. -ms-user-select: none;
  268. user-select: none;
  269. }
  270. li {
  271. font-size: 1.4em;
  272. font-weight: bold;
  273. white-space: nowrap;
  274. cursor: pointer;
  275. padding: 0.3em var(--buttonspacing);
  276. border: 1pt solid var(--button2color);
  277. border-radius: 0.7em;
  278. border-bottom-left-radius: 0em;
  279. border-bottom-right-radius: 0em;
  280. background: var(--buttonmaincolor);
  281. }
  282. ui-behind {
  283. flex: 1 1 auto;
  284. vertical-align:bottom;
  285. padding: 0;
  286. padding-top: 0.9em;
  287. border-bottom: 1pt solid var(--button2color);
  288. border-radius: 0.7em;
  289. border-bottom-left-radius: 0em;
  290. border-bottom-right-radius: 0em;
  291. text-align:right;
  292. white-space: nowrap;
  293. }
  294. `
  295. if(alignment == "right"){
  296. $( "#itemlist" ).prepend( "<ui-behind></ui-behind>" );
  297. }
  298. else if(alignment == "center"){
  299. $( "#itemlist" ).append( "<ui-behind></ui-behind>" );
  300. $( "#itemlist" ).prepend( "<ui-behind></ui-behind>" );
  301. }
  302. else if(alignment == "spread"){
  303. $('ui-behind').remove();
  304. }
  305. else{
  306. $( "#itemlist" ).append( "<ui-behind></ui-behind>" );
  307. }
  308. r.style.setProperty('--outer2margin', "0em");
  309. }
  310. var styleSheet = document.createElement("style")
  311. styleSheet.innerText = styles
  312. document.head.appendChild(styleSheet)
  313. }
  314. });
  315. </script>
  316. <body >
  317. <!-- Animator taken from https://loading.io/css/ -->
  318. <!-- loading icons provided in this page are released under CC0 License -->
  319. <div class="outer" id="headerouter">
  320. <div id="header" >
  321. </div>
  322. </div>
  323. <div class="outer2">
  324. <nav class="navigation">
  325. <ul id="itemlist">
  326. </ul>
  327. </nav>
  328. </div>
  329. </div>
  330. </body>
  331. </html>