Skip to content

Commit b46d95a

Browse files
committed
Init.
1 parent 6bff63e commit b46d95a

20 files changed

+5627
-0
lines changed

Config.js

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Forum.html

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<!DOCTYPE html>
2+
<html class="has-navbar-fixed-top">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<!-- Bulma -->
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
9+
<!-- Fontawesome -->
10+
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
11+
<!-- Vue -->
12+
<!-- <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> -->
13+
<!-- The latest version -->
14+
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
15+
<!-- Vue router -->
16+
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
17+
18+
<!-- Quill Editor-->
19+
<!-- Include the Quill library -->
20+
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
21+
<!-- Include stylesheet -->
22+
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
23+
24+
<script src="https://unpkg.com/[email protected]/dist/vue-i18n.min.js"></script>
25+
26+
<!-- Style -->
27+
<style><?!= include('style.html'); ?></style>
28+
</head>
29+
30+
<body>
31+
<div id="image-viewer" class="modal" style="display: none">
32+
<div class="modal-background"></div>
33+
<div class="modal-content image-viewer-content">
34+
<img id="image-viewer-img" src="">
35+
</div>
36+
<button class="modal-close is-large is-info" aria-label="close" onclick="closeImg()"></button>
37+
</div>
38+
39+
<div id="app">
40+
<spinner v-if="sharedState.isSpinnerVisible"></spinner>
41+
<top-bar></top-bar>
42+
<router-view></router-view>
43+
</div>
44+
45+
<script>
46+
var dataFromServer = <?!= JSON.stringify(dataFromServerTemplate) ?>;
47+
</script>
48+
49+
<?!= include('vue_utils.html'); ?>
50+
<?!= include('vue_components.html'); ?>
51+
<?!= include('vue_store.html'); ?>
52+
<?!= include('vue_new_question.html'); ?>
53+
<?!= include('vue_new_forum.html'); ?>
54+
<?!= include('vue_forums.html'); ?>
55+
<?!= include('vue_questions.html'); ?>
56+
<?!= include('vue_question.html'); ?>
57+
<?!= include('vue_forum.html'); ?>
58+
<?!= include('vue_topbar.html'); ?>
59+
<?!= include('vue_quill.html'); ?>
60+
<?!= include('vue_routes.html'); ?>
61+
<?!= include('vue_i18n.html'); ?>
62+
63+
<script>
64+
const i18n = new VueI18n({
65+
locale: dataFromServer.language,
66+
messages,
67+
});
68+
69+
var app = new Vue({
70+
i18n,
71+
el: '#app',
72+
router: router,
73+
data: {
74+
sharedState: store.state,
75+
router: router,
76+
},
77+
created: function () {
78+
// Router - Get the path from the string URL fragment appearing after the '#' character.
79+
google.script.url.getLocation(function(location) {
80+
var path = location.hash;
81+
82+
if (! path || path == '/'){
83+
router.push('/forums');
84+
} else {
85+
router.push(path);
86+
}
87+
      });
88+
},
89+
watch: {
90+
      // Router - Watching router's current route.
91+
      'router.currentRoute.path' () {
92+
         var path = router.currentRoute.path;
93+
         var now = new Date();
94+
         var state = {
95+
           'timestamp': now.getTime()
96+
         };
97+
         google.script.history.push(state, {}, path);
98+
      }
99+
}
100+
})
101+
</script>
102+
</body>
103+
104+
</html>

0 commit comments

Comments
 (0)