From e7a0911b81fad8851a2168aa5ad479ff3350a5d3 Mon Sep 17 00:00:00 2001 From: Antony Garand Date: Thu, 30 Aug 2018 16:06:38 -0400 Subject: [PATCH] Replace http with https in links (#521) * Comment liquid tag - https Replaced `http` for `https` in twitter and github links * User tag - Https Replaced `http` with `https` in github and twitter links. * Comments - Https Replaced http with https for github and twitter links * Article index Article - Update twitter and github link from http to https * Article markdown - Http to Https Article markdown - replaced http with https * Comment view: Closed `a` tag An `a` tag was not correctly closed, before injecting an image. This commit closed it. --- app/liquid_tags/comment_tag.rb | 4 ++-- app/liquid_tags/user_tag.rb | 4 ++-- app/views/articles/_markdown_form.html.erb | 4 ++-- app/views/articles/index.html.erb | 4 ++-- app/views/comments/_comment.html.erb | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/liquid_tags/comment_tag.rb b/app/liquid_tags/comment_tag.rb index 756152066..6b92da1cb 100644 --- a/app/liquid_tags/comment_tag.rb +++ b/app/liquid_tags/comment_tag.rb @@ -31,12 +31,12 @@ class CommentTag < LiquidTagBase def render_twitter_and_github result = "" if @comment.user.twitter_username.present? - result += "" \ + result += "" \ +image_tag("/assets/twitter-logo.svg", class: "icon-img", alt: "twitter") + \ "" end if @comment.user.github_username.present? - result + "" \ + result + "" \ +image_tag("/assets/github-logo.svg", class: "icon-img", alt: "github") + \ "" end diff --git a/app/liquid_tags/user_tag.rb b/app/liquid_tags/user_tag.rb index 077a7fc47..a21b58ef7 100644 --- a/app/liquid_tags/user_tag.rb +++ b/app/liquid_tags/user_tag.rb @@ -53,7 +53,7 @@ class UserTag < LiquidTagBase def twitter_link if @user.twitter_username.present? <<-HTML - + #{image_tag('/assets/twitter-logo.svg', class: 'icon-img', alt: 'twitter')} #{@user.twitter_username} HTML @@ -63,7 +63,7 @@ class UserTag < LiquidTagBase def github_link if @user.github_username.present? <<-HTML - + #{image_tag('/assets/github-logo.svg', class: 'icon-img', alt: 'github')} #{@user.github_username} HTML diff --git a/app/views/articles/_markdown_form.html.erb b/app/views/articles/_markdown_form.html.erb index 6166537cc..6730d1ff3 100644 --- a/app/views/articles/_markdown_form.html.erb +++ b/app/views/articles/_markdown_form.html.erb @@ -108,10 +108,10 @@ By <%= @user.name %> <% if @user.twitter_username.present? %> - <%= icon("twitter","20") %> + <%= icon("twitter","20") %> <% end %> <% if @user.github_username.present? %> - <%= icon("github","20") %> + <%= icon("github","20") %> <% end %> <%= "on "+@article.published_at.strftime("%B %d, %Y") if @article.published_at %> diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb index 896effc12..55fab6ebc 100644 --- a/app/views/articles/index.html.erb +++ b/app/views/articles/index.html.erb @@ -124,12 +124,12 @@

<% if @user.twitter_username.present? %> - + <%= inline_svg("twitter-logo.svg", class:"icon-img") %> <% end %> <% if @user.github_username.present? %> - + <%= inline_svg("github-logo.svg", class:"icon-img") %> <% end %> diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index b627bc028..1a25d7541 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -19,10 +19,10 @@ <% if comment.user.twitter_username.present? %> - + <%= image_tag("twitter-logo.svg", class:"icon-img") %> <% end %> <% if comment.user.github_username.present? %> - <%= image_tag("github-logo.svg", class:"icon-img") %> + <%= image_tag("github-logo.svg", class:"icon-img") %> <% end %> <% if commentable && (commentable.user_id == comment.user_id || commentable.second_user_id == comment.user_id ||