Xwitter 0.2.1 → 0.2.2

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: c9a7de9c9491bbb1ef648bb7d64cb3d596cc29803498e1d15180317a5a03a0e6
4
- data.tar.gz: 6cb3d91654650cdef620521f02e643a87a62157b1912b099a9dd221fe5553568
3
+ metadata.gz: 0c3206d5937b3dd8ace31d035f2adf449345238404988dca84161ff08e6a6c92
4
+ data.tar.gz: f6e28c151af151500e1a89e8e2c82d7107c44e3e9b0d621ae567e30a7f6ca505
5
5
  SHA512:
6
- metadata.gz: 21f27e91e3672305b8b7a777e3b49bea0a20581eb7436967b9014a2c5dc9dbee99529384483f0d2b98b76cfb954010439578d7171913cfac6d47595f17852db5
7
- data.tar.gz: 624365d80d73c50c9e1f159fd6474ba175a2c5559fad1d6bef6ead1a9332e5912e66b4a25d40aaf1b2c374eaa37b77b4e715be0814602ddaa818a169efc552c3
6
+ metadata.gz: 9b2ec24637aaa2f548b36cd8f176ae49ca7bfb68615a9ea51e285dba740d694985dcd61c9f0fcb3920584e2bc19946db6c4d66282133a76c9019a729cbb5e2b5
7
+ data.tar.gz: 815a2749130be886714347715a2bef9c00cfe28850eb21bbc37592495273919acd9f507dbeaa4e361e42c1c52ec5e1e7f6fa444707c4ec296b230fd78e2cd7d7
data/Schemafile CHANGED
@@ -8,6 +8,7 @@ create_table "users" do |t|
8
8
  t.boolean "public", null: false, default: true
9
9
  t.datetime "reset_password_sent_at"
10
10
  t.datetime "remember_created_at"
11
+ t.string "theme"
11
12
  t.timestamps null: false
12
13
  t.index ["name"], unique: true
13
14
  end
@@ -13,3 +13,4 @@
13
13
  *= require_tree .
14
14
  *= require_self
15
15
  */
16
+ html, body { height: 100%; }
@@ -1,3 +1,7 @@
1
- // Place all the styles related to the messages controller here.
2
- // They will automatically be included in application.css.
3
- // You can use Sass (SCSS) here: http://sass-lang.com/
1
+ .timeline {
2
+ .message-item {
3
+ //cursor: pointer;
4
+ transition: background-color 0.6s;
5
+ &:hover { background-color: #f7f7f7; }
6
+ }
7
+ }
@@ -0,0 +1,13 @@
1
+ body.theme-dark {
2
+ background-color: #323a44;
3
+ color: #e2e5e6;
4
+ h1 {
5
+ color: #f4f6f7;
6
+ }
7
+ .timeline {
8
+ background-color: #293038;
9
+ .message-item:hover {
10
+ background-color: #525a63;
11
+ }
12
+ }
13
+ }
@@ -45,6 +45,6 @@ class ProfilesController < ApplicationController
45
45
 
46
46
  # Never trust parameters from the scary internet, only allow the white list through.
47
47
  def user_params
48
- params.require(:user).permit(:name, :screen_name)
48
+ params.require(:user).permit(:theme, :name, :screen_name)
49
49
  end
50
50
  end
@@ -7,8 +7,9 @@ html
7
7
  = javascript_include_tag 'application', 'data-turbolinks-track': 'reload'
8
8
  = javascript_pack_tag 'application'
9
9
  = stylesheet_pack_tag 'application'
10
+ = stylesheet_link_tag 'application', 'data-turbolinks-track': 'reload'
10
11
  = stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/open-iconic/1.1.1/font/css/open-iconic-bootstrap.min.css'
11
- body
12
+ body(class="theme-#{current_user.theme.to_s}")
12
13
  .navbar
13
14
  = link_to '/', root_path
14
15
 
@@ -1,12 +1,14 @@
1
- - messages.order("created_at DESC").each do |message|
2
- div
3
- p
4
- = message.user.screen_name
5
- | &nbsp;
6
- = link_to '@' + message.user.name, '/' + message.user.name
1
+ .timeline
2
+ ul
3
+ - messages.order("created_at DESC").each do |message|
4
+ li.message-item(onclick="Turbolinks.visit('/messages/#{message.id}')")
5
+ p
6
+ = message.user.screen_name
7
+ | &nbsp;
8
+ = link_to '@' + message.user.name, '/' + message.user.name
7
9
 
8
- p= message.text
9
- p= l message.created_at
10
- - if user_signed_in? && message.user == current_user
11
- .oi.oi-trash
12
- = link_to 'Destroy', message, data: { confirm: 'Are you sure?' }, method: :delete
10
+ p= message.text
11
+ p= l message.created_at
12
+ - if user_signed_in? && message.user == current_user
13
+ .oi.oi-trash
14
+ = link_to 'Destroy', message, data: { confirm: 'Are you sure?' }, method: :delete
@@ -1,9 +1,11 @@
1
- p#notice = notice
1
+ h1
2
+ = @message.user.screen_name
3
+ | &nbsp;
4
+ small= link_to "@#{@message.user.name}", '/' + @message.user.name
5
+ p= @message.text
6
+ p= l @message.created_at
2
7
 
3
- p
4
- strong Text:
5
- = @message.text
6
-
7
- => link_to 'Edit', edit_message_path(@message)
8
- '|
8
+ - if @message.user == current_user
9
+ => link_to 'Edit', edit_message_path(@message)
10
+ '|
9
11
  =< link_to 'Back', messages_path
@@ -12,4 +12,7 @@
12
12
  .field
13
13
  = f.label :screen_name
14
14
  = f.text_field :screen_name
15
+ .field
16
+ = f.label :theme
17
+ = f.select :theme, %w[dark], include_blank: 'default'
15
18
  .actions = f.submit
@@ -1,3 +1,3 @@
1
1
  module Xwitter
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Xwitter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - myun2
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-11 00:00:00.000000000 Z
11
+ date: 2018-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -63,9 +63,9 @@ files:
63
63
  - app/assets/javascripts/channels/.keep
64
64
  - app/assets/javascripts/messages.coffee
65
65
  - app/assets/javascripts/users.coffee
66
- - app/assets/stylesheets/application.css
66
+ - app/assets/stylesheets/application.scss
67
67
  - app/assets/stylesheets/messages.scss
68
- - app/assets/stylesheets/scaffolds.scss
68
+ - app/assets/stylesheets/themes/dark.scss
69
69
  - app/assets/stylesheets/users.scss
70
70
  - app/channels/application_cable/channel.rb
71
71
  - app/channels/application_cable/connection.rb
@@ -1,84 +0,0 @@
1
- body {
2
- background-color: #fff;
3
- color: #333;
4
- margin: 33px;
5
- font-family: verdana, arial, helvetica, sans-serif;
6
- font-size: 13px;
7
- line-height: 18px;
8
- }
9
-
10
- p, ol, ul, td {
11
- font-family: verdana, arial, helvetica, sans-serif;
12
- font-size: 13px;
13
- line-height: 18px;
14
- }
15
-
16
- pre {
17
- background-color: #eee;
18
- padding: 10px;
19
- font-size: 11px;
20
- }
21
-
22
- a {
23
- color: #000;
24
-
25
- &:visited {
26
- color: #666;
27
- }
28
-
29
- &:hover {
30
- color: #fff;
31
- background-color: #000;
32
- }
33
- }
34
-
35
- th {
36
- padding-bottom: 5px;
37
- }
38
-
39
- td {
40
- padding: 0 5px 7px;
41
- }
42
-
43
- div {
44
- &.field, &.actions {
45
- margin-bottom: 10px;
46
- }
47
- }
48
-
49
- #notice {
50
- color: green;
51
- }
52
-
53
- .field_with_errors {
54
- padding: 2px;
55
- background-color: red;
56
- display: table;
57
- }
58
-
59
- #error_explanation {
60
- width: 450px;
61
- border: 2px solid red;
62
- padding: 7px 7px 0;
63
- margin-bottom: 20px;
64
- background-color: #f0f0f0;
65
-
66
- h2 {
67
- text-align: left;
68
- font-weight: bold;
69
- padding: 5px 5px 5px 15px;
70
- font-size: 12px;
71
- margin: -7px -7px 0;
72
- background-color: #c00;
73
- color: #fff;
74
- }
75
-
76
- ul li {
77
- font-size: 12px;
78
- list-style: square;
79
- }
80
- }
81
-
82
- label {
83
- display: block;
84
- }