-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement volunteering page using react
- Loading branch information
1 parent
d434c1d
commit 2ed1a2c
Showing
10 changed files
with
290 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
ecmaVersion: 2018, | ||
sourceType: 'module' | ||
}, | ||
extends: [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
|
||
(function () { | ||
'use strict'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
/* eslint-disable angular/document-service,angular/window-service */ | ||
|
||
import angular from 'angular'; | ||
|
||
const photos = { | ||
'bokeh': { | ||
'name': 'Sandra', // "pinkorchid_too" | ||
'url': 'https://www.flickr.com/photos/artfullife/3589991695', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-sa/2.0/', | ||
'file': 'flickr-bokeh.jpg', | ||
'file_mobile': 'flickr-bokeh--mobile.jpg' | ||
}, | ||
'forestpath': { | ||
'name': 'Johnson', // Johnson Cameraface | ||
'url': 'https://www.flickr.com/photos/54459164@N00/15506455245', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-sa/2.0/', | ||
'file': 'flickr-forestpath.jpg' | ||
}, | ||
'forestpath-toned': { | ||
'name': 'Johnson', // Johnson Cameraface | ||
'url': 'https://www.flickr.com/photos/54459164@N00/15506455245', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-sa/2.0/', | ||
'file': 'flickr-forestpath-toned.jpg' | ||
}, | ||
'sierranevada': { | ||
'name': 'Simona', | ||
'url': 'https://www.wanderlust.lt', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/', | ||
'file': 'ss-sierranevada.jpg' | ||
}, | ||
'hitchroad': { | ||
// https://www.facebook.com/photo.php?fbid=10152802854942931&set=pcb.10152802854987931&type=1&theater | ||
// Permission asked for Trustroots & Hitchwiki by Mikael Korpela | ||
'name': 'Andrew W Bugelli', | ||
'url': 'http://www.containstraces.blogspot.com/', | ||
'file': 'ab-hitchroad-toned.jpg' // ab-hitchroad.jpg | ||
}, | ||
'guitarcamper': { | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Guillaume Ohz', | ||
'file': 'go-camper.jpg', | ||
'url': 'https://soundcloud.com/feather-drug' | ||
}, | ||
'maroccomap': { | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Guillaume Ohz', | ||
'file': 'go-maroccomap.jpg', | ||
'url': 'https://soundcloud.com/feather-drug' | ||
}, | ||
'rainbowpeople': { | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Antonio Fulghieri', | ||
'url': 'https://aaoutthere.wordpress.com/', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/', | ||
'file': 'af-rainbow-people.jpg', | ||
'file_mobile': 'af-rainbow-people--mobile.jpg' | ||
}, | ||
'happyhippies': { | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Antonio Fulghieri', | ||
'url': 'https://aaoutthere.wordpress.com/', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/', | ||
'file': 'af-happyhippies.jpg', | ||
'file_mobile': 'af-happyhippies--mobile.jpg' | ||
}, | ||
'desertgirl': { | ||
// https://www.facebook.com/agniete.melisa | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Agnietė Melisa', | ||
'url': 'https://www.facebook.com/pages/My-Road-Tales/844001355694245', | ||
'file': 'am-desertgirl.jpg' | ||
}, | ||
'wavewatching': { | ||
// https://www.facebook.com/gala.hyde | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Andrea Nieblas', | ||
'url': 'https://www.flickr.com/photos/andreanieblas/', | ||
'file': 'an-wavewatching.jpg', | ||
'file_mobile': 'an-wavewatching--mobile.jpg' | ||
}, | ||
'hitchgirl1': { | ||
// https://www.facebook.com/just.kozmic.blues | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Gytė', | ||
'url': 'https://www.facebook.com/upe.pati.teka', | ||
'file': 'gh-hitchgirl1.jpg', | ||
'file_mobile': 'gh-hitchgirl1--mobile.jpg' | ||
}, | ||
'hitchgirl2': { | ||
// https://www.facebook.com/matasirastrauskas | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Matas Astrauskas', | ||
'url': 'http://www.matasphoto.com/', | ||
'file': 'mr-hitchgirl2.jpg' | ||
}, | ||
'mountainforest': { | ||
// https://unsplash.com/photos/VNseEaTt9w4 | ||
'name': 'Sven Scheuermeier', | ||
'url': 'https://unsplash.com/sveninho', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/publicdomain/zero/1.0/', // https://unsplash.com/license | ||
'file': 'ss-mountainforest.jpg', | ||
'file_mobile': 'ss-mountainforest--mobile.jpg' | ||
}, | ||
'tribes-1': { | ||
// Permission granted for Trustroots (asked by Mikael Korpela) | ||
'name': 'Antonio Fulghieri', | ||
'url': 'https://aaoutthere.wordpress.com/', | ||
'license': 'CC', | ||
'license_url': 'https://creativecommons.org/licenses/by-nc-nd/4.0/', | ||
'file': 'tribes-1.jpg', | ||
'file_mobile': 'tribes-1--mobile.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', | ||
'file_mobile': 'mh-woman-bridge--mobile.jpg' | ||
}, | ||
'nordiclights': { | ||
'name': 'Vincent Guth', | ||
'url': 'https://unsplash.com/photos/62V7ntlKgL8', | ||
'license': 'CC', | ||
'license_url': 'https://unsplash.com/license', | ||
'file': 'nordic-lights.jpg', | ||
'file_mobile': 'nordic-lights--mobile.jpg' | ||
}, | ||
'jungleroad': { | ||
'name': 'Dean Johns', | ||
'license': 'CC', | ||
'license_url': 'https://unsplash.com/license', | ||
'file': 'jungleroad.jpg', | ||
'file_mobile': 'jungleroad--mobile.jpg' | ||
}, | ||
'sahara-backpacker': { | ||
'name': 'Nova Togatorop', | ||
'url': 'http://novatogatorop.com/', | ||
'license': 'CC', | ||
'license_url': 'https://unsplash.com/license', | ||
'file': 'ak-sahara.jpg', | ||
'file_mobile': 'ak-sahara--mobile.jpg' | ||
}, | ||
'hitchtruck': { | ||
'name': 'Nova Togatorop', | ||
'url': 'http://novatogatorop.com/', | ||
'license': 'CC', | ||
'license_url': 'https://unsplash.com/license', | ||
'file': 'nt-hitchtruck.jpg', | ||
'file_mobile': 'nt-hitchtruck--mobile.jpg' | ||
} | ||
}; | ||
|
||
function getApplicationScope() { | ||
return angular.element(document.querySelector('html')).scope(); | ||
} | ||
|
||
export function selectPhoto(name) { | ||
const photo = photos[name]; | ||
const file = (window.innerWidth <= 480 && photo.file_mobile) ? photo.file_mobile : photo.file; | ||
const imageUrl = `/img/board/${file}`; | ||
getApplicationScope().$emit('photoCreditsUpdated', { [name]: photo }); | ||
return { | ||
imageUrl, | ||
...photo | ||
}; | ||
} | ||
|
||
export default photos; |
Oops, something went wrong.