├── packages ├── src │ ├── pwa │ │ ├── components │ │ │ ├── index.js │ │ │ ├── Icons │ │ │ │ ├── Menu.js │ │ │ │ ├── Schedule.js │ │ │ │ ├── Facebook.js │ │ │ │ ├── Twitter.js │ │ │ │ ├── Instagram.js │ │ │ │ ├── Bullhorn.js │ │ │ │ ├── Hyperlink.js │ │ │ │ ├── Comments.js │ │ │ │ ├── Utensils.js │ │ │ │ └── Users.js │ │ │ ├── Theme │ │ │ │ ├── Title.js │ │ │ │ ├── Favicon.js │ │ │ │ └── AppleMeta.js │ │ │ ├── LazyFacebookIframe │ │ │ │ └── index.js │ │ │ ├── Menu │ │ │ │ ├── MenuList.js │ │ │ │ ├── MenuLinks.js │ │ │ │ ├── MenuButton.js │ │ │ │ ├── MenuLink.js │ │ │ │ ├── MenuIcon.js │ │ │ │ ├── MenuHeader.js │ │ │ │ ├── index.js │ │ │ │ ├── MenuRoute.js │ │ │ │ └── MenuNotifications.js │ │ │ ├── Home │ │ │ │ ├── NowNext.js │ │ │ │ ├── Nav.js │ │ │ │ ├── CardsList.js │ │ │ │ ├── CardSpeakers.js │ │ │ │ ├── ScheduleItemSpeakers.js │ │ │ │ ├── VenueLink.js │ │ │ │ ├── CardTitle.js │ │ │ │ ├── index.js │ │ │ │ ├── ScheduleItemTitle.js │ │ │ │ ├── FavoriteButton.js │ │ │ │ ├── NavItem.js │ │ │ │ ├── Schedule.js │ │ │ │ ├── FilterFavorites.js │ │ │ │ ├── ScheduleItem.js │ │ │ │ └── ScheduleList.js │ │ │ ├── Manifest │ │ │ │ └── index.js │ │ │ ├── Pages │ │ │ │ ├── index.js │ │ │ │ └── Page.js │ │ │ ├── Venues │ │ │ │ ├── index.js │ │ │ │ └── Venue.js │ │ │ ├── Table │ │ │ │ └── index.js │ │ │ ├── Posts │ │ │ │ ├── index.js │ │ │ │ └── Post.js │ │ │ ├── Sessions │ │ │ │ ├── index.js │ │ │ │ └── FavoriteButton.js │ │ │ ├── Speakers │ │ │ │ ├── index.js │ │ │ │ └── SessionCard.js │ │ │ ├── TopBar │ │ │ │ ├── Logo.js │ │ │ │ ├── CloseButton.js │ │ │ │ └── index.js │ │ │ ├── Nav │ │ │ │ ├── Button.js │ │ │ │ ├── index.js │ │ │ │ └── Share.js │ │ │ ├── Media │ │ │ │ ├── index.js │ │ │ │ └── image.js │ │ │ ├── Spinner │ │ │ │ └── index.js │ │ │ ├── Announcements │ │ │ │ ├── index.js │ │ │ │ ├── NextPage.js │ │ │ │ ├── Card.js │ │ │ │ └── Refresh.js │ │ │ ├── HtmlToReactConverter │ │ │ │ ├── filter.js │ │ │ │ └── htmlMap.js │ │ │ ├── LazyIframe │ │ │ │ └── index.js │ │ │ ├── Link │ │ │ │ └── index.js │ │ │ ├── LazyYoutube │ │ │ │ └── index.js │ │ │ ├── LazyAudio │ │ │ │ └── index.js │ │ │ ├── LazyVideo │ │ │ │ └── index.js │ │ │ ├── Anchor │ │ │ │ └── index.js │ │ │ └── LazyTweet │ │ │ │ └── index.js │ │ ├── converters │ │ │ ├── removeTagStyle.js │ │ │ ├── table.js │ │ │ ├── removeHidden.js │ │ │ ├── audio.js │ │ │ ├── removeScript.js │ │ │ ├── anchor.js │ │ │ ├── iframe.js │ │ │ ├── index.js │ │ │ ├── video.js │ │ │ ├── twitter.js │ │ │ ├── youtube.js │ │ │ ├── facebookIframe.js │ │ │ ├── instagram.js │ │ │ └── image.js │ │ ├── stores │ │ │ ├── favorites.js │ │ │ ├── menu.js │ │ │ ├── notifications.js │ │ │ ├── schedule.js │ │ │ ├── speaker.js │ │ │ ├── track.js │ │ │ └── session.js │ │ ├── client.js │ │ ├── server.js │ │ ├── processors │ │ │ ├── removeInlineStyle.js │ │ │ ├── removeAmpIds.js │ │ │ ├── dmGallery.js │ │ │ ├── myrTiledGallery.js │ │ │ ├── myrGallery.js │ │ │ ├── index.js │ │ │ ├── tzGallery.js │ │ │ └── anchor.js │ │ ├── styles │ │ │ └── lightbox.js │ │ ├── flows │ │ │ └── client.js │ │ ├── consts │ │ │ └── index.js │ │ ├── utils │ │ │ └── index.js │ │ └── contexts │ │ │ └── index.js │ └── server │ │ ├── index.js │ │ └── manifest.js ├── .gitignore ├── README.md ├── package.json └── LICENSE ├── .gitignore ├── core ├── packages │ ├── settings │ │ ├── shared │ │ │ ├── selectors │ │ │ │ └── index.js │ │ │ ├── actionTypes │ │ │ │ └── index.js │ │ │ ├── actions │ │ │ │ └── index.js │ │ │ ├── reducers │ │ │ │ └── index.js │ │ │ └── selectorCreators │ │ │ │ └── index.js │ │ ├── amp │ │ │ └── index.js │ │ └── pwa │ │ │ └── index.js │ ├── customCss │ │ ├── amp │ │ │ └── index.js │ │ ├── pwa │ │ │ └── index.js │ │ └── shared │ │ │ └── components │ │ │ └── index.js │ ├── analytics │ │ ├── amp │ │ │ ├── index.js │ │ │ └── components │ │ │ │ ├── ComScore.js │ │ │ │ └── GoogleAnalytics.js │ │ ├── pwa │ │ │ ├── index.js │ │ │ ├── sagas │ │ │ │ └── client.js │ │ │ └── components │ │ │ │ ├── ComScore.js │ │ │ │ ├── GoogleTagManager.js │ │ │ │ └── index.js │ │ └── shared │ │ │ ├── helpers │ │ │ └── index.js │ │ │ └── stores │ │ │ └── index.js │ ├── iframes │ │ ├── amp │ │ │ └── index.js │ │ ├── pwa │ │ │ └── index.js │ │ └── shared │ │ │ ├── selectors │ │ │ └── index.js │ │ │ └── components │ │ │ └── index.js │ ├── ads │ │ ├── shared │ │ │ ├── actionTypes │ │ │ │ └── index.js │ │ │ ├── actions │ │ │ │ └── index.js │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ └── LazyUnload │ │ │ │ │ └── index.js │ │ │ ├── selectors │ │ │ │ └── index.js │ │ │ ├── selectorCreators │ │ │ │ └── index.js │ │ │ └── reducers │ │ │ │ └── index.js │ │ ├── amp │ │ │ └── index.js │ │ └── pwa │ │ │ └── index.js │ └── build │ │ ├── shared │ │ ├── reducers │ │ │ ├── __tests__ │ │ │ │ └── index.tests.js │ │ │ └── index.js │ │ ├── actionTypes │ │ │ └── index.js │ │ ├── stores │ │ │ └── index.js │ │ ├── selectors │ │ │ └── index.js │ │ └── actions │ │ │ └── index.js │ │ ├── amp │ │ └── index.js │ │ └── pwa │ │ └── index.js ├── client │ └── public-path.js ├── vendors.js ├── components │ ├── Universal.js │ └── App.js ├── server │ ├── settings.js │ ├── requires.js │ ├── utils.js │ ├── amp-template.js │ └── pwa-template.js ├── certs │ ├── localhost.crt │ └── localhost.key ├── store │ └── index.js ├── scripts │ ├── build.js │ └── start.js ├── index.js └── webpack │ ├── server.prod.js │ └── server.dev.js ├── watch.js ├── .eslintrc ├── LICENSE └── .babelrc /packages/src/pwa/components/index.js: -------------------------------------------------------------------------------- 1 | export { default } from './Theme'; 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | buildClient 2 | buildServer 3 | node_modules 4 | *.log 5 | .build 6 | now.json 7 | -------------------------------------------------------------------------------- /packages/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore everything in this directory 2 | * 3 | # Except this file 4 | !.gitignore 5 | -------------------------------------------------------------------------------- /core/packages/settings/shared/selectors/index.js: -------------------------------------------------------------------------------- 1 | export const getSiteId = state => state.settings.siteId; 2 | -------------------------------------------------------------------------------- /core/packages/settings/shared/actionTypes/index.js: -------------------------------------------------------------------------------- 1 | export const SETTINGS_UPDATED = 'settings/SETTINGS_UPDATED'; 2 | -------------------------------------------------------------------------------- /core/packages/customCss/amp/index.js: -------------------------------------------------------------------------------- 1 | import CustomCss from '../shared/components'; 2 | 3 | export default CustomCss; 4 | -------------------------------------------------------------------------------- /core/packages/customCss/pwa/index.js: -------------------------------------------------------------------------------- 1 | import CustomCss from '../shared/components'; 2 | 3 | export default CustomCss; 4 | -------------------------------------------------------------------------------- /core/client/public-path.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable camelcase, no-undef, no-underscore-dangle */ 2 | __webpack_public_path__ = window['wp-pwa'].publicPath; 3 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/removeTagStyle.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ tagName }) => tagName === 'style', 3 | converter: () => null, 4 | }; 5 | -------------------------------------------------------------------------------- /packages/src/pwa/stores/favorites.js: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | const Favorite = types.model('Favorite').props({ 4 | 5 | }) 6 | -------------------------------------------------------------------------------- /core/packages/analytics/amp/index.js: -------------------------------------------------------------------------------- 1 | import components from './components'; 2 | import Store from '../shared/stores'; 3 | 4 | export default components; 5 | export { Store }; 6 | -------------------------------------------------------------------------------- /core/packages/iframes/amp/index.js: -------------------------------------------------------------------------------- 1 | import components from '../shared/components'; 2 | import selectors from '../shared/selectors'; 3 | 4 | export default components; 5 | export { selectors }; 6 | -------------------------------------------------------------------------------- /core/packages/iframes/pwa/index.js: -------------------------------------------------------------------------------- 1 | import components from '../shared/components'; 2 | import selectors from '../shared/selectors'; 3 | 4 | export default components; 5 | export { selectors }; 6 | -------------------------------------------------------------------------------- /packages/src/pwa/client.js: -------------------------------------------------------------------------------- 1 | import components from './components'; 2 | import Store from './stores'; 3 | import flow from './flows/client'; 4 | 5 | export default components; 6 | export { Store, flow }; 7 | -------------------------------------------------------------------------------- /packages/src/pwa/server.js: -------------------------------------------------------------------------------- 1 | import components from './components'; 2 | import flow from './flows/server'; 3 | import Store from './stores'; 4 | 5 | export default components; 6 | export { Store, flow }; 7 | -------------------------------------------------------------------------------- /packages/src/server/index.js: -------------------------------------------------------------------------------- 1 | const router = require('express').Router(); 2 | const manifest = require('./manifest.js'); 3 | 4 | router.get('/:siteId/manifest.json', manifest); 5 | 6 | module.exports = router 7 | -------------------------------------------------------------------------------- /core/packages/analytics/pwa/index.js: -------------------------------------------------------------------------------- 1 | import components from './components'; 2 | import clientSagas from './sagas/client'; 3 | import Store from '../shared/stores'; 4 | 5 | export default components; 6 | export { clientSagas, Store }; 7 | -------------------------------------------------------------------------------- /core/packages/ads/shared/actionTypes/index.js: -------------------------------------------------------------------------------- 1 | export const STICKY_HAS_SHOWN = 'theme/STICKY_HAS_SHOWN'; 2 | export const STICKY_HAS_HIDDEN = 'theme/STICKY_HAS_HIDDEN'; 3 | export const STICKY_UPDATE_TIMEOUT = 'theme/STICKY_UPDATE_TIMEOUT'; 4 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/table.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Table from '../components/Table'; 3 | 4 | export default { 5 | test: ({ tagName }) => tagName === 'table', 6 | converter: () => children => {children}
, 7 | }; 8 | -------------------------------------------------------------------------------- /core/packages/settings/shared/actions/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable import/prefer-default-export */ 2 | import * as actionTypes from '../actionTypes'; 3 | 4 | export const settingsUpdated = ({ settings }) => ({ type: actionTypes.SETTINGS_UPDATED, settings }); 5 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/removeInlineStyle.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: element => element && element.attributes && element.attributes.style, 3 | process: element => { 4 | delete element.attributes.style; 5 | return element; 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /core/packages/build/shared/reducers/__tests__/index.tests.js: -------------------------------------------------------------------------------- 1 | import { packages } from '../'; 2 | 3 | test('package reducers should be initializated to empty object.', () => { 4 | const state = packages(undefined, {}); 5 | expect(state).toEqual({}); 6 | }); 7 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Icons/Menu.js: -------------------------------------------------------------------------------- 1 | import Facebook from './Facebook'; 2 | import Twitter from './Twitter'; 3 | import Instagram from './Instagram'; 4 | import Hyperlink from './Hyperlink'; 5 | 6 | export default { Facebook, Twitter, Instagram, Hyperlink }; 7 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Theme/Title.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Helmet } from 'react-helmet'; 3 | 4 | const Title = () => ( 5 | 6 | WordCamp Europe 2018 7 | 8 | ); 9 | 10 | export default Title; 11 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/removeHidden.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ attributes }) => 3 | attributes && 4 | attributes.style && 5 | (attributes.style.display === 'none' || attributes.style.visibility === 'hidden'), 6 | converter: () => null 7 | }; 8 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/removeAmpIds.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ attributes }) => attributes.id === 'amp', 3 | process: (element, { state }) => { 4 | if (state.build.amp) { 5 | element.attributes.id = null; 6 | } 7 | 8 | return element; 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/dmGallery.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ tagName, attributes }) => 3 | tagName === 'div' && 4 | attributes && 5 | attributes.className && 6 | attributes.className.includes('gallery_regular'), 7 | process: element => { 8 | element.attributes.id = 'gallery-0'; 9 | return element; 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/myrTiledGallery.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ tagName, attributes }) => 3 | tagName === 'div' && 4 | attributes && 5 | attributes.className && 6 | attributes.className.includes('tiled-gallery'), 7 | process: element => { 8 | element.attributes.id = 'gallery-0'; 9 | return element; 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /core/packages/build/amp/index.js: -------------------------------------------------------------------------------- 1 | import * as actions from '../shared/actions'; 2 | import * as actionTypes from '../shared/actionTypes'; 3 | import reducers from '../shared/reducers'; 4 | import * as selectors from '../shared/selectors'; 5 | 6 | const Build = () => null; 7 | 8 | export default Build; 9 | export { actions, actionTypes, reducers, selectors }; 10 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/myrGallery.js: -------------------------------------------------------------------------------- 1 | export default { 2 | test: ({ tagName, attributes }) => 3 | tagName === 'div' && 4 | attributes && 5 | attributes.className && 6 | attributes.className.includes('td-slide-on-2-columns'), 7 | process: element => { 8 | element.attributes.id = 'gallery-0'; 9 | return element; 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /packages/src/pwa/stores/menu.js: -------------------------------------------------------------------------------- 1 | import { types } from 'mobx-state-tree'; 2 | 3 | export default types 4 | .model('Menu') 5 | .props({ isOpen: types.optional(types.boolean, false) }) 6 | .actions(self => ({ 7 | open() { 8 | if (!self.isOpen) self.isOpen = true; 9 | }, 10 | close() { 11 | if (self.isOpen) self.isOpen = false; 12 | }, 13 | })); 14 | -------------------------------------------------------------------------------- /core/packages/settings/shared/reducers/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import * as actionTypes from '../actionTypes'; 3 | 4 | export const collection = (state = {}, { type, settings }) => { 5 | if (type === actionTypes.SETTINGS_UPDATED) return { ...state, ...settings }; 6 | return state; 7 | }; 8 | 9 | export default () => 10 | combineReducers({ 11 | collection, 12 | }); 13 | -------------------------------------------------------------------------------- /core/vendors.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | 'react', 3 | 'prop-types', 4 | 'react-dom', 5 | 'react-helmet', 6 | 'react-emotion', 7 | 'emotion-theming', 8 | 'worona-deps', 9 | 'superagent', 10 | 'mobx', 11 | 'mobx-state-tree', 12 | 'mobx-react', 13 | 'redux', 14 | 'redux-saga', 15 | 'redux-saga/effects', 16 | 'reselect', 17 | 'react-redux', 18 | 'react-slot-fill', 19 | 'recompose', 20 | ]; 21 | -------------------------------------------------------------------------------- /core/packages/analytics/pwa/sagas/client.js: -------------------------------------------------------------------------------- 1 | import { fork, all } from 'redux-saga/effects'; 2 | import gtmSagas from './gtm'; 3 | import comScoreSagas from './comScore'; 4 | import googleAnalyticsSagas from './analytics'; 5 | 6 | export default function* analyticsClientSagas({ stores }) { 7 | yield all([ 8 | fork(gtmSagas, stores), 9 | fork(comScoreSagas, stores), 10 | fork(googleAnalyticsSagas, stores), 11 | ]); 12 | } 13 | -------------------------------------------------------------------------------- /watch.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | const watch = require('watch'); 3 | 4 | watch.watchTree('.', (f, curr, prev) => { 5 | if (typeof f === 'object' && prev === null && curr === null) { 6 | // Finished walking the tree 7 | } else if (prev === null) { 8 | console.log(`created: ${f}`); 9 | } else if (curr.nlink === 0) { 10 | console.log(`removed: ${f}`); 11 | } else { 12 | console.log(`changed: ${f}`); 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /core/packages/settings/amp/index.js: -------------------------------------------------------------------------------- 1 | import * as actions from '../shared/actions'; 2 | import * as actionTypes from '../shared/actionTypes'; 3 | import reducers from '../shared/reducers'; 4 | import * as selectors from '../shared/selectors'; 5 | import * as selectorCreators from '../shared/selectorCreators'; 6 | 7 | const Settings = () => null; 8 | 9 | export default Settings; 10 | export { actions, actionTypes, reducers, selectors, selectorCreators }; 11 | -------------------------------------------------------------------------------- /core/packages/settings/pwa/index.js: -------------------------------------------------------------------------------- 1 | import * as actions from '../shared/actions'; 2 | import * as actionTypes from '../shared/actionTypes'; 3 | import reducers from '../shared/reducers'; 4 | import * as selectors from '../shared/selectors'; 5 | import * as selectorCreators from '../shared/selectorCreators'; 6 | 7 | const Settings = () => null; 8 | 9 | export default Settings; 10 | export { actions, actionTypes, reducers, selectors, selectorCreators }; 11 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/audio.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import LazyAudio from '../components/LazyAudio'; 3 | import { filter } from '../components/HtmlToReactConverter/filter'; 4 | 5 | export default { 6 | test: ({ tagName }) => tagName === 'audio', 7 | converter: element => children => ( 8 | 9 | {children} 10 | 11 | ), 12 | }; 13 | -------------------------------------------------------------------------------- /core/packages/ads/shared/actions/index.js: -------------------------------------------------------------------------------- 1 | import * as actionTypes from '../actionTypes'; 2 | 3 | export const hasShown = ({ timeout }) => ({ 4 | type: actionTypes.STICKY_HAS_SHOWN, 5 | timeout, 6 | }); 7 | 8 | export const hasHidden = ({ closedByUser }) => ({ 9 | type: actionTypes.STICKY_HAS_HIDDEN, 10 | closedByUser, 11 | }); 12 | 13 | export const updateTimeout = ({ timeout }) => ({ 14 | type: actionTypes.STICKY_UPDATE_TIMEOUT, 15 | timeout, 16 | }); 17 | -------------------------------------------------------------------------------- /core/packages/build/pwa/index.js: -------------------------------------------------------------------------------- 1 | import * as actions from '../shared/actions'; 2 | import * as actionTypes from '../shared/actionTypes'; 3 | import reducers from '../shared/reducers'; 4 | import * as selectors from '../shared/selectors'; 5 | import Store from '../shared/stores'; 6 | import { version } from '../../../../package.json'; 7 | 8 | const Build = () => null; 9 | 10 | export default Build; 11 | export { actions, actionTypes, reducers, selectors, Store, version }; 12 | -------------------------------------------------------------------------------- /core/packages/build/shared/actionTypes/index.js: -------------------------------------------------------------------------------- 1 | export const BUILD_UPDATED = 'build/BUILD_UPDATED'; 2 | export const CLIENT_STARTED = 'build/CLIENT_STARTED'; 3 | export const CLIENT_RENDERED = 'build/CLIENT_RENDERED'; 4 | export const CLIENT_SAGAS_INITIALIZED = 'build/CLIENT_SAGAS_INITIALIZED'; 5 | export const SERVER_STARTED = 'build/SERVER_STARTED'; 6 | export const SERVER_FINISHED = 'build/SERVER_FINISHED'; 7 | export const SERVER_SAGAS_INITIALIZED = 'build/SERVER_SAGAS_INITIALIZED'; 8 | -------------------------------------------------------------------------------- /packages/src/pwa/components/LazyFacebookIframe/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import LazyIframe from '../LazyIframe'; 4 | 5 | const LazyFacebook = ({ height, attributes }) => ( 6 | 7 | ); 8 | 9 | LazyFacebook.propTypes = { 10 | height: PropTypes.string.isRequired, 11 | attributes: PropTypes.shape({}).isRequired, 12 | }; 13 | 14 | export default LazyFacebook; 15 | -------------------------------------------------------------------------------- /core/packages/ads/amp/index.js: -------------------------------------------------------------------------------- 1 | import AdsFills, * as components from '../shared/components'; 2 | import * as actions from '../shared/actions'; 3 | import * as actionTypes from '../shared/actionTypes'; 4 | import reducers from '../shared/reducers'; 5 | import * as selectors from '../shared/selectors'; 6 | import * as selectorCreators from '../shared/selectorCreators'; 7 | 8 | export default AdsFills; 9 | export { actions, actionTypes, reducers, selectors, selectorCreators, components }; 10 | -------------------------------------------------------------------------------- /core/packages/ads/pwa/index.js: -------------------------------------------------------------------------------- 1 | import AdsFills, * as components from '../shared/components'; 2 | import * as actions from '../shared/actions'; 3 | import * as actionTypes from '../shared/actionTypes'; 4 | import * as selectors from '../shared/selectors'; 5 | import * as selectorCreators from '../shared/selectorCreators'; 6 | import reducers from '../shared/reducers'; 7 | 8 | export default AdsFills; 9 | export { actions, actionTypes, reducers, selectors, selectorCreators, components }; 10 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Menu/MenuList.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'react-emotion'; 3 | import MenuRoute from './MenuRoute'; 4 | 5 | const routes = ['schedule', 'venue-map', 'announcements', 'menus', 'code-of-conduct']; 6 | 7 | const MenuList = () => ( 8 | {routes.map(route => )} 9 | ); 10 | 11 | export default MenuList; 12 | 13 | const Container = styled.div` 14 | display: flex; 15 | flex-direction: column; 16 | `; 17 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Home/NowNext.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import CardsList from './CardsList'; 4 | import Page from '../Pages/Page'; 5 | 6 | const NowNext = ({ sessions }) => 7 | sessions.some(s => s.type === 'page') ? ( 8 | 9 | ) : ( 10 | 11 | ); 12 | 13 | NowNext.propTypes = { 14 | sessions: PropTypes.arrayOf(PropTypes.shape({})).isRequired, 15 | }; 16 | 17 | export default NowNext; 18 | -------------------------------------------------------------------------------- /packages/src/pwa/processors/index.js: -------------------------------------------------------------------------------- 1 | // import anchor from './anchor'; 2 | // import tzGallery from './tzGallery'; 3 | // import dmGallery from './dmGallery'; 4 | // import myrGallery from './myrGallery'; 5 | // import myrTiledGallery from './myrTiledGallery'; 6 | import removeInlineStyle from './removeInlineStyle'; 7 | import removeAmpIds from './removeAmpIds'; 8 | 9 | export default [ 10 | removeInlineStyle, 11 | removeAmpIds, 12 | // anchor, 13 | // tzGallery, 14 | // dmGallery, 15 | // myrGallery, 16 | // myrTiledGallery, 17 | ]; 18 | -------------------------------------------------------------------------------- /core/packages/build/shared/stores/index.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-console */ 2 | import { types, getParent, onAction } from 'mobx-state-tree'; 3 | 4 | const dev = process.env.NODE_ENV !== 'production'; 5 | 6 | const Build = types 7 | .model('Build') 8 | .props({}) 9 | .views(self => ({ 10 | get root() { 11 | return getParent(self); 12 | }, 13 | })) 14 | .actions(self => ({ 15 | afterCreate: () => { 16 | if (dev) onAction(self.root, action => console.log(action)); 17 | }, 18 | })); 19 | 20 | export default Build; 21 | -------------------------------------------------------------------------------- /core/packages/settings/shared/selectorCreators/index.js: -------------------------------------------------------------------------------- 1 | import { find } from 'lodash'; 2 | 3 | export const getSettings = namespace => state => state.settings.collection[namespace]; 4 | export const getSetting = (namespace, setting) => state => 5 | state.settings.collection[namespace][setting]; 6 | 7 | export const getSettingsById = _id => state => 8 | find(state.settings.collection, item => item._id === _id); 9 | export const getSettingById = (_id, setting) => state => 10 | find(state.settings.collection, item => item._id === _id)[setting]; 11 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Theme/Favicon.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { inject } from 'mobx-react'; 4 | import { Helmet } from 'react-helmet'; 5 | 6 | const Favicon = ({ logoUrl }) => ( 7 | 8 | 9 | 10 | ); 11 | 12 | Favicon.propTypes = { 13 | logoUrl: PropTypes.string.isRequired, 14 | }; 15 | 16 | export default inject(({ settings }) => ({ 17 | logoUrl: settings.theme.logoUrl, 18 | }))(Favicon); 19 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/removeScript.js: -------------------------------------------------------------------------------- 1 | // const scriptsToRemove = [ 2 | // '//platform.twitter.com/widgets.js', 3 | // 'https://platform.twitter.com/widgets.js', 4 | // '//platform.instagram.com/en_US/embeds.js', 5 | // 'https://platform.instagram.com/en_US/embeds.js', 6 | // ]; 7 | 8 | export default { 9 | test: ({ tagName, children }) => 10 | tagName === 'script' || 11 | (tagName === 'p' && 12 | children[0].tagName === 'script'), 13 | // && scriptsToRemove.includes(children[0].attributes.src), 14 | converter: () => null 15 | }; 16 | -------------------------------------------------------------------------------- /packages/README.md: -------------------------------------------------------------------------------- 1 | # WordCamp Theme 2 | 3 | ## Installation 4 | 5 | This is the WCEU theme package 6 | 7 | Use `npm run start:pwa` to start the development environment. 8 | 9 | ## Changelog 10 | 11 | #### 1.0.4 12 | 13 | - Add links to venues 14 | 15 | #### 1.0.3 16 | 17 | - Last styling and bug fixes 18 | - Added iOS metatags 19 | 20 | #### 1.0.2 21 | 22 | - Several bugfixes 23 | - Push Notifications 24 | 25 | #### 1.0.1 26 | 27 | - Some small bugfixes 28 | 29 | #### 1.0.0 30 | 31 | - First version deployed! 32 | 33 | #### 0.2.0 34 | 35 | - First version 36 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Home/Nav.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import styled from 'react-emotion'; 3 | import NavItem from './NavItem'; 4 | 5 | const labels = ['on-now', 'up-next', 'schedule']; 6 | 7 | const Nav = () => ( 8 | {labels.map(label => )} 9 | ); 10 | 11 | export default Nav; 12 | 13 | const Container = styled.div` 14 | position: fixed; 15 | bottom: 0; 16 | left: 0; 17 | width: 100vw; 18 | height: ${({ theme }) => theme.size.button}; 19 | display: flex; 20 | background-color: ${({ theme }) => theme.color.lightGrey}; 21 | `; 22 | -------------------------------------------------------------------------------- /core/packages/analytics/pwa/components/ComScore.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable react/no-danger */ 2 | import React from 'react'; 3 | import PropTypes from 'prop-types'; 4 | import { Helmet } from 'react-helmet'; 5 | 6 | export const comScoreNoScript = id => ( 7 | 10 | ); 11 | 12 | const ComScore = ({ id }) => {comScoreNoScript(id)}; 13 | 14 | ComScore.propTypes = { 15 | id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, 16 | }; 17 | 18 | export default ComScore; 19 | -------------------------------------------------------------------------------- /core/packages/build/shared/selectors/index.js: -------------------------------------------------------------------------------- 1 | // import { createSelector } from 'reselect'; 2 | 3 | export const getExtensions = state => state.build.extensions; 4 | export const getTheme = state => state.build.theme; 5 | export const getSsr = state => state.build.ssr; 6 | export const getInitialUrl = state => state.build.initialUrl; 7 | export const getPerPage = state => state.build.perPage; 8 | 9 | // export const getPackages = createSelector(getExtensions, getTheme, (extensions, theme) => [ 10 | // ...Object.values(extensions), 11 | // theme, 12 | // ]); 13 | 14 | export const getPackages = state => Object.values(state.build.packages); 15 | -------------------------------------------------------------------------------- /packages/src/pwa/converters/anchor.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Anchor from '../components/Anchor'; 3 | 4 | export default { 5 | test: ({ tagName, attributes }) => 6 | tagName === 'a' && attributes.href && /^#(\S+)/.test(attributes.href), 7 | converter: (element, { extraProps }) => { 8 | const { attributes: { href, className } } = element; 9 | 10 | return children => ( 11 | 17 | {children} 18 | 19 | ); 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Manifest/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { Helmet } from 'react-helmet'; 4 | import { inject } from 'mobx-react'; 5 | 6 | const Manifest = ({ siteId, dynamicUrl }) => ( 7 | 8 | 9 | 10 | ); 11 | Manifest.propTypes = { 12 | siteId: PropTypes.string.isRequired, 13 | dynamicUrl: PropTypes.string.isRequired, 14 | } 15 | 16 | export default inject(({ build }) => ({ 17 | siteId: build.siteId, 18 | dynamicUrl: build.dynamicUrl, 19 | }))(Manifest); 20 | -------------------------------------------------------------------------------- /packages/src/pwa/components/Pages/index.js: -------------------------------------------------------------------------------- 1 | import React, { Fragment } from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { inject } from 'mobx-react'; 4 | import Page from './Page'; 5 | import TopBar from '../TopBar'; 6 | import Nav from '../Nav'; 7 | 8 | const Pages = ({ selectedItem }) => ( 9 | 10 | 11 | 12 |