-
Notifications
You must be signed in to change notification settings - Fork 5
/
App.vue
173 lines (144 loc) · 5.25 KB
/
App.vue
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<template>
<div id="app">
<h1>embetty-vue</h1>
<header>Also try resizing the page!</header>
<h2>Setup</h2>
<article>
<h3>NPM</h3>
<pre class="language-js"><code>import EmbettyVue from 'embetty-vue';
Vue.use(EmbettyVue, {
// required
serverUrl: '/path/to/embetty-server', // without trailing spaces
// optional
posterImageMode: 'cover' // or 'contain', see example below
});</code></pre>
</article>
<h2>Tweet</h2>
<article>
<h3>Basic usage</h3>
<embetty-tweet status="880759671543541763" />
<pre class="language-html"><code><embetty-tweet status="880759671543541763" /></code></pre>
</article>
<article>
<h3>Tweet containing link and @mentions</h3>
<embetty-tweet status="928365837123227654" />
<pre class="language-html"><code><embetty-tweet status="928365837123227654" /></code></pre>
</article>
<article>
<h3>Tweet containing a photo</h3>
<embetty-tweet status="921685144594931712" />
<pre class="language-html"><code><embetty-tweet status="921685144594931712" /></code></pre>
</article>
<article>
<h3>Tweet containing multiple photos</h3>
<embetty-tweet status="935819741947744256" />
<pre class="language-html"><code><embetty-tweet status="935819741947744256" /></code></pre>
</article>
<article>
<h3>Custom styling</h3>
<embetty-tweet class="my-theme" status="934386458852495360" />
<pre class="language-html"><code><style>
.my-theme {
--embetty-border-color: red;
--embetty-font-family: 'Comic Sans MS';
}
</style>
<embetty-tweet class="my-theme" status="934386458852495360" /></code></pre>
</article>
<article>
<h3>Tweet response to a photo</h3>
<embetty-tweet status="916618051906428928" />
<pre class="language-html"><code><embetty-tweet status="916618051906428928" /></code></pre>
</article>
<article>
<h3>Tweet discussion</h3>
<embetty-tweet status="936339584740454402" />
<pre class="language-html"><code><embetty-tweet status="936339584740454402" /></code></pre>
</article>
<h2>Video</h2>
<article>
<h3>YouTube</h3>
<embetty-video type="youtube" video-id="m6UOo2YGbIE" />
<pre class="language-html"><code><embetty-video type="youtube" video-id="m6UOo2YGbIE" /></code></pre>
</article>
<article>
<h3>YouTube with <code>width</code></h3>
<p>Aspect ratio of 16:9 is preserved.</p>
<embetty-video :width="500" type="youtube" video-id="3L4fHrIJ3A4" />
<pre class="language-html"><code><embetty-video :width="500" type="youtube" video-id="3L4fHrIJ3A4" /></code></pre>
</article>
<article>
<h3>YouTube with <code>height</code> and <code>width</code></h3>
<p>Poster image is cropped.</p>
<embetty-video
:width="500"
:height="200"
type="youtube"
video-id="3L4fHrIJ3A4" />
<pre class="language-html"><code><embetty-video
:width="500"
:height="200"
type="youtube"
video-id="3L4fHrIJ3A4" /></code></pre>
</article>
<article>
<h3>YouTube with <code>height</code> and <code>poster-image-mode="contain"</code></h3>
<p>Width is still 100%.</p>
<embetty-video
:height="200"
type="youtube"
video-id="3L4fHrIJ3A4"
poster-image-mode="contain" />
<pre class="language-html"><code><embetty-video
:height="200"
type="youtube"
video-id="3L4fHrIJ3A4"
poster-image-mode="contain" /></code></pre>
</article>
<article>
<h3>YouTube with <code>start-at</code> (human readable syntax)</h3>
<embetty-video type="youtube" video-id="m6UOo2YGbIE" start-at="2h53m19s" />
<pre class="language-html"><code><embetty-video type="youtube" video-id="m6UOo2YGbIE" start-at="2h53m19s" /></code></pre>
</article>
<article>
<h3>Vimeo with <code>start-at</code> (in seconds as a string)</h3>
<embetty-video type="vimeo" video-id="1084537" start-at="97" />
<pre class="language-html"><code><embetty-video type="vimeo" video-id="1084537" start-at="97" /></code></pre>
</article>
<article>
<h3>Vimeo with <code>start-at</code> (in seconds as a number)</h3>
<embetty-video :start-at="97" type="vimeo" video-id="1084537" />
<pre class="language-html"><code><embetty-video type="vimeo" video-id="1084537" :start-at="97" /></code></pre>
</article>
<article>
<h3>Facebook</h3>
<embetty-video type="facebook" video-id="10156049485672318" />
<pre class="language-html"><code><embetty-video type="facebook" video-id="10156049485672318" /></code></pre>
</article>
</div>
</template>
<style lang="scss">
// Demo styling
#app {
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
max-width: 900px;
margin: 0 auto;
}
header {
padding: 1ex;
margin: 1.5em 0 2.5em;
background: rgb(255, 238, 140);
}
article {
margin-bottom: 2.5em;
}
.my-theme {
--embetty-border-color: red;
--embetty-font-family: 'Comic Sans MS'
}
</style>
<script>
export default {
name: 'App'
};
</script>