-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathimage-flags.css
239 lines (209 loc) · 7.51 KB
/
image-flags.css
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
232
233
234
235
236
237
238
239
/*Image Flags Snippet by Lithou
http://github.com/lithou/sandbox
*/
div{
--coremarg: 1%;
--extramarg: 1%; /* This margin is used for any added margin between items */
--defaultwidth: 60%; /*This is the default width for core flags such as the "side" and "tape" */
}
/* Core Flags */
/*side */
div[alt*="+side"]{
position: relative;
width: var(--defaultwidth);
float: right;
margin: 0px;
margin-left: var(--coremarg);
}
/*tape */
div[alt*="+tape"] {
position: relative;
float: right;
width: var(--defaultwidth);
margin-left: var(--coremarg);
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(2deg);
}
div[alt*="+tape"]::before {
content: "";
display: block;
position: relative;
margin: auto;
width: 100px;
height: 30px;
top: 12px;
background: rgba(255, 234, 118, 0.377); /*here you can chosse the scotch tape background*/
-webkit-box-shadow: 0px 1px 3px rgba(0,0,0,0.4);
-moz-box-shadow: 0px 1px 3px rgba(0,0,0,0.4);
box-shadow: 0px 1px 3px rgba(0,0,0,0.4);
z-index: 10;
clip-path: polygon(50% 0%, 100% 0%,
98% 10%, 100% 20%, 98% 30%, 100% 40%, 98% 50%, 100% 60%, 98% 70%, 100% 80%, 98% 90%,100% 100%,
0% 100%, 2% 90%, 0% 80%, 2% 70%, 0% 60%, 2% 50%, 0% 40%, 2% 30%, 0% 20%, 2% 10%, 0% 0%);
}
div[alt*="-lg"]::before{
width: 100px;
height: 30px;
}
div[alt*="-med"]::before{
width: 70px;
height: 25px;
}
div[alt*="-sm"]::before{
width: 45px;
height: 15px;
top: 8px;
}
div[alt*="-thumb"]::before{
width: 25px;
height: 5px;
top: 2px;
}
/* Push Pin */
div[alt*="+pin"] {
position: relative;
float: right;
width: var(--defaultwidth);
margin: auto;
margin-left: var(--coremarg);
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(2deg);}
div[alt*="+pin"]::before {
content: "";
position: absolute;
width: 5px;
height: 5px;
background-color: #4588cc;
top: -3%;
left: 50%;
border: solid #336699 8px;
border-radius: 50%;
box-shadow: #274d74 -5px 3px 1px;}
/* Portrait and Landscape */
div[alt*="+portrait"]{
position: relative;
width: calc(var(--defaultwidth)/2);
float: right;
/* background-color:blue; This setting will create a border effect of set color */
clip-path: ellipse(36% 46% at 50% 50%);}
div[alt*="+portrait"]>img{
vertical-align: middle;
clip-path: ellipse(35% 45% at 50% 50%);}
div[alt*="+landscape"]{
position: relative;
width: var(--defaultwidth);
float: right;
/* background-color:blue; This setting will create a border effect of set color */
clip-path: ellipse(46% 36% at 50% 50%);}
div[alt*="+landscape"]>img{
vertical-align: middle;
clip-path: ellipse(45% 35% at 50% 50%);}
/* Banner and HR */
div[alt*="+banner"]{
height: 100px;
overflow: hidden;
}
div[alt*="+banner"]>img{
margin-top: -130px;
}
div[alt*="+hr"]{
height: 10px;
overflow: hidden;
border-radius: 20px;
}
div[alt*="+hr"]>img{
margin-top: -200px;
}
/*Custom Core Flags */
div[alt*="+custom1"]{
position: relative;
width: var(--defaultwidth);
float: right;
margin-top: 0px;
margin-bottom: 0px;
}
div[alt*="+custom2"]{
position: relative;
width: var(--defaultwidth);
float: right;
margin-top: 0px;
margin-bottom: 0px;
}
/* Modifier Flags */
/* Orientation and position */
div[alt*="-left"]{
float: left;
margin: 0px;
margin-right: var(--extramarg);}
div[alt*="-right"]{
float: right;
margin: 0px;
margin-left: var(--extramarg);}
div[alt*="-fix"]{position: fixed;}
div[alt*="-abs"]{position: absolute;}
/* Size */
div[alt*="-thumb"]{width: 11.50%;}
div[alt*="-sm"]{width: 24%;}
div[alt*="-med"]{width: 32.3333%;}
div[alt*="-lg"]{width: 49%;}
div[alt*="-huge"]{width: 67%;}
div[alt*="-cwidth"]{float: none;margin-left: -10%;width: 120%;}
/* Borders */
div[alt*="-border1"]>img{border: solid black 3px;}
div[alt*="-border2"]>img{border: solid white 3px;}
div[alt*="-bradius1"]>img{border-radius: 5px;}
div[alt*="-bradius2"]>img{border-radius: 20px;}
div[alt*="-bradiustl"]>img{border-top-left-radius: 20px;}
div[alt*="-bradiusbr"]>img{border-bottom-right-radius: 20px;}
div[alt*="-bradiustr"]>img{border-top-right-radius: 20px;}
div[alt*="-bradiusbl"]>img{border-bottom-left-radius: 20px;}
div[alt*="-bthick"]>img{border-width: 5px;}
div[alt*="-bthin"]>img{border-width: 1px;}
/* Div Borders */
div[alt*="-divborder1"]{border: solid #336699 2px;}
div[alt*="-divborder2"]{border: solid black 2px;}
div[alt*="-divbradius1"]{border-radius: 5px;}
div[alt*="-divbradius2"]{border-radius: 20px;}
div[alt*="-cdivbradius1"]{border-radius: 50px;}
div[alt*="-shadow1"]>img{
box-shadow: darkgrey -2px 2px 2px;
}
div[alt*="-glow"]>img{
box-shadow: darkgrey 0px 0px 20px;
}
div[alt*="-nofloat"]{
float:none
}
/*
Core Documentation
Embed an image like normal
add a pipe "|" character to the end of the embedded image filename
Add a "core" flag
Add any modifier flags to change the behaviour of that core element.
Core Flags:
![[testc.jpg|+side]]
This flag will set the object to float so that the text in the following elements will flow around it.
![[testc.jpg|+tape]]
This flag will tilt the image and apply an effect so that the image appears to be attached to the background by a piece of scotch tape.
![[avatar.jpg|+portrait]]
The portrait flag will create an oval cutout around the image and float it to the right. This is most often used for pictures of real or fictional characters at the top of a biographical page although it can be used however you would like.
![[testc.jpg|+landscape]]
The landscape flag is similar to the portrait flag in that it will create an oval cutout around the image.
![[testc.jpg|+banner]]
Modifier Flags:
"-thumb" will create a thumbnail size (1/8th of the page)
"-sm" will call the small size (1/4th of the page)
"-med" will call the medium size (1/3rd of the page)
"-lg" will call the large size (half of the page)
"-huge" will call the huge size (2/3rd of the page)
"-left" will float the image to the left
"-right" will float the image to the right
"-border1" by default, will be a solid line that is two pixel wide. It is also by default black in color
"-border2" by default is the same as "-border1" but is white instead of black.
} */