Commit 15a59697 authored by Luzian Bieri's avatar Luzian Bieri
Browse files

Fixed problems due to merge with master

parents 53f8a0d4 566654a8
......@@ -4,6 +4,7 @@
@import './teams.less';
@import './dimensions.less';
@import './errors.less';
@import './eventList.less';
@import './eventDetails.less';
@import './filteredListPage.less';
@import './footer.less';
......
#event-list {
.list-item {
.event-list-item {
border-bottom: 1px solid #000;
cursor: pointer;
display: flex;
flex-direction: row;
align-items: center;
height: 20vmin;
.grid-container {
width: 100%;
padding: 1em .4em;
padding: 2vmin 2vmin;
display: grid;
grid-gap: 0;
grid-template-columns: auto auto;
grid-template-columns: auto 40vmin;
grid-template-rows: 50% 25% 25%;
.title {
margin: 0;
margin: 0 0 1.5vmin 0;
display: flex;
font-weight: 100;
font-size: 6vmin;
......@@ -25,7 +26,7 @@
}
.price {
margin: .5em 0 0;
margin: 0;
font-size: 4vmin;
font-weight: 100;
color: rgb(107, 108, 119);
......@@ -34,11 +35,9 @@
}
.date-container {
margin: 0 0 0 auto;
margin: 0;
font-weight: 100;
display: grid;
grid-template-rows: auto auto;
color: rgb(107, 108, 119);
color: rgb(28, 34, 105);
grid-column: 2;
grid-row: 2;
}
......@@ -47,8 +46,7 @@
margin: 0;
font-size: 4vmin;
font-weight: 100;
width: 6em;
grid-row: 1;
grid-column: 1;
color: rgb(107, 108, 119);
}
......@@ -56,8 +54,7 @@
margin: 0;
font-size: 3vmin;
font-weight: 100;
width: 6em;
grid-row: 2;
grid-column: 2;
color: rgb(107, 108, 119);
}
}
......
......@@ -125,7 +125,6 @@
display: flex;
flex-direction: row;
align-items: center;
height: 5em;
&:last-of-type {
border: none;
......
......@@ -173,46 +173,46 @@ export default class EventList extends FilteredListPage {
static _renderEventListItem(event, className = '') {
const imageurl = event.img_poster ? `${apiUrl}${event.img_poster.file}` : AmivLogo;
let price = ''; //Dies wäre cooler gewesen, fand aber Sandro nicht so toll;) const price = event.price ? `CHF ${Math.floor(event.price/100) + '.' + (((event.price%100) == 0) ? '-' : ((event.price%100<10) ? '0': '') + event.price%100)}` : i18n('events.free');
if (event.price) {
price += 'CHF ' + Math.floor(event.price/100) + '.' +
(event.price%100 == 0
? '-'
: (event.price%100<10
? +'0'
: +''
+ event.price%100));
}
else{
price = i18n('events.free');
}
const d = new Date(event.time_start);
const day = i18n('date.weekdays%n', d.getDay()) + ', '
const date = `${d.getDate()}. ${i18n('date.months%n', d.getMonth()).slice(0, 3)} ${d.getFullYear()}`;
return m(
'div',
{
class: `list-item ${className}`,
onclick: () => {
m.route.set(`/${currentLanguage()}/events/${event._id}`);
let price = ''; //Dies wäre cooler gewesen, fand aber Sandro nicht so toll;) const price = event.price ? `CHF ${Math.floor(event.price/100) + '.' + (((event.price%100) == 0) ? '-' : ((event.price%100<10) ? '0': '') + event.price%100)}` : i18n('events.free');
if (event.price) {
price += 'CHF ' + Math.floor(event.price/100) + '.' +
(event.price%100 == 0
? '-'
: (event.price%100<10
? +'0'
: +''
+ event.price%100));
}
else{
price = i18n('events.free');
}
const d = new Date(event.time_start);
const day = i18n('date.weekdays%n', d.getDay()) + ', '
const date = `${d.getDate()}. ${i18n('date.months%n', d.getMonth()).slice(0, 3)} ${d.getFullYear()}`;
return m(
'div',
{
class: `list-item event-list-item ${className}`,
onclick: () => {
m.route.set(`/${currentLanguage()}/events/${event._id}`);
},
},
},
[
m('div', {class: 'img-container', }, m('img', {src: imageurl })),
//m('img', {src: imageurl }),
m('div',{class: 'grid-container',},
[
m('div', {class: 'title ',}, event.getTitle()),
m('div', {class: 'price ',}, price),
m('div', {class: 'date-container',}, [
m('div', {class: 'weekday ',}, day),
m('div', {class: 'date',}, date)]
)
]
),
]
[
m('div', {class: 'img-container', }, m('img', {src: imageurl })),
//m('img', {src: imageurl }),
m('div',{class: 'grid-container',},
[
m('div', {class: 'title ',}, event.getTitle()),
m('div', {class: 'price ',}, price),
m('div', {class: 'date-container',}, [
m('span', {class: 'weekday ',}, day),
m('span', {class: 'date',}, date)]
)
]
),
]
);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment