-
Notifications
You must be signed in to change notification settings - Fork 2
/
templates-bootstrap.app
147 lines (134 loc) · 3.95 KB
/
templates-bootstrap.app
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
145
146
147
module templates-bootstrap
imports elib/elib-utils/lib
imports elib/elib-bootstrap/lib
imports elib/elib-tablesorter/lib
override attributes submitlink{ submit attributes }
define mainResponsiveStyle() {
includeCSS("tags.css?1")
includeCSS("bootstrap/css/bootstrap.min.css?2")
includeCSS("bootstrap/css/bootstrap-adapt.css?1")
includeCSS("yellowgrass.css?2")
includeJS(IncludePaths.jQueryJS())
includeJS("bootstrap/js/bootstrap.min.js?1")
tooltipsBS
includeCSS("prism.css")
includeHead("<script type=\"text/javascript\" src=\""+ navigate(root()) + "javascript/prism.js\" data-manual></script>")
postProcess("Prism.highlightAll( node );")
<script>
onkeyupdelayoverride = 500;
</script>
// includeHead("<meta name='viewport' content='width=device-width, initial-scale=1.0'>")
//includeHead(rendertemplate(rssLink()))
//includeHead(rendertemplate(analytics))
//includeHead(rendertemplate(bitterfont))
//<link href="http://fonts.googleapis.com/css?family=Bitter" rel="stylesheet" type="text/css">
div[class="frame"]{
elements
}
}
override template brand() {
navigate root() [class="navbar-brand"]{ "YellowGrass" }
}
template aboutMenu() {
dropdownInNavbar("About"){
dropdownMenu{
dropdownMenuItem{ navigate about() { "About YellowGrass" } }
dropdownMenuItem{ navigate features() { "Features" } }
dropdownMenuItem{ navigate tagManual() { "Tag Manual" } }
dropdownMenuDivider
dropdownMenuItem{
navigate projectList() { "Browse Public Projects"}
}
}
}
}
template mainResponsive() {
mainResponsiveStyle{
ygnavbar{
navItems{
aboutMenu
}
pullRight{ signInOut }
}
gridContainer[id="content"]{
messages
elements
}
ygfooter
}
//analytics
}
define mainResponsive(p: Project) {
mainResponsiveStyle{
ygnavbar{
navItems{
aboutMenu
}
pullRight{ signInOut }
}
gridContainer[id="content"]{
messages
elements
}
ygfooter
}
//analytics
}
template ygnavbar() {
div[class="navbar navbar-default navbar-fixed-top", style="background-color: #CFD67E !important;"]{
gridContainer{
div[class="navbar-header"]{
brand
navCollapseButton
}
div[class="navbar-collapse collapse", style="height: 0px;"]{
elements
}
}
}
}
template ygfooter() {
footer{
gridContainer[id="content"]{
gridRow{
gridCol(12){
"YellowGrass.org - the tag-based issue tracker"
}
}
}
}
}
template progressBar(now : Int, max : Int){
var percent := if(max == 0) 0 else (now * 100) / max;
<div class="progress progress-striped">
<div class="progress-bar" role="progressbar" aria-valuenow=""+now aria-valuemin="0" aria-valuemax=""+max style="width: "+ percent + "%;">
elements
</div>
</div>
}
template warnAction( btnText: String, message : String, isDeleteAction : Bool ){
warnAction( btnText , (message as WikiText), isDeleteAction)[all attributes]{ elements }
}
template warnActionModalLink(idAttr : String){
modalLink(idAttr) [all attributes, rel="tooltip", data-placement="bottom"]{
elements
}
}
template warnAction( btnText : String, message : WikiText, isDeleteAction : Bool ){
warnActionModalLink(id)[all attributes]{
if(isDeleteAction){ iTrash " " } output(btnText)
}
warnActionModal(id, if(btnText == "" && isDeleteAction) "Delete item" else btnText, message){
elements
}
}
template warnActionModal(modalId : String, btnText : String, message : WikiText){
modal(modalId){
modalHeader{ header1{ output(btnText) } }
modalBody{ output(message) }
modalFooter{
elements
modalCloseLink[class = "btn btn-default"] { iStop() " Cancel" }
}
}
}