mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Whitespace
This commit is contained in:
parent
e1934b9797
commit
b42750073c
File diff suppressed because one or more lines are too long
@ -335,6 +335,7 @@ func handlePageRequest(c *gin.Context) {
|
||||
"DontKnowPage": command[0:2] != "/e" &&
|
||||
command[0:2] != "/v" &&
|
||||
command[0:2] != "/l" &&
|
||||
command[0:2] != "/r" &&
|
||||
command[0:2] != "/h",
|
||||
"DirectoryPage": page == "ls",
|
||||
"DirectoryEntries": DirectoryEntries,
|
||||
|
@ -139,12 +139,6 @@ body#pad textarea {
|
||||
{{ end }}
|
||||
<title>{{ .Page }}</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type='text/javascript'>
|
||||
oulipo = false;
|
||||
//<![CDATA[
|
||||
@ -174,8 +168,9 @@ body#pad textarea {
|
||||
// This will apply the debounce effect on the keyup event
|
||||
// And it only fires 500ms or half a second after the user stopped typing
|
||||
$('#userInput').on('keyup', debounce(function() {
|
||||
console.log('typing occurred');
|
||||
if (oulipo == true) { $('#userInput').val($('#userInput').val().replace(/e/g,"")); }
|
||||
if (oulipo) {
|
||||
$('#userInput').val($('#userInput').val().replace(/e/g,""));
|
||||
}
|
||||
$('#saveEditButton').removeClass()
|
||||
$('#saveEditButton').text("Saving")
|
||||
upload();
|
||||
@ -489,14 +484,8 @@ body#pad textarea {
|
||||
<article class="markdown-body">
|
||||
|
||||
{{ if .ReadPage }}
|
||||
<div id="wrap">
|
||||
<div id="rendered">
|
||||
{{ .RenderedPage }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- No menu for read page -->
|
||||
{{ else }}
|
||||
|
||||
|
||||
<div class="pure-menu pure-menu-horizontal" id="menu">
|
||||
<ul class="pure-menu-list">
|
||||
<li></li>
|
||||
@ -531,10 +520,6 @@ body#pad textarea {
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
<!--
|
||||
<li class="pure-menu-item {{ with .ViewPage }}pure-menu-selected{{ end }}">
|
||||
<a href="/{{ .Page }}/view" class="pure-menu-link">View</a>
|
||||
</li>-->
|
||||
|
||||
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover {{ with .ViewPage }}pure-menu-selected{{ end }}">
|
||||
<a href="/{{ .Page }}/view" class="pure-menu-link">View</a>
|
||||
@ -564,30 +549,54 @@ body#pad textarea {
|
||||
{{ end }}
|
||||
<li class="pure-menu-item {{ with .EditPage }}pure-menu-selected{{ end }}"><a href="/{{ .Page }}/edit" class="pure-menu-link"><span id="saveEditButton">Edit</span></a></li>
|
||||
{{end}}
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ end }}
|
||||
|
||||
<div id="wrap">
|
||||
{{ if .EditPage }} <div id="pad"><textarea autofocus placeholder="Use markdown to write your note! New: you can publish your note when you are done ({{ .Page }} -> Publish)." id="userInput">{{ .RawPage }}</textarea></div>{{ end }}
|
||||
<div id="rendered">
|
||||
{{ if .DontKnowPage }} <strong><center>{{ .Route }} not understood!</center></strong>{{ end }}
|
||||
{{ if .ViewPage }}{{ .RenderedPage }}
|
||||
{{ if .EditPage }}
|
||||
<div id="pad">
|
||||
<textarea
|
||||
autofocus
|
||||
placeholder="Use markdown to write your note! New: you can publish your note when you are done ({{ .Page }} -> Publish)."
|
||||
id="userInput"
|
||||
>{{ .RawPage }}</textarea>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<div id="rendered">
|
||||
{{ if .DontKnowPage }}
|
||||
<strong>
|
||||
<center>
|
||||
{{ .Route }} not understood!
|
||||
</center>
|
||||
</strong>
|
||||
{{ end }}
|
||||
|
||||
{{ if .ViewPage }}
|
||||
{{ .RenderedPage }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .ReadPage }}
|
||||
{{ .RenderedPage }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .HistoryPage }}
|
||||
<h1>History</h1>
|
||||
<ul>
|
||||
{{range $i, $e := .Versions}}
|
||||
<li style="list-style: none;">
|
||||
<a href="/{{ $.Page }}/view?version={{$e}}">View</a> <a href="/{{ $.Page }}/list?version={{$e}}">List</a> <a href="/{{ $.Page }}/raw?version={{$e}}">Raw</a>
|
||||
<a href="/{{ $.Page }}/view?version={{$e}}">View</a>
|
||||
|
||||
<a href="/{{ $.Page }}/list?version={{$e}}">List</a>
|
||||
|
||||
<a href="/{{ $.Page }}/raw?version={{$e}}">Raw</a>
|
||||
|
||||
{{index $.VersionsText $i}} ({{if lt (index $.VersionsChangeSums $i) 0}}<span style="color:red">{{else}}<span style="color:green">+{{end}}{{index $.VersionsChangeSums $i}}</span>)</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if .ListPage }}
|
||||
{{ range $index, $element := .ListItems }}
|
||||
{{ $element }}
|
||||
@ -614,13 +623,6 @@ body#pad textarea {
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user