diff --git a/images/logo-monochrome0.svg b/images/logo-monochrome0.svg deleted file mode 100644 index dec1373b2c..0000000000 --- a/images/logo-monochrome0.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/index.html b/index.html index 0d3cba8ab4..b6e5e4cc16 100644 --- a/index.html +++ b/index.html @@ -105,6 +105,9 @@ + + + - - diff --git a/src/pages/home-page.ts b/src/pages/home-page.ts index bc8748e7a2..ecf38b7bf2 100644 --- a/src/pages/home-page.ts +++ b/src/pages/home-page.ts @@ -1,6 +1,10 @@ import { customElement, property } from '@polymer/decorators'; import '@polymer/iron-icon'; import { html, PolymerElement } from '@polymer/polymer'; +import {AppLocalizeBehavior} from '@polymer/app-localize-behavior/app-localize-behavior.js'; +import {mixinBehaviors} from '@polymer/polymer/lib/legacy/class.js'; + + import '../components/about-block'; import '../elements/about-organizer-block'; import '../elements/featured-videos'; @@ -18,9 +22,11 @@ import { toggleVideoDialog } from '../store/ui/actions'; import { Viewport } from '../store/ui/types'; import { TempAny } from '../temp-any'; import { scrollToY } from '../utils/scrolling'; +import { getUserLanguage } from '../utils/functions'; -@customElement('home-page') -export class HomePage extends ReduxMixin(PolymerElement) { +// export class HomePage extends ReduxMixin(mixinBehaviors([AppLocalizeBehavior], PolymerElement)) { + +export class HomePage extends ReduxMixin(mixinBehaviors([AppLocalizeBehavior], PolymerElement)) { static get template() { return html` - - - - - - - - -
{$ heroSettings.speakers.title $}
-

{$ heroSettings.speakers.description $}

-
- - - - - -
- -
- - - - - - - - diff --git a/src/pages/team-page.html b/src/pages/team-page.html deleted file mode 100644 index 993ed45fc2..0000000000 --- a/src/pages/team-page.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/utils/functions.ts b/src/utils/functions.ts index 7c389a8601..6224f7bfb6 100644 --- a/src/utils/functions.ts +++ b/src/utils/functions.ts @@ -60,3 +60,18 @@ export const toggleQueryParam = (currentQueryParams: string | null, key: string, : currentKeyValuePairs.concat(keyValue); return resultArray.join('&'); }; + +export const getUserLanguage = () => { + var lang = window.navigator.languages ? window.navigator.languages[0] : null; + lang = lang || window.navigator.language || window.navigator['browserLanguage'] || window.navigator['userLanguage']; + if (lang.indexOf('-') !== -1) { + lang = lang.split('-')[0]; + } + if (lang.indexOf('_') !== -1) { + lang = lang.split('_')[0]; + } + if (lang != 'fr' && lang != 'en') { + lang = 'en'; + } + return lang; +}