|
28 | 28 | if (obj.contentWindow.location.href.indexOf("/deleted") > 0) { |
29 | 29 | obj.parentNode.parentNode.removeChild(obj.parentNode); |
30 | 30 | } |
| 31 | + window.scrollTo(0, document.body.scrollHeight); |
31 | 32 | } |
32 | 33 | function output(obj) { |
33 | 34 | obj.style.height = obj.contentWindow.document.documentElement.scrollHeight + 'px'; |
|
36 | 37 | } else if (obj.contentWindow.location.href.indexOf("/loaded") > 0) { |
37 | 38 | location.reload() |
38 | 39 | } |
| 40 | + window.scrollTo(0, document.body.scrollHeight); |
39 | 41 | } |
40 | 42 | function newmd() { |
41 | 43 | var body = document.getElementById("page-body"); |
|
78 | 80 | event.preventDefault(); |
79 | 81 | } |
80 | 82 | } |
81 | | - function syntax(elem, id) { |
82 | | - console.log(elem, id); |
83 | | - } |
84 | 83 | </script> |
85 | 84 | </head> |
86 | 85 | <body> |
87 | | - <section class="container mt-10"> |
| 86 | + <section class="container grid-960 mt-10"> |
88 | 87 | <header class="navbar navbar-fixed-height"> |
89 | 88 | <section class="navbar-section"> |
90 | 89 | <img src="{{ $root }}static/logo.png" width="30" height="30" /> |
|
102 | 101 | </header> |
103 | 102 | <section class="container"> |
104 | 103 | <div class="columns"> |
105 | | - <div class="column" id="page-body"> |
| 104 | + <div class="column"> |
106 | 105 | <div class="input-group spacing-top"> |
107 | 106 | <code class="input-group-addon spacing-right">File: {{ $page.filename }}</code> |
108 | 107 | </div> |
109 | | - {{ range $i, $line := $page.lines }} |
110 | | - {{ if eq $line.type "markdown" }} |
| 108 | + </div> |
| 109 | + </div> |
| 110 | + </section> |
| 111 | + </section> |
| 112 | + <section class="container mt-10"> |
| 113 | + <section class="container"> |
| 114 | + <div class="columns"> |
| 115 | + <div class="column" style="padding-top: 0px" id="page-body"> |
| 116 | +{{ range $i, $line := $page.lines }} |
| 117 | +{{ if eq $line.type "markdown" }} |
111 | 118 | <div class="panel spacing-top resizer"> |
112 | 119 | <iframe frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="no" onload="handle(this)" onunload="handle(this)" class="panel-body no-borders md-heigh" src="{{ $root }}markdown/view/{{ $page.unique }}/{{ $line.unique }}"></iframe> |
113 | 120 | </div> |
114 | | - {{ else }} |
| 121 | +{{ else }} |
115 | 122 | <div class="input-group spacing-top"> |
116 | 123 | <code class="input-group-addon spacing-right spacing-left">{{ $line.command }}</code> |
117 | 124 | <a class="btn float-right" href="{{ $root }}output/delete/{{ $page.unique }}/{{ $line.unique }}" onclick="confirm_delete(event)"> |
|
121 | 128 | <div class="input-group spacing-top"> |
122 | 129 | <iframe id="output-{{ $i }}" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" scrolling="no" onload="handle(this)" class="input-group-addon spacing-left md-heigh" src="{{ $root }}output/view/{{ $page.unique }}/{{ $line.unique }}"></iframe> |
123 | 130 | </div> |
124 | | - {{ end }} |
125 | | - {{ end }} |
| 131 | +{{ end }} |
| 132 | +{{ end }} |
126 | 133 | <div class="input-group spacing-top" style="margin-top: 10px;"> |
127 | 134 | <a class="btn" href="#" onclick="newmd()"><i class="icon icon-message">Markdown</i> Markdown</a> |
128 | | - {{ if $pipe }} |
| 135 | +{{ if $pipe }} |
129 | 136 | |
130 | 137 | <a class="btn" href="#" onclick="newcm()"><i class="icon icon-resize-horiz">Command Line</i> Command Line</a> |
131 | | - {{ end }} |
| 138 | +{{ end }} |
132 | 139 | </div> |
133 | 140 | </div> |
134 | 141 | </div> |
|
0 commit comments