2020-05-05 09:10:41 -04:00
|
|
|
<template>
|
2020-05-05 09:52:46 -04:00
|
|
|
<div id="app">
|
|
|
|
<nav class="navbar has-background-light" role="navigation" aria-label="main navigation">
|
|
|
|
<div class="navbar-brand">
|
|
|
|
<a class="navbar-item is-size-5" href="/">Seance</a>
|
|
|
|
|
|
|
|
<a role="button" class="navbar navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navbarMain">
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="navbarMain" class="navbar-menu">
|
|
|
|
<div class="navbar-start">
|
|
|
|
<a class="navbar-item">Home</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="navbar-end">
|
|
|
|
<div class="navbar-item">
|
|
|
|
<div class="button is-primary" v-if="user">{{ user.name }}</div>
|
|
|
|
<div class="button is-primary" v-else>Sign in</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
|
2020-05-07 13:27:34 -04:00
|
|
|
<div class="column is-half is-offset-one-quarter has-text-centered" style="margin-top: 10%;">
|
2020-05-05 09:52:46 -04:00
|
|
|
<h1 class="title">{{ title }}</h1>
|
2020-05-07 13:27:34 -04:00
|
|
|
<form action="/fetch/medium/" method="post">
|
|
|
|
<input type="search" class="input is-medium is-rounded is-focused" placeholder="Enter a Medium link..."/>
|
2020-05-10 13:14:47 -04:00
|
|
|
<p>or, use the bookmarklet <a class="button is-primary is-small" :href="bookmarklet">Add to Seance</a></p>
|
2020-05-07 13:27:34 -04:00
|
|
|
</form>
|
2020-05-05 09:52:46 -04:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
2020-05-05 09:10:41 -04:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2020-05-05 09:52:46 -04:00
|
|
|
name: 'Seance',
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
title: 'Seance',
|
|
|
|
user: null,
|
2020-05-10 13:14:47 -04:00
|
|
|
baseUrl: 'http://localhost:4000',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
bookmarklet () {
|
|
|
|
return `javascript:(()=>{document.title='[Loading...] '+document.title;s=document.createElement('script');s.src='${this.baseUrl}/bookmarklet.js';s.dataset.seanceUrl='${this.baseUrl}';document.body.appendChild(s)})()`
|
2020-05-05 09:52:46 -04:00
|
|
|
}
|
|
|
|
}
|
2020-05-05 09:10:41 -04:00
|
|
|
}
|
|
|
|
</script>
|
2020-05-05 09:52:46 -04:00
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import "../node_modules/bulma/bulma.sass"
|
|
|
|
</style>
|