hyde_admin 0.0.1 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +3 -0
- data/.idea/hyde_admin.iml +2 -0
- data/.idea/vcs.xml +6 -0
- data/CHANGELOG.md +35 -0
- data/README.md +23 -0
- data/TODO.md +3 -0
- data/bin/admin_views/admin_layout.html.erb +204 -108
- data/bin/admin_views/configuration.erb +13 -0
- data/bin/admin_views/dashboard.erb +1 -1
- data/bin/admin_views/editor_html.erb +24 -0
- data/bin/admin_views/editor_js.erb +120 -0
- data/bin/admin_views/files/edit.erb +30 -0
- data/bin/admin_views/files/listing.erb +111 -0
- data/bin/admin_views/partials/image_element.html.erb +4 -0
- data/bin/admin_views/partials/images_page.html.erb +8 -0
- data/bin/admin_views/posts/edit.erb +158 -0
- data/bin/admin_views/posts/listing.erb +37 -0
- data/bin/admin_views/upload_image_form.erb +45 -0
- data/bin/fslightbox/fslightbox.js +1 -0
- data/bin/hyde_admin +3 -0
- data/bin/hyde_admin.ru +306 -56
- data/bin/hyde_admin.yml +12 -5
- data/bin/hyde_assets/hyde_admin.css +37 -0
- data/bin/hyde_assets/hyde_admin.js +24 -0
- data/bin/i18n/en.yml +77 -1
- data/bin/i18n/fr.yml +77 -1
- data/bin/lib/codemirror.css +349 -0
- data/bin/lib/codemirror.js +9833 -0
- data/bin/mode/css/css.js +864 -0
- data/bin/mode/css/gss.html +104 -0
- data/bin/mode/css/gss_test.js +17 -0
- data/bin/mode/css/index.html +81 -0
- data/bin/mode/css/less.html +152 -0
- data/bin/mode/css/less_test.js +54 -0
- data/bin/mode/css/scss.html +158 -0
- data/bin/mode/css/scss_test.js +110 -0
- data/bin/mode/css/test.js +217 -0
- data/bin/mode/htmlembedded/htmlembedded.js +37 -0
- data/bin/mode/htmlembedded/index.html +60 -0
- data/bin/mode/htmlmixed/htmlmixed.js +153 -0
- data/bin/mode/htmlmixed/index.html +100 -0
- data/bin/mode/javascript/index.html +118 -0
- data/bin/mode/javascript/javascript.js +959 -0
- data/bin/mode/javascript/json-ld.html +72 -0
- data/bin/mode/javascript/test.js +521 -0
- data/bin/mode/javascript/typescript.html +62 -0
- data/bin/mode/markdown/index.html +418 -0
- data/bin/mode/markdown/markdown.js +886 -0
- data/bin/mode/markdown/test.js +1319 -0
- data/bin/mode/ruby/index.html +183 -0
- data/bin/mode/ruby/ruby.js +303 -0
- data/bin/mode/ruby/test.js +23 -0
- data/bin/mode/sass/index.html +68 -0
- data/bin/mode/sass/sass.js +459 -0
- data/bin/mode/sass/test.js +122 -0
- data/bin/mode/spreadsheet/index.html +42 -0
- data/bin/mode/spreadsheet/spreadsheet.js +112 -0
- data/bin/mode/xml/index.html +61 -0
- data/bin/mode/xml/test.js +51 -0
- data/bin/mode/xml/xml.js +417 -0
- data/bin/mode/yaml/index.html +80 -0
- data/bin/mode/yaml/yaml.js +120 -0
- data/bin/mode/yaml-frontmatter/index.html +121 -0
- data/bin/mode/yaml-frontmatter/yaml-frontmatter.js +72 -0
- data/hyde_admin.gemspec +7 -1
- data/lib/hyde_admin/version.rb +1 -1
- metadata +131 -7
- data/bin/admin_views/edit.erb +0 -57
- data/bin/admin_views/listing.erb +0 -32
- data/bin/hyde_admin.sh +0 -3
@@ -0,0 +1,80 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: YAML mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="yaml.js"></script>
|
10
|
+
<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>
|
11
|
+
<div id=nav>
|
12
|
+
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
|
13
|
+
|
14
|
+
<ul>
|
15
|
+
<li><a href="../../index.html">Home</a>
|
16
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
17
|
+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
18
|
+
</ul>
|
19
|
+
<ul>
|
20
|
+
<li><a href="../index.html">Language modes</a>
|
21
|
+
<li><a class=active href="#">YAML</a>
|
22
|
+
</ul>
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<article>
|
26
|
+
<h2>YAML mode</h2>
|
27
|
+
<form><textarea id="code" name="code">
|
28
|
+
--- # Favorite movies
|
29
|
+
- Casablanca
|
30
|
+
- North by Northwest
|
31
|
+
- The Man Who Wasn't There
|
32
|
+
--- # Shopping list
|
33
|
+
[milk, pumpkin pie, eggs, juice]
|
34
|
+
--- # Indented Blocks, common in YAML data files, use indentation and new lines to separate the key: value pairs
|
35
|
+
name: John Smith
|
36
|
+
age: 33
|
37
|
+
--- # Inline Blocks, common in YAML data streams, use commas to separate the key: value pairs between braces
|
38
|
+
{name: John Smith, age: 33}
|
39
|
+
---
|
40
|
+
receipt: Oz-Ware Purchase Invoice
|
41
|
+
date: 2007-08-06
|
42
|
+
customer:
|
43
|
+
given: Dorothy
|
44
|
+
family: Gale
|
45
|
+
|
46
|
+
items:
|
47
|
+
- part_no: A4786
|
48
|
+
descrip: Water Bucket (Filled)
|
49
|
+
price: 1.47
|
50
|
+
quantity: 4
|
51
|
+
|
52
|
+
- part_no: E1628
|
53
|
+
descrip: High Heeled "Ruby" Slippers
|
54
|
+
size: 8
|
55
|
+
price: 100.27
|
56
|
+
quantity: 1
|
57
|
+
|
58
|
+
bill-to: &id001
|
59
|
+
street: |
|
60
|
+
123 Tornado Alley
|
61
|
+
Suite 16
|
62
|
+
city: East Centerville
|
63
|
+
state: KS
|
64
|
+
|
65
|
+
ship-to: *id001
|
66
|
+
|
67
|
+
specialDelivery: >
|
68
|
+
Follow the Yellow Brick
|
69
|
+
Road to the Emerald City.
|
70
|
+
Pay no attention to the
|
71
|
+
man behind the curtain.
|
72
|
+
...
|
73
|
+
</textarea></form>
|
74
|
+
<script>
|
75
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
76
|
+
</script>
|
77
|
+
|
78
|
+
<p><strong>MIME types defined:</strong> <code>text/x-yaml</code>.</p>
|
79
|
+
|
80
|
+
</article>
|
@@ -0,0 +1,120 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode("yaml", function() {
|
15
|
+
|
16
|
+
var cons = ['true', 'false', 'on', 'off', 'yes', 'no'];
|
17
|
+
var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i');
|
18
|
+
|
19
|
+
return {
|
20
|
+
token: function(stream, state) {
|
21
|
+
var ch = stream.peek();
|
22
|
+
var esc = state.escaped;
|
23
|
+
state.escaped = false;
|
24
|
+
/* comments */
|
25
|
+
if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) {
|
26
|
+
stream.skipToEnd();
|
27
|
+
return "comment";
|
28
|
+
}
|
29
|
+
|
30
|
+
if (stream.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))
|
31
|
+
return "string";
|
32
|
+
|
33
|
+
if (state.literal && stream.indentation() > state.keyCol) {
|
34
|
+
stream.skipToEnd(); return "string";
|
35
|
+
} else if (state.literal) { state.literal = false; }
|
36
|
+
if (stream.sol()) {
|
37
|
+
state.keyCol = 0;
|
38
|
+
state.pair = false;
|
39
|
+
state.pairStart = false;
|
40
|
+
/* document start */
|
41
|
+
if(stream.match('---')) { return "def"; }
|
42
|
+
/* document end */
|
43
|
+
if (stream.match('...')) { return "def"; }
|
44
|
+
/* array list item */
|
45
|
+
if (stream.match(/\s*-\s+/)) { return 'meta'; }
|
46
|
+
}
|
47
|
+
/* inline pairs/lists */
|
48
|
+
if (stream.match(/^(\{|\}|\[|\])/)) {
|
49
|
+
if (ch == '{')
|
50
|
+
state.inlinePairs++;
|
51
|
+
else if (ch == '}')
|
52
|
+
state.inlinePairs--;
|
53
|
+
else if (ch == '[')
|
54
|
+
state.inlineList++;
|
55
|
+
else
|
56
|
+
state.inlineList--;
|
57
|
+
return 'meta';
|
58
|
+
}
|
59
|
+
|
60
|
+
/* list separator */
|
61
|
+
if (state.inlineList > 0 && !esc && ch == ',') {
|
62
|
+
stream.next();
|
63
|
+
return 'meta';
|
64
|
+
}
|
65
|
+
/* pairs separator */
|
66
|
+
if (state.inlinePairs > 0 && !esc && ch == ',') {
|
67
|
+
state.keyCol = 0;
|
68
|
+
state.pair = false;
|
69
|
+
state.pairStart = false;
|
70
|
+
stream.next();
|
71
|
+
return 'meta';
|
72
|
+
}
|
73
|
+
|
74
|
+
/* start of value of a pair */
|
75
|
+
if (state.pairStart) {
|
76
|
+
/* block literals */
|
77
|
+
if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; };
|
78
|
+
/* references */
|
79
|
+
if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; }
|
80
|
+
/* numbers */
|
81
|
+
if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; }
|
82
|
+
if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; }
|
83
|
+
/* keywords */
|
84
|
+
if (stream.match(keywordRegex)) { return 'keyword'; }
|
85
|
+
}
|
86
|
+
|
87
|
+
/* pairs (associative arrays) -> key */
|
88
|
+
if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
|
89
|
+
state.pair = true;
|
90
|
+
state.keyCol = stream.indentation();
|
91
|
+
return "atom";
|
92
|
+
}
|
93
|
+
if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; }
|
94
|
+
|
95
|
+
/* nothing found, continue */
|
96
|
+
state.pairStart = false;
|
97
|
+
state.escaped = (ch == '\\');
|
98
|
+
stream.next();
|
99
|
+
return null;
|
100
|
+
},
|
101
|
+
startState: function() {
|
102
|
+
return {
|
103
|
+
pair: false,
|
104
|
+
pairStart: false,
|
105
|
+
keyCol: 0,
|
106
|
+
inlinePairs: 0,
|
107
|
+
inlineList: 0,
|
108
|
+
literal: false,
|
109
|
+
escaped: false
|
110
|
+
};
|
111
|
+
},
|
112
|
+
lineComment: "#",
|
113
|
+
fold: "indent"
|
114
|
+
};
|
115
|
+
});
|
116
|
+
|
117
|
+
CodeMirror.defineMIME("text/x-yaml", "yaml");
|
118
|
+
CodeMirror.defineMIME("text/yaml", "yaml");
|
119
|
+
|
120
|
+
});
|
@@ -0,0 +1,121 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: YAML front matter mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="../../addon/mode/overlay.js"></script>
|
10
|
+
<script src="../markdown/markdown.js"></script>
|
11
|
+
<script src="../gfm/gfm.js"></script>
|
12
|
+
<script src="../yaml/yaml.js"></script>
|
13
|
+
<script src="yaml-frontmatter.js"></script>
|
14
|
+
<style>.CodeMirror { border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }</style>
|
15
|
+
<div id=nav>
|
16
|
+
<a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
|
17
|
+
|
18
|
+
<ul>
|
19
|
+
<li><a href="../../index.html">Home</a>
|
20
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
21
|
+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
22
|
+
</ul>
|
23
|
+
<ul>
|
24
|
+
<li><a href="../index.html">Language modes</a>
|
25
|
+
<li><a class=active href="#">YAML-Frontmatter</a>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<article>
|
30
|
+
<h2>YAML front matter mode</h2>
|
31
|
+
<form><textarea id="code" name="code">
|
32
|
+
---
|
33
|
+
receipt: Oz-Ware Purchase Invoice
|
34
|
+
date: 2007-08-06
|
35
|
+
customer:
|
36
|
+
given: Dorothy
|
37
|
+
family: Gale
|
38
|
+
|
39
|
+
items:
|
40
|
+
- part_no: A4786
|
41
|
+
descrip: Water Bucket (Filled)
|
42
|
+
price: 1.47
|
43
|
+
quantity: 4
|
44
|
+
|
45
|
+
- part_no: E1628
|
46
|
+
descrip: High Heeled "Ruby" Slippers
|
47
|
+
size: 8
|
48
|
+
price: 100.27
|
49
|
+
quantity: 1
|
50
|
+
|
51
|
+
bill-to: &id001
|
52
|
+
street: |
|
53
|
+
123 Tornado Alley
|
54
|
+
Suite 16
|
55
|
+
city: East Centerville
|
56
|
+
state: KS
|
57
|
+
|
58
|
+
ship-to: *id001
|
59
|
+
|
60
|
+
specialDelivery: >
|
61
|
+
Follow the Yellow Brick
|
62
|
+
Road to the Emerald City.
|
63
|
+
Pay no attention to the
|
64
|
+
man behind the curtain.
|
65
|
+
---
|
66
|
+
|
67
|
+
GitHub Flavored Markdown
|
68
|
+
========================
|
69
|
+
|
70
|
+
Everything from markdown plus GFM features:
|
71
|
+
|
72
|
+
## URL autolinking
|
73
|
+
|
74
|
+
Underscores_are_allowed_between_words.
|
75
|
+
|
76
|
+
## Strikethrough text
|
77
|
+
|
78
|
+
GFM adds syntax to strikethrough text, which is missing from standard Markdown.
|
79
|
+
|
80
|
+
~~Mistaken text.~~
|
81
|
+
~~**works with other formatting**~~
|
82
|
+
|
83
|
+
~~spans across
|
84
|
+
lines~~
|
85
|
+
|
86
|
+
## Fenced code blocks (and syntax highlighting)
|
87
|
+
|
88
|
+
```javascript
|
89
|
+
for (var i = 0; i < items.length; i++) {
|
90
|
+
console.log(items[i], i); // log them
|
91
|
+
}
|
92
|
+
```
|
93
|
+
|
94
|
+
## Task Lists
|
95
|
+
|
96
|
+
- [ ] Incomplete task list item
|
97
|
+
- [x] **Completed** task list item
|
98
|
+
|
99
|
+
## A bit of GitHub spice
|
100
|
+
|
101
|
+
* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
|
102
|
+
* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
|
103
|
+
* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
|
104
|
+
* \#Num: #1
|
105
|
+
* User/#Num: mojombo#1
|
106
|
+
* User/Project#Num: mojombo/god#1
|
107
|
+
|
108
|
+
See http://github.github.com/github-flavored-markdown/.
|
109
|
+
</textarea></form>
|
110
|
+
|
111
|
+
<p>Defines a mode that parses
|
112
|
+
a <a href="http://jekyllrb.com/docs/frontmatter/">YAML frontmatter</a>
|
113
|
+
at the start of a file, switching to a base mode at the end of that.
|
114
|
+
Takes a mode configuration option <code>base</code> to configure the
|
115
|
+
base mode, which defaults to <code>"gfm"</code>.</p>
|
116
|
+
|
117
|
+
<script>
|
118
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "yaml-frontmatter"});
|
119
|
+
</script>
|
120
|
+
|
121
|
+
</article>
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function (mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"), require("../yaml/yaml"))
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror", "../yaml/yaml"], mod)
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror)
|
11
|
+
})(function (CodeMirror) {
|
12
|
+
|
13
|
+
var START = 0, FRONTMATTER = 1, BODY = 2
|
14
|
+
|
15
|
+
// a mixed mode for Markdown text with an optional YAML front matter
|
16
|
+
CodeMirror.defineMode("yaml-frontmatter", function (config, parserConfig) {
|
17
|
+
var yamlMode = CodeMirror.getMode(config, "yaml")
|
18
|
+
var innerMode = CodeMirror.getMode(config, parserConfig && parserConfig.base || "gfm")
|
19
|
+
|
20
|
+
function localMode(state) {
|
21
|
+
return state.state == FRONTMATTER ? {mode: yamlMode, state: state.yaml} : {mode: innerMode, state: state.inner}
|
22
|
+
}
|
23
|
+
|
24
|
+
return {
|
25
|
+
startState: function () {
|
26
|
+
return {
|
27
|
+
state: START,
|
28
|
+
yaml: null,
|
29
|
+
inner: CodeMirror.startState(innerMode)
|
30
|
+
}
|
31
|
+
},
|
32
|
+
copyState: function (state) {
|
33
|
+
return {
|
34
|
+
state: state.state,
|
35
|
+
yaml: state.yaml && CodeMirror.copyState(yamlMode, state.yaml),
|
36
|
+
inner: CodeMirror.copyState(innerMode, state.inner)
|
37
|
+
}
|
38
|
+
},
|
39
|
+
token: function (stream, state) {
|
40
|
+
if (state.state == START) {
|
41
|
+
if (stream.match('---', false)) {
|
42
|
+
state.state = FRONTMATTER
|
43
|
+
state.yaml = CodeMirror.startState(yamlMode)
|
44
|
+
return yamlMode.token(stream, state.yaml)
|
45
|
+
} else {
|
46
|
+
state.state = BODY
|
47
|
+
return innerMode.token(stream, state.inner)
|
48
|
+
}
|
49
|
+
} else if (state.state == FRONTMATTER) {
|
50
|
+
var end = stream.sol() && stream.match(/(---|\.\.\.)/, false)
|
51
|
+
var style = yamlMode.token(stream, state.yaml)
|
52
|
+
if (end) {
|
53
|
+
state.state = BODY
|
54
|
+
state.yaml = null
|
55
|
+
}
|
56
|
+
return style
|
57
|
+
} else {
|
58
|
+
return innerMode.token(stream, state.inner)
|
59
|
+
}
|
60
|
+
},
|
61
|
+
innerMode: localMode,
|
62
|
+
indent: function(state, a, b) {
|
63
|
+
var m = localMode(state)
|
64
|
+
return m.mode.indent ? m.mode.indent(m.state, a, b) : CodeMirror.Pass
|
65
|
+
},
|
66
|
+
blankLine: function (state) {
|
67
|
+
var m = localMode(state)
|
68
|
+
if (m.mode.blankLine) return m.mode.blankLine(m.state)
|
69
|
+
}
|
70
|
+
}
|
71
|
+
})
|
72
|
+
});
|
data/hyde_admin.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
all_files = `git ls-files`.split("\n").reject{ |filepath| filepath.start_with? 'test/' }
|
12
12
|
s.files = all_files
|
13
13
|
|
14
|
-
s.executables = ['hyde_admin
|
14
|
+
s.executables = ['hyde_admin']
|
15
15
|
s.bindir = "bin"
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
|
@@ -25,4 +25,10 @@ Gem::Specification.new do |s|
|
|
25
25
|
}
|
26
26
|
|
27
27
|
s.license = 'MIT'
|
28
|
+
s.add_runtime_dependency("roda", "~> 3.48.0")
|
29
|
+
s.add_runtime_dependency("roda-i18n", "~> 0.4.0")
|
30
|
+
s.add_runtime_dependency("roda-http-auth", "0.2.0")
|
31
|
+
s.add_runtime_dependency("escape_utils") # escape_javascript / escape_html
|
32
|
+
#s.add_runtime_dependency("i18n", "~> 0.4.0") # I18n.transliterate (already required by jekyll)
|
33
|
+
s.add_runtime_dependency('jekyll') # Because we call jekyll binary
|
28
34
|
end
|
data/lib/hyde_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,35 +1,159 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyde_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Claudel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-10-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: roda
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.48.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.48.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: roda-i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: roda-http-auth
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.2.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.2.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: escape_utils
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jekyll
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
13
83
|
description: A Jekyll admin interface
|
14
84
|
email: claudel.sylvain@gmail.com
|
15
85
|
executables:
|
16
|
-
- hyde_admin
|
86
|
+
- hyde_admin
|
17
87
|
extensions: []
|
18
88
|
extra_rdoc_files: []
|
19
89
|
files:
|
90
|
+
- ".gitattributes"
|
20
91
|
- ".idea/.gitignore"
|
21
92
|
- ".idea/hyde_admin.iml"
|
22
93
|
- ".idea/misc.xml"
|
23
94
|
- ".idea/modules.xml"
|
95
|
+
- ".idea/vcs.xml"
|
96
|
+
- CHANGELOG.md
|
97
|
+
- README.md
|
98
|
+
- TODO.md
|
24
99
|
- bin/admin_views/admin_layout.html.erb
|
100
|
+
- bin/admin_views/configuration.erb
|
25
101
|
- bin/admin_views/dashboard.erb
|
26
|
-
- bin/admin_views/
|
27
|
-
- bin/admin_views/
|
102
|
+
- bin/admin_views/editor_html.erb
|
103
|
+
- bin/admin_views/editor_js.erb
|
104
|
+
- bin/admin_views/files/edit.erb
|
105
|
+
- bin/admin_views/files/listing.erb
|
106
|
+
- bin/admin_views/partials/image_element.html.erb
|
107
|
+
- bin/admin_views/partials/images_page.html.erb
|
108
|
+
- bin/admin_views/posts/edit.erb
|
109
|
+
- bin/admin_views/posts/listing.erb
|
110
|
+
- bin/admin_views/upload_image_form.erb
|
111
|
+
- bin/fslightbox/fslightbox.js
|
112
|
+
- bin/hyde_admin
|
28
113
|
- bin/hyde_admin.ru
|
29
|
-
- bin/hyde_admin.sh
|
30
114
|
- bin/hyde_admin.yml
|
115
|
+
- bin/hyde_assets/hyde_admin.css
|
116
|
+
- bin/hyde_assets/hyde_admin.js
|
31
117
|
- bin/i18n/en.yml
|
32
118
|
- bin/i18n/fr.yml
|
119
|
+
- bin/lib/codemirror.css
|
120
|
+
- bin/lib/codemirror.js
|
121
|
+
- bin/mode/css/css.js
|
122
|
+
- bin/mode/css/gss.html
|
123
|
+
- bin/mode/css/gss_test.js
|
124
|
+
- bin/mode/css/index.html
|
125
|
+
- bin/mode/css/less.html
|
126
|
+
- bin/mode/css/less_test.js
|
127
|
+
- bin/mode/css/scss.html
|
128
|
+
- bin/mode/css/scss_test.js
|
129
|
+
- bin/mode/css/test.js
|
130
|
+
- bin/mode/htmlembedded/htmlembedded.js
|
131
|
+
- bin/mode/htmlembedded/index.html
|
132
|
+
- bin/mode/htmlmixed/htmlmixed.js
|
133
|
+
- bin/mode/htmlmixed/index.html
|
134
|
+
- bin/mode/javascript/index.html
|
135
|
+
- bin/mode/javascript/javascript.js
|
136
|
+
- bin/mode/javascript/json-ld.html
|
137
|
+
- bin/mode/javascript/test.js
|
138
|
+
- bin/mode/javascript/typescript.html
|
139
|
+
- bin/mode/markdown/index.html
|
140
|
+
- bin/mode/markdown/markdown.js
|
141
|
+
- bin/mode/markdown/test.js
|
142
|
+
- bin/mode/ruby/index.html
|
143
|
+
- bin/mode/ruby/ruby.js
|
144
|
+
- bin/mode/ruby/test.js
|
145
|
+
- bin/mode/sass/index.html
|
146
|
+
- bin/mode/sass/sass.js
|
147
|
+
- bin/mode/sass/test.js
|
148
|
+
- bin/mode/spreadsheet/index.html
|
149
|
+
- bin/mode/spreadsheet/spreadsheet.js
|
150
|
+
- bin/mode/xml/index.html
|
151
|
+
- bin/mode/xml/test.js
|
152
|
+
- bin/mode/xml/xml.js
|
153
|
+
- bin/mode/yaml-frontmatter/index.html
|
154
|
+
- bin/mode/yaml-frontmatter/yaml-frontmatter.js
|
155
|
+
- bin/mode/yaml/index.html
|
156
|
+
- bin/mode/yaml/yaml.js
|
33
157
|
- hyde_admin.gemspec
|
34
158
|
- lib/hyde_admin/version.rb
|
35
159
|
homepage: https://rubygems.org/gems/hyde_admin
|
data/bin/admin_views/edit.erb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
<h2><%= t.send(@type_file) %></h2>
|
2
|
-
|
3
|
-
<form action="/<%= @type_file %>?file=<%= @file %>" method="post">
|
4
|
-
<div class="mb-3">
|
5
|
-
<label for="i-path" class="form-label"><%= t.path %></label>
|
6
|
-
<input type="text" class="form-control" value="<%= @file %>" name="new_file" id="i-path">
|
7
|
-
<!--<div id="emailHelp" class="form-text">Name of file</div>-->
|
8
|
-
</div>
|
9
|
-
<div class="mb-3">
|
10
|
-
<label for="i-title" class="form-label"><%= t.title %></label>
|
11
|
-
<input type="text" value="<%= @headers['title'] %>" class="form-control" name="title" id="i-title">
|
12
|
-
</div>
|
13
|
-
<div class="mb-3">
|
14
|
-
<label for="i-date" class="form-label"><%= t.date %></label>
|
15
|
-
<input type="text" value="<%= @headers['date'] %>" class="form-control" name="date" id="i-date">
|
16
|
-
</div>
|
17
|
-
<div class="mb-3">
|
18
|
-
<label for="i-tags" class="form-label"><%= t.tags %></label>
|
19
|
-
<input type="text" value="<%= @headers['tags'] %>" class="form-control" name="tags" id="i-tags">
|
20
|
-
</div>
|
21
|
-
<div class="mb-3 form-check">
|
22
|
-
<input type="checkbox" class="form-check-input" name="publish" id="i-publish">
|
23
|
-
<label class="form-check-label" for="i-publish"><%= t.publish %></label>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<div class="mb-3">
|
27
|
-
<label for="i-layout" class="form-label"><%= t.layout %></label>
|
28
|
-
<select class="form-select" aria-label="Choice layout" name="layout">
|
29
|
-
<% Dir.glob(File.join(@hyde_parameters['path_to_jekyll_src'], '_layouts', '*')).each do |f| %>
|
30
|
-
<% layout = File.basename(f, File.extname(f)) %>
|
31
|
-
<option <%= (@headers['layout'] == f ? 'selected' : '') %> value="<%= layout %>"><%= layout %></option>
|
32
|
-
<% end %>
|
33
|
-
</select>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div class="mb-3">
|
37
|
-
<label for="i-content" class="form-label"><%= t.content %></label>
|
38
|
-
<textarea class="form-control" id="i-content" rows="3" name="content"><%#= %></textarea>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<!--
|
42
|
-
<div class="form-check">
|
43
|
-
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
44
|
-
<label class="form-check-label" for="flexCheckDefault">
|
45
|
-
Default checkbox
|
46
|
-
</label>
|
47
|
-
</div>
|
48
|
-
<div class="form-check">
|
49
|
-
<input class="form-check-input" type="checkbox" value="" id="flexCheckChecked" checked>
|
50
|
-
<label class="form-check-label" for="flexCheckChecked">
|
51
|
-
Checked checkbox
|
52
|
-
</label>
|
53
|
-
</div>
|
54
|
-
-->
|
55
|
-
<button type="submit" class="btn btn-primary">Submit</button>
|
56
|
-
</form>
|
57
|
-
|
data/bin/admin_views/listing.erb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
<h2><%= t.send(@type_file) %></h2>
|
2
|
-
<div class="table-responsive">
|
3
|
-
<table class="table table-striped table-sm">
|
4
|
-
<tr>
|
5
|
-
<th>
|
6
|
-
<%= t.file %>
|
7
|
-
</th>
|
8
|
-
<th>
|
9
|
-
<%= t.edit %>
|
10
|
-
</th>
|
11
|
-
<th>
|
12
|
-
<%= t.delete %>
|
13
|
-
</th>
|
14
|
-
</tr>
|
15
|
-
<% @files.each do |f| %>
|
16
|
-
<tr>
|
17
|
-
<td>
|
18
|
-
<%= f %>
|
19
|
-
</td>
|
20
|
-
<td>
|
21
|
-
<a href="/<%= @type_file %>?file=<%= f %>" class="btn btn-default"><i class="fa fa-edit" title="<%= t.edit %>"></i></a>
|
22
|
-
</td>
|
23
|
-
<td>
|
24
|
-
<form method="post" action="/<%= @type_file %>/delete?file=<%= f %>" class="inline">
|
25
|
-
<button type="submit" class="btn btn-default"><i class="fa fa-trash" title="<%= t.delete %>"></i></button>
|
26
|
-
</form>
|
27
|
-
</td>
|
28
|
-
</tr>
|
29
|
-
<% end %>
|
30
|
-
</table>
|
31
|
-
</div>
|
32
|
-
|
data/bin/hyde_admin.sh
DELETED