diff --git a/app/assets/stylesheets/entries.scss b/app/assets/stylesheets/entries.scss index e87aa970..04951a18 100644 --- a/app/assets/stylesheets/entries.scss +++ b/app/assets/stylesheets/entries.scss @@ -495,3 +495,14 @@ mark { } .note-editor .note-dropzone { opacity: 0 !important; } + +.emotion-link { + text-decoration: none; + margin-left: 2px; + margin-right: 2px; + transition: transform 0.3s ease; /* Smooth transition */ +} + +.emotion-link:hover { + transform: scale(1.1); /* Scale up to 110% */ +} diff --git a/app/views/entries/review.html.haml b/app/views/entries/review.html.haml index 6c397af6..afc3233b 100644 --- a/app/views/entries/review.html.haml +++ b/app/views/entries/review.html.haml @@ -42,7 +42,7 @@ = pie_chart(@sentiment_count, height: "230px", library: {backgroundColor: "#ffffff"}) .clearfix - @entries_with_sentiment.pluck(:sentiment).flatten.uniq.sort.each do |sentiment| - = link_to "#{Entry::AiTagger::EMOTIONS[sentiment]}", entries_emotion_path(sentiment), style: "text-decoration: none; margin-left: 2px; margin-right: 2px;", title: "View entries tagged with #{sentiment}" + = link_to "#{Entry::AiTagger::EMOTIONS[sentiment]}", entries_emotion_path(sentiment), class: "emotion-link", title: "View entries tagged with #{sentiment}" .col-md-8.col-md-offset-2.well .center{class: add_class} diff --git a/lib/tasks/entry.rake b/lib/tasks/entry.rake index 543a593a..f91f2e60 100644 --- a/lib/tasks/entry.rake +++ b/lib/tasks/entry.rake @@ -142,8 +142,8 @@ namespace :entry do tokenizer = WordsCounted::Tokeniser.new(entries_bodies).tokenise(exclude: Entry::WORDS_NOT_TO_COUNT) total_words = tokenizer.count - counter = WordsCounted.count(entries_bodies) - most_frequent = counter.token_frequency.first(400).select { |w| !Entry::COMMON_WORDS.include?(w[0]) }.first(40).map { |w| "#{w[0]}: #{number_with_delimiter(w[1])}" } + # counter = WordsCounted.count(entries_bodies) + # most_frequent = counter.token_frequency.first(400).select { |w| !Entry::COMMON_WORDS.include?(w[0]) }.first(40).map { |w| "#{w[0]}: #{number_with_delimiter(w[1])}" } avg_words = total_words / all_entries.count total_chars = entries_bodies.length @@ -161,8 +161,8 @@ namespace :entry do p "Avg words per post: #{number_with_delimiter(avg_words)}" p "Total characters: #{number_with_delimiter(total_chars)}" p "Avg characters per post: #{number_with_delimiter(avg_chars)} (#{avg_tweets_per_post} tweets)" - p "Most Frequent Words:" - puts most_frequent + # p "Most Frequent Words:" + # puts most_frequent p "*"*100 end