notee 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 8f605552bf5712bf48bed077883110bf51b9af0e
4
- data.tar.gz: c9012f583f9a81052fb46e8a44419d5ab5682d3c
3
+ metadata.gz: 87a081e0734946c5e30c81253f5f3a97a950a75a
4
+ data.tar.gz: 1ff89c2cae6aad44990971d24e448a6ce6682094
5
5
  SHA512:
6
- metadata.gz: a873e14d5e19c09f4045f5b516a47438a7e4aa3d1c7ea873e622b2f27486cd267bba355eee28149f6657352835c41da600a37e62eaf73e865a97e22f654768f2
7
- data.tar.gz: 58d3bb8b4f9f41aa097202dba7b628667af45cb7d1e59dd989d99b3a7a0763b29b2f80480934009f676e459d3a25931a6462e03c4a566c2705523285c73f5105
6
+ metadata.gz: 7950a9d6da13c058424a3c521d8aa427be7a4677a97bce8085fef1328b49f0af98bb094f1408468c8617d5862194773a2b8dd15a2537ffa5126361d3ebc2f34e
7
+ data.tar.gz: c36d95287e9c878bcdb807ac5c70d23e4d908ef4842fa130d32c50e792e818d5727ad9fe6395aa2bfd72095849b0eb423919d218496584566a7ddaabde7d13f7
@@ -1,4 +1,4 @@
1
- <div class="notee_comment_box">
1
+ <div class="notee_list">
2
2
  <comments post_id='<%= post_id %>'></comments>
3
3
  <comment_form post_id='<%= post_id %>'></comment_form>
4
4
  </div>
@@ -16,7 +16,6 @@
16
16
  <comment_form class="notee_comment_form" id="notee_form">
17
17
  <form method="POST">
18
18
 
19
-
20
19
  <label class="notee_label" for="comment_name">Name</label>
21
20
  <input class="notee_text_field" type="text" name="comment[name]" id="comment_name" />
22
21
 
@@ -1,3 +1,3 @@
1
1
  module Notee
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -17,7 +17,7 @@ Notee.configure do |config|
17
17
  title: "Notee",
18
18
  url: "http://hogehoge.com",
19
19
  keyword: "hoge, hoge, hoge",
20
- description: "hogehoge",
20
+ description: "【react&rails】notee is creating CMS(blog) app by only one command.",
21
21
  og_image: "http://hogehoge.com/hoge.png"
22
22
  }
23
23
 
@@ -9,6 +9,7 @@ namespace :notee do
9
9
  add_engine_to_route
10
10
  add_highlight_setting_to_js
11
11
  add_notee_css_path
12
+ add_viewport_meta_info_and_delete_title
12
13
  copy_directory("/app/views/", "../views/notee")
13
14
  copy_directory("/app/assets/stylesheets/notee/", "../stylesheets/notee")
14
15
  copy_directory("/app/assets/javascripts/notee/", "../javascripts/notee")
@@ -140,6 +141,33 @@ $(document).on('ready', function() {
140
141
  puts ""
141
142
  end
142
143
 
144
+ def add_viewport_meta_info_and_delete_title
145
+ puts ""
146
+ return puts 'setup for application.html.erb in /app/views/layouts/application.html.erb\n' unless route = File.open("#{Rails.root}/app/views/layouts/application.html.erb","r")
147
+ return if File.open("#{Rails.root}/app/views/layouts/application.html.erb","r").read.include?('<meta name="viewport" content="width=device-width,initial-scale=1.0" />')
148
+
149
+ text = <<-EOC
150
+
151
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
152
+
153
+ EOC
154
+
155
+ new_html = String.new
156
+ route.each_line do |line|
157
+ line += text if line.include?("<head>")
158
+ line = "" if line.include?("<title>")
159
+ new_html += line
160
+ end
161
+
162
+ f = File.open("#{Rails.root}/app/views/layouts/application.html.erb","w")
163
+ f.write(new_html)
164
+ f.close()
165
+
166
+ puts 'Notee added "viewport meta info" to /app/views/layouts/application.html.erb'
167
+ puts 'Notee deleted "Title tag" in /app/views/layouts/application.html.erb'
168
+ puts ""
169
+ end
170
+
143
171
 
144
172
  private
145
173
 
@@ -243,16 +243,8 @@ ul.li_none , ol.li_none { list-style: none; }
243
243
 
244
244
  /* notee_comment_box */
245
245
 
246
- .notee_comment_box {
247
- width: 100%;
248
- margin: 30px auto;
249
- float: left;
250
- }
251
-
252
246
  .notee_comments {
253
247
  width: 94%;
254
- padding: 3%;
255
- margin_bottom: 20px;
256
248
  float: left;
257
249
  }
258
250
 
@@ -288,6 +280,7 @@ ul.li_none , ol.li_none { list-style: none; }
288
280
  .notee_text_area {
289
281
  width: 100%;
290
282
  height: 78px;
283
+ min-width: 300px;
291
284
  margin-bottom: 15px;
292
285
  float: left;
293
286
  font-size: 14px;
@@ -295,9 +288,13 @@ ul.li_none , ol.li_none { list-style: none; }
295
288
 
296
289
  .notee_submit {
297
290
  width: 100%;
298
- margin-bottom: 15px;
291
+ height: 40px;
292
+ line-height: 40px;
299
293
  float: left;
300
- font-size: 30px;
294
+ font-size: 16px;
295
+ border: 0px solid #F7F7F7;
296
+ background-color: #337C99;
297
+ color: #F7F7F7;
301
298
  }
302
299
 
303
300
  /* pc */
@@ -34,6 +34,9 @@
34
34
  </div>
35
35
  </div>
36
36
 
37
+ <h4>Comments</h4>
38
+ <%= notee_comment_box(@post.id) %>
39
+
37
40
  <h4>Written by</h4>
38
41
  <%= render :partial => "notee/partials/profile.html.erb", :locals => {writer: @post.user} %>
39
42
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - funaota