Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.50 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0"/>
  6. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css">
  7. <link rel="stylesheet" href="css/froala_editor.css">
  8. <link rel="stylesheet" href="css/froala_style.css">
  9. <link rel="stylesheet" href="css/code_view.css">
  10. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.css">
  11. <link href="https://fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
  12.  
  13.  
  14.  
  15.  
  16. <style>
  17. body {
  18. font-family: 'Roboto', sans-serif;
  19. text-align: center;
  20. }
  21.  
  22. hr{
  23. opacity: 0.4;
  24. margin-top: 25px;
  25. }
  26.  
  27. #loader {
  28. position: absolute;
  29. left: 50%;
  30. top: 50%;
  31. z-index: 1;
  32. width: 100px;
  33. height: 100px;
  34. margin: -75px 0 0 -75px;
  35. border: 1px solid #f3f3f3;
  36. border-radius: 50%;
  37. border-top: 2px solid #000000;
  38. width: 120px;
  39. height: 120px;
  40. -webkit-animation: spin 2s linear infinite;
  41. animation: spin 2s linear infinite;
  42. }
  43.  
  44. @-webkit-keyframes spin {
  45. 0% { -webkit-transform: rotate(0deg); }
  46. 100% { -webkit-transform: rotate(360deg); }
  47. }
  48.  
  49. @keyframes spin {
  50. 0% { transform: rotate(0deg); }
  51. 100% { transform: rotate(360deg); }
  52. }
  53.  
  54.  
  55. .sidenav {
  56. height: 100%;
  57. width: 200px;
  58. position: fixed;
  59. z-index: 1;
  60. top: 0;
  61. left: 0;
  62. color:white;
  63. background-color: #000000;
  64. overflow-x: hidden;
  65. padding-top: 25px;
  66.  
  67. }
  68.  
  69. .sidenav a, .dropdown-btn {
  70. padding: 6px 8px 6px 16px;
  71. text-decoration: none;
  72. font-size: 14px;
  73. color: #ffffff;
  74. display: block;
  75. border: none;
  76. background: #000000;
  77. width: 100%;
  78. text-align: left;
  79. cursor: pointer;
  80. outline: none;
  81. line-height: 30px;
  82. -webkit-transition: 0.4s; /* Safari */
  83. transition: 0.4s;
  84. }
  85.  
  86. .sidenav a:hover, .dropdown-btn:hover {
  87. color: #000000;
  88. background: #ffffff;
  89.  
  90. }
  91.  
  92. .main {
  93. margin-left: 200px;
  94. font-size: 20px;
  95. padding: 0px 10px;
  96.  
  97. position: relative;
  98. -webkit-animation-name: animatebottom;
  99. -webkit-animation-duration: 1s;
  100. animation-name: animatebottom;
  101. animation-duration: 1s
  102. }
  103.  
  104. @-webkit-keyframes animatebottom {
  105. from { bottom:-100px; opacity:0 }
  106. to { bottom:0px; opacity:1 }
  107. }
  108.  
  109. @keyframes animatebottom {
  110. from{ bottom:-100px; opacity:0 }
  111. to{ bottom:0; opacity:1 }
  112. }
  113.  
  114. #mainID{
  115. display: none;
  116.  
  117. }
  118.  
  119.  
  120. .active {
  121. background-color: white;
  122. color: black;
  123.  
  124. }
  125.  
  126. .dropdown-container {
  127. display: none;
  128. background-color: #000000;
  129. padding-left: 16px;
  130.  
  131.  
  132. }
  133.  
  134. .fa-plus{
  135.  
  136. float: right;
  137. padding-right: 8px;
  138. padding-top: 8px;
  139. }
  140.  
  141. /* Some media queries for responsiveness */
  142. @media screen and (max-height: 450px) {
  143. .sidenav {padding-top: 15px;}
  144. .sidenav a {font-size: 18px;}
  145. }
  146.  
  147. #buttonSave {
  148. display: block;
  149. border: none;
  150. font-size: 16px;
  151.  
  152. padding: 10px;
  153. width: 25%;
  154. height:auto;
  155. text-align: center;
  156. color: white;
  157. background: linear-gradient(#000000,#2E2E2F);
  158. border-color: #1482d0;
  159. cursor: pointer;
  160. opacity: 1;
  161. transition: 0.3s;
  162. margin-left: auto;
  163. margin-right: auto;
  164. margin-top: 25px;
  165. margin-bottom: 50px;
  166. border-radius: 4px;
  167. -webkit-transition-duration: 0.4s; /* Safari */
  168. transition-duration: 0.4s;
  169. text-decoration: none;
  170. }
  171. #buttonSave:hover{
  172. background: linear-gradient(#51a9ee,#147bcd);
  173. border-color: #1482d0;
  174. width:35%;
  175. }
  176.  
  177.  
  178. .buttonAdd{
  179.  
  180. display: block;
  181. border: none;
  182. font-size: 16px;
  183.  
  184. padding: 10px;
  185. width: 20%;
  186. height:auto;
  187. text-align: center;
  188. color: white;
  189. background: linear-gradient(#51a9ee,#147bcd);
  190. border-color: #1482d0;
  191. cursor: pointer;
  192. opacity: 1;
  193. transition: 0.3s;
  194. margin-left: auto;
  195. margin-right: auto;
  196. margin-top: 25px;
  197. margin-bottom: 50px;
  198. border-radius: 4px;
  199. -webkit-transition-duration: 0.4s; /* Safari */
  200. transition-duration: 0.4s;
  201. text-decoration: none;
  202. }
  203.  
  204. .buttonAdd:hover{
  205. opacity:0.5;
  206. width:23%;
  207.  
  208. }
  209.  
  210. .buttonReset{
  211. display: block;
  212. border: none;
  213. font-size: 10px;
  214.  
  215. padding: 5px;
  216. width: 20%;
  217. height:auto;
  218. text-align: center;
  219. color: white;
  220. background: linear-gradient(#51a9ee,#147bcd);
  221. border-color: #1482d0;
  222. cursor: pointer;
  223. opacity: 1;
  224. transition: 0.3s;
  225. margin-left: auto;
  226. margin-right: auto;
  227. margin-top: 25px;
  228. margin-bottom: 25px;
  229. border-radius: 4px;
  230. -webkit-transition-duration: 0.4s; /* Safari */
  231. transition-duration: 0.4s;
  232. text-decoration: none;
  233.  
  234. }
  235.  
  236. .buttonReset:hover{
  237. opacity:0.5;
  238. width:23%;
  239.  
  240. }
  241.  
  242.  
  243. #projectTitle {
  244. width: 80%;
  245. padding: 12px 20px;
  246. margin: 8px 0;
  247. box-sizing: border-box;
  248.  
  249. font-size:18px;
  250.  
  251. }
  252.  
  253. div#editor {
  254. padding-top: 20px;
  255. width: 80%;
  256. margin: auto;
  257. text-align: left;
  258. display: block;
  259.  
  260. }
  261.  
  262. div#category {
  263. font-size: 18px;
  264. line-height: 23px;
  265. padding-top: 20px;
  266. padding-bottom: 25px;
  267. width: 80%;
  268. margin: auto;
  269. text-align: left;
  270. display: block;
  271.  
  272. }
  273.  
  274. .fr-box.fr-basic .fr-element {
  275.  
  276. color: #000000;
  277. padding: 16px;
  278. -webkit-box-sizing: border-box;
  279. -moz-box-sizing: border-box;
  280. box-sizing: border-box;
  281. overflow-x: scroll;
  282. height: 500px;
  283. font-size: 16px;
  284.  
  285. }
  286.  
  287. .fr-sticky-on {
  288. position: absolute;
  289.  
  290. }
  291.  
  292. .fr-sticky-off {
  293. position: relative;
  294.  
  295. }
  296.  
  297.  
  298. .deleteAllimg{
  299.  
  300. display: none;
  301. }
  302.  
  303.  
  304. .mediaContainer{
  305. display: block;
  306.  
  307. font-size: 18px;
  308. font-weight: bold;
  309. padding-top: 20px;
  310. line-height: 2em;
  311. width: 50%;
  312. margin: auto;
  313. text-align: center;
  314.  
  315. margin-bottom: 100px;
  316.  
  317. }
  318.  
  319.  
  320. img{
  321. display: block;
  322. max-width: 100%;
  323. padding-top: 25px;
  324. margin-left: auto;
  325. margin-right: auto;
  326.  
  327.  
  328. }
  329.  
  330.  
  331. .CodeMirror-gutter, .CodeMirror-gutters, .CodeMirror-linenumber, .CodeMirror-scroll, .CodeMirror-sizer {
  332. -moz-box-sizing: content-box;
  333. box-sizing: content-box;
  334. height: 500px;
  335. }
  336. .sidenav .active_link {
  337.  
  338. background-color: white;
  339. color: black;
  340.  
  341.  
  342. }
  343.  
  344. ul {
  345. margin-left: auto;
  346. list-style-type: none;
  347. }
  348.  
  349. </style>
  350. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  351.  
  352.  
  353. <script>
  354. $(document).ready(function(){
  355. $("#deleteImg").click(function(){
  356. $("img").remove();
  357. $("hr").remove();
  358.  
  359.  
  360.  
  361. });
  362. });
  363. </script>
  364.  
  365. <script>
  366. $(document).ready(function(){
  367. $("#flip").click(function(){
  368. $("#panel").slideToggle("slow");
  369.  
  370. });
  371. });
  372. </script>
  373. <script>
  374. $(document).ready(function() {
  375. $("[href]").each(function() {
  376. if (this.href == window.location.href) {
  377. $(this).addClass("active_link");
  378. }
  379. });
  380. });
  381. </script>
  382. <script>
  383. var myVar;
  384.  
  385. function myFunction() {
  386. myVar = setTimeout(showPage, 2000);
  387. }
  388.  
  389. function showPage() {
  390. document.getElementById("loader").style.display = "none";
  391. document.getElementById("mainID").style.display = "block";
  392. }
  393. </script>
  394.  
  395.  
  396. <script>
  397.  
  398. var y=0;
  399. var img=0;
  400. var btnID = 0;
  401. var hr = 0;
  402.  
  403. function addImage() {
  404. var n = y.toString();
  405. var imgNew = img.toString();
  406. var btn = btnID.toString();
  407. var hrLine = hr.toString();
  408.  
  409. var x = document.createElement("INPUT");
  410. x.setAttribute('type', 'file');
  411. x.setAttribute('name', 'file');
  412. x.setAttribute('id',n);
  413. x.accept = "image/*";
  414. x.onchange = function onchange (event) {loadFile(event)};
  415.  
  416. var buttonDelete = document.createElement("button");
  417. buttonDelete.setAttribute('type', 'reset');
  418. buttonDelete.setAttribute('name', 'delete');
  419. buttonDelete.setAttribute('value', 'reset');
  420. buttonDelete.setAttribute('class', 'buttonReset');
  421. buttonDelete.setAttribute('id','DeleteID'+btn);
  422. buttonDelete.innerHTML = "Delete Image";
  423.  
  424. var imgCreate = document.createElement("IMG");
  425.  
  426. imgCreate.setAttribute('id','idImage'+imgNew);
  427. y++;
  428. img++;
  429. btnID++;
  430. hr++;
  431.  
  432. var hrBorder = document.createElement("hr");
  433. hrBorder.setAttribute('id','borderLine'+hrLine);
  434. var parent = document.getElementById("imageUploader");
  435. parent.appendChild(x);
  436. parent.appendChild(buttonDelete);
  437. parent.appendChild(imgCreate);
  438. parent.appendChild(hrBorder);
  439.  
  440.  
  441.  
  442. var loadFile = function(event) {
  443. var yolo = document.getElementById('idImage'+imgNew);
  444. yolo.src = URL.createObjectURL(event.target.files[0]);
  445.  
  446. }
  447.  
  448. $(document).ready(function(){
  449. $("#"+ "DeleteID"+btn).click(function(){
  450. $("#"+n).detach();
  451. $("#"+"idImage"+imgNew).remove();
  452. $("#"+"DeleteID"+btn).remove();
  453. $("#"+"borderLine"+hrLine).remove();
  454. });
  455. });
  456.  
  457. }
  458. </script>
  459.  
  460.  
  461. </head>
  462.  
  463. <body onload="myFunction()">
  464.  
  465. <div id="loader"></div>
  466.  
  467. <div class="sidenav">
  468.  
  469.  
  470. <a href="home_cms">Home</a>
  471. <a href="cms_nodes">Nodes</a>
  472. <a href="cms_create_category">Categories</a>
  473.  
  474.  
  475. <button id="flip" class="dropdown-btn">Post Project
  476. <i class=" fa fa-plus"></i>
  477. </button>
  478. <div id="panel" class="dropdown-container">
  479. <a href="cms_single_text">Single Text</a>
  480. <a href="cms_double_text">Double Text</a>
  481. <a href="cms_text_media">Text & Media</a>
  482. <a href="cms_media">Media</a>
  483. </div>
  484.  
  485.  
  486. <a href="edit_post">Edit Project</a>
  487. <a href="addlink">Add a Link</a>
  488. <a href="#contact">About</a>
  489. <a href="#contact">Contact</a>
  490. </div>
  491.  
  492.  
  493.  
  494. <div class="main" id="mainID">
  495.  
  496. <div id="category">
  497.  
  498. <h1>Edit Text & Media</h1>
  499. <p>Edit content in English</p>
  500.  
  501. <hr>
  502.  
  503. </div>
  504.  
  505. <div id="category">
  506.  
  507. <h1>Sort Photos</h1>
  508.  
  509. <hr>
  510. <a id="buttonSave" href="http://localhost:8080/cmsrikou/sortphotos">Sort Photos</a>
  511. </div>
  512.  
  513.  
  514. <form action="multipleFileUpload" th:action="@{/edittextmedia}" th:object="${p}" method="post" enctype="multipart/form-data">
  515.  
  516. <div id="category">
  517.  
  518. <h1>Upload Images</h1>
  519. <p>Choose the desired images from your computer to upload</p>
  520.  
  521. <hr>
  522.  
  523. </div>
  524.  
  525. <button class="buttonAdd" type="button" onclick="addImage()">Add Image</button>
  526.  
  527.  
  528. <div class="mediaContainer" id="imageUploader">
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. </div>
  536. <div id="category">
  537.  
  538. <h1>Choose photo(s) to delete</h1>
  539.  
  540.  
  541. <hr>
  542.  
  543.  
  544. <ul class="sortPhotos" >
  545.  
  546. <li th:each="ph : ${photos}" name="name" th:value="${c}" > <img th:src="${'http://localhost:8080/cmsrikou/img/'+ ph}" />
  547. <input type="checkbox" name="pphh" th:value="${ph}" th:utext="${ph}"><br>
  548. </li></ul>
  549.  
  550. <hr>
  551.  
  552. </div>
  553.  
  554. <div id="category">
  555.  
  556. <h1>Edit Text English</h1>
  557. <p>Edit content in English</p>
  558.  
  559.  
  560. <hr>
  561. </div>
  562.  
  563.  
  564.  
  565.  
  566. <input id= 'projectTitle' th:field="*{title}" style="margin-top: 30px;" placeholder="project Title" required>
  567.  
  568.  
  569. <div id="editor">
  570.  
  571.  
  572. <textarea id='edit' th:field="*{text}" placeholder="Type some text">
  573.  
  574.  
  575. </textarea>
  576.  
  577. </div>
  578.  
  579.  
  580. <div id="category">
  581.  
  582. <h1>Edit Text Greek</h1>
  583.  
  584. <p>Συμπληρώστε το περιεχόμενο στα ελληνικά</p>
  585.  
  586. <hr>
  587.  
  588. </div>
  589.  
  590. <input id= 'projectTitle' th:field="*{eltitle}" style="margin-top: 30px;" placeholder="Τίτλος" required>
  591.  
  592.  
  593. <div id="editor">
  594.  
  595.  
  596. <textarea id='edit2' th:field="*{eltext}" placeholder="Κείμενο">
  597.  
  598. </textarea>
  599.  
  600. </div>
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608. <input id="buttonSave" type="submit" value="Submit">
  609. </form>
  610.  
  611.  
  612.  
  613.  
  614. </div>
  615.  
  616.  
  617.  
  618. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  619. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/codemirror.min.js"></script>
  620. <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.3.0/mode/xml/xml.min.js"></script>
  621. <script type="text/javascript" src="js/froala_editor.min.js"></script>
  622.  
  623. <script type="text/javascript" src="js/code_beautifier.min.js"></script>
  624. <script type="text/javascript" src="js/code_view.min.js"></script>
  625.  
  626.  
  627.  
  628.  
  629. <script>
  630. $(function(){
  631. $('#edit')
  632. .on('froalaEditor.initialized', function (e, editor) {
  633. $('#edit').parents('form')
  634. })
  635. .froalaEditor({enter: $.FroalaEditor.ENTER_P, placeholderText: null})
  636. });
  637.  
  638. $(function(){
  639. $('#edit2')
  640. .on('froalaEditor.initialized', function (e, editor) {
  641. $('#edit2').parents('form')
  642. })
  643. .froalaEditor({enter: $.FroalaEditor.ENTER_P, placeholderText: null})
  644. });
  645.  
  646.  
  647. </script>
  648.  
  649.  
  650.  
  651. </div>
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659. </body>
  660. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement