-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.html
executable file
·198 lines (194 loc) · 6.76 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Summernote gallery demo</title>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" >
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.css" rel="stylesheet">
<link rel="stylesheet" href="./summernote-bricks.css">
<style type="text/css">
@-moz-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-moz-transform: translateY(0);
transform: translateY(0);
}
40% {
-moz-transform: translateY(-30px);
transform: translateY(-30px);
}
60% {
-moz-transform: translateY(-15px);
transform: translateY(-15px);
}
}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
60% {
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-moz-transform: translateY(-30px);
-ms-transform: translateY(-30px);
-webkit-transform: translateY(-30px);
transform: translateY(-30px);
}
60% {
-moz-transform: translateY(-15px);
-ms-transform: translateY(-15px);
-webkit-transform: translateY(-15px);
transform: translateY(-15px);
}
}
.arrow {
margin-left: 25px;
width: 40px;
height: 40px;
font-size: 45px;
background-size: contain;
color: #ffbc8b;
}
.bounce {
-moz-animation: bounce 2s infinite;
-webkit-animation: bounce 2s infinite;
animation: bounce 2s infinite;
}
.arrow {
margin-left: 180px;
width: 40px;
height: 58px;
font-size: 45px;
background-size: contain;
color: #ffbc8b;
}
body {
padding-top: 50px;
height: 800px;
background-image: url('https://picsum.photos/id/1021/2000/1200');
background-size: cover;
background-position: center center;
}
h1{
text-align: center;
font-size: 45px;
font-family: cursive;
}
</style>
</head>
<body>
<div class="container">
<h1>Summernote Gellery</h1>
<div class="arrow bounce">
<i class="fa fa-arrow-down" aria-hidden="true"></i>
</div>
<div style="background-color: #FFF" class="wrapper">
<div id="summernote"></div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote-bs4.min.js"></script>
<script src="dist/snb-gallery-brick.min.js" type="text/javascript"></script>
<script>
var data = [
{
"src": "https://picsum.photos/id/40/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/50/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/60/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/70/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/80/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/90/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/100/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/10/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/20/200/200",
"title": "a galerie test"
},
{
"src": "https://picsum.photos/id/30/200/200",
"title": "a galerie test"
}
];
$('#summernote').summernote({
height: 500,
toolbar: [
['insert', ['picture', 'link', 'video', 'table', 'hr', 'summernoteGallery']],
['font style', ['fontname', 'fontsize', 'color', 'bold', 'italic',
'underline', 'strikethrough', 'superscript', 'subscript', 'clear']],
['paragraph style', ['style', 'ol', 'ul', 'paragraph', 'height']],
['misc', ['fullscreen', 'codeview', 'undo', 'redo', 'help']]
['extensions', ['summernoteGallery']],
],
summernoteGallery: {
source: {
// data: data,
url: location.origin+location.pathname+'/server/example.json',
responseDataKey: 'data',
nextPageKey: 'links.next',
formater: (data, page, response) => {
return data.map(image => {
return {
id: image.id+''+page,
url: image.src,
title: image.title
}
})
}
},
modal: {
loadOnScroll: true,
validations: {
selectedImages:{
required: {
message: 'No image was selected, please select one by clicking it!',
}
}
}
},
buttonLabel: '<i class="fa fa-file-image-o"></i> SN Gallery'
}
});
</script>
</body>
</html>