phcdevworks_tutorials 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c0384bb198aa41ebfd3cced43c42de9d7460610d110b13e5fd1c208823c283c
4
- data.tar.gz: cb97f0c6c4b4b93c7de5548e2a3327d327f61d73f8fadd5523ace1db001be9e4
3
+ metadata.gz: 8e44610ff850e5ee12394dbc031c792c1e6d2f6783ecb33e25cd76c8fa26ea93
4
+ data.tar.gz: 287e5bbe34757bd5aca3878fb6d98eef4cc97c34cf46492615dcd0864a166690
5
5
  SHA512:
6
- metadata.gz: 43d118bcf791ef49942253ce1c9b04aae218d21d167856b8cc0a8a8fc25954f63f92a23367f66391f9be1cf3139d974f44b613168f32e441c44430b68514cff1
7
- data.tar.gz: 6fcfbb9c4b8db2d9ce1710f4f382971f39acad0f214692131c7b5d493babc1ef2afd6ecae233114517fb0100153088c1ec64dec5aa017fe1bd045da303d81f59
6
+ metadata.gz: 5510d78bcabad7342535b4641a25c986c9c47a99daecf274d5a1b65047bc26eb0607dcd076f38123347026a42c02efbeb11351ea7b8d572234b1ac40e637ddc4
7
+ data.tar.gz: b96c10f7738ffd30f2c02c2dbdd18aeb3e05b878fd1ca36cdd91c340f9c81aa1c46cf7d4f3adfc98d1de42c427f8f76e909327fe28c1941575f378b81deb80ba
@@ -8,7 +8,8 @@ module PhcdevworksTutorials
8
8
 
9
9
  # INDEX
10
10
  def index
11
- @phcdevworks_tutorials_index = Tutorial::Post.where(post_status: "published")
11
+ @phcdevworks_tutorials_index = Tutorial::Post.where(post_status: "published").order("created_at DESC")
12
+ @phcdevworks_tutorials_photo_randomizer = Tutorial::Post.order('RANDOM()').limit(1)
12
13
  end
13
14
 
14
15
  # SHOW
@@ -64,8 +64,23 @@
64
64
  <!-- Page Container -->
65
65
 
66
66
  <!-- JavaScript -->
67
- <%= javascript_include_tag "phcdevworks_tutorials/application", "data-turbolinks-track": "reload" %>
67
+ <%= javascript_include_tag "phcdevworks_press/application", "data-turbolinks-track": "reload" %>
68
68
  <!-- JavaScript -->
69
69
 
70
+ <!-- JavaScript CKEditor -->
71
+ <script>
72
+ ClassicEditor.create( document.querySelector( '#editor' ) )
73
+ .then( editor => {
74
+ window.editor = editor;
75
+ const wordCountPlugin = editor.plugins.get( 'WordCount' );
76
+ const wordCountWrapper = document.getElementById( 'word-count' );
77
+ wordCountWrapper.appendChild( wordCountPlugin.wordCountContainer );
78
+ } )
79
+ .catch( err => {
80
+ console.error( err.stack );
81
+ } );
82
+ </script>
83
+ <!-- JavaScript CKEditor -->
84
+
70
85
  </body>
71
86
  </html>
@@ -13,7 +13,8 @@
13
13
 
14
14
  <div class="form-group field_with_errors">
15
15
  <%= form.label :post_description, "Tutorial Description" %>
16
- <%= form.text_area :post_description, class: "form-control", rows: "10" %>
16
+ <%= form.text_area :post_description, class: "form-control", id: "editor", rows: "10" %>
17
+ <div id="word-count" class="mt-3"></div>
17
18
  </div>
18
19
 
19
20
  <div class="form-group field_with_errors">
@@ -13,17 +13,18 @@
13
13
 
14
14
  <div class="form-group field_with_errors">
15
15
  <%= form.label :step_title, placeholder: "Step Title" %>
16
- <%= form.text_field :step_title, class: "form-control", rows: "10" %>
16
+ <%= form.text_field :step_title, class: "form-control" %>
17
17
  </div>
18
18
 
19
19
  <div class="form-group field_with_errors">
20
20
  <%= form.label :step_description, "Step Text" %>
21
- <%= form.text_area :step_description, class: "form-control", rows: "10" %>
21
+ <%= form.text_area :step_description, class: "form-control", id: "editor", rows: "10" %>
22
+ <div id="word-count" class="mt-3"></div>
22
23
  </div>
23
24
 
24
25
  <div class="form-group field_with_errors">
25
26
  <%= form.label :step_copy_instruction, "Step Instructions (to Copy)" %>
26
- <%= form.text_area :step_copy_instruction, class: "form-control", rows: "10" %>
27
+ <%= form.text_area :step_copy_instruction, class: "form-control" %>
27
28
  </div>
28
29
 
29
30
  <div class="form-group field_with_errors">
@@ -1,3 +1,3 @@
1
1
  module PhcdevworksTutorials
2
- VERSION = "6.1.0"
2
+ VERSION = "6.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_tutorials
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-19 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails