Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

iOS jazzy theme small improvements #7422

Merged
merged 10 commits into from
Dec 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
275 changes: 183 additions & 92 deletions platform/darwin/docs/theme/assets/css/jazzy.css.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion platform/darwin/docs/theme/assets/img/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions platform/darwin/docs/theme/assets/img/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions platform/darwin/docs/theme/assets/img/minus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions platform/darwin/docs/theme/assets/img/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion platform/darwin/docs/theme/assets/js/jazzy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ $(".token").click(function(event) {
return;
}
var link = $(this);
var linkIcon = link.find('.token-icon');
var animationDuration = 300;
var tokenOffset = "-15px";
var tokenOffset = "0px";
var original = link.css('marginLeft') == tokenOffset;
linkIcon.toggleClass('token-icon-minus');
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
Expand Down
16 changes: 9 additions & 7 deletions platform/darwin/docs/theme/templates/doc.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@

{{> header}}

<p class="breadcrumbs">
<a class="breadcrumb" href="{{path_to_root}}index.html">{{module_name}} Reference</a>
<img class="carat" src="{{path_to_root}}img/carat.png" />
{{name}} {{kind}} Reference
</p>
<div class="breadcrumbs">
<div class="limiter">
<a class="breadcrumb" href="{{path_to_root}}index.html">{{module_name}} Reference</a>
<img class="carat" src="{{path_to_root}}img/carat.png" />
{{name}} {{kind}} Reference
</div>
</div>

<div class="content-wrapper">
<div class="content-wrapper limiter">
{{> nav}}
<article class="main-content">

<section class="section">
<div class="section-content">
{{^hide_name}}<h1>{{name}}</h1>{{/hide_name}}
{{^hide_name}}<a href="#/{{name}}"><h1 id="{{name}}">{{name}}<span class="anchor-icon" /></h1></a>{{/hide_name}}
{{#declaration}}
<div class="declaration">
<div class="language">
Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/docs/theme/templates/footer.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<section class="footer">
<section class="footer limiter">
{{{copyright}}} Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.
</section>
53 changes: 29 additions & 24 deletions platform/darwin/docs/theme/templates/header.mustache
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
<header class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="{{path_to_root}}index.html">
<img class="header-icon" src="{{path_to_root}}img/mapbox.svg" alt="{{module_name}} Docs"/>
</a>
{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}
</p>

{{#github_url}}
<p class="header-col header-col--secondary">
<a class="header-link" href="{{github_url}}">
<svg class="header-icon" viewBox="0 0 33 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path stroke="none" stroke-width="1" fill="white" fill-rule="evenodd" d="M16.6,0.4 C7.6,0.4 0.3,7.7 0.3,16.7 C0.3,23.9 5,30 11.4,32.2 C12.2,32.3 12.5,31.8 12.5,31.4 L12.5,28.6 C8,29.6 7,26.4 7,26.4 C6.3,24.5 5.2,24 5.2,24 C3.7,23 5.3,23 5.3,23 C6.9,23.1 7.8,24.7 7.8,24.7 C9.3,27.2 11.6,26.5 12.5,26.1 C12.6,25 13.1,24.3 13.5,23.9 C9.9,23.5 6.1,22.1 6.1,15.8 C6.1,14 6.7,12.6 7.8,11.4 C7.6,11 7.1,9.3 8,7.1 C8,7.1 9.4,6.7 12.5,8.8 C13.8,8.4 15.2,8.3 16.6,8.3 C18,8.3 19.4,8.5 20.7,8.8 C23.8,6.7 25.2,7.1 25.2,7.1 C26.1,9.3 25.5,11 25.4,11.4 C26.4,12.5 27.1,14 27.1,15.8 C27.1,22.1 23.3,23.4 19.7,23.8 C20.3,24.3 20.8,25.3 20.8,26.8 L20.8,31.3 C20.8,31.7 21.1,32.2 21.9,32.1 C28.4,29.9 33,23.8 33,16.6 C32.9,7.7 25.6,0.4 16.6,0.4 L16.6,0.4 Z"></path>
</svg>
View on GitHub
<header class="header-container">
<div class="limiter">
<div class="header">
<p class="header-col header-col--primary">
<a class="header-link" href="{{path_to_root}}index.html">
<img style="height: 25px;" class="header-icon" src="{{path_to_root}}img/mapbox.svg" alt="{{module_name}} Docs"/>
<span class='header-tag'>BRANDLESS_DOCSET_TITLE Reference</span>
</a>
{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}
</p>
{{/github_url}}

{{#dash_url}}
<p class="header-col header-col--secondary">
<a class="header-link" href="{{dash_url}}">
<img class="header-icon" src="{{path_to_root}}img/dash.png"/>
Install in Dash
</a>
</p>
{{/dash_url}}
{{#github_url}}
<p class="header-col header-col--secondary">
<a class="header-link space-right2" href="{{github_url}}">
<svg style="margin-bottom: 1px;" class="header-icon" viewBox="0 0 33 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path stroke="none" stroke-width="1" fill="white" fill-rule="evenodd" d="M16.6,0.4 C7.6,0.4 0.3,7.7 0.3,16.7 C0.3,23.9 5,30 11.4,32.2 C12.2,32.3 12.5,31.8 12.5,31.4 L12.5,28.6 C8,29.6 7,26.4 7,26.4 C6.3,24.5 5.2,24 5.2,24 C3.7,23 5.3,23 5.3,23 C6.9,23.1 7.8,24.7 7.8,24.7 C9.3,27.2 11.6,26.5 12.5,26.1 C12.6,25 13.1,24.3 13.5,23.9 C9.9,23.5 6.1,22.1 6.1,15.8 C6.1,14 6.7,12.6 7.8,11.4 C7.6,11 7.1,9.3 8,7.1 C8,7.1 9.4,6.7 12.5,8.8 C13.8,8.4 15.2,8.3 16.6,8.3 C18,8.3 19.4,8.5 20.7,8.8 C23.8,6.7 25.2,7.1 25.2,7.1 C26.1,9.3 25.5,11 25.4,11.4 C26.4,12.5 27.1,14 27.1,15.8 C27.1,22.1 23.3,23.4 19.7,23.8 C20.3,24.3 20.8,25.3 20.8,26.8 L20.8,31.3 C20.8,31.7 21.1,32.2 21.9,32.1 C28.4,29.9 33,23.8 33,16.6 C32.9,7.7 25.6,0.4 16.6,0.4 L16.6,0.4 Z"></path>
</svg>
View on GitHub
</a>
</p>
{{/github_url}}

{{#dash_url}}
<p class="header-col header-col--secondary">
<a class="header-link bold" href="{{dash_url}}">
<img style="margin-bottom: 1px;" class="header-icon" src="{{path_to_root}}img/dash.png"/>
Install in Dash
</a>
</p>
{{/dash_url}}
</div>
</div>
</header>
4 changes: 2 additions & 2 deletions platform/darwin/docs/theme/templates/nav.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ul class="nav-groups">
{{#structure}}
<li class="nav-group-name">
<a class="nav-group-name-link" href="{{path_to_root}}{{section}}.html">{{section}}</a>
<a class="small-heading" href="{{path_to_root}}{{section}}.html">{{section}}<span class="anchor-icon" /></a>
<ul class="nav-group-tasks">
{{#children}}
<li class="nav-group-task">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of function names overflow no matter how wide we make the table of contents, and this issue worsens as the window narrows:

toc

We can mitigate this issue by attaching title attributes to each of the links.

<a class="nav-group-task-link" href="{{path_to_root}}{{url}}">{{name}}</a>
<a title="{{name}}" class="nav-group-task-link" href="{{path_to_root}}{{url}}">{{name}}</a>
</li>
{{/children}}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/docs/theme/templates/parameter.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<tr>
<td>
<code>
<em>{{name}}</em>
{{name}}
</code>
</td>
<td>
Expand Down
20 changes: 9 additions & 11 deletions platform/darwin/docs/theme/templates/task.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<a name="/{{uid}}"></a>
<a name="//apple_ref/{{language_stub}}/Section/{{name}}" class="dashAnchor"></a>
<a href="#/{{uid}}">
<h3 class="section-name">{{name}}</h3>
<h3 id="{{uid}}" class="section-name">{{name}}<span class="anchor-icon" /></h3>
</a>
</div>
{{/name}}
Expand All @@ -15,7 +15,7 @@
<code>
<a name="/{{usr}}"></a>
<a name="//apple_ref/{{language_stub}}/{{dash_type}}/{{name}}" class="dashAnchor"></a>
<a class="token" href="#/{{usr}}">{{name}}</a>
<a class="token" href="#/{{usr}}"><span class="token-name">{{name}}</span><span class="token-icon" /></a>
</code>
{{#default_impl_abstract}}
<span class="declaration-note">
Expand All @@ -29,9 +29,7 @@
{{/from_protocol_extension}}
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
{{#abstract}}
<div class="abstract">
{{{abstract}}}
Expand All @@ -49,13 +47,13 @@
{{#declaration}}
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">{{language}}</p>
<div class="language keyline-blue">
<p style="background: rgba(65, 131, 196, 0.15);" class="aside-title text-blue">{{language}}</p>
{{{declaration}}}
</div>
{{#other_language_declaration}}
<div class="language">
<p class="aside-title">Swift</p>
<div class="language keyline-purple">
<p style="background: rgba(149, 149, 209, 0.21);" class="aside-title text-purple">Swift</p>
{{{other_language_declaration}}}
</div>
{{/other_language_declaration}}
Expand All @@ -80,10 +78,10 @@
</div>
{{/return}}
{{#github_token_url}}
<div class="slightly-smaller show-on-github">
<div class="show-on-github">
<a href="{{{github_token_url}}}">
show on github
<img class="show-on-github-icon" src="{{{path_to_root}}}img/github.svg"/>
<img style="margin-bottom: 1px;" class="show-on-github-icon" src="{{{path_to_root}}}img/github.svg"/>
View Source on GitHub
</a>
</div>
{{/github_token_url}}
Expand Down
Binary file added platform/ios/originals/screenshot.sketch
Binary file not shown.
Binary file removed platform/ios/originals/screenshots.sketch
Binary file not shown.
Binary file modified platform/ios/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion platform/ios/scripts/document.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jazzy \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411
find ${OUTPUT} -name *.html -exec \
perl -pi -e 's/Mapbox\s+(Docs|Reference)/Mapbox iOS SDK $1/' {} \;
perl -pi -e 's/BRANDLESS_DOCSET_TITLE/iOS SDK $1/, s/Mapbox\s+(Docs|Reference)/Mapbox iOS SDK $1/' {} \;
2 changes: 1 addition & 1 deletion platform/macos/scripts/document.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jazzy \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411
find ${OUTPUT} -name *.html -exec \
perl -pi -e 's/Mapbox\s+(Docs|Reference)/Mapbox macOS SDK $1/' {} \;
perl -pi -e 's/BRANDLESS_DOCSET_TITLE/macOS SDK $1/, s/Mapbox\s+(Docs|Reference)/Mapbox macOS SDK $1/' {} \;