From 124d588b39f6a15daa16434ab27a0f29c23f3fda Mon Sep 17 00:00:00 2001 From: Andreas N Date: Mon, 5 Jan 2015 00:02:13 +0100 Subject: [PATCH 01/10] added kyr to team display --- app/views/static/about.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/static/about.html.haml b/app/views/static/about.html.haml index 8e6652ba..3238a557 100644 --- a/app/views/static/about.html.haml +++ b/app/views/static/about.html.haml @@ -32,6 +32,13 @@ .media-body %h4.entry-text.entry-about pixeldesu %h6.entry-subtext Frontend Design & Layout + .media + .pull-left + %a{href: show_user_profile_path('kyr')} + %img.img-rounded.answerbox--img{src: User.find_by_screen_name('kyr').profile_picture.url(:medium)} + .media-body + %h4.entry-text.entry-about kyr + %h6.entry-subtext Node.js & Javascript %h3 Moderators %ul.about--moderator - User.where(moderator: true).each do |mod| From e1563da2f3c60a6c6c354ed08821097ecc74e637 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Mon, 5 Jan 2015 00:10:35 +0100 Subject: [PATCH 02/10] updated about page --- app/views/static/about.html.haml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/app/views/static/about.html.haml b/app/views/static/about.html.haml index 3238a557..fb462d7e 100644 --- a/app/views/static/about.html.haml +++ b/app/views/static/about.html.haml @@ -39,13 +39,26 @@ .media-body %h4.entry-text.entry-about kyr %h6.entry-subtext Node.js & Javascript + .panel.panel-default + .panel-body %h3 Moderators + The people on + = APP_CONFIG['site_name'] + that look after you! %ul.about--moderator - User.where(moderator: true).each do |mod| %li %a{href: show_user_profile_path(mod.screen_name)} %img.answerbox--img-small{src: User.find_by_screen_name(mod.screen_name).profile_picture.url(:medium)} = mod.screen_name + .col-sm-4 + .panel.panel-default + .panel-body + %h3 Alpha version + %p This is an alpha version, full of bugs. Caveat emptor. + %p + Found a bug? Have an idea for a must-have feature? Please + = link_to "report them!", 'https://github.com/retrospring/bugs/issues' .panel.panel-default .panel-body There are lies, damned lies, and then there are... @@ -68,14 +81,6 @@ .col-xs-6 %h4.entry-text#follower-count= User.count %h6.entry-subtext Users - .col-sm-4 - .panel.panel-default - .panel-body - %h3 Alpha version - %p This is an alpha version, full of bugs. Caveat emptor. - %p - Found a bug? Have an idea for a must-have feature? Please - = link_to "report them!", 'https://github.com/retrospring/bugs/issues' .col-sm-4 .panel.panel-default .panel-body @@ -89,5 +94,7 @@ %input{:alt => "PayPal - The safer, easier way to pay online!", :border => "0", :name => "submit", :src => "https://www.paypalobjects.com/en_US/AT/i/btn/btn_donateCC_LG.gif", :type => "image"}/ %img{:alt => "", :border => "0", :height => "1", :src => "https://www.paypalobjects.com/de_DE/i/scr/pixel.gif", :width => "1"}/ + Want to support us over a longer timespan? We also have a Patreon campaign! + %a.btn.btn-primary.btn-block{href: "https://patreon.com/retrospring"} Patreon = render "shared/links" From fcf7d430ebe79763d33e5bd86745bdf3e32dd8bc Mon Sep 17 00:00:00 2001 From: Andreas N Date: Mon, 5 Jan 2015 00:32:58 +0100 Subject: [PATCH 03/10] updated about page even more --- app/views/static/about.html.haml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/views/static/about.html.haml b/app/views/static/about.html.haml index fb462d7e..53a33a94 100644 --- a/app/views/static/about.html.haml +++ b/app/views/static/about.html.haml @@ -96,5 +96,15 @@ Want to support us over a longer timespan? We also have a Patreon campaign! %a.btn.btn-primary.btn-block{href: "https://patreon.com/retrospring"} Patreon + .panel.panel-default + .panel-body + %h3 Patrons + People that believe in our vision, and that's why we love them <3 + %ul.about--moderator + - User.where(supporter: true).each do |sup| + %li + %a{href: show_user_profile_path(sup.screen_name)} + %img.answerbox--img-small{src: User.find_by_screen_name(sup.screen_name).profile_picture.url(:medium)} + = sup.screen_name = render "shared/links" From 11cd8b59f813c37c78958f45e7f59e1fdf177354 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Mon, 5 Jan 2015 00:50:27 +0100 Subject: [PATCH 04/10] fix broken labels --- app/assets/stylesheets/base.css.scss | 4 ++++ app/views/user/_profile_info.html.haml | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss index 5edb08d0..73af1d4f 100644 --- a/app/assets/stylesheets/base.css.scss +++ b/app/assets/stylesheets/base.css.scss @@ -71,6 +71,10 @@ body { text-transform: uppercase; } +.j2-label { + display: inline-block; +} + .sweet-overlay { z-index: 1031; } \ No newline at end of file diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index 8fdb59b5..df61ef89 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -5,30 +5,30 @@ .profile--displayname = @user.screen_name - if @user.admin? - %span.label.label-danger.j2-up + %span.label.label-danger.j2-up.j2-label %i.fa.fa-flask Admin - if @user.moderator? - %span.label.label-success.j2-up + %span.label.label-success.j2-up.j2-label %i.fa.fa-users Mod - if @user.supporter? - %span.label.label-warning.j2-up + %span.label.label-warning.j2-up.j2-label %i.fa.fa-star Supporter - else .profile--displayname = @user.display_name - if @user.admin? - %span.label.label-danger.j2-up + %span.label.label-danger.j2-up.j2-label %i.fa.fa-flask Admin - if @user.moderator? - %span.label.label-success.j2-up + %span.label.label-success.j2-up.j2-label %i.fa.fa-users Mod - if @user.supporter? - %span.label.label-warning.j2-up + %span.label.label-warning.j2-up.j2-label %i.fa.fa-star Supporter .profile--username From 3567ba6190a15bff63c8bcf92ec1b8f436e9fbb7 Mon Sep 17 00:00:00 2001 From: nilsding Date: Mon, 5 Jan 2015 10:16:00 +0100 Subject: [PATCH 05/10] numbers --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index ca2a2182..a97b37df 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -127,7 +127,7 @@ class User < ActiveRecord::Base end def display_website - website.match(/https?:\/\/([A-Za-z.\-]+)\/?(?:.*)/i)[1] + website.match(/https?:\/\/([A-Za-z.\-0-9]+)\/?(?:.*)/i)[1] rescue NoMethodError website end From 3750bfa4c663cea73d71f730a31ab32ff3fff409 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 15:21:32 +0100 Subject: [PATCH 06/10] updated README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index c37f67c8..9e20f73d 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,8 @@ Add/remove moderators: $ bundle exec rake 'justask:mod[someone_else]' RAILS_ENV=production $ bundle exec rake 'justask:demod[someone_else]' RAILS_ENV=production + +Add/remove supporters: + + $ bundle exec rake 'justask:sup[someone_else]' RAILS_ENV=production + $ bundle exec rake 'justask:desup[someone_else]' RAILS_ENV=production \ No newline at end of file From 17afe261715402f691fb45f4aeeaf7cb380d7216 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 15:26:24 +0100 Subject: [PATCH 07/10] added new profile badge display --- app/assets/stylesheets/scss/user.scss | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 955ee4d0..437956b1 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -93,4 +93,23 @@ width: 100%; height: auto; border: medium none; +} + +.profile--panel-badge { + width: 100%; + text-align: center; + padding-top: 0.2em; + padding-bottom: 0.2em; + text-transform: uppercase; + font-weight: bold; + margin: 0; + color: #fff; +} + +.panel-badge-danger { + background-color: #E51C23; +} + +.panel-badge-default { + background-color: #BBB; } \ No newline at end of file From 0d784aee475694096afaeec6a63d17e865aa0b40 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 15:32:14 +0100 Subject: [PATCH 08/10] finish implementing new badge design --- app/assets/stylesheets/scss/user.scss | 8 +++++ app/views/user/_profile_info.html.haml | 43 +++++++++----------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 437956b1..0117fd0a 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -112,4 +112,12 @@ .panel-badge-default { background-color: #BBB; +} + +.panel-badge-success { + background-color: #4CAF50; +} + +.panel-badge-warning { + background-color: #FF9800; } \ No newline at end of file diff --git a/app/views/user/_profile_info.html.haml b/app/views/user/_profile_info.html.haml index df61ef89..cf86eac8 100644 --- a/app/views/user/_profile_info.html.haml +++ b/app/views/user/_profile_info.html.haml @@ -1,42 +1,29 @@ .panel.panel-default %img.profile--avatar{src: @user.profile_picture.url(:large)} + - if @user.admin? + .profile--panel-badge.panel-badge-danger + %i.fa.fa-flask + Admin + - if @user.moderator? + .profile--panel-badge.panel-badge-success + %i.fa.fa-users + Mod + - if @user.supporter? + .profile--panel-badge.panel-badge-warning + %i.fa.fa-star + Supporter + - if @user.following? current_user + .profile--panel-badge.panel-badge-default + Follows you .panel-body - if @user.display_name.blank? .profile--displayname = @user.screen_name - - if @user.admin? - %span.label.label-danger.j2-up.j2-label - %i.fa.fa-flask - Admin - - if @user.moderator? - %span.label.label-success.j2-up.j2-label - %i.fa.fa-users - Mod - - if @user.supporter? - %span.label.label-warning.j2-up.j2-label - %i.fa.fa-star - Supporter - else .profile--displayname = @user.display_name - - if @user.admin? - %span.label.label-danger.j2-up.j2-label - %i.fa.fa-flask - Admin - - if @user.moderator? - %span.label.label-success.j2-up.j2-label - %i.fa.fa-users - Mod - - if @user.supporter? - %span.label.label-warning.j2-up.j2-label - %i.fa.fa-star - Supporter .profile--username = @user.screen_name - - if @user.following? current_user - %p.profile--followtag - %span.label.label-default.j2-up - Follows you - unless @user.bio.blank? %p.profile--text= @user.bio - unless @user.website.blank? From 4b114b0cab63184e709930d8b6acdc9fda162ff8 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 15:35:16 +0100 Subject: [PATCH 09/10] fixed badge size --- app/assets/stylesheets/scss/user.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/scss/user.scss b/app/assets/stylesheets/scss/user.scss index 0117fd0a..14c314fe 100644 --- a/app/assets/stylesheets/scss/user.scss +++ b/app/assets/stylesheets/scss/user.scss @@ -98,8 +98,8 @@ .profile--panel-badge { width: 100%; text-align: center; - padding-top: 0.2em; - padding-bottom: 0.2em; + padding-top: 0.05em; + padding-bottom: 0.05em; text-transform: uppercase; font-weight: bold; margin: 0; From 1b4eb1515285937d2339462d5bcdb355def01f62 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Tue, 6 Jan 2015 17:33:02 +0100 Subject: [PATCH 10/10] tooltips for smiles --- app/views/shared/_smiles.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_smiles.html.haml b/app/views/shared/_smiles.html.haml index 28607d86..2625f3bf 100644 --- a/app/views/shared/_smiles.html.haml +++ b/app/views/shared/_smiles.html.haml @@ -6,5 +6,5 @@ No one smiled this, yet. - else - a.smiles.all.each do |smile| - %a{href: show_user_profile_path(smile.user.screen_name), data: {smile_id: smile.id}} + %a{href: show_user_profile_path(smile.user.screen_name), title: smile.user.screen_name, data: { toggle: :tooltip, placement: :top, smile_id: smile.id }} %img.img-rounded.answerbox--img-small{src: gravatar_url(smile.user)} \ No newline at end of file