Skip to content

Commit

Permalink
Lungo.Calendar in src/plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Javi Jimenez Villar committed Mar 25, 2013
1 parent 7e043f7 commit 8113204
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 9 deletions.
17 changes: 8 additions & 9 deletions GruntFile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = (grunt) ->
meta:
file: 'lungo'
packages: "packages",
plugins: "src/plugins",
# BETA
endpoint: "example/components",
version: ".brownie",
Expand Down Expand Up @@ -49,15 +50,14 @@ module.exports = (grunt) ->
icons: [
'src/stylesheets/lungo.icon**.styl']

calendar_coffee: [
'packages/lungo.calendar/**.coffee']
calendar_styl: [
'packages/lungo.calendar/**.styl']
calendar:
coffee: 'src/plugins/calendar/**.coffee'
stylus: 'src/plugins/calendar/**.styl'


coffee:
core: files: '<%=meta.endpoint%>/<%=meta.file%><%=meta.version%>/<%=meta.file%>.debug.js': '<%= source.coffee %>'
calendar: files: 'packages/lungo.calendar/package/lungo.calendar.js': '<%= source.calendar_coffee %>'
calendar: files: 'packages/lungo.calendar/lungo.calendar.js': '<%= source.calendar.coffee %>'

uglify:
options: compress: false, banner: "<%= meta.banner %>"
Expand All @@ -69,7 +69,7 @@ module.exports = (grunt) ->
icons:
options: compress: false
files: '<%=meta.packages%>/<%=meta.file%>.icon/<%=meta.file%>.icon.css': '<%=source.icons%>'
calendar: files: 'packages/lungo.calendar/package/lungo.calendar.css': '<%=source.calendar_styl%>'
calendar: files: 'packages/lungo.calendar/lungo.calendar.css': '<%=source.calendar.stylus%>'

copy:
theme:
Expand All @@ -82,8 +82,8 @@ module.exports = (grunt) ->
stylus:
files: ['<%= source.stylus %>', '<%= source.theme %>']
tasks: ["stylus:core", "stylus:theme"]
pkgs:
files: ['<%= source.calendar_coffee %>','<%= source.calendar_styl %>']
calendar:
files: ['<%= source.calendar.coffee %>','<%= source.calendar.stylus %>']
tasks: ["coffee:calendar", "stylus:calendar"]

grunt.loadNpmTasks "grunt-contrib-coffee"
Expand All @@ -94,4 +94,3 @@ module.exports = (grunt) ->
grunt.loadNpmTasks "grunt-contrib-watch"

grunt.registerTask "default", ["coffee", "uglify", "stylus", "copy"]
# grunt.registerTask "default", ["coffee:calendar", "stylus:calendar"]
15 changes: 15 additions & 0 deletions src/plugins/calendar/lungo.calendar.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
###
Lungo - HTML5 Cross-Device Framework
http://lungo.tapquo.com
Copyright (c) 2011-2013 Tapquo S.L. - Licensed GPLv3, Commercial
@namespace Lungo.Sugar
@class Calendar
@author Javier Jimenez Villar <[email protected]> || @soyjavi
###

Lungo.Sugar.Calendar = do () ->

init = -> @

init: init
58 changes: 58 additions & 0 deletions src/plugins/calendar/lungo.calendar.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[data-control=calendar]
position: absolute
top: 128px
left: 20px
z-index: 5 !important
width: 280px
display: block
font-size: 17px
margin: 0 auto

& table
background: #fff

& thead, tbody, tr
display: block
width: inherit

& thead td
font-weight: 700
font-size: 11px
line-height: 24px
border: 0px

& td
width: 40px
line-height: 40px
text-align: center
font-weight: 600
position: relative
border: solid 1px #eee
&:hover
background: green
border: 0px
&.today
background: blue
color: #fff !important
border: 0px
&.weekend
color: red
&.event:after
position: absolute
content: "·"
position: red
top: 12px
left: 15px
font-size: 28px
color: red
&.disabled
color: #ddd
& .layout
line-height: 40px
background: #000
text-align: center
font-size: 18px
color: #fff

& strong
margin: 0 4px

0 comments on commit 8113204

Please sign in to comment.