diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 23:47:52 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-21 23:47:52 -0400 |
commit | 98378969dae552c0c190eea922415d35eb22ae1e (patch) | |
tree | 9754cc80863564284bb242aa47cb2975726b920f /app | |
parent | 20f2479b33bc548c4736cdc1ceffde6e3af3a31d (diff) | |
download | thoughts-98378969dae552c0c190eea922415d35eb22ae1e.tar.gz thoughts-98378969dae552c0c190eea922415d35eb22ae1e.tar.bz2 thoughts-98378969dae552c0c190eea922415d35eb22ae1e.zip |
Added contrast for quote speaker names
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/quotes/layout.css.sass | 3 | ||||
-rw-r--r-- | app/helpers/quotes_helper.rb | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/app/assets/stylesheets/quotes/layout.css.sass b/app/assets/stylesheets/quotes/layout.css.sass index e5dbd64..0b102db 100644 --- a/app/assets/stylesheets/quotes/layout.css.sass +++ b/app/assets/stylesheets/quotes/layout.css.sass | |||
@@ -92,6 +92,9 @@ body | |||
92 | padding: 0 | 92 | padding: 0 |
93 | position: static | 93 | position: static |
94 | width: 100% | 94 | width: 100% |
95 | .quote-speaker | ||
96 | font-weight: bold | ||
97 | color: green | ||
95 | &:hover | 98 | &:hover |
96 | background-color: #fffcec | 99 | background-color: #fffcec |
97 | .quote-header | 100 | .quote-header |
diff --git a/app/helpers/quotes_helper.rb b/app/helpers/quotes_helper.rb index 3c2acf9..c0753e0 100644 --- a/app/helpers/quotes_helper.rb +++ b/app/helpers/quotes_helper.rb | |||
@@ -2,6 +2,7 @@ module QuotesHelper | |||
2 | def quote_format(text) | 2 | def quote_format(text) |
3 | text = text ? text.to_str : '' | 3 | text = text ? text.to_str : '' |
4 | text = text.dup if text.frozen? | 4 | text = text.dup if text.frozen? |
5 | text.gsub!(/^([\(\[][^\]\)]*[\]\)] )?([^:\n]*): /, "\\1<span class=\"quote-speaker\">\\2</span>: ") | ||
5 | text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n | 6 | text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n |
6 | text.gsub!(/\n/, '<br />') # 1 newline -> br | 7 | text.gsub!(/\n/, '<br />') # 1 newline -> br |
7 | text = sanitize(text) | 8 | text = sanitize(text) |