From 7b77b16e03f0d0f8d3e6ea8fefa199f56afec203 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 15:48:12 -0500 Subject: [PATCH 01/12] don't worry about empty-body documents --- app/jobs/document_mention_job.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/jobs/document_mention_job.rb b/app/jobs/document_mention_job.rb index 52c4cd5c..94b141a7 100644 --- a/app/jobs/document_mention_job.rb +++ b/app/jobs/document_mention_job.rb @@ -8,6 +8,7 @@ class DocumentMentionJob < ApplicationJob document = Document.find(document_id) return unless document.present? + return if document.body.nil? || document.body.empty? analysis = Documents::Analysis::DocumentAnalysisService.create_placeholder_analysis(document) From 6ab6ce5e9f2d95b10a3ba0cedb1399e93ec4a1e1 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 17:04:02 -0500 Subject: [PATCH 02/12] allow custom forums badges for premium uers --- app/views/thredded/users/_badge.html.erb | 11 +++++++---- .../20190813220011_add_forums_badge_to_users.rb | 5 +++++ db/schema.rb | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20190813220011_add_forums_badge_to_users.rb diff --git a/app/views/thredded/users/_badge.html.erb b/app/views/thredded/users/_badge.html.erb index 164b5ca3..07b46810 100644 --- a/app/views/thredded/users/_badge.html.erb +++ b/app/views/thredded/users/_badge.html.erb @@ -1,11 +1,14 @@ -<% badge_style = 'padding: 3px 5px; font-size: 70%; font-weight: normal;' %> +<% + badge_style = 'padding: 3px 5px; font-size: 70%; font-weight: normal;' + badge_text = user.try(:forums_badge_text) # using try() on release for zdd while machines reboot and get reference to this column, can be removed after +%> <% if user.respond_to?(:selected_billing_plan_id) %> <% if user.selected_billing_plan_id == 2 %> - Beta Tester + <%= badge_text || 'Beta Tester' %> <% elsif user.selected_billing_plan_id == 3 %> - Early Adopter + <%= badge_text || 'Early Adopter' %> <% elsif [4, 5, 6].include? user.selected_billing_plan_id %> - Premium Supporter + <%= badge_text || 'Premium Supporter' %> <% end %> <% end %> diff --git a/db/migrate/20190813220011_add_forums_badge_to_users.rb b/db/migrate/20190813220011_add_forums_badge_to_users.rb new file mode 100644 index 00000000..484892fb --- /dev/null +++ b/db/migrate/20190813220011_add_forums_badge_to_users.rb @@ -0,0 +1,5 @@ +class AddForumsBadgeToUsers < ActiveRecord::Migration[5.2] + def change + add_column :users, :forums_badge_text, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 1824c41e..f62e0e9e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_08_09_173934) do +ActiveRecord::Schema.define(version: 2019_08_13_220011) do create_table "api_keys", force: :cascade do |t| t.integer "user_id" @@ -2546,6 +2546,7 @@ ActiveRecord::Schema.define(version: 2019_08_09_173934) do t.string "age" t.string "gender" t.string "interests" + t.string "forums_badge_text" t.index ["deleted_at", "username"], name: "index_users_on_deleted_at_and_username" t.index ["deleted_at"], name: "index_users_on_deleted_at" t.index ["email"], name: "index_users_on_email", unique: true From 4378226cc0f1466ec95e303bd3a9f861ea85042d Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 17:12:33 -0500 Subject: [PATCH 03/12] differentiate admins from custom badges --- app/views/thredded/users/_badge.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/thredded/users/_badge.html.erb b/app/views/thredded/users/_badge.html.erb index 07b46810..3e9136c7 100644 --- a/app/views/thredded/users/_badge.html.erb +++ b/app/views/thredded/users/_badge.html.erb @@ -4,7 +4,9 @@ %> <% if user.respond_to?(:selected_billing_plan_id) %> - <% if user.selected_billing_plan_id == 2 %> + <% if user.id == 5 %> + <%= badge_text || 'Admin' %> + <% elsif user.selected_billing_plan_id == 2 %> <%= badge_text || 'Beta Tester' %> <% elsif user.selected_billing_plan_id == 3 %> <%= badge_text || 'Early Adopter' %> From 545061ce85c0bf4ecc6d5abae6f025b159d04169 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 17:25:17 -0500 Subject: [PATCH 04/12] allow users to customize their premium badge in settings --- app/controllers/registrations_controller.rb | 2 +- app/controllers/users_controller.rb | 1 + app/models/users/user.rb | 5 +++++ .../devise/registrations/panes/_information.html.erb | 10 ++++++++++ app/views/thredded/users/_badge.html.erb | 8 ++++---- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index 7051c3a7..0526038e 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -24,7 +24,7 @@ class RegistrationsController < Devise::RegistrationsController def account_update_params params.require(:user).permit( :name, :email, :username, :password, :password_confirmation, :email_updates, :fluid_preference, - :bio, :favorite_genre, :favorite_author, :interests, :age, :location, :gender + :bio, :favorite_genre, :favorite_author, :interests, :age, :location, :gender, :forums_badge_text ) end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index a451cd62..bdcac941 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -78,6 +78,7 @@ class UsersController < ApplicationController private def user_params + # todo is this used anywhere? params.permit(:id, :username) end end diff --git a/app/models/users/user.rb b/app/models/users/user.rb index c7e39d4e..56c1aaa6 100644 --- a/app/models/users/user.rb +++ b/app/models/users/user.rb @@ -17,6 +17,11 @@ class User < ApplicationRecord allow_blank: true, length: { maximum: 40 }, format: /\A[A-Za-z0-9\-_\$\+\!\*]+\z/ + + validates :forums_badge_text, + allow_nil: true, + allow_blank: true, + length: { maximum: 20 } has_many :subscriptions, dependent: :destroy has_many :billing_plans, through: :subscriptions diff --git a/app/views/devise/registrations/panes/_information.html.erb b/app/views/devise/registrations/panes/_information.html.erb index bf1e3dab..920d0174 100644 --- a/app/views/devise/registrations/panes/_information.html.erb +++ b/app/views/devise/registrations/panes/_information.html.erb @@ -45,6 +45,16 @@ + +
+
+
+ <%= f.label 'Custom Premium badge text' %>
+ <%= f.text_field :forums_badge_text, data: { length: 20 }, class: 'with-character-counter', placeholder: 'Premium Supporter' %> + Premium users can customize the badge that appears under their name on their profile and next to their name on the forums.
+
+
+
diff --git a/app/views/thredded/users/_badge.html.erb b/app/views/thredded/users/_badge.html.erb index 3e9136c7..4d8a2989 100644 --- a/app/views/thredded/users/_badge.html.erb +++ b/app/views/thredded/users/_badge.html.erb @@ -5,12 +5,12 @@ <% if user.respond_to?(:selected_billing_plan_id) %> <% if user.id == 5 %> - <%= badge_text || 'Admin' %> + <%= badge_text.presence || 'Admin' %> <% elsif user.selected_billing_plan_id == 2 %> - <%= badge_text || 'Beta Tester' %> + <%= badge_text.presence || 'Beta Tester' %> <% elsif user.selected_billing_plan_id == 3 %> - <%= badge_text || 'Early Adopter' %> + <%= badge_text.presence || 'Early Adopter' %> <% elsif [4, 5, 6].include? user.selected_billing_plan_id %> - <%= badge_text || 'Premium Supporter' %> + <%= badge_text.presence || 'Premium Supporter' %> <% end %> <% end %> From 33ccfde1b0f8c192157c7ce47c2cdc9b04691d7b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 17:51:41 -0500 Subject: [PATCH 05/12] don't let navigation breadcrumbs overlap page content on mobile --- app/assets/stylesheets/thredded-overrides.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/assets/stylesheets/thredded-overrides.scss b/app/assets/stylesheets/thredded-overrides.scss index c9605c50..fd44a5fd 100644 --- a/app/assets/stylesheets/thredded-overrides.scss +++ b/app/assets/stylesheets/thredded-overrides.scss @@ -6,6 +6,11 @@ padding-left: 16px; } + .thredded--navigation-breadcrumbs { + overflow: hidden; + max-height: 60px; + } + .thredded--user-navigation { height: 64px; } From 93df230f04d00f29130e9453b5d3dfcc94661815 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 18:03:38 -0500 Subject: [PATCH 06/12] fix forums navbar overlapping page content / thread titles --- app/assets/stylesheets/thredded-overrides.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/thredded-overrides.scss b/app/assets/stylesheets/thredded-overrides.scss index fd44a5fd..50052e80 100644 --- a/app/assets/stylesheets/thredded-overrides.scss +++ b/app/assets/stylesheets/thredded-overrides.scss @@ -12,7 +12,14 @@ } .thredded--user-navigation { - height: 64px; + height: 70px; + + margin-top: 10px; + margin-right: 10px; + + .thredded--user-navigation--item a { + padding: 0; + } } .thredded--currently-online { From fbbfcbf1ebe4d76d136f4c1046ff28db38f22a92 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 18:37:33 -0500 Subject: [PATCH 07/12] landing page polish --- app/views/main/index.html.erb | 53 ++++++++++++++++------------------- config/locales/en.yml | 28 +++++++++--------- 2 files changed, 38 insertions(+), 43 deletions(-) diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 1e42aa1c..ac5843d8 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -89,7 +89,6 @@
-
@@ -103,25 +102,24 @@
-

schedule

-
<%= t('marketing.landing_page.benefits.speed.title') %>
+

cloud

+
<%= t('marketing.landing_page.benefits.backups.title') %>

- <%= t('marketing.landing_page.benefits.speed.text') %> + <%= t('marketing.landing_page.benefits.backups.text') %>

-

assignment_turned_in

-
<%= t('marketing.landing_page.benefits.continuity.title') %>
+

security

+
<%= t('marketing.landing_page.benefits.ads.title') %>

- <%= t('marketing.landing_page.benefits.continuity.text') %> + <%= t('marketing.landing_page.benefits.ads.text') %>

-
-
+

face

@@ -144,15 +142,14 @@
-

security

-
<%= t('marketing.landing_page.benefits.items.title') %>
+

assignment_turned_in

+
<%= t('marketing.landing_page.benefits.continuity.title') %>

- <%= t('marketing.landing_page.benefits.items.text') %> + <%= t('marketing.landing_page.benefits.continuity.text') %>

-
-
+

search

@@ -173,18 +170,6 @@
-
-
-

cloud

-
<%= t('marketing.landing_page.benefits.backups.title') %>
-

- <%= t('marketing.landing_page.benefits.backups.text') %> -

-
-
-
- -

settings_ethernet

@@ -207,10 +192,20 @@
-

library_books

-
<%= t('marketing.landing_page.benefits.yours.title') %>
+

schedule

+
<%= t('marketing.landing_page.benefits.speed.title') %>

- <%= t('marketing.landing_page.benefits.yours.text') %> + <%= t('marketing.landing_page.benefits.speed.text') %> +

+
+
+ +
+
+

bar_chart

+
<%= t('marketing.landing_page.benefits.quality.title') %>
+

+ <%= t('marketing.landing_page.benefits.quality.text') %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index bbd448a0..ad7d4600 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -56,11 +56,15 @@ en: benefits: creativity: title: Promotes creativity - text: Your Notebook now asks you questions about your characters and ideas, and your answers are saved too. + text: Your notebook now asks you questions about your characters and ideas, and your answers are saved too. speed: - title: Speeds up writing - text: With a universe of information at your fingertips, you can look up anything quickly and keep writing. + title: Write faster + text: Reference any aspect of any page in your notebook without losing your momentum in our built-in document editor. + + quality: + title: Write better + text: Analyze your writing with a world-class AI that measures readability, style, emotion, and more. continuity: title: Continuity checks @@ -68,15 +72,15 @@ en: characters: title: Deeper characters - text: Get to know your characters. Track every detail of their thoughts, appearance, and personality. + text: Get to know your characters. Track every detail of their thoughts, appearance, family, and personality. locations: title: Richer worlds - text: Immerse yourself in vibrant worlds with tracking available for any kind of locations. + text: Immerse yourself in vibrant worlds with specialized notebook pages for your countries, cities, landmarks, and more. - items: - title: Legendary items - text: Every object has a backstory that can shine as bright as any character — if you let it. + ads: + title: No ads, ever + text: Rest easy knowing your notebook is safe and completely private by default, but shareable if you choose. search: title: Searchable @@ -84,7 +88,7 @@ en: organization: title: Organizable - text: Focus on one universe at a time and filter everything else out. Reorganize, sort, and write freely. + text: Focus on one universe at a time and automatically filter everything else out. Reorganize, sort, and write freely. backups: title: Backed up forever @@ -96,11 +100,7 @@ en: sharing: title: Brainstorm together - text: Invite anyone to review any content you decide to share. Sometimes a second set of eyes makes all the difference. - - yours: - title: Make it yours - text: Plan creatures, magic, scenes, and other page types specific to your world, tailored to you. + text: Invite anyone to review any pages you decide to share. Sometimes a second set of eyes makes all the difference. quote: text: Really clever and beautifully organized way for storytellers to create a world. From e67a43bf4fc291b8a8cfb760874a5cddba4766ea Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 18:56:28 -0500 Subject: [PATCH 08/12] polish writers landing page --- app/views/main/for_writers.html.erb | 42 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/main/for_writers.html.erb b/app/views/main/for_writers.html.erb index d32ad633..0281785f 100644 --- a/app/views/main/for_writers.html.erb +++ b/app/views/main/for_writers.html.erb @@ -63,7 +63,7 @@ body {
-
+

How do I use it?

@@ -81,12 +81,12 @@ body { items for any relevant objects or trinkets in your story.

- Once you've got the basics, just expand outward for your story! Right now, there are nine different page types you can - create in Notebook.ai. + Once you've got the basics, just expand outward for your story! Right now, there are <%= Rails.application.config.content_types[:all_non_universe].count %> different page types you can + create in Notebook.ai: <%= Rails.application.config.content_types[:all_non_universe].map { |t| t.name.downcase.pluralize }.to_sentence %>.

-
+
<%= image_tag 'screenshots/dashboard.png' %>
@@ -112,7 +112,7 @@ body {
-
+

Separate your worlds with Universes

@@ -129,7 +129,7 @@ body {

-
+
<%= image_tag 'screenshots/universe.png', class: 'left' %>
@@ -138,7 +138,7 @@ body {
<%= image_tag 'screenshots/quick-reference.png', class: 'right' %>
-
+

Build your world piece by piece with personalized writing prompts

@@ -164,7 +164,7 @@ body {

-
+

Keep your readers engrossed with a rich world of consistent details

@@ -189,7 +189,7 @@ body {

-
+
<%= image_tag 'screenshots/character.png', class: 'left' %>
@@ -198,7 +198,7 @@ body {
<%= image_tag 'screenshots/gallery.png', class: 'right' %>
-
+

Upload images for inspiration or reference

@@ -224,7 +224,7 @@ body {

-
+

Build family trees and organization hierarchies with ease

@@ -249,7 +249,7 @@ body {

-
+
<%= image_tag 'screenshots/family-tree.png', class: 'left' %>
@@ -262,10 +262,10 @@ body {
-

+

<%= link_to 'Start worldbuilding right now.', new_user_registration_path, class: 'white-text' %>

-
No card needed. Upgrade seamlessly any time.
+
No card needed. Upgrade or downgrade seamlessly any time.
@@ -338,10 +338,10 @@ body {
-

library_books

-
<%= t('marketing.landing_page.benefits.yours.title') %>
+

security

+
<%= t('marketing.landing_page.benefits.ads.title') %>

- <%= t('marketing.landing_page.benefits.yours.text') %> + <%= t('marketing.landing_page.benefits.ads.text') %>

@@ -358,7 +358,7 @@ body {

How much does it cost?

-
+

Creating core notebook pages (universes, characters, locations, and items) is free and doesn't require any payment information to start creating your novel's world immediately upon signup. Free users, however, @@ -374,12 +374,12 @@ body { Additionally, a Premium subscription also increases your image upload storage from 50MB to 10GB.

-
+
<% Rails.application.config.content_types[:all].each_with_index do |content_type, i| %> - + <%= content_type.icon %> - <%= '
'.html_safe if (i + 1) % 4 == 0 %> + <%= '
'.html_safe if (i + 1) % 6 == 0 %> <% end %>
From e5cc975705d268bb5bd04f9defa316f438014cb5 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 19:07:28 -0500 Subject: [PATCH 09/12] polish roleplayers landing page --- app/views/main/for_roleplayers.html.erb | 37 ++++++++++++------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/app/views/main/for_roleplayers.html.erb b/app/views/main/for_roleplayers.html.erb index 3b34839e..b6c482b9 100644 --- a/app/views/main/for_roleplayers.html.erb +++ b/app/views/main/for_roleplayers.html.erb @@ -63,7 +63,7 @@ body {
-
+

How do I use it?

@@ -86,7 +86,7 @@ body {

-
+
<%= image_tag 'screenshots/dashboard.png' %>
@@ -98,7 +98,7 @@ body {
- <% [Character, Location, Item, Creature, Race, Religion, Group, Magic, Language].each do |content_type| %> + <% Rails.application.config.content_types[:all_non_universe].each do |content_type| %>
<%= render partial: 'cards/intros/content_type_intro', locals: { content_type: content_type } %>
@@ -110,9 +110,8 @@ body {
-
-
+

Separate your worlds with Universes

@@ -130,7 +129,7 @@ body {

-
+
<%= image_tag 'screenshots/universe.png', class: 'left' %>
@@ -139,7 +138,7 @@ body {
<%= image_tag 'screenshots/sharing.png', class: 'right' %>
-
+

Share your campaign with players with easy privacy rules

@@ -172,7 +171,7 @@ body {

-
+

Keep your players engrossed with a rich world of consistent details

@@ -198,7 +197,7 @@ body {

-
+
<%= image_tag 'screenshots/character.png', class: 'left' %>
@@ -207,7 +206,7 @@ body {
<%= image_tag 'screenshots/gallery.png', class: 'right' %>
-
+

Upload images for inspiration or reference

@@ -233,7 +232,7 @@ body {

-
+

Build family trees and organization hierarchies with ease

@@ -258,7 +257,7 @@ body {

-
+
<%= image_tag 'screenshots/family-tree.png', class: 'left' %>
@@ -271,10 +270,10 @@ body {
-

+

<%= link_to 'Start worldbuilding right now.', new_user_registration_path, class: 'white-text' %>

-
No card needed. Upgrade seamlessly any time.
+
No card needed. Upgrade or downgrade seamlessly any time.
@@ -365,7 +364,7 @@ body {

How much does it cost?

-
+

Creating core notebook pages (universes, characters, locations, and items) is free and doesn't require any payment information to start creating your novel's world immediately upon signup. Free users, however, @@ -381,12 +380,12 @@ body { Additionally, a Premium subscription also increases your image upload storage from 50MB to 10GB.

-
- <% [Character, Location, Item, Creature, Race, Religion, Group, Magic, Language].each_with_index do |content_type, i| %> - +
+ <% Rails.application.config.content_types[:all].each_with_index do |content_type, i| %> + <%= content_type.icon %> - <%= '
'.html_safe if (i + 1) % 3 == 0 %> + <%= '
'.html_safe if (i + 1) % 6 == 0 %> <% end %>
From 9d6b0c710afbc536d5c059ad0c187d2fb40a6917 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 19:10:27 -0500 Subject: [PATCH 10/12] polish designers landing page --- app/views/main/for_designers.html.erb | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/views/main/for_designers.html.erb b/app/views/main/for_designers.html.erb index 055ae5a3..2c7005cf 100644 --- a/app/views/main/for_designers.html.erb +++ b/app/views/main/for_designers.html.erb @@ -63,7 +63,7 @@ body {
-
+

How do I use it?

@@ -86,7 +86,7 @@ body {

-
+
<%= image_tag 'screenshots/dashboard.png' %>
@@ -98,7 +98,7 @@ body {
- <% [Character, Location, Item, Creature, Race, Religion, Group, Magic, Language].each do |content_type| %> + <% Rails.application.config.content_types[:all_non_universe].each do |content_type| %>
<%= render partial: 'cards/intros/content_type_intro', locals: { content_type: content_type } %>
@@ -112,7 +112,7 @@ body {
-
+

Separate your worlds with Universes

@@ -131,7 +131,7 @@ body {

-
+
<%= image_tag 'screenshots/universe.png', class: 'left' %>
@@ -140,7 +140,7 @@ body {
<%= image_tag 'screenshots/sharing.png', class: 'right' %>
-
+

Share your game with your team with easy privacy rules

@@ -174,9 +174,9 @@ body {

-
+
-

Keep your game focused in a rich world of consistent details

+

Keep your world focused with consistent details

Having an in-depth reference while developing your game lets you quickly look up even the smallest of details when you need them and keep working uninterrupted. You'll never again have to flip backward to find out what quest rewards should be, or exactly how @@ -201,7 +201,7 @@ body {

-
+
<%= image_tag 'screenshots/character.png', class: 'left' %>
@@ -210,7 +210,7 @@ body {
<%= image_tag 'screenshots/gallery.png', class: 'right' %>
-
+

Upload images for inspiration or reference

@@ -236,7 +236,7 @@ body {

-
+

Export your entire notebook in more and more formats

@@ -253,7 +253,7 @@ body {

-
+
<%= image_tag 'screenshots/exporting.png', class: 'left' %>
@@ -266,7 +266,7 @@ body {
-

+

<%= link_to 'Start worldbuilding right now.', new_user_registration_path, class: 'white-text' %>

No card needed. Upgrade seamlessly any time.
@@ -360,7 +360,7 @@ body {

How much does it cost?

-
+

Creating core notebook pages (universes, characters, locations, and items) is free and doesn't require any payment information to start creating your novel's world immediately upon signup. Free users, however, @@ -376,12 +376,12 @@ body { Additionally, a Premium subscription also increases your image upload storage from 50MB to 10GB.

-
- <% [Character, Location, Item, Creature, Race, Religion, Group, Magic, Language].each_with_index do |content_type, i| %> - +
+ <% Rails.application.config.content_types[:all].each_with_index do |content_type, i| %> + <%= content_type.icon %> - <%= '
'.html_safe if (i + 1) % 3 == 0 %> + <%= '
'.html_safe if (i + 1) % 6 == 0 %> <% end %>
From 2083c21294aaa2a5b3541147e9819e7b5ece1f5b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 20:10:15 -0500 Subject: [PATCH 11/12] add cta for document analysis on dashboard --- app/views/main/dashboard.html.erb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index 23ca3072..a69e8591 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -69,22 +69,24 @@ l_width = 6 %> - <% unless true || current_user.notice_dismissals.where(notice_id: 1).any? %> + <% unless current_user.notice_dismissals.where(notice_id: 2).any? %>
"> -
+

- School, Sport, and Food pages + Analyze your writing with world-class AI

- To celebrate the launch of our three new Premium pages, - you can now create as many School pages as you'd like during the month of June! + Premium users can now analyze their documents — and the characters within them — for readability, style, emotion with IBM Watson's AI. +

+
+

+ Learn more at our blog post below:

-
- <%= link_to 'Read more', 'https://www.notebook.ai/forum/announcements/new-page-types-food-sports-and-schools-and-a-special-surprise', class: 'white-text' %> - <%= link_to 'Customize my pages', main_app.customization_content_types_path, class: 'white-text' %> +
+ <%= link_to 'Read more', 'https://medium.com/indent-labs/adding-the-ai-to-notebook-ai-950f44d231e5', class: 'white-text' %> <%= link_to 'Dismiss', notice_dismissal_dismiss_path(notice_id: 1), class: 'white-text right' %>
From fe373b3456dc49e6ba8e56264b17bf09d5e7c8e5 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 13 Aug 2019 22:01:32 -0500 Subject: [PATCH 12/12] polish cta --- app/views/main/dashboard.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/main/dashboard.html.erb b/app/views/main/dashboard.html.erb index a69e8591..8037127a 100644 --- a/app/views/main/dashboard.html.erb +++ b/app/views/main/dashboard.html.erb @@ -78,7 +78,7 @@ Analyze your writing with world-class AI

- Premium users can now analyze their documents — and the characters within them — for readability, style, emotion with IBM Watson's AI. + Premium users can now analyze their documents — and the characters within them — for readability, style, and emotion with IBM Watson's AI.


@@ -86,7 +86,7 @@

- <%= link_to 'Read more', 'https://medium.com/indent-labs/adding-the-ai-to-notebook-ai-950f44d231e5', class: 'white-text' %> + <%= link_to 'Read more', 'https://medium.com/indent-labs/adding-the-ai-to-notebook-ai-950f44d231e5', target: '_new', class: 'white-text' %> <%= link_to 'Dismiss', notice_dismissal_dismiss_path(notice_id: 1), class: 'white-text right' %>