From c40ba93c8558a5c108db9598060bf13fd2ec3ed5 Mon Sep 17 00:00:00 2001 From: taea Date: Mon, 5 May 2014 14:19:56 +0900 Subject: [PATCH 1/2] Add simple tweet link MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ただのリンク(twitter.com/share?なんとか)でとりあえず作ってみた --- app/views/tasks/edit.html.haml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/tasks/edit.html.haml b/app/views/tasks/edit.html.haml index c74f50a..23be195 100644 --- a/app/views/tasks/edit.html.haml +++ b/app/views/tasks/edit.html.haml @@ -7,6 +7,10 @@ .form-header = render ("tasks/statuses/#{@task.status}"), task: @task = render 'form' + .tweet + = link_to "http://twitter.com/share?text=TODO: #{@task.title} [#{@task.point}pt] @ktra_app&url=https://ktra.herokuapp.com", target: '_blank' do + %i.fa.fa-twitter + Tweet this task .time %dl %dt START From 05b2c7f075889d70d0050c860eb4e9473aff3d38 Mon Sep 17 00:00:00 2001 From: taea Date: Mon, 5 May 2014 14:23:24 +0900 Subject: [PATCH 2/2] Style for tweet link --- app/assets/stylesheets/style.css.sass | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/style.css.sass b/app/assets/stylesheets/style.css.sass index e0d16b7..d97438d 100644 --- a/app/assets/stylesheets/style.css.sass +++ b/app/assets/stylesheets/style.css.sass @@ -237,6 +237,17 @@ select font-size: 20px +relative top: 3px + + .tweet + margin-top: 20px + text-align: center + a + i + font-size: 130% + color: rgba(white, .5) + +relative + top: 2px + .time font-size: 10px margin-top: 30px @@ -290,7 +301,10 @@ select color: white .destroy > a color: $pt-color - + .tweet > a + color: $pt-color + i + color: rgba($pt-color, .5) &.doing .destroy > a @@ -329,6 +343,10 @@ select color: $pt-color .destroy > a color: white + .tweet > a + color: white + i + color: rgba(white, .5) .form width: 320px