Browse Source

version 1

master
Jørgen Lien Sellæg 6 years ago
parent
commit
2c9f046c8e
  1. 8
      manifest.json
  2. 1
      size-plugin.json
  3. 20
      src/Events.js
  4. 3
      src/index.js
  5. 24
      src/style.css

8
manifest.json

@ -6,11 +6,5 @@
"orientation": "portrait",
"background_color": "#fff",
"theme_color": "#673ab8",
"icons": [
{
"src": "/assets/icon.png",
"type": "image/png",
"sizes": "512x512"
}
]
"icons": []
}

1
size-plugin.json

File diff suppressed because one or more lines are too long

20
src/Events.js

@ -3,20 +3,24 @@ import { useEffect, useState } from 'preact/hooks'
const endpoint = 'https://kultar.sout.no/events/'
const fetch_options = {}
function Link(props) {
return <a {...props} target="_blank" rel="noopener noreferrer" />;
}
function Facebook({ event_id }) {
const facebook_event_url = `https://facebook.com/events/${event_id}/`
return (
<a href={facebook_event_url} title="Åpne facebookarrangement.">
Facebook
</a>
<Link href={facebook_event_url} title="Åpne facebookarrangement.">
Mer info
</Link>
)
}
function Tickets({ ticket_url }) {
return (
<a href={ticket_url} title="Kjøp billett hos kultar.">
<Link href={ticket_url} title="Kjøp billett hos kultar.">
Kjøp billett
</a>
</Link>
)
}
@ -56,6 +60,8 @@ function Location({ location }) {
return ''
}
function Links({ event_id, ticket_url }) {
if (ticket_url !== null) {
return (
@ -86,10 +92,6 @@ function EventCard({ event }) {
function Event({ event, index }) {
const isFirstEvent = index === 0
/* if (isFirstEvent) {
* return <EventCard event={event} />
* } */
return (
<>
<EventCard event={event} />

3
src/index.js

@ -1,5 +1,6 @@
import './style'
import Events from './Events.js'
import './style.css'
export default function App() {
return <Events />

24
src/style.css

@ -1,9 +1,21 @@
html,
body {
font: 14px/1.21 'Helvetica Neue', arial, sans-serif;
font-weight: 400;
a {
font-family: inherit;
color: #2ba6bc;
}
a:hover, a:focus {
color: #2795b6;
}
h1 {
text-align: center;
p {
font-family: inherit;
}
body {
font-family:"Century Gothic", "Trebuchet MS", Helvetica, Arial, sans-serif;
font-style: normal;
cursor: default;
color: #222222;
margin: 0px;
padding: 0px;
}

Loading…
Cancel
Save