git ssb

0+

Rômulo Alves / dat-letnice



Commit 29e10e89b29e21699acb50380ef8640f3334735e

layout

nomand committed on 6/3/2018, 5:54:52 AM
Parent: da95a942d6f86bb03c02c65962da608ec5859847

Files changed

css/style.csschanged
js/letnice.jschanged
css/style.cssView
@@ -23,23 +23,21 @@
2323 }
2424
2525 .month {
2626 background-color: #b7b7b7;
27- width:300px;
27+ width:200px;
2828 display: inline-block;
2929 margin: 10px;
3030 }
3131 .m {
32+ font-size: 20px;
33+ font-weight: bold;
3234 font-family: Arial, Helvetica, sans-serif;
3335 text-transform: capitalize;
3436 }
3537
36-
37-
38-
3938 svg.graph { color:white; max-width:1000px; width: 100%; height:100%;}
4039 svg.graph text {font-family: Arial, Helvetica, sans-serif; stroke:none; fill:#000000; font-size:14px; text-anchor: middle;}
41-svg.graph text.m { font-size: 14px;}
4240 svg.graph text.w { font-size: 10px; font-weight: 200;}
4341 svg.graph rect { stroke:none }
4442 svg.graph rect:hover { fill:#a1a1a1 !important; cursor:pointer}
4543 svg.graph rect.null { fill: none; stroke: none;}
js/letnice.jsView
@@ -69,33 +69,33 @@
6969 //mtwtfss
7070 //start comparing date with weekdays
7171 //start iterating through days from a match until month is over
7272
73+
74+ //let cell = parseInt((base.getBoundingClientRect().width - 52*2)/52)
75+
7376 while(month < 12)
7477 {
7578 base.innerHTML += `
7679 <div class="month">
7780 <span class="m" x="" y='${month * 140}' dy="10">${monthNames[new Date(year, month).getMonth()].substr(0,1)}</span>
78- <svg class="graph">
81+ <svg class="graph" >
7982 ${doweeks()}
80- </svg></div>
81- `
83+ </svg></div>`
8284 month++
8385 }
8486
8587 function doweeks()
8688 {
8789 let html = "";
8890 let y = 0;
8991
90- while(week<7)
92+ for(i=0; i<7; i++)
9193 {
92- y += week * 20;
93- html += `<text class="w" x="10" y='${y}' dy="10">${dayNames[new Date(year, month, week).getDay()].substr(0,1)}</text>`
94- week++
94+ y = i * 20;
95+ html += `<text class="w" x="7" y='${y}' dy="10">${dayNames[new Date(year, month, i).getDay()].substr(0,1)}</text>`
9596 count++
9697 }
97- week = 0;
9898 return html;
9999 }
100100 }
101101

Built with git-ssb-web