Verified Commit 1276aab3 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Revert "Add april fool"

This reverts commit 5ad975c1.
parent 5ad975c1
...@@ -15,7 +15,7 @@ export default class EventCard { ...@@ -15,7 +15,7 @@ export default class EventCard {
* ``` * ```
*/ */
static view({ attrs: { item, style } }) { static view({ attrs: { item } }) {
let url; let url;
let cardContent; let cardContent;
...@@ -38,7 +38,6 @@ export default class EventCard { ...@@ -38,7 +38,6 @@ export default class EventCard {
} }
return m(Card, { return m(Card, {
style,
url, url,
content: m('div.image.ratio-paper-a-vertical', cardContent), content: m('div.image.ratio-paper-a-vertical', cardContent),
}); });
......
...@@ -9,7 +9,6 @@ import Button from './Button'; ...@@ -9,7 +9,6 @@ import Button from './Button';
import Checkbox from './Checkbox'; import Checkbox from './Checkbox';
import Select from './Select'; import Select from './Select';
import TextField from './TextField'; import TextField from './TextField';
import { isLsdTripEnabled, getTadaAnimation } from '../models/lsd';
import './FilterView.less'; import './FilterView.less';
/** /**
...@@ -161,7 +160,6 @@ export default class FilterViewComponent { ...@@ -161,7 +160,6 @@ export default class FilterViewComponent {
}); });
return m(Search, { return m(Search, {
style: isLsdTripEnabled() ? getTadaAnimation() : null,
textfield: { textfield: {
label: field.label || '', label: field.label || '',
value: this.values[field.key], value: this.values[field.key],
...@@ -186,7 +184,6 @@ export default class FilterViewComponent { ...@@ -186,7 +184,6 @@ export default class FilterViewComponent {
this.values[field.key] = this.values[field.key] || field.default || ''; this.values[field.key] = this.values[field.key] || field.default || '';
return m(TextField, { return m(TextField, {
style: isLsdTripEnabled() ? getTadaAnimation() : null,
label: field.label || '', label: field.label || '',
value: this.values[field.key], value: this.values[field.key],
onChange: state => { onChange: state => {
...@@ -212,7 +209,7 @@ export default class FilterViewComponent { ...@@ -212,7 +209,7 @@ export default class FilterViewComponent {
field.values.map(item => items.push(this._createCheckbox(field.key, item.label, item.value))); field.values.map(item => items.push(this._createCheckbox(field.key, item.label, item.value)));
} }
return m('div.check', { style: isLsdTripEnabled() ? getTadaAnimation() : null }, items); return m('div.check', items);
} }
_createCheckbox(key, label, value) { _createCheckbox(key, label, value) {
...@@ -234,7 +231,7 @@ export default class FilterViewComponent { ...@@ -234,7 +231,7 @@ export default class FilterViewComponent {
} }
_createRadioGroup(field) { _createRadioGroup(field) {
return m('div.radio', { style: isLsdTripEnabled() ? getTadaAnimation() : null }, [ return m('div.radio', [
field.label ? m('h4', field.label) : m(''), field.label ? m('h4', field.label) : m(''),
m(RadioGroup, { m(RadioGroup, {
...field, ...field,
...@@ -283,11 +280,7 @@ export default class FilterViewComponent { ...@@ -283,11 +280,7 @@ export default class FilterViewComponent {
this.notify(); this.notify();
}; };
return m( return m(Select, options);
'div',
{ style: `width:100%;display:grid;${isLsdTripEnabled() ? getTadaAnimation() : ''}` },
m(Select, options)
);
} }
_createButton(field) { _createButton(field) {
...@@ -305,11 +298,7 @@ export default class FilterViewComponent { ...@@ -305,11 +298,7 @@ export default class FilterViewComponent {
options.className = field.className; options.className = field.className;
} }
return m( return m(Button, options);
'div',
{ style: `width:100%;display:grid;${isLsdTripEnabled() ? getTadaAnimation() : ''}` },
m(Button, options)
);
} }
// eslint-disable-next-line class-methods-use-this // eslint-disable-next-line class-methods-use-this
......
...@@ -31,8 +31,6 @@ export default { ...@@ -31,8 +31,6 @@ export default {
'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><g id="Sharp"><path fill="#000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41z"/></g></svg>', '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><g id="Sharp"><path fill="#000" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41z"/></g></svg>',
checkboxMarked: checkboxMarked:
'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" /></svg>', '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z" /></svg>',
stop:
'<svg style="width:24px;height:24px" viewBox="0 0 24 24"><path fill="#000000" d="M18,18H6V6H18V18Z" /></svg>',
// File Types // File Types
file: file:
......
...@@ -4,8 +4,6 @@ export default { ...@@ -4,8 +4,6 @@ export default {
de: 'Deutsch', de: 'Deutsch',
en: 'Englisch', en: 'Englisch',
}, },
greetingCodingWeekend:
'Grüsse vom Coding Weekend! Klicke rechts auf «Stop» um zur Normalansicht zurückzukehren.',
loading: 'Laden...', loading: 'Laden...',
emptyList: 'Es sind keine Einträge zum Anzeigen vorhanden.', emptyList: 'Es sind keine Einträge zum Anzeigen vorhanden.',
close: 'schliessen', close: 'schliessen',
......
...@@ -4,8 +4,6 @@ export default { ...@@ -4,8 +4,6 @@ export default {
de: 'German', de: 'German',
en: 'English', en: 'English',
}, },
greetingCodingWeekend:
'Greetings from the Coding Weekend! Click on the «Stop» button on the right to return to the default view.',
loading: 'Loading...', loading: 'Loading...',
emptyList: 'There are no items to show.', emptyList: 'There are no items to show.',
close: 'close', close: 'close',
......
let isEnabled = false;
export function isLsdTripEnabled() {
return isEnabled;
}
export function setLsdTripState(state) {
isEnabled = state;
}
export function getTadaAnimation() {
return `animation: tada 1s linear ${Math.floor(Math.random() * 500)}ms infinite !important`;
}
export function getTada2Animation() {
return `animation: tada2 1s linear ${Math.floor(Math.random() * 500)}ms infinite !important`;
}
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
@import './filterView.less'; @import './filterView.less';
@import './jobofferList.less'; @import './jobofferList.less';
@import './jobofferDetails.less'; @import './jobofferDetails.less';
@import './lsd.less';
* { * {
box-sizing: border-box; box-sizing: border-box;
......
@import './colors.less'; @import './colors.less';
.report-issue { .report-issue {
width: 100%;
background-color: @color-grey; background-color: @color-grey;
text-align: center; text-align: center;
padding: 1em; padding: 1em;
......
@keyframes lsdtrip {
0% {
background-color: hsl(201, 100%, 39%);
}
10% {
background-color: hsl(237, 100%, 39%);
}
20% {
background-color: hsl(273, 100%, 39%);
}
30% {
background-color: hsl(309, 100%, 39%);
}
40% {
background-color: hsl(345, 100%, 39%);
}
50% {
background-color: hsl(21, 100%, 39%);
}
60% {
background-color: hsl(57, 100%, 39%);
}
70% {
background-color: hsl(93, 100%, 39%);
}
80% {
background-color: hsl(129, 100%, 39%);
}
90% {
background-color: hsl(165, 100%, 39%);
}
100% {
background-color: hsl(201, 100%, 39%);
}
}
/* Based on tada animation from Animate.css https://github.com/daneden/animate.css */
@keyframes tada {
from {
transform: scale3d(1, 1, 1);
}
10%,20% {
transform: scale3d(.8, .8, .8) rotate3d(0, 0, 1, -4deg);
}
30%,50%,70%,90% {
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 4deg);
}
40%,60%,80% {
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -4deg);
}
to {
transform: scale3d(1, 1, 1);
}
}
@keyframes tada {
from {
transform: scale3d(1, 1, 1);
}
10%,20% {
transform: scale3d(.8, .8, .8) rotate3d(0, 0, 1, -4deg);
}
30%,50%,70%,90% {
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, 4deg);
}
40%,60%,80% {
transform: scale3d(1, 1, 1) rotate3d(0, 0, 1, -4deg);
}
to {
transform: scale3d(1, 1, 1);
}
}
@keyframes tada2 {
from {
transform: scale3d(1, 1, 1);
}
10%,20% {
transform: translateX(-1%) scale3d(.95, .95, .95);
}
30%,50%,70%,90% {
transform: translateX(3%) scale3d(1, 1, 1);
}
40%,60%,80% {
transform: translateX(-2%) scale3d(.95, .95, .95);
}
to {
transform: scale3d(1, 1, 1);
}
}
@keyframes floatText {
from {
transform: translateX(100%);
}
to {
transform: translateX(-200%);
}
}
.greeting {
display: inline-block;
overflow: hidden;
white-space: nowrap;
position: absolute;
width: 100%;
height: 100%;
margin: 0;
line-height: 1em;
text-align: center;
transform: translateX(100%);
&.animation1 {
animation: floatText 30s linear 0s infinite;
}
&.animation2 {
animation: floatText 30s linear 10s infinite;
}
&.animation3 {
animation: floatText 30s linear 20s infinite;
}
}
...@@ -6,7 +6,6 @@ import { boardPortraits, boardImage } from '../../content/amiv/data/board_portra ...@@ -6,7 +6,6 @@ import { boardPortraits, boardImage } from '../../content/amiv/data/board_portra
import { boardTaskDescriptions } from '../../content/amiv/data/board_roles'; import { boardTaskDescriptions } from '../../content/amiv/data/board_roles';
import { i18n, currentLanguage } from '../../models/language'; import { i18n, currentLanguage } from '../../models/language';
import { TranslationUnavailable } from '../errors'; import { TranslationUnavailable } from '../errors';
import { isLsdTripEnabled, getTadaAnimation } from '../../models/lsd';
class ImageGroup { class ImageGroup {
oninit(vnode) { oninit(vnode) {
...@@ -34,7 +33,6 @@ class ImageGroup { ...@@ -34,7 +33,6 @@ class ImageGroup {
if (group.image) { if (group.image) {
image = m( image = m(
'div.image.ratio-3to2', 'div.image.ratio-3to2',
{ style: isLsdTripEnabled() ? getTadaAnimation() : null },
m('img', { src: `/${group.image}`, alt: this._portraitNames.join(' & ') }) m('img', { src: `/${group.image}`, alt: this._portraitNames.join(' & ') })
); );
} else { } else {
...@@ -120,7 +118,6 @@ export default class Board { ...@@ -120,7 +118,6 @@ export default class Board {
if (boardImage) { if (boardImage) {
image = m( image = m(
'div.image.ratio-3to2', 'div.image.ratio-3to2',
{ style: isLsdTripEnabled() ? getTadaAnimation() : null },
m('img', { src: `/${boardImage}`, alt: i18n('board.title') }) m('img', { src: `/${boardImage}`, alt: i18n('board.title') })
); );
} else { } else {
......
...@@ -9,7 +9,6 @@ import { data as data_ressorts } from '../../content/amiv/data/ressorts'; ...@@ -9,7 +9,6 @@ import { data as data_ressorts } from '../../content/amiv/data/ressorts';
import { data as data_commissions } from '../../content/amiv/data/commissions'; import { data as data_commissions } from '../../content/amiv/data/commissions';
import { i18n, currentLanguage } from '../../models/language'; import { i18n, currentLanguage } from '../../models/language';
import { TranslationUnavailable } from '../errors'; import { TranslationUnavailable } from '../errors';
import { isLsdTripEnabled, getTadaAnimation, getTada2Animation } from '../../models/lsd';
class Team { class Team {
static _parseMarkdownText(text) { static _parseMarkdownText(text) {
...@@ -100,7 +99,6 @@ class Team { ...@@ -100,7 +99,6 @@ class Team {
return m(Card, { return m(Card, {
className: 'team', className: 'team',
style: isLsdTripEnabled() ? getTadaAnimation() : null,
content: [ content: [
{ {
media: { media: {
...@@ -130,19 +128,11 @@ export default class Teams { ...@@ -130,19 +128,11 @@ export default class Teams {
static view() { static view() {
return m('div', [ return m('div', [
m('div', [ m('div', [
m( m('h1.centered', i18n('teams.ressorts')),
'h1.centered',
{ style: isLsdTripEnabled() ? getTada2Animation() : null },
i18n('teams.ressorts')
),
m('div.teams', data_ressorts.map(ressort => m(Team, { team: ressort }))), m('div.teams', data_ressorts.map(ressort => m(Team, { team: ressort }))),
]), ]),
m('div', [ m('div', [
m( m('h1.centered', i18n('teams.commissions')),
'h1.centered',
{ style: isLsdTripEnabled() ? getTada2Animation() : null },
i18n('teams.commissions')
),
m('div.teams', data_commissions.map(commission => m(Team, { team: commission }))), m('div.teams', data_commissions.map(commission => m(Team, { team: commission }))),
]), ]),
]); ]);
......
...@@ -81,7 +81,7 @@ export class TranslationUnavailable { ...@@ -81,7 +81,7 @@ export class TranslationUnavailable {
* @return {Infobox} * @return {Infobox}
*/ */
export class Infobox { export class Infobox {
static view({ attrs: { icon, label, style } }) { static view({ attrs: { icon, label } }) {
return m('div', { class: 'infobox', style }, [icon, m('span', label)]); return m('div', { class: 'infobox' }, [icon, m('span', label)]);
} }
} }
...@@ -6,7 +6,6 @@ import logos from '../../images/logos'; ...@@ -6,7 +6,6 @@ import logos from '../../images/logos';
import { i18n, currentLocale } from '../../models/language'; import { i18n, currentLocale } from '../../models/language';
import { EventController } from '../../models/events'; import { EventController } from '../../models/events';
import { FilteredListPage, FilteredListDataStore } from '../filteredListPage'; import { FilteredListPage, FilteredListDataStore } from '../filteredListPage';
import { isLsdTripEnabled, getTada2Animation } from '../../models/lsd';
const controller = new EventController({}, true); const controller = new EventController({}, true);
const dataStore = new FilteredListDataStore(); const dataStore = new FilteredListDataStore();
...@@ -191,45 +190,41 @@ export default class EventList extends FilteredListPage { ...@@ -191,45 +190,41 @@ export default class EventList extends FilteredListPage {
}, },
]; ];
return m( return m(ExpansionPanel, {
'div', id: this.getItemElementId(event._id),
{ style: isLsdTripEnabled() ? getTada2Animation() : null }, expanded: event._id === selectedId,
m(ExpansionPanel, { separated: true,
id: this.getItemElementId(event._id), duration: animationDuration,
expanded: event._id === selectedId, onChange: expanded => {
separated: true, this.onChange(event._id, expanded, animationDuration);
duration: animationDuration, },
onChange: expanded => { header: () =>
this.onChange(event._id, expanded, animationDuration); m('div.event-header', [
}, m('div.image.ratio-1to1', m('img', { src: imageurl, alt: event.getTitle() })),
header: () => m('div.event-content', [
m('div.event-header', [ m('h2.title', event.getTitle()),
m('div.image.ratio-1to1', m('img', { src: imageurl, alt: event.getTitle() })), m('div.catchphrase', event.getCatchphrase()),
m('div.event-content', [ m('div.date', this.constructor._renderEventTime(event.time_start, event.time_end)),
m('h2.title', event.getTitle()), m('div.properties', properties.map(item => this.constructor._renderProperty(item))),
m('div.catchphrase', event.getCatchphrase()),
m('div.date', this.constructor._renderEventTime(event.time_start, event.time_end)),
m('div.properties', properties.map(item => this.constructor._renderProperty(item))),
]),
]), ]),
content: ({ expanded }) => { ]),
if (expanded) { content: ({ expanded }) => {
if (eventDetailsModule) { if (expanded) {
return m(eventDetailsModule.default, { event }); if (eventDetailsModule) {
} return m(eventDetailsModule.default, { event });
import(/* webpackInclude: /\.js$/ */ /* webpackChunkName: "event" */ './eventDetails').then(
loadedModule => {
eventDetailsModule = loadedModule;
m.redraw();
}
);
return m('.event-loading', m(Spinner, { show: true, size: '48px' }));
} }
return m('');
}, import(/* webpackInclude: /\.js$/ */ /* webpackChunkName: "event" */ './eventDetails').then(
}) loadedModule => {
); eventDetailsModule = loadedModule;
m.redraw();
}
);
return m('.event-loading', m(Spinner, { show: true, size: '48px' }));
}
return m('');
},
});
} }
static _renderProperty({ name = null, value, visible = false }) { static _renderProperty({ name = null, value, visible = false }) {
......
...@@ -10,7 +10,6 @@ import { error } from '../models/log'; ...@@ -10,7 +10,6 @@ import { error } from '../models/log';
import { i18n, currentLanguage } from '../models/language'; import { i18n, currentLanguage } from '../models/language';
import FilterView from '../components/FilterView'; import FilterView from '../components/FilterView';
import icons from '../images/icons'; import icons from '../images/icons';
import { isLsdTripEnabled, getTadaAnimation, getTada2Animation } from '../models/lsd';
const LIST_LOADING_DELAY = 150; const LIST_LOADING_DELAY = 150;
const LIST_LOADING = 'loading'; const LIST_LOADING = 'loading';
...@@ -526,7 +525,6 @@ export class FilteredListPage { ...@@ -526,7 +525,6 @@ export class FilteredListPage {
m( m(
Shadow, Shadow,
{ {
style: isLsdTripEnabled() ? getTada2Animation() : null,
className: 'list_header', className: 'list_header',
shadowDepth: 1, shadowDepth: 1,
}, },
...@@ -573,7 +571,6 @@ export class FilteredListPage { ...@@ -573,7 +571,6 @@ export class FilteredListPage {
} }
return m( return m(
'div.load-more-items', 'div.load-more-items',
{ style: isLsdTripEnabled() ? getTadaAnimation() : null },
m(Button, { m(Button, {
border: true, border: true,
extraWide: true, extraWide: true,
......
...@@ -3,7 +3,6 @@ import { Icon } from 'polythene-mithril'; ...@@ -3,7 +3,6 @@ import { Icon } from 'polythene-mithril';
import { currentLanguage, i18n } from '../models/language'; import { currentLanguage, i18n } from '../models/language';
import logos from '../images/logos'; import logos from '../images/logos';
import icons from '../images/icons'; import icons from '../images/icons';
import { isLsdTripEnabled, getTadaAnimation } from '../models/lsd';
const renderVseth = coord => {