Skip to content

Commit

Permalink
Updating aws-godoc (aws#1028)
Browse files Browse the repository at this point in the history
  • Loading branch information
xibz authored Jan 3, 2017
1 parent 6ad900d commit 794fda0
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 37 deletions.
77 changes: 46 additions & 31 deletions doc-src/aws-godoc/templates/package_service.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ <h2 class="toggleButton" title="Click to hide Index section">Operations ▾</h2>
<dd><a href="#{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
{{end}}
{{range .Methods}}
<!-- Hide stringers -->
{{if (and (ne .Name "String") (ne .Name "GoString")) }}
{{if (ne .Name "Validate") }}
{{ if (not (is_setter $.PDoc.Name .)) }}
{{ if (not (is_paginator .)) }}
{{ if (ne .Name "Validate") }}
{{$name_html := html .Name}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{node_html $ .Decl false | sanitize}}</a></dd>
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{client_html $ .Decl false | sanitize}}</a></dd>
{{end}}
{{end}}
{{end}}
{{end}}
Expand All @@ -86,32 +88,30 @@ <h2 class="toggleButton" title="Click to hide Index section">Operations ▾</h2>
<dd><a href="#pkg-note-{{$marker}}">{{noteTitle $marker | html}}s</a></dd>
{{end}}
{{end}}
</dl>
</div><!-- #manual-nav -->

<!--{{if $.Examples}}
<div id="pkg-examples">
<h4>Examples</h4>
<dl>
{{range $.Examples}}
<dd><a class="exampleLink" href="#example_{{.Name}}">{{example_name .Name}}</a></dd>
{{end}}
</dl>
</div>
{{end}}-->

<!--{{with .Filenames}}
<h4>Package files</h4>
<p>
<span style="font-size:90%">
{{range .}}
<a href="{{.|srcLink|html}}">{{.|filename|html}}</a>
{{end}}
</span>
</p>
{{end}}-->
</div><!-- #manual-nav -->
</div><!-- .expanded -->
</div><!-- #pkg-index -->
{{ if $.HasPaginators }}
<div id="pkg-pagination " class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Paginators ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Paginators ▾</h2>
{{range .Types -}}
{{$tname_html := html .Name}}
{{range .Methods -}}
{{if is_paginator . -}}
{{$name_html := html .Name}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{client_html $ .Decl false | sanitize}}</a></dd>
{{end }}
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
<div id="pkg-types" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Types ▹</h2>
Expand All @@ -121,10 +121,18 @@ <h2 class="toggleButton" title="Click to hide Index section">Types ▾</h2>
{{if .Vars}}
<dd><a href="#pkg-variables">Variables</a></dd>
{{end}}
<dl>
{{range .Types}}
{{$tname_html := html .Name}}
<dd><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
<dt><a href="#{{$tname_html}}">type {{$tname_html}}</a></dd>
{{range .Methods}}
{{ if is_setter $.PDoc.Name .}}
{{$name_html := html .Name}}
<dd><a href="#{{$tname_html}}.{{$name_html}}">{{name_only_html $ . | sanitize}}</a></dd>
{{end}}
{{end}}
{{end}}
</dl>
</div>
</div>

Expand Down Expand Up @@ -184,11 +192,18 @@ <h2 class="toggleButton" title="Click to hide Internal Call Graph section">Inter
</div> <!-- #pkg-callgraph -->

{{with .Consts}}
<h2 id="pkg-constants">Constants</h2>
{{range .}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
<div id="pkg-consts" class="toggle">
<div class="collapsed">
<h2 class="toggleButton" title="Click to show Index section">Constants ▹</h2>
</div>
<div class="expanded">
<h2 class="toggleButton" title="Click to hide Index section">Constants ▾</h2>
{{range .}}
<pre>{{node_html $ .Decl true}}</pre>
{{comment_html .Doc}}
{{end}}
</div>
</div>
{{end}}
{{with .Vars}}
<h2 id="pkg-variables">Variables</h2>
Expand Down
9 changes: 5 additions & 4 deletions doc-src/aws-godoc/templates/pkglist.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
<div style="overflow-x:hidden;text-align:center;">
<div id="mobile_container">
<div id="mobile_only">
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left:60px">
<a href="https://aws.amazon.com/blogs/developer/category/go/">Blog</a>
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left:60px"> <a href="https://aws.amazon.com/blogs/developer/category/go/">Blog</a>
</ul>
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left:60px">
<a href="https://aws.amazon.com/forms/aws-doc-feedback?hidden_service_name=godoc&hidden_file_name=godoc&hidden_guide_name=godoc&hidden_api_version=HEAD">Feedback</a>
</ul>
</div>
<ul class="packages" >
{{range .List}}
<ul class="packages" style="line-height:1.25;font-size:larger;padding-left: {{multiply .Depth 20}}px;">
<dd style="margin: 0 0 0 0;line-height:1.25;font-size:larger;padding-left: {{multiply (add .Depth 1) 20}}px;">
<a target="_parent" href="{{srcLink .Path}}/">{{html .Name}}</a>
</ul>
</dd>
{{end}}
</ul>
</div>
</div>
</body>
Expand Down
9 changes: 7 additions & 2 deletions doc-src/aws-godoc/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ a > img {
padding-top:8px;
}

.packages dd:nth-child(odd) {
background-color: #ececec;
}

body {
margin: 0;
font-family: HelveticaNeueBold,Helvetica,Helvetica,Arial,sans-serif;
Expand Down Expand Up @@ -67,6 +71,7 @@ ol {
margin: 20px;
}
.packages {
display:inline;
margin: 0px;
text-align: left;
width: 100%;
Expand Down Expand Up @@ -766,8 +771,6 @@ a.error {
div#mobile_container {
display:inline-block;
width: 100%;
padding-left:20px;
padding-top:10px;
}
}

Expand Down Expand Up @@ -818,6 +821,8 @@ a.error {
content:"";
height: 5px;
width:30px;
padding-left:20px;
padding-top:10px;
}
}

Expand Down

0 comments on commit 794fda0

Please sign in to comment.