update assets location
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js" lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#2196F3">
|
||||
<title>{{ if Defined . "Name" }}{{ .Name }}{{ end }}</title>
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300,700,400italic' rel='stylesheet' type='text/css'>
|
||||
<link rel="stylesheet" href="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/assets/css/main.min.css">
|
||||
{{ if (Defined . "Config") }}{{ if not (eq .Config.Styles "") }}<link rel="stylesheet" href="{{ .Config.Styles }}">{{ end }}{{ end }}
|
||||
|
||||
<script src="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/assets/js/plugins.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js"></script>
|
||||
<script src="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/assets/js/app.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav>
|
||||
<ul class="container">
|
||||
<li><a href="/"><i class="fa fa-home fa-lg"></i><span> Go to website</span></a></li>
|
||||
<li><a data-pjax href="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/browse/content/"><i class="fa fa-newspaper-o"></i><span> Content</span></a></li>
|
||||
<li><a data-pjax href="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/browse/"><i class="fa fa-folder-o"></i><span> Browse</span></a></li>
|
||||
<li><a data-pjax href="{{ if and (Defined . "User") }}{{ .User.Admin }}{{ else }}{{ .Config.Admin }}{{ end }}/settings/"><i class="fa fa-cog"></i><span> Settings</span></a></li>
|
||||
<li><a data-pjax id="logout" href="#logout"><i class="fa fa-sign-out"></i><span> Logout</span></a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="content">
|
||||
{{ template "content" . }}
|
||||
</div>
|
||||
<footer>
|
||||
<p>Proudly using <a href="https://caddyserver.com/">Caddy</a> and <a href="http://gohugo.io/">Hugo</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
{{ template "content" . }}
|
||||
@@ -1,107 +0,0 @@
|
||||
{{ define "content" }}
|
||||
{{ $path := .Path }}
|
||||
{{ $admin := .User.Admin }}
|
||||
|
||||
<main class="browse">
|
||||
<div class="actions">
|
||||
<div class="container">
|
||||
{{if .CanGoUp}}<a data-pjax href=".." class="up" title="Up one level"><i class="fa fa-arrow-left fa-lg"></i></a>{{end}}
|
||||
<span id="site-title">Path: {{ $path }}</span>
|
||||
<div class="go-right">
|
||||
<input type="file" value="Upload" multiple>
|
||||
<button id="upload">Upload <i class="fa fa-cloud-upload"></i></button>
|
||||
<button class="default new">New <i class="fa fa-plus"></i></button>
|
||||
{{ if .User.Git }}<button class="darker git"><i class="fa fa-git"></i></button>{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="left">
|
||||
{{if and (eq .Sort "name") (ne .Order "desc")}}
|
||||
<a data-pjax href="?sort=name&order=desc">Name <i class="fa fa-arrow-up"></i></a> {{else if and (eq .Sort "name") (ne .Order "asc")}}
|
||||
<a data-pjax href="?sort=name&order=asc">Name <i class="fa fa-arrow-down"></i></a> {{else}}
|
||||
<a data-pjax href="?sort=name&order=asc">Name</a> {{end}}
|
||||
</th>
|
||||
<th class="right hideable">
|
||||
{{if and (eq .Sort "size") (ne .Order "desc")}}
|
||||
<a data-pjax href="?sort=size&order=desc">Size <i class="fa fa-arrow-up"></i></a> {{else if and (eq .Sort "size") (ne .Order "asc")}}
|
||||
<a data-pjax href="?sort=size&order=asc">Size <i class="fa fa-arrow-down"></i></a> {{else}}
|
||||
<a data-pjax href="?sort=size&order=asc">Size</a> {{end}}
|
||||
</th>
|
||||
<th class="hideable right">
|
||||
{{if and (eq .Sort "time") (ne .Order "desc")}}
|
||||
<a data-pjax href="?sort=time&order=desc">Modified <i class="fa fa-arrow-up"></i></a> {{else if and (eq .Sort "time") (ne .Order "asc")}}
|
||||
<a data-pjax href="?sort=time&order=asc">Modified <i class="fa fa-arrow-down"></i></a> {{else}}
|
||||
<a data-pjax href="?sort=time&order=asc">Modified</a> {{end}}
|
||||
</th>
|
||||
<th class="right buttons"></th>
|
||||
</tr>
|
||||
{{range .Items}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if .IsDir}}
|
||||
<i class="fa fa-folder"></i> <a data-pjax class="filename" href="{{.URL}}">{{.Name}}</a> {{else}} {{ if CanBeEdited .URL }}
|
||||
<i class="fa fa-file"></i> <a data-pjax class="file filename" href="{{ $admin }}/edit{{ $path }}{{.URL}}">{{.Name}}</a> {{ else }}
|
||||
<i class="fa fa-file"></i> <span class="filename">{{.Name}}</span> {{ end }} {{ end }}
|
||||
</td>
|
||||
<td class="right hideable">{{.HumanSize}}</td>
|
||||
<td class="right hideable">{{.HumanModTime "01/02/2006 3:04:05 PM"}}</td>
|
||||
<td class="right"><button data-file="{{ $admin }}/browse{{ $path }}{{.URL}}" data-message="File renamed." class="rename">✎</button> <button data-file="{{ $admin }}/browse{{ $path }}{{.URL}}" data-message="File deleted." class="delete">✖</button></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="loading" class="hidden">
|
||||
<div class="centerize">
|
||||
<div class="sk-folding-cube">
|
||||
<div class="sk-cube1 sk-cube"></div>
|
||||
<div class="sk-cube2 sk-cube"></div>
|
||||
<div class="sk-cube4 sk-cube"></div>
|
||||
<div class="sk-cube3 sk-cube"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="foreground" class="hidden"></div>
|
||||
|
||||
<form class="popup hidden" id="delete">
|
||||
<h3>Delete</h3>
|
||||
<p>Are you sure you want to delete "<span></span>"?</p>
|
||||
<p class="right">
|
||||
<button class="close" class="darker">No</button>
|
||||
<input type="submit" value="Yes, I am">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form class="popup hidden" id="new">
|
||||
<h3>New file</h3>
|
||||
<p>Write the name of the new file. If you want to use an archetype, add <code>:archetype</code> in the end, replacing 'archetype' by its name.</p>
|
||||
<input type="text" placeholder="Write here...">
|
||||
<p class="right">
|
||||
<input type="submit" value="Create">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form class="popup hidden" id="rename">
|
||||
<h3>Rename file</h3>
|
||||
<p>Write down the new name of "<span></span>".</p>
|
||||
<input type="text" placeholder="New name...">
|
||||
<p class="right">
|
||||
<input type="submit" value="Rename">
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<form class="popup hidden" id="git">
|
||||
<h3>Git</h3>
|
||||
<p>Write down the <code>git</code> command you want to execute. You don't need to write <code>git</code>.</p>
|
||||
<input type="text" placeholder="git push origin master">
|
||||
<p class="right">
|
||||
<input type="submit" value="Execute">
|
||||
</p>
|
||||
</form>
|
||||
{{ end }}
|
||||
@@ -1,58 +0,0 @@
|
||||
{{ define "content" }}
|
||||
<div class="editor container {{ .Class }}">
|
||||
{{ if eq .Class "complete" }}
|
||||
<h1><textarea id="site-title">{{ .Name }}</textarea></h1>
|
||||
{{ end }}
|
||||
<form method="POST" action="">
|
||||
<main>
|
||||
{{ if not (eq .Class "complete") }}
|
||||
<h1 id="site-title">{{ .Name }}</h1>
|
||||
{{ end }}
|
||||
|
||||
{{ if eq .Class "frontmatter-only" }}
|
||||
<div class="frontmatter blocks">
|
||||
{{ template "frontmatter" .FrontMatter }}
|
||||
<p class="actions">
|
||||
<button class="add">Add field</button>
|
||||
</p>
|
||||
</div>
|
||||
{{ else if eq .Class "content-only" }}
|
||||
<div class="content">
|
||||
<div id="editor-source" data-mode="{{ .Mode }}"></div>
|
||||
<textarea name="content">{{ .Content }}</textarea>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="frontmatter">
|
||||
<div class="blocks">
|
||||
{{ template "frontmatter" .FrontMatter }}
|
||||
</div>
|
||||
|
||||
<p class="actions">
|
||||
<button class="add">Add field</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
{{ if eq .Mode "markdown" }}
|
||||
<nav>
|
||||
<a id="see-source" class="active"><i class="fa fa-code"></i> Source</a>
|
||||
<a id="see-preview"><i class="fa fa-eye"></i> Preview</a>
|
||||
</nav>
|
||||
{{ end}}
|
||||
<div id="editor-source" data-mode="{{ .Mode }}"></div>
|
||||
<textarea name="content">{{ .Content }}</textarea>
|
||||
<div id="editor-preview"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<p class="toolbar">
|
||||
<input type="submit" data-type="{{ .Class }}" data-regenerate="false" data-schedule="false" data-message="{{ if eq .Class "frontmatter-only" }}The fields were put on their way.{{ else if eq .Class "content-only" }}Every byte was saved.{{ else }}Post saved with pomp and circumstance.{{ end }}" value="Save">
|
||||
<span class="right">
|
||||
{{ if and (eq .Class "complete") ( .IsPost ) }}<input type="submit" data-type="{{ .Class }}" data-schedule="true" data-regenerate="false" data-message="Post scheduled." value="Schedule"> {{ end }}
|
||||
<input type="submit" data-type="{{ .Class }}" data-regenerate="true" data-schedule="false" data-message="{{ if eq .Class "frontmatter-only" }}Saved and regenerated.{{ else if eq .Class "content-only" }}Done. What do you want more?{{ else }}Post published. Go and share it!{{ end }}" class="default" value="Publish">
|
||||
</span>
|
||||
</p>
|
||||
</main>
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -1,8 +0,0 @@
|
||||
{{ define "content" }}
|
||||
<main role="main" class="container browse error">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<code>{{ .Message }}</code>
|
||||
|
||||
<p><strong>If this error persists contact us on <a href="https://gitter.im/hacdias/caddy-hugo">Gitter chat</a> or open an issue at <a href="https://github.com/hacdias/caddy-hugo/issues/new">GitHub</a>.</strong></p>
|
||||
</main>
|
||||
{{ end }}
|
||||
@@ -1,39 +0,0 @@
|
||||
{{ define "frontmatter" }}
|
||||
{{ range $key, $value := . }}
|
||||
|
||||
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
||||
<fieldset id="{{ $value.Name }}" data-type="{{ $value.Type }}">
|
||||
<h3>{{ SplitCapitalize $value.Title }}</h3>
|
||||
<button class="delete">remove</button>
|
||||
{{ if (eq $value.Type "array") }}<div class="itens">{{ end }}{{ template "frontmatter" $value.Content }}{{ if (eq $value.Type "array") }}<button class="add">+</button></div>{{ end }}
|
||||
</fieldset>
|
||||
{{ else }}
|
||||
|
||||
{{ if not (eq $value.Parent.Type "array") }}
|
||||
<div class="block" id="block-{{ $value.Name }}" data-content="{{ $value.Name }}">
|
||||
<label for="{{ $value.Name }}">{{ SplitCapitalize $value.Title }}</label>
|
||||
<button class="delete">remove</button>
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $value.Parent.Type "array" }}
|
||||
<div id="{{ $value.Name }}-{{ $key }}" data-type="array-item">
|
||||
{{ end }}
|
||||
|
||||
{{ if eq $value.HTMLType "textarea" }}
|
||||
<textarea class="scroll" name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" data-parent-type="{{ $value.Parent.Type }}">{{ $value.Content }}</textarea>
|
||||
{{ else if eq $value.HTMLType "datetime" }}
|
||||
<input name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" value="{{ $value.Content.Format "2006-01-02T15:04" }}" type="datetime-local" data-parent-type="{{ $value.Parent.Type }}"></input>
|
||||
{{ else }}
|
||||
<input name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" value="{{ $value.Content }}" type="{{ $value.HTMLType }}" data-parent-type="{{ $value.Parent.Type }}"></input>
|
||||
{{ end }}
|
||||
|
||||
{{ if not (eq $value.Parent.Type "array") }}</div>{{ end }}
|
||||
|
||||
{{ if eq $value.Parent.Type "array" }}
|
||||
<span class="actions"><button class="delete">×</button></span></div>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user