Skip to content

Commit

Permalink
Work on Tribes presentation/sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed May 5, 2016
1 parent 9f2ef3b commit a7cc7b3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
7 changes: 7 additions & 0 deletions modules/core/client/directives/tr-boards.client.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@
'license': 'CC',
'license_url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
'file': 'tribes-1.jpg'
},
'woman-bridge': {
'name': 'Michael Hull',
'url': 'https://unsplash.com/photos/JibIPPrvITE',
'license': 'CC',
'license_url': 'https://unsplash.com/license',
'file': 'mh-woman-bridge.jpg'
}
};

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions modules/core/server/views/layout.server.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
{% if facebookAppId !== "APP_ID" %}<meta property="fb:app_id" content="{{facebookAppId}}">{% endif %}
{% if facebookPage !== "" %}<meta property="article:publisher" content="{{facebookPage}}">{% endif %}
{% if tribe %}
<meta property="og:title" content="{{tribe.label|striptags|addslashes}} - Trustroots Tribe">
<meta property="og:description" content="Join to meet, host and get hosted by this and other communities. Trustroots is a travellers' community for sharing, hosting and getting people together.">
<meta property="og:title" content="Join {{tribe.label|striptags|addslashes}} on Trustroots">
<meta property="og:description" content="Join to meet, host and get hosted by Trustroots Tribe {{tribe.label|striptags|addslashes}}. Trustroots is a travellers' community for sharing, hosting and getting people together.">
<meta property="og:url" content="{{hostPort}}/tribes/{{tribe.slug}}">
{% if tribe.image_UUID %}
{# https://developers.facebook.com/docs/sharing/best-practices#images #}
Expand All @@ -73,8 +73,8 @@
{# Twitter #}
{% if twitterUsername !== "" %}<meta name="twitter:site" content="{{twitterUsername}}">{% endif %}
{% if tribe %}
<meta name="twitter:title" content="{{tribe.label|striptags|addslashes}} - Trustroots Tribe">
<meta name="twitter:description" content="Join to meet, host and get hosted by this and other communities. Trustroots is a travellers' community for sharing, hosting and getting people together.">
<meta name="twitter:title" content="Join {{tribe.label|striptags|addslashes}} on Trustroots">
<meta name="twitter:description" content="Join to meet, host and get hosted by Trustroots Tribe {{tribe.label|striptags|addslashes}}. Trustroots is a travellers' community for sharing, hosting and getting people together.">
<meta name="twitter:url" content="{{hostPort}}/tribes/{{tribe.slug}}">
{% if tribe.image_UUID %}
<meta name="twitter:image" content="https://ucarecdn.com/{{tribe.image_UUID}}/-/progressive/yes/-/scale_crop/1200x630/center/-/quality/lightest/-/format/jpeg/">
Expand Down Expand Up @@ -135,6 +135,7 @@
title = '{{title}}',
settings = {{ appSettings | json | safe }},
languages = {{ languages | json | safe }},
{% if facebookAppId !== "APP_ID" %}facebookAppId = '{{facebookAppId}}',{% endif %}
env = '{{ env }}';
</script>

Expand Down
12 changes: 10 additions & 2 deletions modules/pages/client/controllers/home.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.controller('HomeController', HomeController);

/* @ngInject */
function HomeController(Authentication, TribesService) {
function HomeController(Authentication, TribesService, $stateParams) {

var headerHeight = angular.element('#tr-header').height() || 0;

Expand All @@ -16,8 +16,16 @@
// Exposed to the view
vm.windowHeight = angular.element('html').height() - headerHeight;

vm.boards = Authentication.user ? 'wavewatching' : ['rainbowpeople', 'hitchroad', 'desertgirl', 'sierranevada', 'wavewatching', 'hitchgirl1', 'hitchgirl2'];
// Load front page's landing photos
// @todo, move part of this logic data to the DB
if($stateParams.tribe && ['hitchhikers', 'dumpster-divers', 'punks'].indexOf($stateParams.tribe) > -1) {
vm.boards = ['rainbowpeople', 'hitchroad', 'desertgirl', 'hitchgirl1', 'hitchgirl2'];
}
else {
vm.boards = Authentication.user ? ['woman-bridge', 'wavewatching'] : ['woman-bridge', 'rainbowpeople', 'hitchroad', 'hitchgirl1', 'wavewatching'];
}

// Load example tribes
vm.tribes = TribesService.query({
limit: 3
});
Expand Down
6 changes: 1 addition & 5 deletions modules/pages/client/views/faq.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ <h2>Organisation</h2>
</div>

<h3 class="faq-question" id="what-is-your-legal-status">What's your legal status?</h3>
The website is owned and operated by Trustroots Foundation, a non-profit Limited by Guarantee (LBG) under section 60 exemption, registered in the United Kingdom in March 2015.

<br><br>

<a href="http://ideas.trustroots.org/wordpress/wp-content/uploads/2015/03/Trustroots-Articles-2015.pdf">Trustroots Foundation’s Articles (pdf)</a>
The website is owned and operated by <a ui-sref="foundation">Trustroots Foundation</a>, a non-profit Limited by Guarantee (LBG) under section 60 exemption, registered in the United Kingdom in March 2015.

<br><br>

Expand Down
16 changes: 4 additions & 12 deletions modules/tags/client/views/tribe.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,15 @@ <h2 class="font-brand-regular tribe-title" ng-bind="::tribeCtrl.tribe.label"></h
<p class="lead tribe-intro">
Trustroots is built on communities. Share this page within your community and invite them to join!
</p>
<span class="tribe-share" ng-if="app.user.additionalProvidersData.twitter">
<a href="https://twitter.com/share" class="twitter-share-button" data-text="test" data-via="trustroots">Tweet</a>
<span class="tribe-share" ng-if="tribeCtrl.tribe.label && app.user.additionalProvidersData.twitter">
<a href="https://twitter.com/share" class="twitter-share-button" data-text="Join to meet, host and get hosted by Trustroots Tribe {{::tribeCtrl.tribe.label}}." data-via="trustroots">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</span>
<span class="tribe-share" ng-if="app.user.additionalProvidersData.facebook">
<span class="tribe-share" ng-if="tribeCtrl.tribe.label && app.user.additionalProvidersData.facebook">
<span id="fb_share"></span>
<script>
document.getElementById('fb_share').innerHTML = '<div class="fb-share-button" data-href="' + encodeURIComponent(location.href) + '" data-layout="button" data-mobile-iframe="true"></div>';
document.getElementById('fb_share').innerHTML = '<iframe src="https://www.facebook.com/plugins/share_button.php?href=' + encodeURIComponent(location.href) + '&layout=button&mobile_iframe=true&appId=' + (window.facebookAppId || '') + '&width=58&height=20" width="58" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>';
</script>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6";//&appId=";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</span>
</div>

Expand Down

0 comments on commit a7cc7b3

Please sign in to comment.