-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (69 loc) · 3.42 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Stepik Stories Constructor</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="stylesheet" href="fonts/fonts.css" />
<link rel="stylesheet" href="res/style/core.css" />
<link rel="stylesheet" href="res/style/main.css" />
<link rel="stylesheet" href="res/style/form.css" />
<link rel="stylesheet" href="res/style/preview.css" />
<link rel="stylesheet" href="res/style/story-preview.css" />
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="src/components/device-android.js"></script>
<script src="src/components/device-ios.js"></script>
<script src="src/components/story-part.js"></script>
<script>
UPLOADCARE_LOCALE = "en";
UPLOADCARE_LIVE = false;
UPLOADCARE_TABS = "file url dropbox facebook vk gdrive box skydrive instagram evernote";
UPLOADCARE_AUTOSTORE = true;
UPLOADCARE_PUBLIC_KEY = "e7a075ad8dc9e3a1ec61";
UPLOADCARE_CDN_BASE = 'https://ucarecdn.com/';
UPLOADCARE_MANUAL_START = true;
UPLOADCARE_EFFECTS = ['crop', 'rotate', 'mirror', 'flip', 'enhance'];
</script>
<script src="https://ucarecdn.com/libs/widget/3.x/uploadcare.full.min.js"></script>
<title>Редактор историй v1</title>
</head>
<body>
<div id="app">
<div class="main" v-if="!storyPreview">
<h2>Редактор историй v1</h2>
<div class="story-parts">
<story-part
v-for="part in parts"
v-bind:part="part"
v-on:move-part="movePart"
v-on:remove-part="removePart"
v-bind:key="part.position"
>
</story-part>
</div>
<div class="controls">
<div class="action-button inline" v-on:click="addPart">Добавить часть</div>
<div class="action-button inline" v-on:click="importConfig">Редактировать сущеуствующую историю</div>
<div class="action-button inline" v-on:click="startStoryPreview('android')" v-if="parts.length > 0">Посмотреть историю на весь экран (Android)</div>
<div class="action-button inline" v-on:click="startStoryPreview('ios')" v-if="parts.length > 0">Посмотреть историю на весь экран (iOS)</div>
</div>
<div class="out">
<div>
<textarea disabled>{{ createConfig() }}</textarea>
</div>
<div class="action-button inline" v-on:click="copyConfig">Скопировать</div>
</div>
</div>
<div class="story-preview"
v-if="storyPreview"
>
<device-android v-bind:part="parts[storyPreview.index]" v-if="storyPreview.type === 'android'"></device-android>
<device-ios v-bind:part="parts[storyPreview.index]" v-if="storyPreview.type === 'ios'"></device-ios>
<div class="close" v-on:click="stopStoryPreview">❌</div>
<div class="move left" v-on:click="prevStoryPreview">⬅️</div>
<div class="move right" v-on:click="nextStoryPreview">➡️️</div>
</div>
</div>
</body>
<script src="src/app.js"></script>
</html>