diff --git a/app/assets/javascripts/initializers/initScrolling.js.erb b/app/assets/javascripts/initializers/initScrolling.js.erb index 463dedf7a..0d1dcbea3 100644 --- a/app/assets/javascripts/initializers/initScrolling.js.erb +++ b/app/assets/javascripts/initializers/initScrolling.js.erb @@ -73,10 +73,8 @@ function insertVideos(video_articles) { video_articles.forEach(function(video_article){ var existingEl = document.getElementById("video-article-"+video_article.id); if(!existingEl) { - console.log('existing') var newHTML = buildVideoArticleHTML(video_article) newVideosHTML += newHTML - console.log(newHTML) } }); @@ -87,7 +85,6 @@ function insertVideos(video_articles) { var singleArticles = document.getElementsByClassName("single-article"); var lastElement = singleArticles[singleArticles.length - 1]; insertAfter(newNode, lastElement); - console.log(nextPage) if (nextPage > 0) { fetching = false; } diff --git a/app/assets/stylesheets/user-profile-header.scss b/app/assets/stylesheets/user-profile-header.scss index dedb48dac..5266845b1 100644 --- a/app/assets/stylesheets/user-profile-header.scss +++ b/app/assets/stylesheets/user-profile-header.scss @@ -392,45 +392,62 @@ border: 1px solid #d6d6d6; box-shadow: 3px 3px 0px #bababa; border-radius: 3px; - max-width: 90%; - width: 80%; + max-width: 95%; + width: 600px; .message-form { display: flex; - flex-direction: row; + flex-direction: column; flex-wrap: nowrap; justify-content: space-around; align-items: center; align-content: stretch; - + @media screen and ( min-width: 500px ){ + flex-direction: row; + } textarea { border-radius: 3px; border: 1px solid #d6d6d6; font-size: 14px; margin: 10px; padding: 5px; - width: calc(100% - 100px); + width: calc(100% - 50px); order: 1; flex-grow: 1; + height: 80px; resize: vertical; - max-height:30%; + max-height:50vh; + @media screen and ( min-width: 500px ){ + width: calc(100% - 100px); + } } .submit-message { - margin: 10px 10px 10px 0; + margin: 0px auto; border-radius: 3px; background: $dark-purple; font-weight: 600px; font-family: $helvetica-condensed; - width: 80px; + width: 220px; color: white; - font-size: 18px; - height: 80px; + font-size: 17px; + height: 40px; order: 10; flex-grow: 1; + border: 0px; + @media screen and ( min-width: 500px ){ + margin: 10px 10px 10px 0; + width: 82px; + height: 80px; + } } } - + p { + color: $dark-gray; + font-size: 0.8em; + margin: 5px auto; + width: 96%; + } .close-modal { position: absolute; right: 10px; diff --git a/app/javascript/chat/content.jsx b/app/javascript/chat/content.jsx index fa3ec5328..dc7737531 100644 --- a/app/javascript/chat/content.jsx +++ b/app/javascript/chat/content.jsx @@ -14,7 +14,6 @@ export default class Content extends Component { }; render() { - console.log(this.props); if (!this.props.resource) { return ''; } diff --git a/app/policies/user_policy.rb b/app/policies/user_policy.rb index 50408eede..ada727199 100644 --- a/app/policies/user_policy.rb +++ b/app/policies/user_policy.rb @@ -87,6 +87,7 @@ class UserPolicy < ApplicationPolicy feed_mark_canonical feed_url gitlab_url + inbox_guidelines linkedin_url location looking_for_work diff --git a/app/views/users/_misc.html.erb b/app/views/users/_misc.html.erb index e2cb552c7..b5fb9f6f7 100644 --- a/app/views/users/_misc.html.erb +++ b/app/views/users/_misc.html.erb @@ -159,6 +159,16 @@
<%= f.select :inbox_type, [["Open", "open"], ["Private", "private"]] %>
+ <%= f.label :inbox_guidelines, "Open inbox guidelines/instructions (optional)" %> +
+ <%= f.text_area :inbox_guidelines, maxlength: 200, placeholder: "For example: + +- Only contact me about consulting opportunities. +- I'm happy to help beginners with CSS. +- Allow for a few days to respond. +- etc. + " %> +
<%= f.submit "SUBMIT", class: "cta" %> <% end %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 3b542b611..9d4b5b0ba 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -117,10 +117,17 @@
<%= render "articles/user_metadata", context: "profile" %> diff --git a/db/migrate/20190417171019_add_inbox_instructions_to_users.rb b/db/migrate/20190417171019_add_inbox_instructions_to_users.rb new file mode 100644 index 000000000..7cfbd3045 --- /dev/null +++ b/db/migrate/20190417171019_add_inbox_instructions_to_users.rb @@ -0,0 +1,5 @@ +class AddInboxInstructionsToUsers < ActiveRecord::Migration[5.2] + def change + add_column :users, :inbox_guidelines, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 9d5d14efc..993e2f198 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_04_12_093614) do +ActiveRecord::Schema.define(version: 2019_04_17_171019) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -810,6 +810,7 @@ ActiveRecord::Schema.define(version: 2019_04_12_093614) do t.datetime "github_repos_updated_at", default: "2017-01-01 05:00:00" t.string "github_username" t.string "gitlab_url" + t.string "inbox_guidelines" t.string "inbox_type", default: "private" t.jsonb "language_settings", default: {}, null: false t.datetime "last_article_at", default: "2017-01-01 05:00:00"