-
Notifications
You must be signed in to change notification settings - Fork 109
/
index.html
523 lines (496 loc) Β· 27.7 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
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
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
<!DOCTYPE html>
<html lang="en">
<head>
<title>Evo Calendar</title>
<meta charset="utf-8">
<meta name="description" content="Simple Modern-looking Event Calendar Plugin">
<meta name="keywords" content="jQuery, Plugin, Event, Calendar, EvoCalendar">
<meta name="author" content="Edlyn Villegas">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" href="favicon.png">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="./evo-calendar/css/evo-calendar.min.css">
<link rel="stylesheet" type="text/css" href="./evo-calendar/css/evo-calendar.orange-coral.min.css">
<link rel="stylesheet" type="text/css" href="./evo-calendar/css/evo-calendar.midnight-blue.min.css">
<link rel="stylesheet" type="text/css" href="./evo-calendar/css/evo-calendar.royal-navy.min.css">
<link rel="stylesheet" type="text/css" href="./demo/demo.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Mono&display=swap" rel="stylesheet">
</head>
<body>
<header>
<div class="header-container clearfix">
<h1 class="title" data-go="#top" title="Oh, hi! :)"><span>evo</span>calendar</h1>
<ul>
<li data-go="#themes">
<a>Themes</a>
</li>
<li data-go="#demos">
<a>Demo</a>
</li>
<li data-go="#usage">
<a>Usage</a>
</li>
<li data-go="#settings">
<a>Settings</a>
</li>
<li>
<a href="https://github.com/edlynvillegas/evo-calendar" target="_blank" title="get it on github">Github</a>
</li>
</ul>
</div>
</header>
<main>
<div class="main-container">
<section>
<div class="section-content">
<div class="console-log --ads">
<script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?serve=CEBI4KQI&placement=edlynvillegasgithubio" id="_carbonads_js"></script>
</div>
</div>
</section>
<section id="features">
<div class="section-content">
<p class="section-title --lng">features</p>
<div class="console-log --sm">
<div class="log-content">
<pre><code>
<span class="red">var</span> <span class="orange">features</span> = [
<span class="yellow">'Flexible and fully customizable'</span>,
<span class="yellow">'Responsive β has desktop, tablet and mobile design'</span>,
<span class="yellow">'Add, remove and view calendar events'</span>,
<span class="yellow">'Events and methods that lets you think outside the box :)'</span>,
<span class="yellow">'Does "modern-looking" counts? Then I'm in!'</span>
]; <span class="green">// and more features to come...</span>
</code></pre>
</div>
</div>
</div>
</section>
<section id="themes">
<div class="section-content">
<p class="section-title --shrt">themes</p>
<p class="section-desc">Simple themes for a very simple plugin. You can choose what suits to your project or find inspiration to customize it just the way you like!</p>
<div class="theme-container clearfix">
<div class="theme-content">
<div class="console-log">
<div class="log-content">
<img src="./img/default.png" alt="Evo Calendar - Theme: Default">
<pre><code>
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
<span class="green">// It's the default theme :)</span>
})
</code></pre>
</div>
</div>
</div>
<div class="theme-content">
<div class="console-log">
<div class="log-content">
<img src="./img/midnight_blue.png" alt="Evo Calendar - Theme: Midnight Blue">
<pre><code>
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
theme: <span class="violet">'Midnight Blue'</span>
})
</code></pre>
</div>
</div>
</div>
<div class="theme-content">
<div class="console-log">
<div class="log-content">
<img src="./img/royal_navy.png" alt="Evo Calendar - Theme: Royal Navy">
<pre><code>
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
theme: <span class="violet">'Royal Navy'</span>
})
</code></pre>
</div>
</div>
</div>
<div class="theme-content">
<div class="console-log">
<div class="log-content">
<img src="./img/orange_coral.png" alt="Evo Calendar - Theme: Orange Coral">
<pre><code>
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
theme: <span class="violet">'Orange Coral'</span>
})
</code></pre>
</div>
</div>
</div>
</div>
<p class="section-note">Let me customize a theme for you. <a href="https://www.buymeacoffee.com/edlynvillegas/e/5551" target="_blank" title="Click here">Click here!</a></p>
</div>
</section>
<section id="demos">
<div class="section-content">
<p class="section-title --shrt">evocalendar in action!</p>
<div class="action-buttons">
<p class="section-desc">Experience evocalendar in every theme</p>
<button class="btn-action active" data-set-theme="Default">DEFAULT</button>
<button class="btn-action" data-set-theme="Midnight Blue">MIDNIGHT BLUE</button>
<button class="btn-action" data-set-theme="Royal Navy">ROYAL NAVY</button>
<button class="btn-action" data-set-theme="Orange Coral">ORANGE CORAL</button>
</div>
<div class="console-log">
<div class="log-content">
<div class="--noshadow" id="demoEvoCalendar"></div>
</div>
</div>
<div class="action-buttons">
<button class="btn-action" id="addBtn">ADD EVENT</button>
<button class="btn-action" id="removeBtn" disabled>REMOVE EVENT</button>
</div>
</div>
</section>
<section id="usage">
<div class="section-content">
<p class="section-title --lng">let the coding begins!</p>
<div class="section-caption"><p>html</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code>
<span class="green">// Set up your HTML markup</span>
<span class="red"><div <span class="blue">id</span><span class="white">=</span><span class="yellow">"calendar"</span>></div></span>
</code></pre>
</div>
</div>
<div class="section-caption"><p>css</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code>
<span class="green">// Add evo-calendar.css (default theme included) in the <head> tag</span>
<span class="red"><link <span class="blue">rel</span><span class="white">=</span><span class="yellow">"stylesheet"</span> <span class="blue">type</span><span class="white">=</span><span class="yellow">"text/css"</span> <span class="blue">href</span><span class="white">=</span><span class="yellow">"css/evo-calendar.css"</span>/></span>
<span class="green">// Themes? Add them right after the main css</span>
<span class="red"><link <span class="blue">rel</span><span class="white">=</span><span class="yellow">"stylesheet"</span> <span class="blue">type</span><span class="white">=</span><span class="yellow">"text/css"</span> <span class="blue">href</span><span class="white">=</span><span class="yellow">"css/evo-calendar.midnight-blue.css"</span>/></span>
</code></pre>
</div>
</div>
<div class="section-caption"><p>javascript</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code>
<span class="green">// Add evo-calendar.js before your closing <body> tag, right after jQuery (required)</span>
<span class="red"><script <span class="blue">src</span><span class="white">=</span><span class="yellow">"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"</span>></script></span>
<span class="red"><script <span class="blue">src</span><span class="white">=</span><span class="yellow">"js/evo-calendar.js"</span>></script></span>
</code></pre>
</div>
</div>
<div class="console-log --sm">
<div class="log-content">
<pre><code>
<span class="green">// Initialize evo-calendar in your script file or an inline <script> tag</span>
$(<span class="blue">document</span>).<span class="yellow">ready</span>(<span class="blue">function</span>() {
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
<span class="violet">settingName</span>: settingValue
})
})
</code></pre>
</div>
</div>
<div class="section-caption"><p>basic html complete look:</p></div>
<div class="console-log --md">
<div class="log-content">
<pre><code>
<span class="red"><html></span>
<span class="red"><head></span>
<span class="red"><title><span class="white">My Evo Calendar</span></title></span>
<span class="green">// evo-calendar.css, followed by [theme-name].css (optional)</span>
<span class="red"><link <span class="blue">rel</span><span class="white">=</span><span class="yellow">"stylesheet"</span> <span class="blue">type</span><span class="white">=</span><span class="yellow">"text/css"</span> <span class="blue">href</span><span class="white">=</span><span class="yellow">"css/evo-calendar.css"</span>/></span>
<span class="red"><link <span class="blue">rel</span><span class="white">=</span><span class="yellow">"stylesheet"</span> <span class="blue">type</span><span class="white">=</span><span class="yellow">"text/css"</span> <span class="blue">href</span><span class="white">=</span><span class="yellow">"css/evo-calendar.midnight-blue.css"</span>/></span>
<span class="red"></head></span>
<span class="red"><body></span>
<span class="green">// this is where your calendar goes.. :)</span>
<span class="red"><div <span class="blue">id</span><span class="white">=</span><span class="yellow">"calendar"</span>></div></span>
<span class="green">// evo-calendar.js, right after jQuery (required)</span>
<span class="red"><script <span class="blue">src</span><span class="white">=</span><span class="yellow">"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"</span>></script></span>
<span class="red"><script <span class="blue">src</span><span class="white">=</span><span class="yellow">"js/evo-calendar.js"</span>></script></span>
<span class="red"><script></span>
<span class="green">// initialize your calendar, once the page's DOM is ready</span>
$(<span class="blue">document</span>).<span class="yellow">ready</span>(<span class="blue">function</span>() {
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
<span class="violet">settingName</span>: settingValue
})
})
<span class="red"></script></span>
<span class="red"></body></span>
<span class="red"></html></span>
</code></pre>
</div>
</div>
</div>
</section>
<!-- settings -->
<section id="settings">
<div class="section-content">
<p class="section-title --lng">settings</p>
<div class="console-log">
<div class="log-content">
<table>
<tr>
<th>settings</th>
<th>type</th>
<th>default</th>
<th>description</th>
<th>options</th>
</tr>
<tr data-settings="theme">
<td>theme</td>
<td>string</td>
<td class="gray">Default</td>
<td>Define calendar's theme</td>
<td>Default, Midnight Blue, Orange Coral, Royal Navy</td>
</tr>
<tr data-settings="language">
<td>language</td>
<td>string</td>
<td class="red">'en'</td>
<td>Calendar's language</td>
<td>en, es, de, pt</td>
</tr>
<tr data-settings="format">
<td>format</td>
<td>string</td>
<td class="red">'mm/dd/yyyy'</td>
<td>Date format</td>
<td>Date string format</td>
</tr>
<tr data-settings="titleFormat">
<td>titleFormat</td>
<td>string</td>
<td class="red">'MM yyyy'</td>
<td>Date format for calendar title</td>
<td>Date string format</td>
</tr>
<tr data-settings="eventHeaderFormat">
<td>eventHeaderFormat</td>
<td>string</td>
<td class="red">'MM d, yyyy'</td>
<td>Date format for calendar event's title</td>
<td>Date string format</td>
</tr>
<tr data-settings="firstDayOfWeek">
<td>firstDayOfWeek</td>
<td>number</td>
<td class="violet">0</td>
<td>Displayed first day of the week</td>
<td>0 (Sunday) - 6 (Saturday)</td>
</tr>
<tr data-settings="todayHighlight">
<td>todayHighlight</td>
<td>boolean</td>
<td class="blue">false</td>
<td>Highlight today's date in calendar</td>
<td>true, false</td>
</tr>
<tr data-settings="sidebarDisplayDefault">
<td>sidebarDisplayDefault</td>
<td>boolean</td>
<td class="blue">true</td>
<td>Set default visibility of sidebar</td>
<td>true, false</td>
</tr>
<tr data-settings="sidebarToggler">
<td>sidebarToggler</td>
<td>boolean</td>
<td class="blue">true</td>
<td>Display the button for toggling the sidebar</td>
<td>true, false</td>
</tr>
<tr data-settings="eventDisplayDefault">
<td>eventDisplayDefault</td>
<td>boolean</td>
<td class="blue">true</td>
<td>Set default visibility of event lists</td>
<td>true, false</td>
</tr>
<tr data-settings="eventListToggler">
<td>eventListToggler</td>
<td>boolean</td>
<td class="blue">true</td>
<td>Display the button for toggling the event lists</td>
<td>true, false</td>
</tr>
<tr data-settings="calendarEvents">
<td>calendarEvents</td>
<td>array</td>
<td class="gray">null</td>
<td>Defined events for calendar to show</td>
<td>Array of events</td>
</tr>
</table>
</div>
</div>
<div class="section-caption"><p>settings example</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code id="event-settings">
<span class="green">// calendarEvents</span>
$(<span class="red">'#calendar'</span>).<span class="yellow">evoCalendar</span>({
todayHighlight: <span class="blue">true</span>,
calendarEvents: [
{
<span class="red">id</span>: <span class="red">"4hducye"</span>, <span class="green">// Event's id (required, for removing event)</span>
<span class="red">name</span>: <span class="red">"Today's Event"</span>, <span class="green">// Name of event</span>
<span class="red">description</span>: <span class="red">"Lorem ipsum dolor sit amet.."</span>, <span class="green">// Description of event (optional)</span>
<span class="red">date</span>: <span class="blue">new</span> <span class="yellow">Date</span>(), <span class="green">// Date of event</span>
<span class="red">type</span>: <span class="red">"holiday"</span>, <span class="green">// Type of event (event|holiday|birthday)</span>
<span class="red">color</span>: <span class="blue">"#63d867"</span> <span class="green">// Event custom color (optional)</span>
<span class="red">everyYear</span>: <span class="blue">true</span> <span class="green">// Event is every year (optional)</span>
}
]
})
</code></pre>
</div>
</div>
</div>
<div class="section-content">
<p class="section-title --shrt">methods</p>
<div class="console-log">
<div class="log-content">
<table>
<tr>
<th>method</th>
<th>argument</th>
<th>description</th>
</tr>
<tr data-method="setTheme">
<td>setTheme</td>
<td class="red">string</td>
<td>Set/Change theme</td>
</tr>
<tr data-method="toggleSidebar">
<td>toggleSidebar</td>
<td class="blue">boolean (optional)</td>
<td>Toggle sidebar display</td>
</tr>
<tr data-method="toggleEventList">
<td>toggleEventList</td>
<td class="blue">boolean (optional)</td>
<td>Toggle event list display</td>
</tr>
<tr data-method="getActiveDate">
<td>getActiveDate</td>
<td class="gray">none</td>
<td>Get the selected date</td>
</tr>
<tr data-method="getActiveEvents">
<td>getActiveEvents</td>
<td class="gray">none</td>
<td>Get the event(s) of selected date</td>
</tr>
<tr data-method="selectYear">
<td>selectYear</td>
<td class="violet">number</td>
<td>Select year programmatically</td>
</tr>
<tr data-method="selectMonth">
<td>selectMonth</td>
<td class="violet">number (0-11)</td>
<td>Select month programmatically</td>
</tr>
<tr data-method="selectDate">
<td>selectDate</td>
<td class="red">string</td>
<td>Select date programmatically</td>
</tr>
<tr data-method="addCalendarEvent">
<td>addCalendarEvent</td>
<td class="red">array/object</td>
<td>Add Calendar event(s)</td>
</tr>
<tr data-method="removeCalendarEvent">
<td>removeCalendarEvent</td>
<td class="red">array/string</td>
<td>Remove event(s) by their id</td>
</tr>
<tr data-method="destroy">
<td>destroy</td>
<td class="gray">none</td>
<td>Well.. destroy the calendar</td>
</tr>
</table>
</div>
</div>
<div class="section-caption"><p>methods example</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code id="method-code">
<span class="green">// loading...</span>
</code></pre>
</div>
</div>
</div>
<div class="section-content">
<p class="section-title --shrt">events</p>
<div class="console-log">
<div class="log-content">
<table>
<tr>
<th>events</th>
<th>argument</th>
<th>description</th>
</tr>
<tr data-event="selectDate">
<td>selectDate</td>
<td class="red">newDate, oldDate</td>
<td>Fires after selecting date</td>
</tr>
<tr data-event="selectEvent">
<td>selectEvent</td>
<td class="red">activeEvent</td>
<td>Fires after selecting event</td>
</tr>
<tr data-event="selectMonth">
<td>selectMonth</td>
<td class="red">activeMonth, monthIndex</td>
<td>Fires after selecting month</td>
</tr>
<tr data-event="selectYear">
<td>selectYear</td>
<td class="red">activeYear</td>
<td>Fires after changing year</td>
</tr>
<tr data-event="destroy">
<td>destroy</td>
<td class="orange">calendar</td>
<td>Fires after destroying calendar</td>
</tr>
</table>
</div>
</div>
<div class="section-caption"><p>events example</p></div>
<div class="console-log --sm">
<div class="log-content">
<pre><code id="event-code">
<span class="green">// loading...</span>
</code></pre>
</div>
</div>
</div>
</section>
</div>
</main>
<footer>
<div class="footer-container">
<a class="bmc-button" target="_blank" href="https://www.buymeacoffee.com/edlynvillegas">
<img src="https://cdn.buymeacoffee.com/buttons/bmc-new-btn-logo.svg" alt="Buy me a coffee">
<span>Buy me a coffee</span>
</a>
<a href="https://github.com/edlynvillegas/evo-calendar" target="_blank" title="view on github">
<button class="btn-action">VIEW ON GITHUB</button>
</a>
<p class="message">PS. this is just me, exploring things.. :) — ed</p>
<p class="message">Email me at <a href="mailto:[email protected]">[email protected]</a></p>
</div>
</footer>
<!-- jQuery -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js"></script>
<script src="./evo-calendar/js/evo-calendar.min.js"></script>
<script src="./demo/demo.js"></script>
</body>
</html>