hyde_admin 0.0.10 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c2a24943a838bb470b6375c0658626798f0f1beb456f65d792995a4fe7bf0bd
4
- data.tar.gz: a367a451d9b2e2aa05aa79cc2812702624472e59a776bf9fdc842260fa1cf099
3
+ metadata.gz: 7dc5c1f3c3e06393c4c25ce2a7463e035c156e071a5263c9207b8a05df3d5b9b
4
+ data.tar.gz: bf460efdb34250deebffd318269cf82dd9cc61a1bd92812131dd9d8033f1e302
5
5
  SHA512:
6
- metadata.gz: 712d1960647c69074f878d94d4bc1db2193f3f170835f7c7ad98d4652df95ad96ef25d9d6dd238d19517ff0a87d5256a2875dafba89b534d69a8d632de576596
7
- data.tar.gz: f3773cbc9b770c60ee5c237f1ac657d4ed9cbe25973f8a3cfffbf86938ac6b9ab8573820a3e72710dcf32e96738d3d4c0e7954c7efde347ad122a79a4bff3a6b
6
+ metadata.gz: ec1cb2e4a56c723f3930999c68976a460dc0ed70e12417b5a9ee51c319f48246d2ab6de6801ccee9f3682aa17a0ec44ad8c2614d62d2806f70c3853afcbce19f
7
+ data.tar.gz: 7ad9661636366333ca352891047b189c851876c4dc4166c6cf7fe8319c5bf3fbbbb0b651ee413b8dd2aaab24c288933db0e09386d21180b7209f84030940fe9e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 0.0.12
2
+
3
+ Add liquid code highlighter in wysiwyg editor
4
+ Add new option to maximize text editor
5
+
6
+ # 0.0.11
7
+
8
+ Add logo hyde admin
9
+ Increase image window size
10
+ Add dependency to avoid to set them in jekyll site gemfile
11
+
1
12
  # 0.0.9
2
13
 
3
14
  Hide deploy button if 'deploy_dest_address' is empty.
data/README.md CHANGED
@@ -2,13 +2,24 @@
2
2
 
3
3
  Hyde_admin is a administration frontend for Jekyll (static site generator in Ruby).
4
4
 
5
+ ![Hyde_admin for jekyll](hyde_admin_for_jekyll.png)
6
+
5
7
  ## Getting Started with Hyde Admin
6
8
 
9
+ # Prerequisite
10
+
11
+ Install ImageMagick (required by mini_magick)
12
+
13
+ ```
14
+ apt install imagemagick
15
+ ```
16
+
17
+ # Install
18
+
7
19
  Add
8
20
 
9
21
  ```
10
22
  gem 'hyde_admin'
11
- gem 'puma'
12
23
  ```
13
24
 
14
25
  In the Gemfile of your jekyll site.
@@ -17,17 +28,19 @@ Run
17
28
 
18
29
  `bundle update`
19
30
 
20
- When run
31
+ # Run hyde_admin
32
+
33
+ Run
21
34
 
22
35
  `hyde_admin`
23
36
 
24
37
  in your jekyll directory.
25
- You can visit localhost:9292 !
38
+ You can visit http://localhost:9292/ !
26
39
 
27
40
  hyde_admin.yml is automatically generated in your jekyll directory.
28
- (you can change settings with hyde_admin ou directly)
41
+ (you can change settings with hyde_admin at http://localhost:9292/configuration or directly with text editor)
29
42
 
30
- Hyde_admin allow ssh deployment.
43
+ Hyde_admin allow ssh deployment with rsync.
31
44
 
32
45
  ## New version of hyde_admin ?
33
46
 
@@ -31,6 +31,7 @@
31
31
  <div class="row">
32
32
  <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
33
33
  <div class="position-sticky pt-3">
34
+ <a href="/"><img src="/img/logo.png" alt="Hyde Admin" title="Logo hyde admin" class="sidebarMenu-logo" /></a>
34
35
  <ul class="nav flex-column">
35
36
  <li class="nav-item">
36
37
  </li>
@@ -97,21 +98,6 @@
97
98
  </div>
98
99
  </nav>
99
100
  <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">
100
- <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
101
- <h1 class="h2">Hyde Admin for Jekyll</h1>
102
- <!--
103
- <div class="btn-toolbar mb-2 mb-md-0">
104
- <div class="btn-group me-2">
105
- <button type="button" class="btn btn-sm btn-outline-secondary"><%= t.backup_zip %></button>
106
- <button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
107
- </div>
108
- <button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
109
- <span data-feather="calendar"></span>
110
- This week
111
- </button>
112
- </div>
113
- -->
114
- </div>
115
101
  <%= yield %>
116
102
  </main>
117
103
  </div>
@@ -180,6 +166,7 @@
180
166
  lineNumbers: true,
181
167
  tabSize: 2,
182
168
  indentWithTabs: false,
169
+ viewportMargin: Infinity,
183
170
  mode: "<%= {'.js' => 'javascript', '.json' => 'javascript', '.xml' => 'xml', '.svg' => 'xml', '.css' => 'css', '.yml' => 'yaml', '.sass' => 'sass', '.rb' => 'ruby', '.md' => 'markdown'}[File.extname(@file)] || 'markdown' %>"
184
171
  });
185
172
  }
@@ -21,4 +21,15 @@
21
21
  <button type="button" class="btn btn-light"><i class="fas fa-italic cmt-replace" title="<%= EscapeUtils.escape_html t.editor_italic %>"></i></button>
22
22
  <button type="button" class="btn btn-light"><i class="fas fa-strikethrough cmt-replace" title="<%= EscapeUtils.escape_html t.editor_strikethrough %>"></i></button>
23
23
  </div>
24
- </div>
24
+ <div class="btn-group mr-2" role="group" aria-label="Liquid tags">
25
+ <button type="button" class="btn btn-light"><i class="fas fa-code cmt-replace" title="<%= EscapeUtils.escape_html t.editor_liquid_code %>"></i></button>
26
+ <button type="button" class="btn btn-light"><i class="fas fa-terminal cmt-replace" title="<%= EscapeUtils.escape_html t.editor_pre_code %>"></i></button>
27
+ </div>
28
+ </div>
29
+ <% if @hyde_parameters['text_editor_maximized'].to_s == 'true' %>
30
+ <style>
31
+ .CodeMirror{
32
+ height: auto;
33
+ }
34
+ </style>
35
+ <% end %>
@@ -101,11 +101,21 @@ $(document).on('click', '.codemirror-toolbar .cmt-replace', function(){
101
101
  end_str = '';
102
102
  }
103
103
  }else if($(this).hasClass('fa-list-ol')){
104
- begin_str = '<ol>\n <li>';
105
- end_str = '</li>\n</ol>';
104
+ begin_str = '<ol>\n <li>';
105
+ end_str = '</li>\n</ol>';
106
+ if(window.mode_markdown){
107
+ begin_str = '1. ';
108
+ end_str = '';
109
+ }
110
+ }else if($(this).hasClass('fa-code')){
111
+ begin_str = '{% highlight ruby linenos %}\n';
112
+ end_str = '{% endhighlight %}\n';
113
+ }else if($(this).hasClass('fa-terminal')){
114
+ begin_str = '<pre>\n';
115
+ end_str = '\n</pre>';
106
116
  if(window.mode_markdown){
107
- begin_str = '1. ';
108
- end_str = '';
117
+ begin_str = '```';
118
+ end_str = '```';
109
119
  }
110
120
  }
111
121
 
data/bin/hyde_admin CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/bin/env ruby
2
2
 
3
- `rackup "#{File.expand_path(File.dirname(__FILE__))}/hyde_admin.ru"`
3
+ `rackup -o 0.0.0.0 -p 9292 "#{File.expand_path(File.dirname(__FILE__))}/hyde_admin.ru"`
data/bin/hyde_admin.ru CHANGED
@@ -25,7 +25,7 @@ class Mid < Roda
25
25
  plugin :i18n, translations: File.join(File.expand_path(File.dirname(__FILE__)), 'i18n') # gem 'roda-i18n'
26
26
  opts[:root] = Dir.pwd
27
27
  plugin :public, root: File.join(Dir.pwd, '_site') # simulate jekyll site
28
- plugin :static, ['/mode', '/lib', '/fslightbox', '/hyde_assets'], :root => File.join(File.expand_path(File.dirname(__FILE__)))
28
+ plugin :static, ['/mode', '/lib', '/fslightbox', '/hyde_assets', '/img'], :root => File.join(File.expand_path(File.dirname(__FILE__)))
29
29
  plugin :http_auth
30
30
  plugin :common_logger
31
31
 
@@ -38,6 +38,7 @@ class Mid < Roda
38
38
  FileUtils.cp(yml_in_gem, yml_in_current_dir)
39
39
  end
40
40
  @hyde_parameters ||= YAML.load(File.read(yml_in_current_dir))
41
+
41
42
  super(param)
42
43
  end
43
44
 
@@ -132,8 +133,8 @@ class Mid < Roda
132
133
 
133
134
  # Rebuild static files
134
135
  r.on "rebuild" do
135
- puts Dir.pwd
136
- `cd #{Dir.pwd} && jekyll b`
136
+ $stderr.puts Dir.pwd
137
+ $stderr.puts `cd #{Dir.pwd} && jekyll b`
137
138
  r.redirect "/dashboard"
138
139
  end
139
140
 
@@ -411,7 +412,8 @@ end
411
412
  class App < Roda
412
413
  use Mid
413
414
  use Rack::Static, :urls => [''], root: Dir.pwd # allow to match all files in Dir.pwd
414
- end
415
415
 
416
- run App.freeze.app
416
+ $stderr.puts "===> Starting hyde_admin : open http://127.0.0.1:9292/"
417
+ end
417
418
 
419
+ run App.freeze.app
data/bin/hyde_admin.yml CHANGED
@@ -15,4 +15,5 @@ display_format: 'true'
15
15
  images_path: assets/images/
16
16
  resize_format: jpg
17
17
  resize_size: 1500x1000
18
- resize_enable: 'true'
18
+ resize_enable: 'true'
19
+ text_editor_maximized: 'true'
@@ -20,18 +20,38 @@
20
20
 
21
21
  .image-element{
22
22
  position: relative;
23
+ margin-left: auto;
24
+ margin-right: auto;
25
+ margin-bottom: 20px;
23
26
  }
24
27
 
25
28
  .image-element span{
26
- position: absolute;
27
29
  bottom:0px;
28
- left:5px;
29
30
  z-index: 10;
30
31
  font-weight: bold;
31
32
  margin-bottom: -20px;
33
+
34
+ text-shadow: 0px 0px 3px white;
35
+ margin-left: -100%;
36
+ margin-right: -100%;
37
+ text-align: center;
38
+ display: block;
39
+ }
40
+ .modal-dialog {
41
+ max-width: 90vw;
32
42
  }
33
43
 
34
44
  .CodeMirror{
35
45
  border: 1px solid #ced4da;
36
46
  border-radius: 4px;
37
- }
47
+ }
48
+
49
+ /* hyde admin style */
50
+ .sidebarMenu-logo{
51
+ width: 144px;
52
+ margin-left: auto;
53
+ margin-right: auto;
54
+ display: block;
55
+ margin-bottom: 30px;
56
+ margin-top: 10px;
57
+ }
data/bin/i18n/en.yml CHANGED
@@ -83,6 +83,8 @@ editor_underline: Underline
83
83
  editor_bold: Bold
84
84
  editor_italic: Italic
85
85
  editor_strikethrough: Strikethrough
86
+ editor_pre_code: Code
87
+ editor_liquid_code: Liquid code
86
88
  default_alt_img: Alt text
87
89
  default_title_img: Title text
88
90
  parent_dir: parent directory
@@ -106,4 +108,6 @@ help_resize_format: jpg or png
106
108
  resize_size: "size to fit, example : 1500x1000"
107
109
  help_resize_size: Downsize to fit to the specified size (resize preserve ratio), example 1500x1000
108
110
  resize_enable: Enable resizing for images
109
- help_resize_enable: enable feature resize image at upload
111
+ help_resize_enable: enable feature resize image at upload
112
+ text_editor_maximized: enable maximised editor
113
+ help_text_editor_maximized: permet d'agrandir l'éditeur au maximum du contenu
data/bin/i18n/fr.yml CHANGED
@@ -83,6 +83,8 @@ editor_underline: Souligner
83
83
  editor_bold: Gras
84
84
  editor_italic: Italique
85
85
  editor_strikethrough: Barré
86
+ editor_pre_code: Code
87
+ editor_liquid_code: Liquid code
86
88
  default_alt_img: Texte alternatif
87
89
  default_title_img: Titre image
88
90
  parent_dir: dossier parent
@@ -106,4 +108,6 @@ help_resize_format: jpg ou png
106
108
  resize_size: "Recadrer en (example : 1500x1000)"
107
109
  help_resize_size: Réduit les image pour coller à la taille spécifiée (le redimensionnement préserve le ratio), exemple 1500x1000
108
110
  resize_enable: activer redimensionnement
109
- help_resize_enable: active la fonctionnalité de redimensionnement d'image à l'upload
111
+ help_resize_enable: active la fonctionnalité de redimensionnement d'image à l'upload
112
+ text_editor_maximized: activer l'editeur maximisé
113
+ help_text_editor_maximized: permet d'agrandir l'éditeur au maximum du contenu
data/bin/img/logo.png ADDED
Binary file
data/hyde_admin.gemspec CHANGED
@@ -32,4 +32,7 @@ Gem::Specification.new do |s|
32
32
  #s.add_runtime_dependency("i18n", "~> 0.4.0") # I18n.transliterate (already required by jekyll)
33
33
  s.add_runtime_dependency('jekyll') # Because we call jekyll binary
34
34
  s.add_runtime_dependency('image_processing') # JPEG quality
35
+ s.add_runtime_dependency('mini_magick')
36
+ s.add_runtime_dependency('rack', '2.2.4')
37
+ s.add_runtime_dependency('puma')
35
38
  end
Binary file
@@ -1,3 +1,3 @@
1
1
  module HydeAdmin
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.13"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyde_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Claudel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-27 00:00:00.000000000 Z
11
+ date: 2024-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: roda
@@ -94,6 +94,48 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mini_magick
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 2.2.4
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 2.2.4
125
+ - !ruby/object:Gem::Dependency
126
+ name: puma
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
97
139
  description: A Jekyll admin interface
98
140
  email: claudel.sylvain@gmail.com
99
141
  executables:
@@ -133,6 +175,7 @@ files:
133
175
  - bin/hyde_assets/hyde_admin.js
134
176
  - bin/i18n/en.yml
135
177
  - bin/i18n/fr.yml
178
+ - bin/img/logo.png
136
179
  - bin/lib/codemirror.css
137
180
  - bin/lib/codemirror.js
138
181
  - bin/mode/css/css.js
@@ -172,6 +215,7 @@ files:
172
215
  - bin/mode/yaml/index.html
173
216
  - bin/mode/yaml/yaml.js
174
217
  - hyde_admin.gemspec
218
+ - hyde_admin_for_jekyll.png
175
219
  - lib/hyde_admin/version.rb
176
220
  homepage: https://rubygems.org/gems/hyde_admin
177
221
  licenses:
@@ -196,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
240
  - !ruby/object:Gem::Version
197
241
  version: '0'
198
242
  requirements: []
199
- rubygems_version: 3.3.7
243
+ rubygems_version: 3.2.22
200
244
  signing_key:
201
245
  specification_version: 4
202
246
  summary: Hyde for Jekyll site