diff --git a/assets/public/css/styles.css b/assets/public/css/styles.css index e69de29b..79e570aa 100644 --- a/assets/public/css/styles.css +++ b/assets/public/css/styles.css @@ -0,0 +1,97 @@ +.editor input[type="text"], .editor input[type="datetime-local"], .editor textarea { + background-color: #f5f3f3; + border-radius: .5em; + border: 1px solid #ccc; + outline: none; + padding: .5em; + line-height: 1.2em; + width: 100%; + font-size: 1rem; + margin: 0; + transition: all 0.3s; +} +input[type="text"]:focus { + border-bottom: 1px solid #26a69a; +} +.editor .block { + margin-bottom: 1em; +} +.editor fieldset { + border: 0; + margin: 0; + padding: 0; +} +.editor h1 textarea { + font-size: 2em; + font-weight: 400; + resize: none; + overflow: hidden; + padding: 0; + line-height: 1em; + height: 1em; + background-color: transparent; + border: 0; +} +.editor fieldset h3 { + display: inline-block +} +.editor label { + font-size: .8em; + color: #8b8b8b; + font-weight: 500; +} +.editor .options { + column-count: 2; + column-gap: 1em; +} +.editor .block { + break-inside: avoid; + position: relative; + z-index: 0; +} +.editor .block .delete { + position: absolute; + right: 0; + bottom: 1px; + height: 2.5em; + padding: 0 .7em; + background: transparent; + color: rgba(0, 0, 0, 0.5); +} + +/* BUTTONS */ + +.editor button, .editor input[type="submit"] { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); + border: none; + border-radius: 2px; + height: 36px; + line-height: 36px; + outline: 0; + padding: 0 2rem; + text-transform: uppercase; + text-decoration: none; + color: #fff; + background-color: #26a69a; + text-align: center; + letter-spacing: .5px; + position: relative; + cursor: pointer; + display: inline-block; + overflow: hidden; + vertical-align: middle; + transition: all .3s ease-out; +} + +/* TOOLBAR */ + +.editor #actions { + display: flex; + margin: 1em 0; +} +.editor #actions> div { + flex-basis: 50%; +} +.editor #actions div:nth-child(2) { + text-align: right; +} diff --git a/assets/public/js/application.js b/assets/public/js/application.js index 8e556af2..d1e6eb60 100644 --- a/assets/public/js/application.js +++ b/assets/public/js/application.js @@ -1,20 +1,5 @@ "use strict"; -var deleteHandler = function(event) { - event.preventDefault(); - let name = this.dataset.delete; - - let element = document.getElementById(name); - document.removeChild(element); - - //$('label[for="' + name + '"]').fadeOut().remove(); -// $('#' + name).fadeOut().remove(); - - return false; -} - -document.addEventListener("DOMContentLoaded", function(event) { - //alert("hugo is working"); - - return false; -}); +var ace = document.createElement('script'); +ace.src = 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js'; +document.head.appendChild(ace); diff --git a/assets/templates/editor.tmpl b/assets/templates/editor.tmpl index 337194de..b2e4ae91 100644 --- a/assets/templates/editor.tmpl +++ b/assets/templates/editor.tmpl @@ -1,61 +1,62 @@ {{ define "content" }} - - +