mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 15:38:59 +00:00
feat(sharing): screw it, social links + img + text aint working, just
redirect to homepage + show member modal
This commit is contained in:
parent
3a415a45a9
commit
15f318ccc2
4 changed files with 59 additions and 38 deletions
|
|
@ -6,6 +6,21 @@ window.habitrpgStatic = angular.module('habitrpgStatic', ['notificationServices'
|
|||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||
.constant("MOBILE_APP", false)
|
||||
|
||||
.controller("RootCtrl", ['$scope', '$location', '$modal', '$http', function($scope, $location, $modal, $http){
|
||||
// must be #?memberId=xx, see https://github.com/angular/angular.js/issues/7239
|
||||
var memberId = $location.search()['memberId'];
|
||||
if (memberId) {
|
||||
$http.get('/api/v2/members/'+memberId).success(function(data, status, headers, config){
|
||||
$scope.profile = data;
|
||||
$scope.Content = window.habitrpgShared.content;
|
||||
$modal.open({
|
||||
templateUrl: 'modals/member.html',
|
||||
scope: $scope
|
||||
});
|
||||
})
|
||||
}
|
||||
}])
|
||||
|
||||
.controller("PlansCtrl", ['$rootScope',
|
||||
function($rootScope) {
|
||||
$rootScope.clickContact = function(){
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@
|
|||
"bower_components/bootstrap/dist/css/bootstrap.css",
|
||||
"bower_components/css-social-buttons/css/zocial.css",
|
||||
"bower_components/jquery-colorbox/example1/colorbox.css",
|
||||
"app.css",
|
||||
"bower_components/habitrpg-shared/dist/habitrpg-shared.css",
|
||||
"static.css"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ mixin avatar(opts)
|
|||
|
||||
.character-sprites
|
||||
|
||||
.addthis_native_toolbox(ng-if='profile._id==user._id', data-url="#{env.BASE_URL}/export/avatar-{{profile._id}}.png", data-title="Check out my HabitRPG progress!")
|
||||
.addthis_native_toolbox(ng-if='profile._id==user._id', data-url="#{env.BASE_URL}/static/front/#?memberId={{profile._id}}", data-title="Check out my HabitRPG progress!")
|
||||
|
||||
// Mount Body
|
||||
if !opts.minimal
|
||||
|
|
|
|||
|
|
@ -8,41 +8,45 @@ block title
|
|||
title=env.t('titleFront')
|
||||
|
||||
block content
|
||||
.marketing
|
||||
//we need to use something that's not jumbotron for this, but still keep it centered
|
||||
//could someone write something else to make it pretty?
|
||||
img(src='/bower_components/habitrpg-shared/img/logo/habitrpg_pixel.png', alt='HabitRPG logo')
|
||||
//this image needs to be replaced by something more enticing, that shows off the features of hRPG
|
||||
//while acting similarly to a logo
|
||||
h1#tagline=env.t('tagline')
|
||||
p.lead
|
||||
button.btn.btn-primary.btn-lg#frontpage-play-button(ng-click='playButtonClick()')=env.t('playButton')
|
||||
hr
|
||||
img(src='/marketing/devices.png')
|
||||
//we'd want the tagline centered, for sure, and a bit more pop, but without using jumbotron
|
||||
//it could also be part of the image, as long as the alt text included it
|
||||
//in fact, I think I really want it on the image, rather than as text, but language issues
|
||||
br
|
||||
p.lead=env.t('landingp1')
|
||||
h2=env.t('landingp2header')
|
||||
//images in these parts could be useful, too
|
||||
//if there's a language workaround, image headers? people like pictures!
|
||||
p.lead
|
||||
=env.t('landingp2')
|
||||
|
|
||||
h2=env.t('landingp3header')
|
||||
//I'm not sold on "Consquences as the title here. Anyone got a better idea?
|
||||
p.lead
|
||||
=env.t('landingp3')
|
||||
|
|
||||
h2=env.t('landingp4header')
|
||||
p.lead=env.t('landingp4')
|
||||
//- TODO
|
||||
h2=env.t('landingend')
|
||||
div(ng-controller='RootCtrl')
|
||||
include ../shared/header/avatar
|
||||
include ../shared/modals/members
|
||||
|
||||
.marketing
|
||||
//we need to use something that's not jumbotron for this, but still keep it centered
|
||||
//could someone write something else to make it pretty?
|
||||
img(src='/bower_components/habitrpg-shared/img/logo/habitrpg_pixel.png', alt='HabitRPG logo')
|
||||
//this image needs to be replaced by something more enticing, that shows off the features of hRPG
|
||||
//while acting similarly to a logo
|
||||
h1#tagline=env.t('tagline')
|
||||
p.lead
|
||||
=env.t('landingend2')
|
||||
a(href="FEATURESPAGEHERE")=env.t('landingfeatureslink')
|
||||
=env.t('landingend3')
|
||||
a(href="ENTERPRISEPAGEHERE")=env.t('landingadminlink')
|
||||
|
|
||||
=env.t('landingend4')
|
||||
button.btn.btn-primary.btn-lg#frontpage-play-button(ng-click='playButtonClick()')=env.t('playButton')
|
||||
hr
|
||||
img(src='/marketing/devices.png')
|
||||
//we'd want the tagline centered, for sure, and a bit more pop, but without using jumbotron
|
||||
//it could also be part of the image, as long as the alt text included it
|
||||
//in fact, I think I really want it on the image, rather than as text, but language issues
|
||||
br
|
||||
p.lead=env.t('landingp1')
|
||||
h2=env.t('landingp2header')
|
||||
//images in these parts could be useful, too
|
||||
//if there's a language workaround, image headers? people like pictures!
|
||||
p.lead
|
||||
=env.t('landingp2')
|
||||
|
|
||||
h2=env.t('landingp3header')
|
||||
//I'm not sold on "Consquences as the title here. Anyone got a better idea?
|
||||
p.lead
|
||||
=env.t('landingp3')
|
||||
|
|
||||
h2=env.t('landingp4header')
|
||||
p.lead=env.t('landingp4')
|
||||
//- TODO
|
||||
h2=env.t('landingend')
|
||||
p.lead
|
||||
=env.t('landingend2')
|
||||
a(href="FEATURESPAGEHERE")=env.t('landingfeatureslink')
|
||||
=env.t('landingend3')
|
||||
a(href="ENTERPRISEPAGEHERE")=env.t('landingadminlink')
|
||||
|
|
||||
=env.t('landingend4')
|
||||
|
|
|
|||
Loading…
Reference in a new issue