Commit f5d74ba1c132d473aa200f852562f7954b512854
new fonts
nomand committed on 6/4/2018, 11:23:54 AMParent: 90bca5c148200ba5c7993f3c8c2bf41653877172
Files changed
css/style.css | changed |
css/fonts.css | added |
index.html | changed |
js/letnice.js | changed |
fonts/input_mono_regular.ttf | added |
css/style.css | ||
---|---|---|
@@ -29,18 +29,18 @@ | ||
29 | 29 | display: inline-block; |
30 | 30 | margin: 10px; |
31 | 31 | } |
32 | 32 | |
33 | -.m { font-size: 20px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; margin-bottom: 10px; text-align: left; } | |
34 | -.y { font-size: 40px; font-weight: bold; font-family: Arial, Helvetica, sans-serif; text-transform: uppercase; margin-bottom: 40px; text-align: middle; } | |
33 | +.m { font-size: 20px; font-weight: bold; font-family: 'input_mono_regular'; text-transform: uppercase; margin-bottom: 10px; text-align: left; } | |
34 | +.y { font-size: 40px; font-weight: bold; font-family: 'input_mono_regular'; text-transform: uppercase; margin-bottom: 40px; text-align: middle; } | |
35 | 35 | |
36 | 36 | svg.graph { color:white; width: 100%; } |
37 | -svg.graph text {font-family: Arial, Helvetica, sans-serif; stroke:none; fill:#000000; font-size:14px; text-anchor: middle;} | |
37 | +svg.graph text {font-family: 'input_mono_regular'; stroke:none; fill:#8b8b8b; font-size:14px; text-anchor: middle;} | |
38 | 38 | svg.graph text.dayLabel { font-size: 10px; font-weight: 200; } |
39 | 39 | svg.graph rect { stroke:none } |
40 | 40 | svg.graph rect:hover { fill:#a1a1a1 ; cursor:pointer} |
41 | 41 | svg.graph rect.null { fill: none; stroke: none;} |
42 | 42 | svg.graph rect.today { fill:#ffffff; stroke: #000000;} |
43 | -svg.graph rect.day { fill:#5f5757; } | |
44 | -svg.graph rect.weekend { fill:#505050 } | |
43 | +svg.graph rect.day { fill:#8b8b8b; } | |
44 | +svg.graph rect.weekend { fill:#747474 } | |
45 | 45 | svg.graph rect.gone { fill:#000000 } |
46 | 46 | svg.graph path { stroke-linecap: butt; stroke-dasharray: 1,1; fill:none; stroke:#333; stroke-width:13px } |
css/fonts.css | ||
---|---|---|
@@ -1,0 +1,6 @@ | ||
1 | +@font-face { | |
2 | + font-family: 'input_mono_regular'; | |
3 | + src: url('../fonts/input_mono_regular.ttf') format('truetype'); | |
4 | + font-weight: normal; | |
5 | + font-style: normal; | |
6 | +} |
index.html | ||
---|---|---|
@@ -2,10 +2,12 @@ | ||
2 | 2 | <html> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <title>Timetable</title> |
6 | + <link rel="stylesheet" href="css/fonts.css"/> | |
7 | + <link rel="stylesheet" href="css/style.css"/> | |
8 | + | |
6 | 9 | <script src="js/letnice.js"></script> |
7 | - <link rel="stylesheet" href="css/style.css"/> | |
8 | 10 | </head> |
9 | 11 | <body> |
10 | 12 | <section id="center"> |
11 | 13 | </section> |
js/letnice.js | ||
---|---|---|
@@ -31,9 +31,9 @@ | ||
31 | 31 | let y = 0; |
32 | 32 | |
33 | 33 | for(i = 0; i < 7; i++) |
34 | 34 | { |
35 | - y = i * 14; | |
35 | + y = (i * 14)-1; | |
36 | 36 | html += `<text class="dayLabel" x="5" y='${y}' dy="10">${dayNames[i].substr(0,1)}</text>` |
37 | 37 | } |
38 | 38 | return html; |
39 | 39 | } |
@@ -55,16 +55,17 @@ | ||
55 | 55 | { |
56 | 56 | y = week * 14; |
57 | 57 | let day = new Date(year, month, date); |
58 | 58 | |
59 | - console.log(day); | |
60 | - console.log(new Date().getMonth()); | |
61 | - | |
62 | 59 | if(day.getDay() != week) |
63 | 60 | { |
64 | 61 | style = "null"; |
65 | 62 | date-- |
66 | 63 | } |
64 | + else if(day.getDay() == 5 || day.getDay() == 6) | |
65 | + { | |
66 | + style = "weekend"; | |
67 | + } | |
67 | 68 | else if(day == new Date()) |
68 | 69 | { |
69 | 70 | style = "today"; |
70 | 71 | } |
@@ -72,14 +73,13 @@ | ||
72 | 73 | { |
73 | 74 | style = "day"; |
74 | 75 | } |
75 | 76 | |
76 | - html += `<rect class='${style}' x='${x}' y='${y}' title='${date+1}' width="12px" height="12px" rx="2" ry="2" onclick=""></rect>` | |
77 | + html += `<rect class='${style}' x='${x}' y='${y}' title='${dayNames[week] + "_" + (date+1)}' width="12px" height="12px" rx="2" ry="2" onclick=""></rect>` | |
77 | 78 | week++ |
78 | 79 | date++ |
79 | 80 | count++ |
80 | 81 | } |
81 | 82 | } |
82 | 83 | return html; |
83 | 84 | } |
84 | - | |
85 | 85 | } |
fonts/input_mono_regular.ttf | ||
---|---|---|
@@ -1,0 +1,595 @@ | ||
1 | + � pGSUBI� �� �OS/2[��] x `cmap�G*� X zcvt �/ /� &fpgm�;�� -� agasp �� glyf�l�� 7$ 6�head�[= � 6hhea�� 4 $hmtxr+�Z � ~locaq& /� 6maxpG4 X namedo m� �post��r5 s� *�prepy�4 /8 � ���] _<� L �e4� Ѱ���>�x ��� ����� % �h � W | |
2 | + s �� �� R�� � 7h � � �� FBI @ ��R� n�, ��� X � 2 � � (� (� (� (� (� (� (� (� (� (� (� d� P� P� P� P� P� P� d� d� d� d� d� d� d� d� d� d� d� d� d� P� P� P� P� P� d� d� d� d� d� d� d� d� d� d� d� d� <� <� d� d� �� �� �� �� F� d� d� d� d� d� P� P� P� P� P� P� P� P� P� d� P� d� d� d� d� 7� 7� 7� 7� 7� 7� 2� 2� 2� 2� d� d� d� d� d� d� d� d� d� d� d� (� � � � � � � � � � � � P� P� P� P� � � � P� P� d� � � <� �� 2� d� | |
3 | +� 2� (� � d� d� (� d���� P� d���� 2� d���� d� d� (� F� d� P� P���� d� d� F� 2� ��g� � 2� � P� F���� F� � P� 7� d� d� <���� <� � d� (� d� d� d� d� | |
4 | +� d� d� d� � F� d� d� d� d� d���� F� d� P� d� d� P� 2� ,� ,� 2� � d� d� <� <� | |
5 | +� P� d� P� <� )� d� F� F� F� F� F� F� F� F� F� F� F� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� P� 2� 2� 2� 2� 2� d���� d� d� d� d� d� d� d� d� d� e� e� �� �� d� d� d� d� <� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� d� �� �� B� �� P� P� P� P� P� P� F� F� F� F� d� d� d� d� d� d� d� d� d� d� d� J� '� '� '� '� '� U� J� J� J� J� J� x� x� x� x� o� �� 2� � � d� d� d� d� d� � d� U� �� d� d���� d� � F� �� e� Z� Z� d� J� d� Q� Q� R� d� d� d� P� P� P� P� �� J� Z� J� � d� d� (� d� d� d� d� d� d� d� d� <� V� <� <� <� F� d� d� �� �� (� d� d� d� � Q� d� d� d� �� �� � Z� d� d� d� d� d� F� J� J� <� U� d� P� <� <� � P� d� Y� <� [� � d� P� d� d� e���� <� � d� �� � �> |