Commit df2b9988 authored by Luzian Bieri's avatar Luzian Bieri
Browse files

Added infoscreen pitures, adjusted margins

parent 910a1bfc
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
} }
.spots { .spots {
margin: 2% 0 2% 0; margin: 2% 0;
font-weight: 600; font-weight: 600;
font-size: 80%; font-size: 80%;
} }
...@@ -32,4 +32,14 @@ ...@@ -32,4 +32,14 @@
button { button {
margin-right: 1em; margin-right: 1em;
} }
.background {
width: 100%;
height: calc(100% / 1920 * 1200);
object-fit: cover;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
height: 20vmin; height: 15vmin;
.grid-container { .grid-container {
width: 100%; width: 100%;
...@@ -58,14 +58,15 @@ ...@@ -58,14 +58,15 @@
} }
img { img {
width: 20vmin; width: 15vmin;
height: 20vmin; height: 15vmin;
} }
.img-container { .img-container {
width: 20vmin; width: 15vmin;
height: 20vmin; height: 15vmin;
position: relative; position: relative;
object-fit: cover;
} }
} }
......
...@@ -192,6 +192,7 @@ ...@@ -192,6 +192,7 @@
.details { .details {
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
@media @tablet { @media @tablet {
grid-column: ~'1 / 3'; grid-column: ~'1 / 3';
} }
......
...@@ -7,6 +7,7 @@ import { log } from '../../models/log'; ...@@ -7,6 +7,7 @@ import { log } from '../../models/log';
import { isLoggedIn, login } from '../../models/auth'; import { isLoggedIn, login } from '../../models/auth';
import { Button } from '../../components'; import { Button } from '../../components';
import { i18n } from '../../models/language'; import { i18n } from '../../models/language';
import { apiUrl } from 'config';
class EventSignupForm { class EventSignupForm {
oninit(vnode) { oninit(vnode) {
...@@ -174,6 +175,7 @@ export default class EventDetails { ...@@ -174,6 +175,7 @@ export default class EventDetails {
} }
return m('div.event-details', [ return m('div.event-details', [
m('img', {class: 'background', src:`${apiUrl}${event.img_infoscreen.file}`, alt:''}),
m('div', {class: 'title'}, event.getTitle()), m('div', {class: 'title'}, event.getTitle()),
m('div', {class: 'date'}, day + time + ' '+ i18n('date.oclock', )), m('div', {class: 'date'}, day + time + ' '+ i18n('date.oclock', )),
m('div', {class: 'price'}, i18n('events.price', ) + ': ' + price), m('div', {class: 'price'}, i18n('events.price', ) + ': ' + price),
......
...@@ -171,7 +171,7 @@ export default class EventList extends FilteredListPage { ...@@ -171,7 +171,7 @@ export default class EventList extends FilteredListPage {
} }
static _renderEventListItem(event, className = '') { static _renderEventListItem(event, className = '') {
const imageurl = event.img_poster ? `${apiUrl}${event.img_poster.file}` : AmivLogo; const imageurl = event.img_thumbnail ? `${apiUrl}${event.img_thumbnail.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'); 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) { if (event.price) {
...@@ -201,7 +201,6 @@ export default class EventList extends FilteredListPage { ...@@ -201,7 +201,6 @@ export default class EventList extends FilteredListPage {
}, },
[ [
m('div', {class: 'img-container', }, m('img', {src: imageurl })), m('div', {class: 'img-container', }, m('img', {src: imageurl })),
//m('img', {src: imageurl }),
m('div',{class: 'grid-container',}, m('div',{class: 'grid-container',},
[ [
m('div', {class: 'title ',}, event.getTitle()), m('div', {class: 'title ',}, event.getTitle()),
......
Markdown is supported
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