Skip to content

Commit

Permalink
Feature: Change Discord buttons to clear style (#3952)
Browse files Browse the repository at this point in the history
## Because
- Our current button styling doesn't meet WCAG contrast requirements


## This PR
- Changes links to Discord to `button--clear`


## Issue
Part of #3923 

## Pull Request Requirements
<!-- Replace the whitespace between the square brackets with an 'x',
e.g. [x]. After you create the PR, they will become checkboxes that you
can click on. -->
- [x] I have thoroughly read and understand [The Odin Project
Contributing
Guide](https://github.com/TheOdinProject/theodinproject/blob/main/CONTRIBUTING.md)
- [x] The title of this PR follows the `keyword: brief description of
change` format, using one of the following keywords:
  - `Feature` - adds new or amends existing user-facing behavior
- `Chore` - changes that have no user-facing value, refactors,
dependency bumps, etc
  - `Fix` - bug fixes
-   [x] The `Because` section summarizes the reason for this PR
- [x] The `This PR` section has a bullet point list describing the
changes in this PR
- [x] I have verified all tests and linters pass after making these
changes.
- [x] If this PR addresses an open issue, it is linked in the `Issue`
section
-   [x] If applicable, this PR includes new or updated automated tests
  • Loading branch information
Asartea committed Jul 11, 2023
1 parent 3678401 commit bd83cc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/button_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ def contribute_button
end

def chat_button
link_to 'Open Discord', ODIN_CHAT_URL, class: 'button button--secondary', target: '_blank', rel: 'noreferrer'
link_to 'Open Discord', ODIN_CHAT_URL, class: 'button button--clear px-4', target: '_blank', rel: 'noreferrer'
end
end
2 changes: 1 addition & 1 deletion app/views/static_pages/about.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
Connect with our friendly community on discord, a chat and networking platform or <a href="mailto:[email protected]" class="text-gold hover:underline">send us an email</a>.
</p>

<%= link_to 'Chat on Discord', ODIN_CHAT_URL, class: 'button button--secondary', target: '_blank', rel: 'noreferrer' %>
<%= link_to 'Chat on Discord', ODIN_CHAT_URL, class: 'button button--clear px-4', target: '_blank', rel: 'noreferrer' %>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/button_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
describe '#chat_button' do
let(:chat_button) do
# rubocop:disable Layout/LineLength
'<a class="button button--secondary" target="_blank" rel="noreferrer" href="https://discord.gg/fbFCkYabZB">Open Discord</a>'
'<a class="button button--clear px-4" target="_blank" rel="noreferrer" href="https://discord.gg/fbFCkYabZB">Open Discord</a>'
# rubocop:enable Layout/LineLength
end

Expand Down

0 comments on commit bd83cc4

Please sign in to comment.