From 528c2fb4da42518f171edbb2076e33896b556319 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 28 Apr 2024 01:57:38 +0300 Subject: [PATCH 1/3] Use .icon-link for new diary entry icon --- app/assets/stylesheets/common.scss | 5 ----- app/views/diary_entries/index.html.erb | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index c0f6c367c..71649fbce 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -21,11 +21,6 @@ time[title] { #container { position: relative; } -.small_icon { - vertical-align: middle; - margin-right: $lineheight * 0.25; -} - /* Rules for icons */ .icon { diff --git a/app/views/diary_entries/index.html.erb b/app/views/diary_entries/index.html.erb index 78ac0dcf8..a0ab0264a 100644 --- a/app/views/diary_entries/index.html.erb +++ b/app/views/diary_entries/index.html.erb @@ -25,7 +25,7 @@ <% end %> <% if @user && @user == current_user || !@user && current_user %> -
  • <%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %>
  • +
  • <%= link_to image_tag("new.png") + t(".new"), new_diary_entry_path, :class => "icon-link", :title => t(".new_title") %>
  • <% end %> From a2e7b5db56a1bc61d90ea2c74e9961fcafd46218 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 28 Apr 2024 02:02:15 +0300 Subject: [PATCH 2/3] Remove border=0 from feed icons --- app/helpers/application_helper.rb | 4 ++-- test/helpers/application_helper_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 368668a9b..e81a9d401 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,11 +10,11 @@ module ApplicationHelper end def rss_link_to(args = {}) - link_to(image_tag("RSS.png", :size => "16x16", :border => 0), args, :class => "rsssmall") + link_to(image_tag("RSS.png", :size => "16x16"), args, :class => "rsssmall") end def atom_link_to(args = {}) - link_to(image_tag("RSS.png", :size => "16x16", :border => 0), args, :class => "rsssmall") + link_to(image_tag("RSS.png", :size => "16x16"), args, :class => "rsssmall") end def dir diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index a905090db..f6b335a5c 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -31,12 +31,12 @@ class ApplicationHelperTest < ActionView::TestCase def test_rss_link_to link = rss_link_to(:controller => :diary_entries, :action => :rss) - assert_dom_equal "", link + assert_dom_equal "", link end def test_atom_link_to link = atom_link_to(:controller => :changesets, :action => :feed) - assert_dom_equal "", link + assert_dom_equal "", link end def test_dir From acac5fcc890dfa3b7317febf4222df4450def62b Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 28 Apr 2024 02:07:53 +0300 Subject: [PATCH 3/3] Use .align-text-bottom for feed icon images --- app/helpers/application_helper.rb | 4 ++-- test/helpers/application_helper_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e81a9d401..fcf253289 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -10,11 +10,11 @@ module ApplicationHelper end def rss_link_to(args = {}) - link_to(image_tag("RSS.png", :size => "16x16"), args, :class => "rsssmall") + link_to image_tag("RSS.png", :size => "16x16", :class => "align-text-bottom"), args end def atom_link_to(args = {}) - link_to(image_tag("RSS.png", :size => "16x16"), args, :class => "rsssmall") + link_to image_tag("RSS.png", :size => "16x16", :class => "align-text-bottom"), args end def dir diff --git a/test/helpers/application_helper_test.rb b/test/helpers/application_helper_test.rb index f6b335a5c..24d74c85f 100644 --- a/test/helpers/application_helper_test.rb +++ b/test/helpers/application_helper_test.rb @@ -31,12 +31,12 @@ class ApplicationHelperTest < ActionView::TestCase def test_rss_link_to link = rss_link_to(:controller => :diary_entries, :action => :rss) - assert_dom_equal "", link + assert_dom_equal "", link end def test_atom_link_to link = atom_link_to(:controller => :changesets, :action => :feed) - assert_dom_equal "", link + assert_dom_equal "", link end def test_dir