hyde_admin 0.0.11 → 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: dbc26086f9910e8ec6eb2348b8510e033d4cc022d1ff41445cb0aa93b84cd7ca
4
- data.tar.gz: 538ebf983c3f25eae07a9326244e520884e078b56be53a647758d11e4f07ddbe
3
+ metadata.gz: 7dc5c1f3c3e06393c4c25ce2a7463e035c156e071a5263c9207b8a05df3d5b9b
4
+ data.tar.gz: bf460efdb34250deebffd318269cf82dd9cc61a1bd92812131dd9d8033f1e302
5
5
  SHA512:
6
- metadata.gz: c06f9bf58f50c87b5721aa6e49725750a7a593daa23bee08deec169447d144f3cc292a736ae7b49576f0cfc026fe6805753694ee94a267f837d8c63146c37af7
7
- data.tar.gz: 69b883a756e8caabb1db403b64bcde3af33f920d743e02a2c415c4b7d59dbc43b1aed2fe2bc6bbe88d493e3d0cb2ae5410ca8d8db7fb49ed27b0d0adac38294e
6
+ metadata.gz: ec1cb2e4a56c723f3930999c68976a460dc0ed70e12417b5a9ee51c319f48246d2ab6de6801ccee9f3682aa17a0ec44ad8c2614d62d2806f70c3853afcbce19f
7
+ data.tar.gz: 7ad9661636366333ca352891047b189c851876c4dc4166c6cf7fe8319c5bf3fbbbb0b651ee413b8dd2aaab24c288933db0e09386d21180b7209f84030940fe9e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.0.12
2
+
3
+ Add liquid code highlighter in wysiwyg editor
4
+ Add new option to maximize text editor
5
+
1
6
  # 0.0.11
2
7
 
3
8
  Add logo hyde admin
@@ -166,6 +166,7 @@
166
166
  lineNumbers: true,
167
167
  tabSize: 2,
168
168
  indentWithTabs: false,
169
+ viewportMargin: Infinity,
169
170
  mode: "<%= {'.js' => 'javascript', '.json' => 'javascript', '.xml' => 'xml', '.svg' => 'xml', '.css' => 'css', '.yml' => 'yaml', '.sass' => 'sass', '.rb' => 'ruby', '.md' => 'markdown'}[File.extname(@file)] || 'markdown' %>"
170
171
  });
171
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.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'
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
@@ -1,3 +1,3 @@
1
1
  module HydeAdmin
2
- VERSION = "0.0.11"
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.11
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Claudel
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-02 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
@@ -225,7 +225,7 @@ metadata:
225
225
  bug_tracker_uri: https://github.com/rivsc/hyde_admin/issues
226
226
  changelog_uri: https://github.com/rivsc/hyde_admin/releases
227
227
  homepage_uri: https://rubygems.org/gems/hyde_admin
228
- post_install_message:
228
+ post_install_message:
229
229
  rdoc_options: []
230
230
  require_paths:
231
231
  - lib
@@ -240,8 +240,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  - !ruby/object:Gem::Version
241
241
  version: '0'
242
242
  requirements: []
243
- rubygems_version: 3.3.7
244
- signing_key:
243
+ rubygems_version: 3.2.22
244
+ signing_key:
245
245
  specification_version: 4
246
246
  summary: Hyde for Jekyll site
247
247
  test_files: []