updates...
Former-commit-id: 2d19655aac80ec7033829b0b3d708bf86986252c [formerly b8bb006bd1a5492960c1d4793e15e80775ddc5fd] [formerly 4641277c14953bdb2ddab89ba866cf63f3dac0f9 [formerly 95b91a64a3c648e1414c7feb4b597bf0da195664]] Former-commit-id: 5a6e07758bbe67fd202effa5b2975c65227eaebd [formerly 9a161548d270750b8da949189ad6f3b641779bfc] Former-commit-id: 84e0bbcbbead53c5e91987574d5c854a9792515f
This commit is contained in:
111
_assets/_old/templates/actions.tmpl
Normal file
111
_assets/_old/templates/actions.tmpl
Normal file
@@ -0,0 +1,111 @@
|
||||
{{ define "info-button" }}
|
||||
<button title="Info" aria-label="Info" class="action" id="info">
|
||||
<i class="material-icons">info</i>
|
||||
<span>Info</span>
|
||||
</button>
|
||||
{{ end }}
|
||||
|
||||
{{ define "delete-button" }}
|
||||
<button aria-label="Delete" title="Delete" class="action" id="delete">
|
||||
<i class="material-icons">delete</i>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
{{ end }}
|
||||
|
||||
{{ define "right-side-actions" }}
|
||||
{{ template "info-button" }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "right" }}
|
||||
{{- if not .IsEditor }}
|
||||
<a aria-label="Switch View" href="?display={{- if eq .Display "mosaic" }}list{{ else }}mosaic{{ end }}" class="action">
|
||||
<i class="material-icons">{{- if eq .Display "mosaic" }}view_list{{ else }}view_module{{ end }}</i>
|
||||
<span>Switch view</span>
|
||||
</a>
|
||||
|
||||
<button aria-label="Select multiple" class="action mobile-only" id="multiple-selection-activate">
|
||||
<i class="material-icons">check_circle</i>
|
||||
<span>Select</span>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{- if and (.User.AllowNew) (not .IsEditor) }}
|
||||
<button aria-label="Upload" title="Upload" class="action" id="upload">
|
||||
<i class="material-icons">file_upload</i>
|
||||
<span>Upload</span>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{- if and .User.AllowEdit (.IsEditor) }}
|
||||
<button aria-label="Delete" title="Delete" class="action" id="delete">
|
||||
<i class="material-icons">delete</i>
|
||||
<span>Delete</span>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
<button {{ if .IsDir }}data-dropdown{{ end }} aria-label="Download" title="Download" class="action" id="download">
|
||||
{{- if .IsEditor}}<a href="?download=true">{{ end }}
|
||||
<i class="material-icons">file_download</i><span>Download</span>
|
||||
{{- if .IsEditor}}</a>{{ end }}
|
||||
|
||||
{{- if not .IsEditor }}
|
||||
<ul class="dropdown" id="download-drop">
|
||||
<a tabindex="0" aria-label="Download as Zip" data-format="zip" href="?download=zip"><li>zip</li></a>
|
||||
<a tabindex="0" aria-label="Download as Tar" data-format="tar" href="?download=tar"><li>tar</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarGz" data-format="targz" href="?download=targz"><li>tar.gz</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarBz2" data-format="tarbz2" href="?download=tarbz2"><li>tar.bz2</li></a>
|
||||
<a tabindex="0" aria-label="Download as TarXz" data-format="tarbz2" href="?download=tarxz"><li>tar.xz</li></a>
|
||||
</ul>
|
||||
{{- end }}
|
||||
</button>
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ define "left-side-actions" }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "left" }}
|
||||
{{- if and (not .IsDir) (.User.AllowEdit) }}
|
||||
{{- if .Editor}}
|
||||
|
||||
{{- if eq .Data.Mode "markdown" }}
|
||||
<button aria-label="Preview" class="action" id="preview" onclick="notImplemented(event);">
|
||||
<i class="material-icons" title="Preview">remove_red_eye</i>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{- if eq .Data.Visual true }}
|
||||
<button aria-label="Toggle edit source" class="action" id="edit-source">
|
||||
<i class="material-icons" title="Toggle edit source">code</i>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{/* end if editor */}}
|
||||
|
||||
<button aria-label="Save" class="action" id="save">
|
||||
<i class="material-icons" title="Save">save</i>
|
||||
</button>
|
||||
{{- end }}
|
||||
|
||||
{{/* end if not dir and AllowEdit */}}
|
||||
{{- end }}
|
||||
|
||||
{{- if and .IsDir .User.AllowEdit }}
|
||||
<button aria-label="Edit" class="action" id="rename">
|
||||
<i class="material-icons" title="Edit">mode_edit</i>
|
||||
<span>Rename</span>
|
||||
</button>
|
||||
|
||||
<button aria-label="Move" class="action" id="move">
|
||||
<i class="material-icons" title="Move">forward</i>
|
||||
<span>Move file</span>
|
||||
</button>
|
||||
|
||||
<button aria-label="Delete" class="action" id="delete">
|
||||
<i class="material-icons" title="Delete">delete</i><span>Delete</span>
|
||||
</button>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
57
_assets/_old/templates/editor.tmpl
Normal file
57
_assets/_old/templates/editor.tmpl
Normal file
@@ -0,0 +1,57 @@
|
||||
{{ define "content" }}
|
||||
{{- with .Data }}
|
||||
<form id="editor" {{ if eq .Mode "markdown" }}class="markdown"{{ end }} data-kind="{{ .Class }}" data-rune="{{ if eq .Class "complete" }}{{ .FrontMatter.Rune }}{{ end }}">
|
||||
{{- if or (eq .Class "frontmatter-only") (eq .Class "complete") }}
|
||||
{{- if (eq .Class "complete")}}
|
||||
<h2>Metadata</h2>
|
||||
{{- end }}
|
||||
<div class="frontmatter" data-type="parent">
|
||||
{{- template "blocks" .FrontMatter.Content }}
|
||||
<div class="button add">Add field</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{ if or (eq .Class "content-only") (eq .Class "complete") }}
|
||||
{{ if (eq .Class "complete")}}
|
||||
<h2>Body</h2>
|
||||
{{ end }}
|
||||
<div class="content">
|
||||
<div id="ace" data-mode="{{ .Mode }}"></div>
|
||||
<textarea class="source" name="content">{{ .Content }}</textarea>
|
||||
</div>
|
||||
{{ end }}
|
||||
</form>
|
||||
{{- end }}
|
||||
|
||||
<template id="base-template">
|
||||
<fieldset id="" data-type="">
|
||||
<h3></h3>
|
||||
<div class="action add">
|
||||
<i class="material-icons">add</i>
|
||||
</div>
|
||||
<div class="action delete" data-delete="">
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
<div class="group"></div>
|
||||
</fieldset>
|
||||
</template>
|
||||
|
||||
<template id="object-item-template">
|
||||
<div class="block" id="block-${bid}" data-content="${bid}">
|
||||
<label for="${bid}">${name}</label>
|
||||
<input name="${bid}" id="${bid}" type="text" data-parent-type="object"></input>
|
||||
<div class="action delete" data-delete="block-${bid}">
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="array-item-template">
|
||||
<div id="" data-type="array-item">
|
||||
<input name="" id="" type="text" data-parent-type="array"></input>
|
||||
<div class="action delete" data-delete="">
|
||||
<i class="material-icons">close</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
{{ end }}
|
||||
56
_assets/_old/templates/frontmatter.tmpl
Normal file
56
_assets/_old/templates/frontmatter.tmpl
Normal file
@@ -0,0 +1,56 @@
|
||||
{{ define "blocks" }}
|
||||
{{ if .Fields }}<div class="group">{{ end }}
|
||||
{{- range $key, $value := .Fields }}
|
||||
{{- if eq $value.Parent.Type "array" }}
|
||||
<div id="{{ $value.Name }}-{{ $key }}" data-type="array-item">
|
||||
{{- template "value" $value }}
|
||||
<div class="action delete" data-delete="{{ $value.Name }}-{{ $key }}">
|
||||
<i class="material-icons" title="Close">close</i>
|
||||
</div>
|
||||
</div>
|
||||
{{- else }}
|
||||
<div class="block" id="block-{{ $value.Name }}" data-content="{{ $value.Name }}">
|
||||
<label for="{{ $value.Name }}">{{ $value.Title }}</label>
|
||||
{{ template "value" $value }}
|
||||
<div class="action delete" data-delete="block-{{ $value.Name }}">
|
||||
<i class="material-icons" title="Close">close</i>
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Fields }}</div>{{ end }}
|
||||
|
||||
{{- range $key, $value := .Arrays }}
|
||||
{{- template "fielset" $value }}
|
||||
{{- end }}
|
||||
|
||||
{{- range $key, $value := .Objects }}
|
||||
{{- template "fielset" $value }}
|
||||
{{- end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ define "value" }}
|
||||
{{- if eq .HTMLType "textarea" }}
|
||||
<textarea class="scroll" name="{{ .Name }}" id="{{.Name }}" data-parent-type="{{ .Parent.Type }}">{{ .Content.Other }}</textarea>
|
||||
{{- else if eq .HTMLType "datetime" }}
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{- else }}
|
||||
<input name="{{ .Name }}" id="{{ .Name }}" value="{{ .Content.Other }}" type="{{ .HTMLType }}" data-parent-type="{{ .Parent.Type }}"></input>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "fielset" }}
|
||||
<fieldset id="{{ .Name }}" data-type="{{ .Type }}">
|
||||
{{- if not (eq .Title "") }}
|
||||
<h3>{{ .Name }}</h3>
|
||||
{{- end }}
|
||||
<div class="action add">
|
||||
<i class="material-icons" title="Add">add</i>
|
||||
</div>
|
||||
<div class="action delete" data-delete="{{ .Name }}">
|
||||
<i class="material-icons" title="Close">close</i>
|
||||
</div>
|
||||
{{- template "blocks" .Content }}
|
||||
</fieldset>
|
||||
{{ end }}
|
||||
14
_assets/_old/templates/hugo.tmpl
Normal file
14
_assets/_old/templates/hugo.tmpl
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ define "sidebar-addon" }}
|
||||
<a class="action" href="{{ .BaseURL }}/content/">
|
||||
<i class="material-icons">subject</i>
|
||||
<span>Posts and Pages</span>
|
||||
</a>
|
||||
<a class="action" href="{{ .BaseURL }}/themes/">
|
||||
<i class="material-icons">format_paint</i>
|
||||
<span>Themes</span>
|
||||
</a>
|
||||
<a class="action" href="{{ .BaseURL }}/settings/">
|
||||
<i class="material-icons">settings</i>
|
||||
<span>Settings</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
17
_assets/_old/templates/listing.tmpl
Normal file
17
_assets/_old/templates/listing.tmpl
Normal file
@@ -0,0 +1,17 @@
|
||||
{{ define "item" }}
|
||||
<div ondragstart="listing.itemDragStart(event)"
|
||||
{{ if .IsDir}}ondragover="listing.itemDragOver(event)" ondrop="listing.itemDrop(event)"{{ end }}
|
||||
|
||||
onclick="listing.selectItem(event)"
|
||||
ondblclick="listing.openItem(event)"
|
||||
data-dir="{{ .IsDir }}"
|
||||
data-url="{{ .URL }}">
|
||||
|
||||
<div>
|
||||
|
||||
<p class="modified">
|
||||
<time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "2 Jan 2006 03:04 PM"}}</time>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
87
_assets/_old/templates/templates.tmpl
Normal file
87
_assets/_old/templates/templates.tmpl
Normal file
@@ -0,0 +1,87 @@
|
||||
{{ define "templates" }}
|
||||
<template id="question-template">
|
||||
<form class="prompt">
|
||||
<h3></h3>
|
||||
<p></p>
|
||||
<input autofocus type="text">
|
||||
<div>
|
||||
<button type="submit" autofocus class="ok">OK</button>
|
||||
<button class="cancel" onclick="closePrompt(event);">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<template id="info-template">
|
||||
<div class="prompt">
|
||||
<h3>File Information</h3>
|
||||
<p><strong>Display Name:</strong> <span id="display_name"></span></p>
|
||||
<p><strong>Size:</strong> <span id="content_length"></span> Bytes</p>
|
||||
<p><strong>Last Modified:</strong> <span id="last_modified"></span></p>
|
||||
|
||||
<section class="file-only">
|
||||
<p><strong>MD5:</strong> <code id="md5"><a href="#" onclick="getHash(event, 'md5')">show</a></code></p>
|
||||
<p><strong>SHA1:</strong> <code id="sha1"><a href="#" onclick="getHash(event, 'sha1')">show</a></code></p>
|
||||
<p><strong>SHA256:</strong> <code id="sha256"><a href="#" onclick="getHash(event, 'sha256')">show</a></code></p>
|
||||
<p><strong>SHA512:</strong> <code id="sha512"><a href="#" onclick="getHash(event, 'sha512')">show</a></code></p>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<button type="submit" onclick="closePrompt(event);" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="message-template">
|
||||
<div class="prompt">
|
||||
<h3></h3>
|
||||
<p></p>
|
||||
<div>
|
||||
<button type="submit" onclick="closePrompt(event);" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="move-template">
|
||||
<form class="prompt">
|
||||
<h3>Move</h3>
|
||||
<p>Choose new house for your file(s)/folder(s):</p>
|
||||
|
||||
<div class="file-list">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>Currently navigating on: <code></code>.</p>
|
||||
|
||||
<div>
|
||||
<button type="submit" autofocus class="ok">Move</button>
|
||||
<button class="cancel" onclick="closePrompt(event);">Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
</template>
|
||||
|
||||
<div class="help">
|
||||
<h3>Help</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>F1</strong> - this information</li>
|
||||
<li><strong>F2</strong> - rename file</li>
|
||||
<li><strong>DEL</strong> - delete selected items</li>
|
||||
<li><strong>ESC</strong> - clear selection and/or close the prompt</li>
|
||||
<li><strong>CTRL + S</strong> - save a file or download the directory where you are</li>
|
||||
<li><strong>CTRL + Click</strong> - select multiple files or directories</li>
|
||||
<li><strong>Double click</strong> - open a file or directory</li>
|
||||
<li><strong>Click</strong> - select file or directory</li>
|
||||
</ul>
|
||||
|
||||
<p>Not available yet</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Alt + Click</strong> - select a group of files</li>
|
||||
</ul>
|
||||
|
||||
<div>
|
||||
<button type="submit" onclick="closeHelp(event);" class="ok">OK</button>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user