-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #296 from CaptainFact/staging
Release 0.9.1
- Loading branch information
Showing
49 changed files
with
799 additions
and
363 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,12 +1,10 @@ | ||
{ | ||
"presets": [ | ||
"es2015", | ||
"react" | ||
], | ||
"presets": ["es2015", "react"], | ||
"plugins": [ | ||
"transform-decorators-legacy", | ||
"transform-runtime", | ||
"transform-class-properties", | ||
"transform-object-rest-spread" | ||
"transform-object-rest-spread", | ||
"babel-plugin-styled-components" | ||
] | ||
} | ||
} |
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
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,23 @@ | ||
import gql from 'graphql-tag' | ||
|
||
export const VideosQuery = gql` | ||
query VideosIndex($offset: Int! = 1, $limit: Int! = 16, $filters: VideoFilter = {}) { | ||
videos(limit: $limit, offset: $offset, filters: $filters) { | ||
pageNumber | ||
totalPages | ||
entries { | ||
hash_id: hashId | ||
provider_id: providerId | ||
provider | ||
title | ||
insertedAt | ||
isPartner | ||
speakers { | ||
full_name: fullName | ||
id | ||
slug | ||
} | ||
} | ||
} | ||
} | ||
` |
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,41 @@ | ||
import { IS_DEV } from '../config' | ||
|
||
/** | ||
* Low-level function to push an event to matomo **only** if instanciated. If | ||
* Matomo is not instanciated (which is, if `window._paq` is undefined) the event | ||
* is simply ignored. | ||
* | ||
* @param {string} context The context where this happens (eg. Home, UserProfile...) | ||
* @param {string} action The type of action (Click, Close...) | ||
* @param {string} (optional) name | ||
* @param {number} (optional) numeric value | ||
*/ | ||
export const pushEvent = (context, action, name, value) => { | ||
// Generate the event | ||
let event = null | ||
if (name && value) { | ||
event = ['trackEvent', context, action, name, value] | ||
} else if (name) { | ||
event = ['trackEvent', context, action, name] | ||
} else { | ||
event = ['trackEvent', context, action] | ||
} | ||
|
||
// Push the event | ||
if ((window._paq === undefined || !window._paq) && IS_DEV) { | ||
console.debug('[Matomo] Push event', event) | ||
} else { | ||
window._paq.push(event) | ||
} | ||
} | ||
|
||
/** | ||
* Register a click on Matomo. | ||
* | ||
* @param {string} context The context where this happens (eg. Home, UserProfile...) | ||
* @param {string} type of the element (eg. Link, Button) | ||
* @param {string} name The name of the link / button (eg. signin, register...) | ||
*/ | ||
export const registerClick = (context, type, name) => { | ||
pushEvent(context, 'Click', `${type}-${name}`) | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,37 @@ | ||
import React from 'react' | ||
import { Link } from 'react-router' | ||
import styled from 'styled-components' | ||
import { Flex } from '@rebass/grid' | ||
|
||
import imgBasile from '../../assets/ambassadors/basile.jpg' | ||
import imgDorian from '../../assets/ambassadors/dorian.jpg' | ||
import imgFrederic from '../../assets/ambassadors/frederic.jpg' | ||
import imgThimothee from '../../assets/ambassadors/timothee.jpg' | ||
|
||
const AMBASSADORS = [ | ||
{ name: 'Frédéric Bouffetier', username: 'DocFred', img: imgFrederic }, | ||
{ name: 'Timothée Rolland', username: 'Troplent', img: imgThimothee }, | ||
{ name: 'Dorian Cazottes', username: 'DodoLaSoudure', img: imgDorian }, | ||
{ name: 'Basile Asti', username: 'Basile', img: imgBasile } | ||
] | ||
|
||
const AmbassadorPicture = styled.img` | ||
border-radius: 1em; | ||
margin: 0 1em; | ||
height: 70px; | ||
` | ||
|
||
/** | ||
* Render all CaptainFact ambassadors | ||
*/ | ||
const AllAmbassadors = () => ( | ||
<Flex flexWrap="wrap" justifyContent={['center', 'left']}> | ||
{AMBASSADORS.map(({ name, username, img }) => ( | ||
<Link to={`/u/${username}`} key={name}> | ||
<AmbassadorPicture title={name} src={img} alt={name} /> | ||
</Link> | ||
))} | ||
</Flex> | ||
) | ||
|
||
export default AllAmbassadors |
This file was deleted.
Oops, something went wrong.
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,44 @@ | ||
import React from 'react' | ||
import { Flex, Box } from '@rebass/grid' | ||
|
||
import ExternalLinkNewTab from '../Utils/ExternalLinkNewTab' | ||
|
||
import imgImago from '../../assets/partners/imago.jpg' | ||
import imgDemocratieOuverte from '../../assets/partners/democratie-ouverte.jpg' | ||
import imgHeureka from '../../assets/partners/heureka.jpg' | ||
import imgSystemeD from '../../assets/partners/systemed.jpg' | ||
import imgTedxNoumea from '../../assets/partners/tedxnoumea.jpg' | ||
import imgThinkerView from '../../assets/partners/thinkerview.jpg' | ||
import imgTroncheEnBiais from '../../assets/partners/troncheenbiais.jpg' | ||
import imgYesWeHack from '../../assets/partners/yeswehack.jpg' | ||
|
||
// prettier-ignore | ||
const PARTNERS = [ | ||
{ name: 'ThinkerView', img: imgThinkerView, url: 'https://thinkerview.com' }, | ||
{ name: 'Heu?reka', img: imgHeureka, url: 'https://www.youtube.com/channel/UC7sXGI8p8PvKosLWagkK9wQ' }, | ||
{ name: 'La Tronche en Biais', img: imgTroncheEnBiais, url: 'https://www.youtube.com/user/TroncheEnBiais' }, | ||
{ name: 'Système D', img: imgSystemeD, url: 'https://www.systeme-d.co/' }, | ||
{ name: 'Démocratie Ouverte', img: imgDemocratieOuverte, url: 'https://democratieouverte.org' }, | ||
{ name: 'IMAGO', img: imgImago, url: 'https://imagotv.fr' }, | ||
{ name: 'TedX Nouméa', img: imgTedxNoumea, url: 'https://tedxnoumea.com' }, | ||
{ name: 'YesWeHack', img: imgYesWeHack, url: 'https://yeswehack.com' }, | ||
] | ||
|
||
/** | ||
* Render all CaptainFact partners | ||
*/ | ||
const AllPartners = () => ( | ||
<Flex flexWrap="wrap" alignItems="center" justifyContent="space-around"> | ||
{PARTNERS.map(({ name, url, img }) => ( | ||
<Box key={name} mb="1em"> | ||
<ExternalLinkNewTab href={url} title={name}> | ||
<figure className="image is-96x96"> | ||
<img src={img} alt={name} /> | ||
</figure> | ||
</ExternalLinkNewTab> | ||
</Box> | ||
))} | ||
</Flex> | ||
) | ||
|
||
export default AllPartners |
Oops, something went wrong.