Compare commits

...

11 commits

Author SHA1 Message Date
Connor Turland
7224d02c20 make confirmations work 2017-10-18 19:35:40 -04:00
Connor Turland
4f6c93e86e add confirmable 2017-10-16 18:40:48 -04:00
Connor Turland
1b7acd72e1 remove request page and config for UTS 2017-10-15 22:23:16 -04:00
Connor Turland
e824dbb8f2 Merge branch 'homepage.good' into instance/uts 2017-10-15 21:09:28 -04:00
Connor Turland
3c0c937c55 fixup after rebase 2017-10-15 21:08:09 -04:00
Connor Turland
ede0adf1fd ensure logo is in front of nodes 2017-10-15 16:09:10 -04:00
Connor Turland
08e03c11f6 homepage work first draft 2017-10-15 16:09:10 -04:00
Connor Turland
292d31aa1e content 2017-10-15 16:09:10 -04:00
Connor Turland
a638f39008 Merge pull request #1152 from metamaps/Connoropolous-patch-1
perms:fix needs to run after assets:precompile
2017-10-15 16:04:35 -04:00
Connor Turland
f8d2817acb Update extensions.rake 2017-10-15 14:02:22 -04:00
Metamaps on Linode
3e563fb2ae uts customizations 2017-10-15 13:12:43 -04:00
31 changed files with 274 additions and 189 deletions

View file

@ -1 +1 @@
metamaps
metamaps_uts

File diff suppressed because one or more lines are too long

View file

@ -222,7 +222,6 @@ button.button.btn-no:hover {
}
.new_user{
height: 412px;
margin-left:-166px;
box-shadow: 0px 3px 3px rgba(0, 0, 0, 0.23), 0px 3px 3px rgba(0, 0, 0, 0.16);
font-family: din-medium;

View file

@ -18,10 +18,26 @@
font-weight: normal;
font-style: normal;
}
.backface-visible {
-webkit-backface-visibility: visible !important;
backface-visibility: visible !important;
@font-face {
font-family: 'noto-sans-regular';
src: url(<%= asset_path 'Fonts/notosansui-regular-webfont.woff2' %>) format('woff2'),
url(<%= asset_path 'Fonts/notosansui-regular-webfont.woff' %>) format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'noto-sans-bold';
src: url(<%= asset_path 'Fonts/notosansui-bold-webfont.woff2' %>) format('woff2'),
url(<%= asset_path 'Fonts/notosansui-bold-webfont.woff' %>) format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'noto-sans-bold-italic';
src: url(<%= asset_path 'Fonts/notosansui-bolditalic-webfont.woff2' %>) format('woff2'),
url(<%= asset_path 'Fonts/notosansui-bolditalic-webfont.woff' %>) format('woff');
font-weight: normal;
font-style: normal;
}
#yield {
@ -227,119 +243,109 @@
/* end map wrapper */
/* yield */
/* homepage */
.famousYield {
overflow-y:auto;
body.unauthenticated.action-home {
background: white;
font-family: 'noto-sans', sans-serif;
font-weight: 200;
}
/* homepage */
.home {
position: absolute;
width: 100%;
height: 100%;
}
.homeLogo {
position: fixed;
top: 10px;
left: 20px;
font-family: 'noto-sans-bold-italic', sans-serif;
font-size: 22px;
color: #6D6D6D;
z-index: 1;
}
#particles-bg {
position: absolute;
top: 0;
width: 100%;
height: 100%;
}
.homeWrapper.homeText {
margin-top: 5%;
}
.fullWidthWrapper {
width: 100%;
}
.fullWidthWrapper.withVideo {
height: 315px;
background: #757575;
}
.homeWrapper {
box-sizing: border-box;
position: relative;
z-index: 1;
border-radius: 3px;
color: #6D6D6D;
text-align: center;
padding: 30px;
background: white;
opacity: 0.8;
}
@media only screen and (max-width : 800px) {
.homeWrapper {
width: 90%;
margin: 0 5%;
}
}
@media only screen and (min-width : 801px) {
.homeWrapper {
width: 800px;
margin: 0 auto;
color: #424242;
}
}
.homeTitle {
font-size: 64px;
line-height: 48px;
text-align: center;
line-height: 70px;
margin-bottom: 20px;
font-family: 'noto-sans-bold', sans-serif;
}
.homeIntro {
font-size: 22px;
line-height: 26px;
text-align: justify;
margin: 32px 0 20px;
font-family: 'din-regular', helvetica, sans-serif;
}
.homeIntro div {
margin: 20px 0;
}
.homeWrapper .green {
color: #4fc059;
}
.homeWrapper .din-medium {
font-family: 'din-medium', helvetica, sans-serif;
.homeWrapper .purple {
color: #a354cd;
}
.homeWrapper .yellow {
color: #dab539;
}
.homeVideo {
margin-bottom: 20px;
float: left;
.ctaContainer {
margin: 0 auto;
}
.homeWrapper .callToAction {
float: left;
width: 216px;
padding: 8px 0 8px 24px;
color: #F5F5F5;
}
.callToAction h3 {
font-size: 24px;
}
.callToAction p {
margin: 8px 0 16px;
font-size: 13px;
line-height: 16px;
font-family: 'din-regular', helvetica, sans-serif;
text-align: left;
}
.callToAction a, .callToAction button {
display: block;
.requestInviteCTA {
display: inline-block;
width: 220px;
height: 12px;
font-size: 20px;
padding: 16px 0;
text-align: center;
border-radius: 2px;
font-size: 12px;
box-shadow: 0px 1px 1.5px rgba(0,0,0,0.12), 0 1px 1px rgba(0,0,0,0.24);
margin: 0 auto;
color: #FFFFFF;
box-sizing: content-box;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
.callToAction .requestInviteCTA {
background-color: #4fc059;
margin-bottom: 12px;
}
.callToAction .requestInviteCTA:hover {
background-color: #49ad4e;
}
.callToAction .exploreFeaturedCTA {
background-color: #a354cd;
margin-bottom: 12px;
}
.callToAction .exploreFeaturedCTA:hover {
background-color: #9150bc;
}
.callToAction .learnMoreCTA {
background-color: #4fb5c0;
margin-bottom: 12px;
}
.callToAction .learnMoreCTA:hover {
background-color: #419599;
border-radius: 3px;
border: 2px solid #a354cd;
margin: 12px 12px;
color: #a354cd;
font-family: 'noto-sans-bold', sans-serif;
}
.requestInviteCTA:hover {
.fullWidthWrapper.withPartners {
background: url(<%= asset_path('homepage_bg_fade.png') %>) no-repeat center -300px;
}
.homeWrapper.homePartners {
padding: 64px 0 280px;
height: 96px;
}
/* end home page */

View file

@ -60,19 +60,6 @@
.homeIntro {
text-align: left;
}
.fullWidthWrapper.withVideo {
height: auto;
}
.homeVideo {
width: 100% !important;
height: auto;
}
.fullWidthWrapper.withPartners {
display: none;
}
.learnMoreCTA {
display: none !important;
}
#yield {
padding-top: 50px;

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
module Users
class ConfirmationsController < Devise::ConfirmationsController
private
def after_confirmation_path_for(resource_name, resource)
sign_in_path
end
end
end

View file

@ -7,6 +7,10 @@ module Users
protected
def after_inactive_sign_up_path_for(resource)
sign_in_path
end
def after_update_path_for(resource)
signed_in_root_path(resource)
end

View file

@ -17,9 +17,7 @@ class User < ApplicationRecord
has_many :following, class_name: 'Follow'
after_create :generate_code
devise :database_authenticatable, :recoverable, :rememberable, :trackable, :registerable
devise :database_authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :registerable
serialize :settings, UserPreference
@ -35,8 +33,7 @@ class User < ApplicationRecord
validates :email, presence: true # done by devise
validates :name, uniqueness: true # done by devise
validates :email, uniqueness: true # done by devise
validates :joinedwithcode, presence: true, inclusion: { in: $codes, message: '%{value} is not valid' }, on: :create
validates_format_of :email, with: /\@uts\.edu\.au/, message: ' must end with @uts.edu.au'
# This method associates the attribute ":image" with a file attachment
has_attached_file :image, styles: {

View file

@ -87,20 +87,6 @@
</div>
<% if current_user %>
<div class="lightboxContent" id="invite">
<h3>SHARE INVITE</h3>
<div class="leaveSpace"></div>
<p>The Metamaps platform is currently in an invite-only beta with the express purpose of creating a high value knowledge ecosystem, a diverse community of contributors and a culture of collaboration and curiosity.</p>
<p>As a valued beta tester, you have the ability to invite your peers, colleagues and collaborators onto the platform.</p>
<p>Below is a personal invite link containing your unique access code, which can be used multiple times.</p>
<div id="joinCodesBox">
<p class="joinCodes"><%= invite_link() %>
<button class="button" onclick="Metamaps.GlobalUI.shareInvite('<%= @invite_link %>');">COPY INVITE LINK!</button>
</div>
</div>
<div class="lightboxContent" id="forkmap">
<%= render :partial => 'shared/forkmap' %>
</div>

View file

@ -7,33 +7,29 @@
<% content_for :title, "Home | Metamaps" %>
<% content_for :mobile_title, "Home" %>
<div id="yield">
<div class="home">
<div id="particles-bg"></div>
<div class="homeWrapper homeText">
<div class="homeTitle">Make Sense with Metamaps</div>
<div class="homeTitle">Make sense, together.</div>
<div class="homeIntro">
<span class="green din-medium">METAMAPS.CC</span> is a free and open source platform that supports real-time sense-making, distributed collaboration, and the creative intelligence of individuals, organizations and communities. We are currently in an <span class="din-medium">invite-only beta.</span>
</div>
</div>
<div class="fullWidthWrapper withVideo">
<div class="homeWrapper">
<iframe class="homeVideo" src="https://player.vimeo.com/video/113154814" width="560" height="315" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<div class="callToAction">
<h3>Who finds it useful?</h3>
<p>Designers, inventors, artists, educators, strategists, consultants, facilitators, entrepreneurs, systems thinkers, changemakers, analysts, students, researchers... maybe you!</p>
<button type="button" class="button learnMoreCTA" onclick="Metamaps.GlobalUI.openLightbox('about');">LEARN MORE</button>
<a href="/explore/featured" data-router="true" class="exploreFeaturedCTA">EXPLORE FEATURED MAPS</a>
<a href="/request" class="requestInviteCTA">REQUEST INVITE</a>
<div>Untangle complex conversations, expand perspectives, and gain insights
about the things that matter to you.
</div>
<div>Metamaps enables individual and collaborative sensemaking through
<span class="purple">concept mapping</span>, <span class="green">live video + text chat</span>, and a <span class="yellow">shared knowledge graph</span>.
</div>
<div>The University of Technology Sydney is using Metamaps
to share knowledge, and think better together.
</div>
<div>
<a href="/join" class="requestInviteCTA">SIGN UP</a>
<a href="/login" class="requestInviteCTA">LOG IN</a>
</div>
<div class="clearfloat"></div>
</div>
</div>
<div class="fullWidthWrapper withPartners">
<div class="homeWrapper homePartners">
<% # our partners %>
</div>
</div>
</div><!-- end yield -->
<%= javascript_include_tag "particles-bg" %>
<script>
Metamaps.currentSection = ''
Metamaps.currentPage = ''

View file

@ -1,10 +0,0 @@
<%#
# @file
# Located at /request
# Shows a form where people can request an invite
#%>
<% content_for :title, "Request Invite | Metamaps" %>
<% content_for :mobile_title, "Request Invite" %>
<div class="requestInviteHeader"></div>
<iframe class="requestInvite" src="https://docs.google.com/forms/d/1lWoKPFHErsDfV5l7-SvcHxwX3vDi9nNNVW0rFMgJwgg/viewform?embedded=true" width="700" frameborder="0" marginheight="0" marginwidth="0">Loading...</iframe>

View file

@ -8,5 +8,3 @@
<div><%= f.submit "Resend confirmation instructions" %></div>
<% end %>
<%= render "devise/shared/links" %>

View file

@ -36,9 +36,8 @@
<%= form.label :name, "Name:", class: 'firstFieldText' %>
<%= form.text_field :name %>
</div>
<div>
<%= form.label :email, "Email:", class: 'firstFieldText' %>
<%= form.email_field :email %>
<div class="firstFieldText">
Email: <%= @user.email %>
</div>
<div>
<%= form.label :emails_allowed, class: 'firstFieldText' do %>

View file

@ -6,6 +6,11 @@
<h3>Sign Up</h3>
<div class="fieldText">
Only email addresses at the uts.edu.au domain name will be able to register.
All users must verify their email address.
</div>
<div><%= f.label :name, "Name:", :class => "firstFieldText" %>
<%= f.text_field :name, :autofocus => true %></div>
@ -18,12 +23,6 @@
<div><%= f.label :password_confirmation, "Password Confirmation:", :class => "fieldText" %>
<%= f.password_field :password_confirmation %></div>
<div><%= f.label "Access Code:", :class => "fieldText" %>
<%= f.text_field :joinedwithcode, :value => params[:code] %></div>
<div><%= f.submit "Sign up!" %></div>
<div class = "smallText"><br />Don't have an access code?<br /><a href="/request">Request an Invite</a></div>
<div><%= f.submit "Sign up" %></div>
<% end %>
</div>

View file

@ -0,0 +1,22 @@
#!/bin/bash
cd /home/metamaps/uts.metamaps.cc/
date
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
source "/usr/local/rvm/scripts/rvm"
else
printf "ERROR: An RVM installation was not found.\n"
exit 1
fi
VERSION="$(cat .ruby-version)"
GEMSET="$(cat .ruby-gemset)"
rvm use ${VERSION}@${GEMSET}
source .env
bundle exec rake metamaps:deliver_map_activity_emails
echo ""

View file

@ -9,5 +9,5 @@ Rails.application.configure do
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w( application-secret.css application-secret.js webpacked/metamaps.bundle.js )
config.assets.precompile += %w( application-secret.css application-secret.js particles-bg.js webpacked/metamaps.bundle.js )
end

View file

@ -116,7 +116,7 @@ Devise.setup do |config|
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed new email is stored in
# unconfirmed email column, and copied to email column on successful confirmation.
config.reconfirmable = true
config.reconfirmable = false
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]

View file

@ -4,7 +4,6 @@ Metamaps::Application.routes.draw do
mount ActionCable.server => '/cable'
root to: 'main#home', via: :get
get 'request', to: 'main#requestinvite', as: :request
namespace :explore do
get 'active'
@ -98,6 +97,7 @@ Metamaps::Application.routes.draw do
resources :tokens, only: [:new]
devise_for :users, skip: :sessions, controllers: {
confirmations: 'users/confirmations',
registrations: 'users/registrations',
passwords: 'users/passwords',
sessions: 'users/sessions'

View file

@ -0,0 +1,20 @@
class AddConfirmableToDevise < ActiveRecord::Migration[5.0]
# Note: You can't use change, as User.update_all will fail in the down migration
def up
add_column :users, :confirmation_token, :string
add_column :users, :confirmed_at, :datetime
add_column :users, :confirmation_sent_at, :datetime
# add_column :users, :unconfirmed_email, :string # Only if using reconfirmable
add_index :users, :confirmation_token, unique: true
# User.reset_column_information # Need for some types of updates, but not for update_all.
# To avoid a short time window between running the migration and updating all existing
# users as confirmed, do the following
User.all.update_all confirmed_at: DateTime.now
# All existing user accounts should be able to log in after this.
end
def down
remove_columns :users, :confirmation_token, :confirmed_at, :confirmation_sent_at
# remove_columns :users, :unconfirmed_email # Only if using reconfirmable
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170903180840) do
ActiveRecord::Schema.define(version: 20171016214309) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -359,6 +359,10 @@ ActiveRecord::Schema.define(version: 20170903180840) do
t.datetime "image_updated_at"
t.integer "generation"
t.boolean "emails_allowed", default: true
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
end

View file

@ -28,14 +28,6 @@ class AccountMenu extends Component {
<div className="accountIcon"></div>
<a href="/metacodes">Admin</a>
</li>
<li className="accountListItem accountApps">
<div className="accountIcon"></div>
<a href="/oauth/authorized_applications">Apps</a>
</li>
<li className="accountListItem accountInvite" onClick={onInviteClick}>
<div className="accountIcon"></div>
<span>Share Invite</span>
</li>
<li className="accountListItem accountLogout">
<div className="accountIcon"></div>
<a id="Logout" href="/logout">Sign Out</a>

View file

@ -12,19 +12,25 @@ class UpperLeftUI extends Component {
onRequestClick: PropTypes.func
}
static contextTypes = {
location: PropTypes.object
}
render () {
const { map, currentUser, userRequested, requestAnswered, requestApproved, onRequestClick } = this.props
const { pathname } = this.context.location
const unauthedHome = pathname === '/' && !currentUser
return <div className="upperLeftUI">
<div className="homeButton">
{currentUser && <Link to="/">METAMAPS</Link>}
{!currentUser && <a href="/">METAMAPS</a>}
</div>
<div className="sidebarSearch">
{!unauthedHome && <div className="sidebarSearch">
<input type="text" className="sidebarSearchField" placeholder="Search for topics, maps, and mappers..." />
<div id="searchLoading"></div>
<div className="sidebarSearchIcon"></div>
<div className="clearfloat"></div>
</div>
</div>}
{map && !map.authorizeToEdit(currentUser) && <div className="viewOnly">
<div className="eyeball">View Only</div>
{currentUser && !userRequested && <div className="requestAccess requestNotice" onClick={onRequestClick}>Request Access</div>}

View file

@ -18,6 +18,10 @@ class UpperRightUI extends Component {
openInviteLightbox: PropTypes.func
}
static contextTypes = {
location: PropTypes.object
}
constructor(props) {
super(props)
this.state = {
@ -52,6 +56,8 @@ class UpperRightUI extends Component {
notifications, fetchNotifications, openInviteLightbox,
markAsRead, markAsUnread } = this.props
const { accountBoxOpen, notificationsBoxOpen } = this.state
const { pathname } = this.context.location
const unauthedHome = pathname === '/' && !currentUser
return <div className="upperRightUI">
{currentUser && <a href="/maps/new" target="_blank" className="addMap upperRightEl upperRightIcon">
<div className="tooltipsUnder">
@ -69,7 +75,7 @@ class UpperRightUI extends Component {
markAsUnread={markAsUnread}
toggleNotificationsBox={this.toggleNotificationsBox}/>}
</span>}
{!signInPage && <div className="sidebarAccount upperRightEl">
{!signInPage && !unauthedHome && <div className="sidebarAccount upperRightEl">
<div className="sidebarAccountIcon ignore-react-onclickoutside" onClick={this.toggleAccountBox}>
<div className="tooltipsUnder">Account</div>
{currentUser && <img src={currentUser.get('image')} />}

View file

@ -76,12 +76,12 @@ class App extends Component {
mobileTitleWidth={mobileTitleWidth}
onTitleClick={mobileTitleClick}
serverData={serverData} />}
{!unauthedHome && <UpperLeftUI currentUser={currentUser}
map={map}
userRequested={userRequested}
requestAnswered={requestAnswered}
requestApproved={requestApproved}
onRequestClick={onRequestAccess} />}
<UpperLeftUI currentUser={currentUser}
map={map}
userRequested={userRequested}
requestAnswered={requestAnswered}
requestApproved={requestApproved}
onRequestClick={onRequestAccess} />
{!mobile && <UpperRightUI currentUser={currentUser}
unreadNotificationsCount={unreadNotificationsCount}
notifications={notifications}
@ -91,7 +91,6 @@ class App extends Component {
openInviteLightbox={openInviteLightbox}
signInPage={pathname === '/login'} />}
<Toast message={toast} />
{!mobile && currentUser && <a className='feedback-icon' target='_blank' href='https://hylo.com/c/metamaps/tag/feedback'></a>}
{children}
</div>
}

View file

@ -11,5 +11,9 @@ namespace :assets do
end
end
# run before
Rake::Task[:'assets:precompile'].enhance([:'assets:js_compile'])
Rake::Task[:'assets:precompile'].enhance([:'assets:production_ready'])
# run after
Rake::Task[:'assets:precompile'].enhance do
Rake::Task[:'assets:production_ready'].invoke
end