forked from cloudinary/cloudinary_angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphoto-list.component.html
More file actions
231 lines (223 loc) · 10.7 KB
/
photo-list.component.html
File metadata and controls
231 lines (223 loc) · 10.7 KB
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<div class="photo-list">
<div id="posterframe">
<!-- This will render the fetched Facebook profile picture using Cloudinary according to the
requested transformations. This also shows how to chain transformations -->
<a (click)=changePublicId()>
<cl-image
class="static-photo"
responsive
width="auto"
crop="scale"
[public-id]="publicId"
type="facebook"
angle="20"
(onLoad)="onLoadImage($event)"
>
<cl-transformation effect="art:hokusai"></cl-transformation>
<cl-transformation border="3px_solid_rgb:00390b" radius="20"></cl-transformation>
</cl-image>
<cl-image
public-id="non-existing"
(onError)="onErrorImage($event)"
>
</cl-image>
</a>
</div>
<h1 class="welcome">Welcome!</h1>
<div class="introducing-cloudinary">
<p>
This is the main demo page of the PhotoAlbum sample AngularJS application of Cloudinary.<br/> Here you can see all images
you have uploaded to this application and find some information on how to implement your own AngularJS application storing,
manipulating and serving your photos using Cloudinary!
</p>
<p>
All of the images you see here are transformed and served by Cloudinary. For instance, the logo and the poster frame. They
are both generated in the cloud using Cloudinary functions. These two pictures weren't even have to be uploaded to Cloudinary,
they are retrieved by the service, transformed, cached and distributed through a CDN.
<!-- This embeds a <video> element in the page, retrieved from a different cloud -->
<cl-video public-id="manipulation_video" cloud-name="cloudinary" controls="true" preload="none"
width="925" crop="scale"
class="manipulation-video"
poster='{ "cloud-name": "cloudinary", "gravity": "north", "start-offset": "28", "transformation": [{"effect": "sepia", "fetch_format": "auto"}]}'
source-transformation='{ "webm": { "quality": "70"}, "mp4": { "overlay": "text:verdana_30:Greetings!" } }'
fallback-content="Your browser does not support HTML5 video tags"
>
<cl-transformation overlay="text:arial_20:Cloudinary%20features" color="red" gravity="north" y="12"></cl-transformation>
</cl-video>
</p>
</div>
<hr>
<h1>Your Photos</h1>
<div class="actions">
<a class="upload_link" routerLink="new">Add photo with Angular File upload</a>
</div>
<div class="photos">
<p *ngIf="errorOccurred">No photos were added yet.</p>
<p *ngIf="photos.length === 0 | async">No photos were added yet.</p>
<div class="photo" *ngFor="let photo of photos | async">
<!-- | orderBy:'version':true -->
<h2 *ngIf="photo.context">{{photo.context.custom.photo}}</h2>
<a clHref={{photo.public_id}} format="jpg" target="_blank">
<cl-transformation quality="auto" fetch-format="auto"></cl-transformation>
<cl-image
public-id={{photo.public_id}}
class="thumbnail inline"
width="150"
height="150"
crop="fit"
quality="80"
format="jpg"
(mouseenter)="photo.isMouseOver = true"
(mouseleave)="photo.isMouseOver = false"
[attr.opacity]="photo.isMouseOver ? '50' : null"
>
</cl-image>
</a>
<div class="less_info">
<button class="toggle_info" style="cursor: help" (click)="photo.shown=true" *ngIf="!photo.shown">Show transformations</button>
</div>
<div class="more_info" *ngIf="photo.shown">
<button class="toggle_info" (click)="photo.shown=false">Hide transformations</button>
<table class="thumbnails">
<tr>
<td>
<div class="thumbnail_holder">
<cl-image public-id={{photo.public_id}} class="thumbnail inline" crop="fill" height="150" width="150" radius="10" format="jpg">
</cl-image>
</div>
<table class="info">
<tr>
<td>crop</td>
<td>fill</td>
</tr>
<tr>
<td>width</td>
<td>150</td>
</tr>
<tr>
<td>height</td>
<td>150</td>
</tr>
<tr>
<td>radius</td>
<td>10</td>
</tr>
</table>
<br/>
</td>
<td>
<div class="thumbnail_holder">
<cl-image public-id={{photo.public_id}} class="thumbnail inline" crop="scale" height="150" width="150" format="jpg">
</cl-image>
</div>
<table class="info">
<tr>
<td>crop</td>
<td>scale</td>
</tr>
<tr>
<td>width</td>
<td>150</td>
</tr>
<tr>
<td>height</td>
<td>150</td>
</tr>
</table>
<br/>
</td>
<td>
<div class="thumbnail_holder">
<cl-image public-id={{photo.public_id}} class="thumbnail inline" crop="fit" height="150" width="150" format="jpg">
</cl-image>
</div>
<table class="info">
<tr>
<td>crop</td>
<td>fit</td>
</tr>
<tr>
<td>width</td>
<td>150</td>
</tr>
<tr>
<td>height</td>
<td>150</td>
</tr>
</table>
<br/>
</td>
<td>
<div class="thumbnail_holder">
<cl-image public-id={{photo.public_id}} class="thumbnail inline" crop="thumb" gravity="face" height="150" width="150" format="jpg">
</cl-image>
</div>
<table class="info">
<tr>
<td>crop</td>
<td>thumb</td>
</tr>
<tr>
<td>gravity</td>
<td>face</td>
</tr>
<tr>
<td>width</td>
<td>150</td>
</tr>
<tr>
<td>height</td>
<td>150</td>
</tr>
</table>
<br/>
</td>
<td>
<div class="thumbnail_holder">
<cl-image public-id={{photo.public_id}} class="thumbnail inline" angle="20" format="jpg">
<cl-transformation height="150" width="150" crop="fill" gravity="north" effect="sepia" radius="20">
</cl-transformation>
</cl-image>
</div>
<table class="info">
<tr>
<td>crop</td>
<td>fill</td>
</tr>
<tr>
<td>effect</td>
<td>sepia</td>
</tr>
<tr>
<td>gravity</td>
<td>north</td>
</tr>
<tr>
<td>width</td>
<td>150</td>
</tr>
<tr>
<td>height</td>
<td>150</td>
</tr>
<tr>
<td>then</td>
<td></td>
</tr>
<tr>
<td>angle</td>
<td>20</td>
</tr>
</table>
<br/>
</td>
</tr>
</table>
</div>
</div>
<div class="note">
Take a look at our documentation of <a href="http://cloudinary.com/documentation/image_transformations" target="_blank">Image Transformations</a> for a full list of
supported transformations.
</div>
</div>
</div>