From ea3fc6ffbb8f90aff28ce56fe4432a8d3ff18caa Mon Sep 17 00:00:00 2001 From: luca-marie Date: Mon, 29 Aug 2016 17:39:46 +0200 Subject: Changes mainly on CSS 'fine tuning' and shortening the Twitter API credentials, - only bearer token is needed to access Twitter API --- app/assets/stylesheets/twitter.scss | 55 +++++++++++++++++-------------------- app/helpers/twitter_helper.rb | 2 -- app/views/twitter/_index.html.erb | 22 ++++++++++----- 3 files changed, 40 insertions(+), 39 deletions(-) (limited to 'app') diff --git a/app/assets/stylesheets/twitter.scss b/app/assets/stylesheets/twitter.scss index 6b74cf7..b0ce982 100644 --- a/app/assets/stylesheets/twitter.scss +++ b/app/assets/stylesheets/twitter.scss @@ -1,21 +1,15 @@ .twitter { position: relative; - // top: 0; - // right: 10px; - // bottom: 0; - // overflow: auto; - // width: 250px; } + .twitter_header { - padding-top: 8px; - height: 30px; - font-size: 20px ; - text-align: center; - margin-bottom: 20px; + font-size: 20px; + text-align: left; + margin-bottom: 30px; } .twitter_list { - position: relative; + box-sizing: border-box; } .tweet:hover { @@ -25,33 +19,35 @@ .tweet { border-bottom-style: solid; border-color: #bfbfbf; - // display: inline; - // height: 32px; - // width: 100%; - // position: absolute; - // text-align: center; + padding: 10px 8px; +} + +.tweet_title { + position: relative; + height: 40px; + margin-bottom: 10px; } .tweet_pic { display: block; - float: left; - width: 28px; - height: 33px; - padding-left: 8px; - padding-top: 8px; - // background: hsl(0, 0%, 30%); -} + width: 40px; + height: 40px; + overflow: hidden; + position: absolute; + left: 0; + top: 0; + } .tweet_name { - padding-left: 45px; - padding-top: 16px; - // border-bottom-style: solid; - // border-color: #00bfff; + padding-left: 50px; + line-height: 40px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .tweet_text { - padding-left: 8px; - padding-top: 15px; +box-sizing: border-box; } .tweet_text_date { @@ -67,7 +63,6 @@ width: 40px; height: 40px; overflow: hidden; - position: relative; } .twitter_image_frame > img { diff --git a/app/helpers/twitter_helper.rb b/app/helpers/twitter_helper.rb index b01293f..d20b7da 100644 --- a/app/helpers/twitter_helper.rb +++ b/app/helpers/twitter_helper.rb @@ -5,8 +5,6 @@ module TwitterHelper def twitter_client Twitter::REST::Client.new do |config| - config.consumer_key = Rails.application.secrets.twitter['consumer_key'] - config.consumer_secret = Rails.application.secrets.twitter['consumer_secret'] config.bearer_token = Rails.application.secrets.twitter['bearer_token'] end end diff --git a/app/views/twitter/_index.html.erb b/app/views/twitter/_index.html.erb index 8ac65be..eba9675 100644 --- a/app/views/twitter/_index.html.erb +++ b/app/views/twitter/_index.html.erb @@ -1,26 +1,34 @@ <% if twitter_enabled == true %>
+ +