diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/about/brochure.ejs | 12 | ||||
| -rw-r--r-- | views/partials/edit-subscription.ejs | 33 | ||||
| -rw-r--r-- | views/profile.ejs | 82 |
3 files changed, 84 insertions, 43 deletions
diff --git a/views/about/brochure.ejs b/views/about/brochure.ejs index cffa51f..1c808f8 100644 --- a/views/about/brochure.ejs +++ b/views/about/brochure.ejs @@ -35,9 +35,9 @@ <li> [[ if (! logged_in) { ]] <button href="/signup">Sign Up</button> - [[ } else if (! profile.plan_level || profile.plan_level < plan.level) { ]] - <button href="https://vvalls.recurly.com/subscribe/basic/[[- profile._id ]]/[[- profile.username ]]">Buy Now</button> - [[ } else if (profile.plan_level == plan.level) { ]] + [[ } else if (! user.plan_level || user.plan_level < plan.level) { ]] + <button href="https://vvalls.recurly.com/subscribe/basic/[[- user._id ]]/[[- user.username ]]">Buy Now</button> + [[ } else if (user.plan_level == plan.level) { ]] Current Level [[ } else { ]] [[ } ]] @@ -57,9 +57,9 @@ <li> [[ if (! logged_in) { ]] <button href="/signup">Sign Up</button> - [[ } else if (! profile.plan_level || profile.plan_level < plan.level) { ]] - <button href="https://vvalls.recurly.com/subscribe/pro/[[- profile._id ]]/[[- profile.username ]]">Buy Now</button> - [[ } else if (profile.plan_level == plan.level) { ]] + [[ } else if (! user.plan_level || user.plan_level < plan.level) { ]] + <button href="https://vvalls.recurly.com/subscribe/pro/[[- user._id ]]/[[- user.username ]]">Buy Now</button> + [[ } else if (user.plan_level == plan.level) { ]] Current Level [[ } ]] </ul> diff --git a/views/partials/edit-subscription.ejs b/views/partials/edit-subscription.ejs new file mode 100644 index 0000000..0aa5281 --- /dev/null +++ b/views/partials/edit-subscription.ejs @@ -0,0 +1,33 @@ +<div class="mediaDrawer fixed animate editSubscription"> + <span class="close">X</span> + <div id="form_container"> + <form enctype="multipart/form-data" method="post"> + <input type="hidden" name="_csrf" value="[[- token ]]"> + <ul> + <li class="section_break"> + <h3>Edit Subscription</h3> + </li> + <li> + [[ if (! user.plan_level) { ]] + You are currently using the free plan. For access to all of Vvalls features, + consider upgrading to a paid plan. + <p> + <a href="/about/brochure">View the Plans</a> + [[ } else { ]] + Your current plan level is XXX + You have been a member since XXX + $cost/month OR $cost/year + + You are using N basic layouts + Buy more + + You are using N pro layouts + Buy more / Upgrade your account + + Cancel your subscription + [[ } ]] + </li> + </ul> + </form> + </div> +</div> diff --git a/views/profile.ejs b/views/profile.ejs index 88af6b0..e149847 100644 --- a/views/profile.ejs +++ b/views/profile.ejs @@ -9,48 +9,53 @@ [[- include partials/header ]] <div class="profilepage"> - [[ if (profile.photo && profile.photo.length) { ]] - <div class="profilePic" style="background-image:url([[- profile.photo ]])"> - </div> - [[ } else { ]] - <div class="profilePic noPic"> - <span class="holder"> - <span class="ion-ios7-person-outline"></span> - [[ if (isOwnProfile) { ]] - <div>click to add profile pic</div> - <input id="profile_avatar" name="avatar" class="element file" type="file"> - [[ } ]] - </span> - </div> + [[ if (profile.photo && profile.photo.length) { ]] + <div class="profilePic" style="background-image:url([[- profile.photo ]])"> + </div> + [[ } else { ]] + <div class="profilePic noPic"> + <span class="holder"> + <span class="ion-ios7-person-outline"></span> + [[ if (isOwnProfile) { ]] + <div>click to add profile pic</div> + <input id="profile_avatar" name="avatar" class="element file" type="file"> [[ } ]] - <div class="bio"> - <div class="holder"> - <h2>[[- profile.displayName ]]</h2> - [[ if (profile.location) { ]] - <span> - [[- profile.location ]] - </span> - [[ } ]] - [[ if (profile.website && profile.website.length) { ]] - <span> - <a href="[[- profile.website ]]" target="_blank">[[- profile.website ]]</a> - </span> - [[ } ]] - [[ if (profile.twitterName && profile.twitterName.length) { ]] - <span> - <a href="https://twitter.com/[[- profile.twitterName ]]" target="_blank">@[[- profile.twitterName ]]</a> - </span> - [[ } ]] - </div> - </div> - + </span> + </div> + [[ } ]] + <div class="bio"> + <div class="holder"> + <h2>[[- profile.displayName ]]</h2> + [[ if (profile.location) { ]] + <span> + [[- profile.location ]] + </span> + [[ } ]] + [[ if (profile.website && profile.website.length) { ]] + <span> + <a href="[[- profile.website ]]" target="_blank">[[- profile.website ]]</a> + </span> + [[ } ]] + [[ if (profile.twitterName && profile.twitterName.length) { ]] + <span> + <a href="https://twitter.com/[[- profile.twitterName ]]" target="_blank">@[[- profile.twitterName ]]</a> + </span> + [[ } ]] + [[ if (profile.plan_level == 1) { ]] + <span class="plan_level premium">PREMIUM</span> + [[ } else if (profile.plan_level == 2) { ]] + <span class="plan_level pro">PRO</span> + [[ } ]] + </div> + </div> [[ if (projects.length) { ]] + <h1>[[- profile.username ]] has [[- projectCount ]] project[[- projectCount != 1 ? "s" : "" ]]</h1> - [[ include projects/list-projects ]] + [[ } else { ]] - + <h1>Welcome to VVALLS</h1> <div class="projectList about"> <h2> @@ -69,8 +74,11 @@ <h3>This person has no projects.</h3> [[ } ]] </div> + [[ } ]] - </div> + + </div> + [[ include partials/edit-subscription ]] [[ include partials/edit-profile ]] [[ include projects/layouts-modal ]] [[ include projects/edit-project ]] |
