github.com/marinho/drone@v0.2.1-0.20140504195434-d3ba962e89a7/pkg/template/pages/repo_dashboard.html (about)

     1  {{ define "title" }}{{.Repo.Slug}} ยท Dashboard{{ end }}
     2  
     3  {{ define "content" }}
     4  	<div class="subhead">
     5  		<div class="container">
     6  			<ul class="nav nav-tabs pull-right">
     7  				<li class="active"><a href="/{{.Repo.Slug}}">Commits</a></li>
     8  				<li><a href="/{{.Repo.Slug}}/settings">Settings</a></li>
     9  			</ul> <!-- ./nav -->
    10  			<h1>
    11  				<span>{{.Repo.Name}}</span>
    12  				<small>{{.Repo.Owner}}</small>
    13  			</h1>
    14  		</div><!-- ./container -->
    15  	</div><!-- ./subhead -->
    16  
    17  	{{ $repo := .Repo }}
    18  	{{ $branch := .Branch }}
    19  	<div class="container">
    20  		<div class="row">
    21  			<div class="col-xs-8" role="main">
    22  				<a class="btn btn-refresh hide" href="/{{.Repo.Slug}}/tree?branch={{.Branch}}">
    23  					<i class="fa fa-rotate-right"></i>
    24  					<span>0 new</span>
    25  				</a>
    26  
    27  				{{ if .Commits }}
    28  				<ul class="commit-list commit-list-alt">
    29  					{{ range .Commits }}
    30  					<li>
    31            <a href="/{{$repo.Slug}}/commit/{{.Hash}}?branch={{.Branch}}" class="btn btn-{{.Status}}"></a>
    32  						<h3>
    33  							<a href="/{{$repo.Slug}}/commit/{{.Hash}}?branch={{.Branch}}">{{.HashShort}}</a>
    34  							<small class="timeago" title="{{.CreatedString}}"></small>
    35  							{{ if .PullRequest }}
    36  								<p>opened pull request <a href="/{{$repo.Slug}}/commit/{{.Hash}}?branch={{.Branch}}"># {{.PullRequest}}</a></p>
    37  							{{ else }}
    38  								<p>{{.Message}} &nbsp;</p>
    39  							{{ end }}
    40  						</h3>
    41  						<img src="{{.Image}}" />
    42  					</li>
    43  					{{ end }}
    44  				</ul>
    45  				{{ end }}
    46  			</div><!-- ./col-xs-8 -->
    47  
    48  			<div class="col-xs-4" style="padding-left:20px;">
    49  				<ul class="nav nav-pills nav-stacked nav-branches">
    50  					{{ range .Branches }}
    51  					<li{{ if eq $branch .Branch }} class="active"{{end}}>
    52  						<a href="/{{ $repo.Slug }}/tree?branch={{.Branch}}">
    53  							<span class="btn btn-mini btn-{{.Status}} "></span>
    54  							<span>{{.Branch}}</span>
    55  						</a>
    56  					<li>
    57  					{{ end }}
    58  				</ul>
    59  			</div><!-- ./col-xs-4 -->
    60  		</div><!-- ./row -->
    61  	</div><!-- ./container -->
    62  {{ end }}
    63  
    64  {{ define "script" }}
    65    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.js"></script>
    66    <script>
    67      $(document).ready(function() {
    68        $(".timeago").timeago();
    69      });
    70    </script>
    71  
    72    <script>
    73          var updates = 0;
    74          var ws = new WebSocket((window.location.protocol=='http:'?'ws':'wss')+'://'+window.location.host+'/feed?token='+{{ .Token}});
    75          ws.onmessage = function (e) {
    76             updates = updates+1;
    77             $(".btn-refresh span").text(updates + " new")
    78             $(".btn-refresh").show().removeClass("hide");
    79          };
    80    </script>
    81  {{ end }}