From 78f3c0e9893d36e0ce039c2b79ede8a92ebe468a Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 1 Oct 2017 00:24:20 -0400 Subject: Adding the code --- apps/calendar/css/charms.css | 195 +++++++++++++ apps/calendar/img/close-light.png | Bin 0 -> 3786 bytes apps/calendar/img/close.png | Bin 0 -> 3516 bytes apps/calendar/img/left-light.png | Bin 0 -> 3572 bytes apps/calendar/img/left.png | Bin 0 -> 3644 bytes apps/calendar/img/plus-light.png | Bin 0 -> 3525 bytes apps/calendar/img/plus.png | Bin 0 -> 3597 bytes apps/calendar/img/right-light.png | Bin 0 -> 3667 bytes apps/calendar/img/right.png | Bin 0 -> 3711 bytes apps/calendar/index.html | 170 +++++++++++ apps/calendar/lib.js | 585 ++++++++++++++++++++++++++++++++++++++ apps/calendar/splashscreen.png | Bin 0 -> 3038 bytes apps/calendar/style.css | 498 ++++++++++++++++++++++++++++++++ 13 files changed, 1448 insertions(+) create mode 100644 apps/calendar/css/charms.css create mode 100644 apps/calendar/img/close-light.png create mode 100644 apps/calendar/img/close.png create mode 100644 apps/calendar/img/left-light.png create mode 100644 apps/calendar/img/left.png create mode 100644 apps/calendar/img/plus-light.png create mode 100644 apps/calendar/img/plus.png create mode 100644 apps/calendar/img/right-light.png create mode 100644 apps/calendar/img/right.png create mode 100644 apps/calendar/index.html create mode 100644 apps/calendar/lib.js create mode 100644 apps/calendar/splashscreen.png create mode 100644 apps/calendar/style.css (limited to 'apps/calendar') diff --git a/apps/calendar/css/charms.css b/apps/calendar/css/charms.css new file mode 100644 index 0000000..54337b7 --- /dev/null +++ b/apps/calendar/css/charms.css @@ -0,0 +1,195 @@ +body { + font-family:Segoe UI; + margin:0px; + padding:0px; +} +img, a { + outline:none; + border:none; +} +#splashscreen { + position:fixed; + width:100%; + height:100%; + color:#FFFFFF; + background-image:url('../splashscreen.png'); + background-position:center; + background-color:#5133AB; + background-repeat:no-repeat; + animation:splash 4s; + -ms-animation:splash 4s; + -webkit-animation:splash 4s; + -o-animation:splash 4s; + opacity:0; + z-index:-1; +} +@keyframes splash { + from { + z-index:2; + opacity: 1; + } + 66% { + opacity: 1; + } + to { + opacity:0; + z-index:1; + display:none; + } +} +@-webkit-keyframes splash { + from { + z-index:2; + opacity: 1; + } + 66% { + opacity: 1; + } + to { + opacity:0; + z-index:1; + display:none; + } +} +@-ms-keyframes splash { + from { + z-index:2; + opacity: 1; + } + 66% { + opacity: 1; + } + to { + opacity:0; + z-index:1; + display:none; + } +} +@-o-keyframes splash { + from { + z-index:2; + opacity: 1; + } + 66% { + opacity: 1; + } + to { + opacity:0; + z-index:1; + display:none; + } +} +#hoverarea { + position:fixed; + top:0px; + right:0px; + width:15px; + height:15px; +} +#bottomhoverarea { + position:fixed; + bottom:0px; + right:0px; + width:15px; + height:15px; +} +#starthoverarea { + position:fixed; + bottom:0px; + left:0px; + width:15px; + height:15px; +} +#charmsbar { + display:none; + background-color:#111111; + position:fixed; + padding:5% 0; + top:0px; + right:0px; + height:100%; + width: 86px; + +} +#settingscharms { + padding : 40px; + display:none; + background-color:#5133AB; + position:fixed; + top:0px; + right:0px; + height:100%; + width: 345px; + font-size:9pt; + color:#FFFFFF !important; +} +#settingscharms a { + color:#FFFFFF !important; +} +#startbutton { + display:none; + position:fixed; + left:0px; + bottom:0px; +} +#iconnetwork { + position:absolute; + top:35px; + left:25px; +} +#iconbattery { + position:absolute; + bottom:35px; + left:32px; +} +#datetime { + display:none; + position:fixed; + left:50px; + bottom:50px; + width:490px; + height:139px; + background-color: rgba(17,17,17,1); +} +#ctime { + position:absolute; + left:70px; + bottom:19px; + font-family: Segoe UI Light; + font-size: 64pt; + color:#FFFFFF; +} +#date { + margin-top:20px; + margin-right:20px; + float:right; + font-size:24pt; + font-family: Segoe UI; + color:#FFFFFF; +} +.cheading1 { + font-family:Segoe UI Semilight; + font-size:28px; + margin-bottom:25px; + display:block; +} +.cheading2 { + font-size:11pt; + margin-bottom:25px; + display:block; +} +.cheading2d { + font-size:11pt; + color:#A8A8A8; + margin-bottom:25px; + display:block; +} +#settingscharms a { + display:block; + margin-bottom:25px; +} +.closecharms { + width:32px; + height:32px; + float:right; +} \ No newline at end of file diff --git a/apps/calendar/img/close-light.png b/apps/calendar/img/close-light.png new file mode 100644 index 0000000..3ede172 Binary files /dev/null and b/apps/calendar/img/close-light.png differ diff --git a/apps/calendar/img/close.png b/apps/calendar/img/close.png new file mode 100644 index 0000000..7173f58 Binary files /dev/null and b/apps/calendar/img/close.png differ diff --git a/apps/calendar/img/left-light.png b/apps/calendar/img/left-light.png new file mode 100644 index 0000000..b581ca9 Binary files /dev/null and b/apps/calendar/img/left-light.png differ diff --git a/apps/calendar/img/left.png b/apps/calendar/img/left.png new file mode 100644 index 0000000..02d77e1 Binary files /dev/null and b/apps/calendar/img/left.png differ diff --git a/apps/calendar/img/plus-light.png b/apps/calendar/img/plus-light.png new file mode 100644 index 0000000..40039c0 Binary files /dev/null and b/apps/calendar/img/plus-light.png differ diff --git a/apps/calendar/img/plus.png b/apps/calendar/img/plus.png new file mode 100644 index 0000000..19d9cf6 Binary files /dev/null and b/apps/calendar/img/plus.png differ diff --git a/apps/calendar/img/right-light.png b/apps/calendar/img/right-light.png new file mode 100644 index 0000000..0bb359b Binary files /dev/null and b/apps/calendar/img/right-light.png differ diff --git a/apps/calendar/img/right.png b/apps/calendar/img/right.png new file mode 100644 index 0000000..e915318 Binary files /dev/null and b/apps/calendar/img/right.png differ diff --git a/apps/calendar/index.html b/apps/calendar/index.html new file mode 100644 index 0000000..fbe49c8 --- /dev/null +++ b/apps/calendar/index.html @@ -0,0 +1,170 @@ + + + + Calendar + + + + + + + + + + + + +
+
+
+

+ +
+

+ + + + + +
+
+ + +
+
+
+ +
+
+ +

 

+
+ +
    +

    Click on a time to add an event

    +
    +
    + +
    + +
    +

    +

    + + Hour + Minute +

    +

    + + +

    +
    +
    +

    + + + + +

    +
    + +
    + Copy the text and save it as calendar.ics file.
    + You can then import the file to Google Calendar, iCal etc. + +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +Settings +Calendar +Theme +light +Get as iCal +Click here to show code +
    + +
    +
    + + \ No newline at end of file diff --git a/apps/calendar/lib.js b/apps/calendar/lib.js new file mode 100644 index 0000000..43327cc --- /dev/null +++ b/apps/calendar/lib.js @@ -0,0 +1,585 @@ +/* + Simple Planner + A localStorage based personal planner prototype + Made for 10K Apart + + Kailash Nadh, http://kailashnadh.name (August 2011) +*/ +var Planner = { + DAYS: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday', 'Sunday'], + MONTHS: ['January','February','March','April','May','June','July','August','September','October','November','December'], + LABELS: ['todo', 'personal', 'work', 'important', 'misc'], + Date: new Date(), + UI: null, + EVENTS: {}, + diary_open: false, + + init: function() { + this.EVENTS = localStorage['events']; + if(!this.EVENTS) { + this.EVENTS = {}; + if(!localStorage.setup) { + // initial setup + var holidays = {'1-0': 'New Year', '8-2': 'Commonwealth Day', '17-2': 'St. Patrick\'s Day', '1-3': 'April fools', '22-3': 'Earth Day', '1-4': 'May Day', '5-4': 'Cinco de Mayo', '4-6': 'Independence Day (US)', '3-7': 'Friendship Day', '10-7': 'Rollercoaster Day', '17-8': 'International Day of Peace', '16-9': 'World Food Day', '31-9': 'Halloween', '4-10': 'Diwali', '17-10': 'World Peace Day', '22-10': 'Thanksgiving', '25-11': 'Christmas'}; + + for(var year=this.Date.getFullYear(); year<=this.Date.getFullYear()+1; year++) { + for(var id in holidays) { + this.createEvent( + id + '-' + year, + '00', + '00', + holidays[id], + 'misc' + ); + } + } + + // random entries + for(var i=0; i<7; i++) { + this.createEvent( + Math.floor(Math.random()*28) + '-'+ this.Date.getMonth() + '-'+ this.Date.getFullYear(), + Math.floor(Math.random()*23).pad(2), + '00', + 'This is a dummy event. The number ' + i + ' is cool!', + this.LABELS[Math.floor(Math.random()*(this.LABELS.length-1))] + ); + } + localStorage.setup = 1; + } + } else { + try{ + this.EVENTS = JSON.parse(this.EVENTS); + } catch(e) { + localStorage.clear(); + this.EVENTS = {}; + } + } + + this.phone = navigator.userAgent.match(/phone/i) || navigator.userAgent.match(/android/i); + + this.setDate(); + this.initUI(); + + // what month to render first? + var hash = document.location.href.match(/([0-9]{1,2})\-([0-9]{4})/i); + if(hash && hash[1] >= 1 && hash[1] <= 12 && hash[2] >= 1900 && hash[2] <= 2050) { + this.specificMonth(hash[1], hash[2]); + } else { + this.today(); + } + + // only load the diary on pageload if there's enough space to render it + Planner.renderDiary( $('.day' + this.date).data('id') ); + this.UI.resize(); + + Planner.UI.diary_wrap.show(); + var covered = (Planner.UI.diary_wrap.offset().left - Planner.UI.calendar_wrap.innerWidth()); + Planner.UI.diary_wrap.hide(); + if(!this.phone && covered > -35 && new Date().getMonth() == this.month ) { + Planner.showDiary(); + } + }, + initUI: function() { + this.UI = { + themes: ['Switch to dark theme', 'Switch to light theme'], + 'calendar': $('#calendar'), + 'dialog': $('#dialog'), + 'add': $('#add'), + 'calendar_wrap': $('#calendar-wrap'), + 'diary_wrap': $('#diary-wrap'), + 'event_label': $('#event-label'), + 'event_hour': $('#event-hour'), + 'event_minute': $('#event-minute'), + 'event_description': $('#event-description'), + 'event_delete': $('#event-delete'), + 'event_tweet': $('#event-tweet'), + 'diary': $('#diary') + }; + + // time in create event dialog + var val = ''; + for(i=0; i<24; i++) { + val = i.pad(2); + this.UI.event_hour.append( $('