-
Notifications
You must be signed in to change notification settings - Fork 0
/
web_client.jinja
144 lines (137 loc) · 4.01 KB
/
web_client.jinja
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{%- extends 'bootstrap/base.html' -%}
{%- import 'bootstrap/wtf.html' as wtf -%}
{%- import 'bootstrap/fixes.html' as fixes -%}
{%- block metas %}
{{super()}}
{{fixes.ie8()}}
{%- endblock metas %}
{%- block styles -%}
{{super()}}
<style>
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background-color: #f5f5f5;
}
.container .text-muted {
margin: 20px 0;
}
.footer > .container {
padding-right: 15px;
padding-left: 15px;
}
</style>
{%- endblock styles -%}
{%- block title -%}
{{"HSE Marsohod CAD"}}
{%- endblock title -%}
{%- block navbar -%}
<nav class="navbar navbar-default">
<div class="container">
{# For brand and colapsed navbar. #}
<div class="navbar-header">
<button type="button"
class="navbar-toggle collapsed"
data-toggle="collapse"
data-target="#bs-example-navbar-collapse-1"
aria-expanded="false">
<span class="sr-only">
{{"Toggle navigation"}}
</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{url_for('index')}}">
{{"HSE Marsohod CAD"}}
</a>
</div>
{# Navbar content #}
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
{# render links to all available borders #}
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#"
class="dropdown-toggle"
data-toggle="dropdown"
role="button"
aria-haspopup="true"
aria-expanded="false">
{{"Select target board type"}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
{%- for board in boards -%}
<li>
<a href="{{url_for('index', board=board)}}">
{{board}}
</a>
</li>
{%- endfor -%}
</ul>
</li>
</ul>
</div>
</div>
</nav>
{%- endblock navbar -%}
{%- block content -%}
{{super()}}
<div class="container">
{%- with messages = get_flashed_messages() -%}
{%- if messages -%}
{%- for message in messages -%}
<div class="alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert">×</button>
{{message}}
</div>
{%- endfor -%}
{%- endif -%}
{%- endwith -%}
{%- if form -%}
<div class="row">
<div class="col-md-4">
<h1>{{"Configure"}} {{board | capitalize}}</h1>
<br/>
<img class="img-responsive" src="{{url_for('board_picture')}}">
</div>
<div class="col-md-8">
{{wtf.quick_form(form)}}
</div>
</div>
{%- else -%}
<h1 class="cover-heading">
{{"HSE University System Builder for Marsohod FPGA boards."}}
</h1>
<div class="lead">
<p>{{"<b>NOTE:</b> this is just a draft of index page."}}</p>
<p>{{"Select board type on top of the page, configure selected board and press 'Generate' button to save generated project."}}</p>
</div>
{%- endif -%}
</div>
<br/>
{%- block footer -%}
<footer class="footer">
<div class="container">
<p class="text-muted">
{{"Created by HSE University students"}}
<a href="mailto:dapchelkin@edu.hse.ru?Subject=FPGAMarsohodCAD%20Question" target="_top">
{{"Dmitriy Pchelkin"}}
</a> {{"and"}}
<a href="mailto:aaivanov_5@edu.hse.ru?Subject=FPGAMarsohodCAD%20Question" target="_top">
{{"Alexey Ivanov"}}
</a>
</p>
</div>
</footer>
{%- endblock footer -%}
{%- endblock content -%}