use editor_template for snippets

master
Garrett Mills 5 years ago
parent 3e95e5beb4
commit 17793dfd7b

@ -104,6 +104,12 @@ body {
background: #ccdddd;
}
.inject {
margin: 3px;
margin-left: 14px;
margin-top: 14px;
}
#title-header-content {
padding: 14px;
font-size: 20pt;
@ -185,17 +191,14 @@ body {
}
.iheader {
background: tomato;
/* no flex rules, it will grow */
}
.idiv {
flex: 1; /* 1 and it will fill whole space left if no flex value are set to other children*/
background: gold;
overflow: auto;
}
.ifooter {
background: lightgreen;
/*min-height: 60px; min-height has its purpose :) , unless you meant height*/
}

@ -12,8 +12,12 @@ html
#pre-header-content DevBug | v#{devbug.version} #{(user ? " | User: "+user.username : "")} #{(e_project ? " | Project: "+project.name+" | API: "+project.uuid : "")} #{((_flitter.config('server.environment') === 'development') ? " | Development" : "" )} | <i>Editor Mode</i>
#title-header
#title-header-content-sm #{title ? title : 'DevBug Dashboard'}
.iheader
block header
.idiv
block content
.ifooter
block footer
.ifooter
ul#navbar
li

@ -1,5 +1,6 @@
extends ./template
block content
extends ./editor_template
block header
.inject
if errors
each error in errors
p(style='color: red; font-weight: bold;') #{error}
@ -82,10 +83,12 @@ block content
if snippet && user && is_owner && readonly
a.btn(href='/dash/v1/snippet/share/'+snippet.id style='margin-left: 20px') Share Snippet
a.btn(href='/dash/v1/project/snippet/'+project.id+'/edit/'+snippet.uuid style='margin-left: 10px') Edit
block content
pre#editor #{ snippet ? snippet.data : '' }
input#preset_mode(type='hidden' value=snippet ? snippet.mode : 'ace/mode/javascript')
block footer
if (!readonly)
button.btn(onclick='submitSnippet()') #{ snippet ? 'Update Snippet' : 'Create Snippet' }
input#preset_mode(type='hidden' value=snippet ? snippet.mode : 'ace/mode/javascript')
block scripts
script(src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js")

@ -21,6 +21,12 @@ block content
a.btn(href='./api') DevBug API
br
h3 Changelog
h4 v0.6.0 - UI Improvements!
ul
li New navigation theme with sticky navigation bar to make the display cleaner
li Separate "editor mode" layout for views using Ace.js
li Out viewer now uses editor mode.
h4 v0.5.1 - Use Ace.js for Outputs
ul
li Switched over to use Ace.js to view development output. Might make this a user preference in the future.

Loading…
Cancel
Save