Skip to content
This repository was archived by the owner on Aug 1, 2020. It is now read-only.

Commit add5003

Browse files
author
Fengyuan Chen
committed
Release v0.5.0
1 parent d76d5eb commit add5003

File tree

8 files changed

+159
-85
lines changed

8 files changed

+159
-85
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Changelog
22

33

4+
## 0.5.0 (Jan 21, 2016)
5+
6+
- Add more available values to the "title", "toolbar" and "navbar" options.
7+
- Support to toggle the visibility of title, toolbar and navbar between different screen widths.
8+
- Exit fullscreen when stop playing.
9+
- Fixed title not generated bug (#6).
10+
11+
412
## 0.4.0 (Jan 1, 2016)
513

614
- Added "update" method for update image dynamically.

README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
dist/
4646
├── viewer.css ( 8 KB)
4747
├── viewer.min.css ( 7 KB)
48-
├── viewer.js (47 KB)
49-
└── viewer.min.js (20 KB)
48+
├── viewer.js (48 KB)
49+
└── viewer.min.js (21 KB)
5050
```
5151

5252

@@ -147,31 +147,46 @@ Show the button on the top-right of the viewer.
147147

148148
### navbar
149149

150-
- Type: `Boolean`
150+
- Type: `Boolean` or `Number`
151151
- Default: `true`
152+
- Options:
153+
- `0` or `false`: hide the navbar
154+
- `1` or `true`: show the navbar
155+
- `2`: show the navbar only when screen width great then 768 pixels
156+
- `3`: show the navbar only when screen width great then 992 pixels
157+
- `4`: show the navbar only when screen width great then 1200 pixels
152158

153-
Show the navbar.
159+
Specify the visibility of the navbar.
154160

155161

156162
### title
157163

158-
- Type: `Boolean`
164+
- Type: `Boolean` or `Number`
159165
- Default: `true`
166+
- Options:
167+
- `0` or `false`: hide the title
168+
- `1` or `true`: show the title
169+
- `2`: show the title only when screen width great then 768 pixels
170+
- `3`: show the title only when screen width great then 992 pixels
171+
- `4`: show the title only when screen width great then 1200 pixels
160172

161-
Show the current image's name and dimensions.
173+
Specify the visibility of the title (the current image's name and dimensions).
162174

163175
> The name comes from the `alt` attribute of an image element or the image name parsed from URL.
164-
> The title is visible only when the screen width great than 768 pixels.
165176
166177

167178
### toolbar
168179

169-
- Type: `Boolean`
180+
- Type: `Boolean` or `Number`
170181
- Default: `true`
171-
172-
Show the toolbar.
173-
174-
> The toolbar is visible only when the screen width great than 768 pixels.
182+
- Options:
183+
- `0` or `false`: hide the toolbar
184+
- `1` or `true`: show the toolbar
185+
- `2`: show the toolbar only when screen width great then 768 pixels
186+
- `3`: show the toolbar only when screen width great then 992 pixels
187+
- `4`: show the toolbar only when screen width great then 1200 pixels
188+
189+
Specify the visibility of the toolbar.
175190

176191

177192
### tooltip

dist/viewer.css

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*!
2-
* Viewer v0.4.0
2+
* Viewer v0.5.0
33
* https://github.com/fengyuanchen/viewer
44
*
55
* Copyright (c) 2015-2016 Fengyuan Chen
66
* Released under the MIT license
77
*
8-
* Date: 2016-01-01T04:21:19.666Z
8+
* Date: 2016-01-21T09:59:45.429Z
99
*/
1010
.viewer-zoom-in:before,
1111
.viewer-zoom-out:before,
@@ -35,85 +35,85 @@
3535
}
3636

3737
.viewer-zoom-in:before {
38-
content: 'Zoom In';
38+
content: 'Zoom In';
3939

4040
background-position: 0 0;
4141
}
4242

4343
.viewer-zoom-out:before {
44-
content: 'Zoom Out';
44+
content: 'Zoom Out';
4545

4646
background-position: -20px 0;
4747
}
4848

4949
.viewer-one-to-one:before {
50-
content: 'One to One';
50+
content: 'One to One';
5151

5252
background-position: -40px 0;
5353
}
5454

5555
.viewer-reset:before {
56-
content: 'Reset';
56+
content: 'Reset';
5757

5858
background-position: -60px 0;
5959
}
6060

6161
.viewer-prev:before {
62-
content: 'Previous';
62+
content: 'Previous';
6363

6464
background-position: -80px 0;
6565
}
6666

6767
.viewer-play:before {
68-
content: 'Play';
68+
content: 'Play';
6969

7070
background-position: -100px 0;
7171
}
7272

7373
.viewer-next:before {
74-
content: 'Next';
74+
content: 'Next';
7575

7676
background-position: -120px 0;
7777
}
7878

7979
.viewer-rotate-left:before {
80-
content: 'Rotate Left';
80+
content: 'Rotate Left';
8181

8282
background-position: -140px 0;
8383
}
8484

8585
.viewer-rotate-right:before {
86-
content: 'Rotate Right';
86+
content: 'Rotate Right';
8787

8888
background-position: -160px 0;
8989
}
9090

9191
.viewer-flip-horizontal:before {
92-
content: 'Flip Horizontal';
92+
content: 'Flip Horizontal';
9393

9494
background-position: -180px 0;
9595
}
9696

9797
.viewer-flip-vertical:before {
98-
content: 'Flip Vertical';
98+
content: 'Flip Vertical';
9999

100100
background-position: -200px 0;
101101
}
102102

103103
.viewer-fullscreen:before {
104-
content: 'Enter Full Screen';
104+
content: 'Enter Full Screen';
105105

106106
background-position: -220px 0;
107107
}
108108

109109
.viewer-fullscreen-exit:before {
110-
content: 'Exit Full Screen';
110+
content: 'Exit Full Screen';
111111

112112
background-position: -240px 0;
113113
}
114114

115115
.viewer-close:before {
116-
content: 'Close';
116+
content: 'Close';
117117

118118
background-position: -260px 0;
119119
}
@@ -136,7 +136,7 @@
136136
user-select: none;
137137

138138
background-color: #000;
139-
background-color: rgba(0, 0, 0, .5);
139+
background-color: rgba(0, 0, 0, .5);
140140

141141
direction: ltr !important;
142142
-ms-touch-action: none;
@@ -185,7 +185,7 @@
185185
bottom: 0;
186186
left: 0;
187187

188-
overflow: hidden;
188+
overflow: hidden;
189189

190190
text-align: center;
191191
}
@@ -198,7 +198,7 @@
198198
}
199199

200200
.viewer-list {
201-
overflow: hidden;
201+
overflow: hidden;
202202

203203
-webkit-box-sizing: content-box;
204204
-moz-box-sizing: content-box;
@@ -217,7 +217,7 @@
217217
width: 30px;
218218
height: 50px;
219219

220-
cursor: pointer;
220+
cursor: pointer;
221221

222222
opacity: .5;
223223
color: transparent;
@@ -253,8 +253,7 @@
253253
}
254254

255255
.viewer-toolbar {
256-
display: none;
257-
overflow: hidden;
256+
overflow: hidden;
258257

259258
width: 280px;
260259
margin: 0 auto 5px;
@@ -267,7 +266,7 @@
267266
width: 24px;
268267
height: 24px;
269268

270-
cursor: pointer;
269+
cursor: pointer;
271270

272271
border-radius: 50%;
273272
background-color: #000;
@@ -292,11 +291,6 @@
292291
.viewer-toolbar > .viewer-play:before {
293292
margin: 5px;
294293
}
295-
@media (min-width: 768px) {
296-
.viewer-toolbar {
297-
display: block;
298-
}
299-
}
300294

301295
.viewer-tooltip {
302296
font-size: 12px;
@@ -325,13 +319,13 @@
325319
font-size: 12px;
326320
line-height: 1;
327321

328-
display: none;
322+
display: inline-block;
329323
overflow: hidden;
330324

331325
max-width: 90%;
332326
margin: 0 5% 5px;
333327

334-
white-space: nowrap;
328+
white-space: nowrap;
335329
text-overflow: ellipsis;
336330

337331
opacity: .8;
@@ -344,11 +338,6 @@
344338

345339
filter: alpha(opacity=100);
346340
}
347-
@media (min-width: 768px) {
348-
.viewer-title {
349-
display: inline-block;
350-
}
351-
}
352341

353342
.viewer-button {
354343
position: absolute;
@@ -360,7 +349,7 @@
360349
width: 80px;
361350
height: 80px;
362351

363-
cursor: pointer;
352+
cursor: pointer;
364353

365354
border-radius: 50%;
366355
background-color: #000;
@@ -416,3 +405,21 @@
416405
-o-transition: all .3s ease-out;
417406
transition: all .3s ease-out;
418407
}
408+
409+
@media (max-width: 767px) {
410+
.viewer-hide-xs-down {
411+
display: none;
412+
}
413+
}
414+
415+
@media (max-width: 991px) {
416+
.viewer-hide-sm-down {
417+
display: none;
418+
}
419+
}
420+
421+
@media (max-width: 1199px) {
422+
.viewer-hide-md-down {
423+
display: none;
424+
}
425+
}

0 commit comments

Comments
 (0)