ironsmith/web/index.html
Tim Shannon ae961e9dd1 More web work
rearranged how web files were loaded a bit

Started on breadcrumb handling
2016-04-15 21:57:59 +00:00

194 lines
3.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Ironsmith - A simple, script driven continuous integration tool">
<title>Ironsmith - A simple, script driven continuous integration tool</title>
<link rel="stylesheet" href="/css/pure-min.css">
<style>
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
}
@media (min-width: 768px) {
.container {
padding-right: 40px;
padding-left: 40px;
}
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.text-center {
text-align: center;
}
/*tables*/
.table-responsive {
margin-left: auto;
margin-right: auto;
overflow-x: auto;
}
.table-responsive table {
width: 100%;
max-width: 100%;
}
/* error */
.error {
display: inline-block;
background-color: red;
color: white;
border-radius: 4px;
padding: .5em 1em;
margin: 10px;
}
/*stages*/
.stage-load {
}
.stage-fetch {
}
.stage-build {
}
.stage-test {
}
.stage-release {
}
/* breadcrumbs */
#breadcrumbs {
margin-bottom: 10px;
}
.breadcrumb-separator {
color: #ccc;
font-weight: bold;
font-size: 2em;
}
</style>
</head>
<body>
<script id="tMain" type="text/ractive">
<div class="container pure-g">
<div class="pure-u-1">
<h3 class="text-center">Iron Smith</h3>
{{#if error}}
<div class="text-center">
<span class="error">{{error}}</span>
</div>
{{/if}}
<div id="breadcrumbs" class="pure-menu pure-menu-horizontal text-center">
<ul class="pure-menu-list">
<li class="pure-menu-item">
<a href="/" class="pure-menu-link">Project List</a>
</li>
{{#if project}}
<li class="pure-menu-item">
<span class="breadcrumb-separator">/</span>
</li>
<li class="pure-menu-item">
<a href="/project/{{project.id}}" class="pure-menu-link">{{project.name}}</a>
</li>
{{/if}}
{{#if project && version}}
<li class="pure-menu-item">
<span class="breadcrumb-separator">/</span>
</li>
<li class="pure-menu-item">
<a href="/project/{{project.id}}/{{version}}" class="pure-menu-link">{{version}}</a>
</li>
{{/if}}
{{#if project && version && stage}}
<li class="pure-menu-item">
<span class="breadcrumb-separator">/</span>
</li>
<li class="pure-menu-item">
<a href="/project/{{project.id}}/{{version}}/{{stage}}" class="pure-menu-link">{{stage}}</a>
</li>
{{/if}}
</ul>
</div>
{{#if !project}}
{{>projects}}
{{elseif !version}}
{{>project}}
{{elseif !stage}}
{{>version}}
{{else}}
{{>stage}}
{{/if}}
</div>
</div>
{{#partial projects}}
<div class="table-responsive">
<table class="pure-table pure-table-striped">
<thead>
<tr>
<th>Project</th>
<th>Status</th>
<th>Stage</th>
<th>Last Release</th>
<th>Last Version</th>
<th>Last Log</th>
</tr>
</thead>
<tbody>
{{#projects:i}}
<tr>
<td><a href="/project/{{.id}}/">{{.name}}</a></td>
<td>{{.status}}</td>
<td>{{.stage}}</td>
<td>{{.releaseVersion}}</td>
<td>{{.lastLog.version}}</td>
<td title="{{.lastLog.log}}">{{#if .lastLog.log}}{{.lastLog.log.substring(0,100) + " ..."}}{{/if}}</td>
</tr>
{{/projects}}
</tbody>
</table>
</div>
{{/partial}}
{{#partial project}}
{{/partial}}
{{#partial version}}
{{/partial}}
{{#partial stage}}
{{/partial}}
</script>
<script src="/js/ractive.min.js"></script>
<script src="/js/index.js"></script>
</body>
</html>