summaryrefslogtreecommitdiffstats
path: root/modules-available/roomplanner/templates/svg-plan.html
blob: 072efbfffe6f8caf6e64a62beddb30853daac16f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg"
	  xmlns:xlink="http://www.w3.org/1999/xlink"
	  version="1.1"
	  viewBox="0 0 {{width}} {{height}}"
	  width="{{width}}mm"
	  height="{{height}}mm">
	<style type="text/css">
		<![CDATA[
		rect {
			stroke: #000;
		}
		rect.kb {
			fill: #999;
			stroke-width: .1;
		}
		rect.scrn {
			stroke-width: .2;
			fill: url(#screen);
		}
		rect.hl {
			fill: url(#screenhl);
		}
		]]>
	</style>
	<defs>
		<radialGradient id="screen" cx=".4" cy=".3" r="1">
			<stop offset="0%" stop-color="#888" />
			<stop offset="100%" stop-color="#000" />
		</radialGradient>
		<radialGradient id="screenhl" cx=".4" cy=".3" r="1">
			<stop offset="0%" stop-color="#afa" />
			<stop offset="100%" stop-color="#074" />
		</radialGradient>
	</defs>
	<g transform="rotate({{rotate}} {{centerX}} {{centerY}}) translate({{shiftX}} {{shiftY}})">
		<line x1="{{line.x1}}" y1="{{line.y1}}"
				x2="{{line.x2}}" y2="{{line.y2}}"
				style="stroke:#555;stroke-width:.2;opacity:.5" />
		{{#machines}}
			<g transform="translate({{gridCol}} {{gridRow}})">
				<rect transform="rotate({{rotation}} 1.9 1.9)"
						x=".1"
						y="2.6"
						height="1"
						width="3.6"
						class="kb" />
				<rect transform="rotate({{rotation}} 1.9 1.9)"
						x=".2"
						y=".2"
						rx=".4"
						ry=".4"
						height="2.2"
						width="3.4"
						class="scrn {{class}}"
						/>
			</g>
		{{/machines}}
	</g>
</svg>