summaryrefslogtreecommitdiff
path: root/plugins/vue/demo/index.html
blob: 7a142c192d5e671b0f93ef6d30feb7c2be12746c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Graffiti Vue</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css">
  <script async src="https://ga.jspm.io/npm:es-module-shims@1.6.2/dist/es-module-shims.js"></script>
  <script type="importmap">{ "imports": {
    "vue": "https://cdnjs.cloudflare.com/ajax/libs/vue/3.2.45/vue.esm-browser.prod.min.js",
    "graffiti-vue": "../plugin.js"
  }}</script>
  <script type="module">
    // "graffiti-vue": "https://graffiti.garden/graffiti-js/plugins/vue/plugin.js"
    import { createApp } from 'vue'
    import { Name, SetMyName } from './components/name.js'
    import Chat from './components/chat.js'
    import GraffitiVue from 'graffiti-vue'
    createApp()
      .use(GraffitiVue)
      .component('Name', Name)
      .component('SetMyName', SetMyName)
      .component('Chat', Chat)
      .mount('#app')
  </script>
</head>
<body id="app">
<!-------------------------------------------------------------->

  <h1>
    Connection Status
  </h1>

  <p>
    Connected to the Graffiti server? {{ $graffitiConnected }}
  </p>

  <h1>
    Logging In
  </h1>

  <p>
    <button @click="$graffitiToggleLogIn">
      {{ !$graffitiMyID? 'Log In' : 'Log Out' }}
    </button>
  </p>

  <p>
    My Graffiti ID is "{{ $graffitiMyID }}"
  </p>

  <br>

  <h1>
    Profile
  </h1>

  <p>
    My name is: <name :of="$graffitiMyID"></name>
  </p>

  <set-my-name :tags="[$graffitiMyID]"></set-my-name>

  <br>

  <h1>
    Chatting
  </h1>

  <chat :tags="['demo']"></chat>

  <!-- Add a like button -->


  <!-- Filter by likes -->


  <!-- different contexts -->

  <!-- Private messages -->
  
<!-------------------------------------------------------------->
</body>
</html>