Last active
November 4, 2015 09:05
Revisions
-
mindboard revised this gist
Nov 4, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ sb.append("""<html> <table border=0 style="border-collapse: collapse;border:solid 1px;">""") def cellW = 200 def cellStyle0 = "width:${cellW}px;border-left:solid 1px #333;background-color:#eee;" sb.append(""" -
mindboard created this gist
Nov 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,70 @@ def sb = new StringBuffer() sb.append("""<html> <body> <table border=0 style="border-collapse: collapse;border:solid 1px;">""") def cellW = 200; def cellStyle0 = "width:${cellW}px;border-left:solid 1px #333;background-color:#eee;" sb.append(""" <tr> <th></th> <th style="${cellStyle0}">MON</th> <th style="${cellStyle0}">TUE</th> <th style="${cellStyle0}">WED</th> <th style="${cellStyle0}">THU</th> <th style="${cellStyle0}">FRI</th> <th style="${cellStyle0}">SAT</th> <th style="${cellStyle0}">SUN</th> </tr>""") def cellStyle1 = 'height:24px;border-left:solid 1px #333;background-color:#eee;' sb.append(""" <tr> <td></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> <td style="${cellStyle1}"></td> </tr>""") def color = '#999' def cellStyle2 = "border-left:solid 1px $color;height:15px;" def cellStyle3 = "border-left:solid 1px $color;border-top:solid 1px $color;height:15px;" //(0..24).each { (5..24).each { sb.append(""" <tr> <th style="margin:0;padding-right:5px;width:50px;text-align:right;" rowspan="2"><span style="font-size:9px;">$it:00</span></th> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> <td style="$cellStyle2"></td> </tr> <tr> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> <td style="$cellStyle3"></td> </tr>""") } sb.append(''' </table> </body> </html>''') new File('weekly-schedule.html').text = sb.toString()