homeland-note 0.1.3 → 0.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
  SHA1:
3
- metadata.gz: 4ea7dd025aa845a9f845c4e106ac3f5e1d7b7c99
4
- data.tar.gz: 25f2f94cf7ef6bcdbcb6d1ebfd87aef74d87811b
3
+ metadata.gz: 13fbe8a348a082c445d93eb308b2ea965a34c4ad
4
+ data.tar.gz: c05dd0e6b9e3dab1dc79a023454c272bb814fb77
5
5
  SHA512:
6
- metadata.gz: 82025487ac8124b20c501bd2c53573576f53bd1ca3d05c6a6cf76044af43f254abe9fdf9210359c2a287104366da550c229f635911e54e3cd19e5b81d681cfa0
7
- data.tar.gz: a879092228adb84670f888a60ec79e1d4e3f1b508a9d8a8f6263016c91ee8f06ea304c81492258a9a0a977344be9df7f2461dd85369058fcc326e36ee164123b
6
+ metadata.gz: c667c7c35ed1b4cce53deda11442c4879b28ca2e6c4369b983cc3ff145aa16924e8c24d55ab920fa38c4e44a6582fadbb504b44d6aacd68de3e1a48d8bcbcf43
7
+ data.tar.gz: 322d5f44452c82d0c41299e73bcf9b4400617af6239e871e6bddc7d950d8f33d97762cfb070552e3d014a048e7c5e652d3a7aea0071a96f623aa4e01ff7dc661
@@ -6,7 +6,7 @@
6
6
  border-bottom: 0px;
7
7
  }
8
8
  border-bottom: 1px solid #f0f0f0;
9
- padding-bottom: 10px;
9
+ padding: 15px 0;
10
10
 
11
11
  .media-heading {
12
12
  a { font-size: 15px; }
@@ -1,30 +1,31 @@
1
- <%= simple_form_for(@note, html: { class: "" }) do |f| %>
2
- <%= render "shared/error_messages", target: @note %>
1
+ <%= form_for @note do |f| %>
2
+ <%= render "shared/error_messages", target: @note %>
3
3
 
4
- <div class="edit-tools">
5
- <%= render "/shared/editor_toolbar" %>
6
- </div>
4
+ <div class="edit-tools">
5
+ <%= render "/shared/editor_toolbar" %>
6
+ </div>
7
7
 
8
- <div class="form-group">
9
- <%= f.text_area :body, rows: 20, class: 'form-control topic-editor' %>
8
+ <div class="form-group">
9
+ <%= f.text_area :body, rows: 20, class: 'form-control topic-editor' %>
10
10
 
11
- <p class="help-block">
12
- 请用 <a href="/markdown" target="_blank">Markdown</a> 格式编写。
13
- </p>
14
- </div>
11
+ <p class="help-block">
12
+ 请用 <a href="/markdown" target="_blank">Markdown</a> 格式编写。
13
+ </p>
14
+ </div>
15
15
 
16
- <div class="form-group">
17
- <label class="control-label" for="note_publish"><%= f.check_box :publish %> 公开 <span class="text-danger"><i class="fa fa-warning"></i> 除非你选择公开,否则此 Note 的所有内容将是保密的!<span></label>
18
- </div>
16
+ <div class="form-group form-check">
17
+ <%= f.check_box :publish, class: "form-check-input" %>
18
+ <label class="form-check-label" for="note_publish"> 公开 <span class="text-danger"><i class="fa fa-warning"></i> 除非你选择公开,否则此 Note 的所有内容将是保密的!<span></label>
19
+ </div>
19
20
 
20
- <div class="form-actions">
21
- <div class="row">
22
- <div class="col-sm-3">
23
- <%= f.submit "保存", class: "btn btn-primary btn-lg btn-block", 'data-disable-with' => "保存中..." %>
24
- </div>
25
- <div class="col-sm-2">
26
- <%= link_to "取消", notes_path, class: "btn btn-default btn-lg btn-block" %>
27
- </div>
21
+ <div class="form-actions">
22
+ <div class="row">
23
+ <div class="col-sm-3">
24
+ <%= f.submit "保存", class: "btn btn-primary btn-block", 'data-disable-with' => "保存中..." %>
25
+ </div>
26
+ <div class="col-sm-2">
27
+ <%= link_to "取消", notes_path, class: "btn btn-default btn-block" %>
28
28
  </div>
29
29
  </div>
30
+ </div>
30
31
  <% end %>
@@ -1,18 +1,18 @@
1
1
  <div class="sidebar col-md-3">
2
- <div class="panel panel-default">
3
- <div class="panel-body">
2
+ <div class="card">
3
+ <div class="card-body">
4
4
  <p><a href="<%= new_note_path %>" class="btn btn-success btn-block">新建 Note</a></p>
5
5
  <div>
6
6
  记事本用于保存个人私密的记事信息,除非你选择公开,否则其他人无法访问。
7
7
  </div>
8
8
  </div>
9
- <div class="panel-footer"><a href="<%= notes_path %>">查看我的 <%= current_user_notes.count %> 条 Note...</a></div>
9
+ <div class="card-footer"><a href="<%= notes_path %>">查看我的 <%= current_user_notes.count %> 条 Note...</a></div>
10
10
  </div>
11
11
 
12
12
  <% if @recent_notes.present? %>
13
- <div class="panel panel-default">
14
- <div class="panel-heading">我最近创建的 Note</div>
15
- <ul class="list-group">
13
+ <div class="card">
14
+ <div class="card-header">我最近创建的 Note</div>
15
+ <ul class="list-group list-group-flush">
16
16
  <% @recent_notes.each do |note| %>
17
17
  <li class="list-group-item">
18
18
  <%= link_to note.display_title, note %>
@@ -2,8 +2,8 @@
2
2
 
3
3
  <div class="row">
4
4
  <div class="col-sm-9">
5
- <div class="panel panel-default">
6
- <div class="panel-body">
5
+ <div class="card">
6
+ <div class="card-body">
7
7
  <%= render 'form' %>
8
8
  </div>
9
9
  </div>
@@ -1,15 +1,15 @@
1
1
  <% title_tag t('plugin.note') %>
2
2
  <div class="row">
3
3
  <div class="col-md-9">
4
- <div id="notes" class="panel panel-default">
5
- <div class="panel-heading">
4
+ <div id="notes" class="card">
5
+ <div class="card-header">
6
6
  <%= t('plugin.note') %>
7
7
  <span class="total pull-right">
8
8
  已有 <%= current_user_notes.count %> 条 Note
9
9
  </span>
10
10
  </div>
11
11
 
12
- <div class="panel-body">
12
+ <div class="card-body">
13
13
  <% if @notes.blank? %>
14
14
  <div style="text-align:center; padding:60px 0;">你还没有创建过一个文件。</div>
15
15
  <% else %>
@@ -19,7 +19,7 @@
19
19
  <div class="media-heading">
20
20
  <%= link_to note.display_title, note %>
21
21
  <% if note.publish %>
22
- <span class="label warning"><i class="fa fa-share-alt"></i> 公开</span>
22
+ <span class="label label-text-warning"><i class="fa fa-share-alt"></i> 公开</span>
23
23
  <% end %>
24
24
  <span class="opts pull-right">
25
25
  <a href="<%= edit_note_path(note.id) %>"><i class="fa fa-pencil"></i></a>
@@ -34,7 +34,7 @@
34
34
  <% end %>
35
35
  </div>
36
36
 
37
- <div class="panel-footer clearfix">
37
+ <div class="card-footer clearfix">
38
38
  <%= paginate @notes %>
39
39
  </div>
40
40
  </div>
@@ -2,8 +2,8 @@
2
2
 
3
3
  <div class="row">
4
4
  <div class="col-sm-9">
5
- <div class="panel panel-default">
6
- <div class="panel-body">
5
+ <div class="card">
6
+ <div class="card-body">
7
7
  <%= render 'form' %>
8
8
  </div>
9
9
  </div>
@@ -2,29 +2,21 @@
2
2
 
3
3
  <div class="row">
4
4
  <div class="col-sm-9">
5
- <div id="notes" class="panel panel-default">
6
- <div class="panel-heading clearfix">
7
- <div class="info">
8
- <%= @note.word_count %> 个字符
9
- <%= user_name_tag(@note.user) if !owner? @note %>
10
- <%= l @note.created_at, format: :long %>
11
- • <%= @note.hits %> 次阅读
12
- <%= @note.changes_count %> 次修改
13
- <% if owner? @note %>
14
- <span class="opts pull-right">
15
- <%= link_to icon_tag("pencil"), edit_note_path(@note), title: "编辑" %>
16
- <%= link_to icon_tag("trash"), note_path(@note), 'data-confirm' => "确定要删除么?", method: :delete %>
17
- </span>
18
- <% end %>
19
- </div>
20
- <% if @note.publish %>
21
- <div class="links">
22
- <label>页面链接</label>
23
- <%= note_url(@note) %>
24
- </div>
5
+ <div id="notes" class="card">
6
+ <div class="card-header info clearfix">
7
+ <%= @note.word_count %> 个字符
8
+ <%= user_name_tag(@note.user) if !owner? @note %>
9
+ <%= l @note.created_at, format: :long %>
10
+ <%= @note.hits %> 次阅读
11
+ • <%= @note.changes_count %> 次修改
12
+ <% if owner? @note %>
13
+ <span class="opts pull-right">
14
+ <%= link_to icon_tag("pencil"), edit_note_path(@note), title: "编辑" %>
15
+ <%= link_to icon_tag("trash"), note_path(@note), 'data-confirm' => "确定要删除么?", method: :delete %>
16
+ </span>
25
17
  <% end %>
26
18
  </div>
27
- <div class="panel-body">
19
+ <div class="card-body">
28
20
  <% if !@note.publish %>
29
21
  <i class="fa fa-lock text-success pull-right" title="此内容保密"></i>
30
22
  <% end %>
@@ -32,6 +24,12 @@
32
24
  <%= markdown(@note.body) %>
33
25
  </div>
34
26
  </div>
27
+ <% if @note.publish %>
28
+ <div class="card-footer links">
29
+ <label>页面链接</label>
30
+ <%= note_url(@note) %>
31
+ </div>
32
+ <% end %>
35
33
  </div>
36
34
  </div>
37
35
 
@@ -1,7 +1,7 @@
1
1
  module Homeland
2
2
  module Note
3
- NAME = 'note'
3
+ NAME = 'note'
4
4
  DESCRIPTION = 'Note for Homeland.'
5
- VERSION = '0.1.3'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homeland-note
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-22 00:00:00.000000000 Z
11
+ date: 2018-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.6.11
81
+ rubygems_version: 2.5.2
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Note plugin for Homeland