[ios, macos] Add Mapbox Jazzy theme

- Based on Jazzy's "full width" theme.
- Add ellipsis to overlong items in navigation menu.
- Set minimum width for navigation menu.
- Use Open Sans font face.
- Inline GitHub header icon as SVG.
- Center images by default.
- Add GitHub SVG icon to 'show on github' link.
- Wrap overlong method names on class pages.
This commit is contained in:
Jason Wray
2016-06-09 17:47:41 -07:00
parent 5389f04da5
commit bacf8eee70
22 changed files with 978 additions and 1 deletions

View File

@@ -0,0 +1,88 @@
/* Rouge Syntax Highlighting, Mapbox Base style
------------------------------------------------------- */
.highlight .hll { background-color:#ffffcc }
/* No Styling, Just Default:
.highlight .nx, Normal Text
.highlight .ni Name.Entity
.highlight .nf Name.Entity
.highlight .no Name.Constant
*/
/* Comments */
.highlight .o, /* Operator */
.highlight .c,
.highlight .c1,
.highlight .cp,
.highlight .cm { color:#999; font-style:italic; }
.highlight .err { color:#F00000; background-color:#F0A0A0 } /* Error */
.highlight .k { color:#404040; font-weight:bold; } /* Keyword */
.highlight .css .k { font-weight:normal; }
.highlight .cs { color:#404040; font-style:italic; } /* Comment.Special */
.highlight .gd { color:#A00000; } /* Generic.Deleted */
.highlight .ge { font-style:italic } /* Generic.Emph */
.highlight .gs { font-weight:bold; } /* Generic.Strong */
.highlight .gr { color:#FF0000; } /* Generic.Error */
.highlight .gh { color:#000080; } /* Generic.Heading */
.highlight .gi { color:#00A000; } /* Generic.Inserted */
.highlight .go { color:#808080; } /* Generic.Output */
.highlight .gp { color:#c65d09; } /* Generic.Prompt */
.highlight .gu { color:#800080; } /* Generic.Subheading */
.highlight .gt { color:#0040D0; } /* Generic.Traceback */
.highlight .kc { color:#D24400; } /* Keyword.Constant */
/* Keyword.Declaration
* Keyword.Namespace
* Keyword.Reserved */
.highlight .kd,
.highlight .kn,
.highlight .kr,
.highlight .nt { color:#0B5A91; } /* Name.Tag */
/* Literal.Number */
.highlight .mh,
.highlight .mo,
.highlight .il,
.highlight .mi,
.highlight .kt,
.highlight .mf,
.highlight .nl, /* Name.Label */
.highlight .na, /* Name.Attribute */
.highlight .m { color:#0C9DC2; } /* Keyword.Type */
.highlight .kp { color:#0080f0; } /* Keyword.Pseudo */
.highlight .nc { color:#DF6637; } /* Name.Class */
.highlight .css .nc { color:#75A21C; }
.highlight .nd { color:#505050; } /* Name.Decorator */
.highlight .ne { color:#F00000; } /* Name.Exception */
.highlight .nn { color:#0e84b5; } /* Name.Namespace */
.highlight .nf, /* Name.Function */
.highlight .nv { color:#003060; } /* Name.Variable */
.highlight .ow { color:#404040; } /* Operator.Word */
.highlight .w { color:#bbbbbb; } /* Text.Whitespace */
.highlight .sc { color:#8080F0; } /* Literal.String.Char */
.highlight .sd { color:#D04020; } /* Literal.String.Doc */
/* Name.Builtin / Name.Builtin.Pseudo */
.highlight .bp,
.highlight .nb { color:#007020; }
/* Literal.String */
.highlight .s,
.highlight .sh,
.highlight .sb,
.highlight .s1,
.highlight .sr,
.highlight .se { color:#75A21C; }
.highlight .si { background-color:#eee; } /* Literal.String.Interpol */
.highlight .p { color:#444444; } /* Normal Text */
.highlight .ss { color:#f0c080; } /* Literal.String.Symbol */
.highlight .vc { color:#c0c0f0; } /* Name.Variable.Class */
.highlight .vg { color:#f08040; } /* Name.Variable.Global */
.highlight .vi { color:#a0a0f0; } /* Name.Variable.Instance */

View File

@@ -0,0 +1,600 @@
// ===========================================================================
//
// Variables
//
// ===========================================================================
$body_background: #fff;
$body_font: 15px/25px 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$text_color: #333;
$gray_border: 1px solid #ddd;
$quote_color: #858585;
$quote_border: 4px solid #e5e5e5;
$link_color: #3887BE;
$link_hover_color: #63b6e5;
$table_alt_row_color: #fbfbfb;
$table_border_color: #ddd;
$code_bg_color: #f6f6f6;
$code_font: Menlo, Bitstream Vera Sans Mono, Monaco, Consolas, monospacee;
// ----- Layout
$gutter: 16px;
$navigation_min_width: 175px;
$navigation_max_width: 300px;
// ----- Header
$header_weight: normal;
$header_color: #555;
$header_font: 'Open Sans Bold', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$header_bg_color: #3887be;
$header_link_color: #fff;
$doc_coverage_color: #999;
// ----- Breadcrumbs
$breadcrumbs_bg_color: #fbfbfb;
$breadcrumbs_border_color: #ddd;
// ----- Navigation
$navigation_max_width: 300px;
$navigation_bg_color: #fbfbfb;
$navigation_border_color: #ddd;
$navigation_title_color: rgba(0, 0, 0, 0.5);
$navigation_task_color: $link_color;
$section_name_color: $navigation_title_color;
// ----- Content
$declaration_title_language_color: #4183c4;
$declaration_language_border: 5px solid #cde9f4;
$declaration_bg_color: #fdfeff;
$declaration_border_color: #ddd;
$aside_color: #aaa;
$aside_border: 5px solid lighten($aside_color, 20%);
$aside_warning_color: #ff0000;
$aside_warning_border: 5px solid lighten($aside_warning_color, 20%);
// ----- Footer
$footer_text_color: #888;
$footer_link_color: #555;
// ===========================================================================
//
// Base
//
// ===========================================================================
*, *:before, *:after {
box-sizing: inherit;
}
body {
margin: 0;
background: $body_background;
color: $text_color;
font: $body_font;
letter-spacing: .2px;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
// ----- Block elements
@mixin heading($font-size: 1rem, $margin: 1.275em 0 0.85em) {
font-family: $header_font;
font-size: $font-size;
font-weight: $header_weight;
color: $header_color;
margin: $margin;
}
h1 {
@include heading(2.0rem, 0.5em 0 0.6em);
}
h1 a {
color: $header_color;
}
h2 {
@include heading(1.5rem, 1em 0 0.6em);
}
h3 {
@include heading(1rem, 1em 0 0.3em);
}
h4 {
@include heading(1rem);
}
h5, h6 {
@include heading;
}
p {
margin: 0 0 1em;
}
ul, ol {
padding: 0 0 0 2em;
margin: 0 0 0.85em;
}
blockquote {
margin: 0 0 0.85em;
padding: 0 15px;
color: $quote_color;
border-left: $quote_border;
}
// ----- Inline elements
img {
max-width: 100%;
}
a {
color: $link_color;
text-decoration: none;
&:hover, &:focus {
color: $link_hover_color;
}
&:focus {
box-shadow:inset 0 0 0 1px rgba(0,0,0,0.05);
}
}
// ----- Tables
table {
background: $body_background;
width: 100%;
border-collapse: collapse;
border-spacing: 0;
overflow: auto;
margin: 0 0 0.85em;
}
tr {
&:nth-child(2n) {
background-color: $table_alt_row_color;
}
}
th, td {
padding: 6px 13px;
border: 1px solid $table_border_color;
}
// ----- Code
pre {
margin: 0 0 1.275em;
padding: .85em 1em;
overflow: auto;
background: $code_bg_color;
font-family: $code_font;
border-radius: 4px;
}
code {
font-family: $code_font;
font-size: .85em;
line-height: .85em;
}
p, li {
> code {
background: $code_bg_color;
padding: .2em;
border-radius: 4px;
&:before, &:after {
letter-spacing: -.35em;
content: "\00a0";
}
}
}
pre code {
padding: 0;
white-space: pre;
}
// ===========================================================================
//
// Layout
//
// ===========================================================================
.content-wrapper {
display: flex;
flex-direction: column;
@media (min-width: 768px) {
flex-direction: row;
}
}
// ===========================================================================
//
// Header
//
// ===========================================================================
.header {
display: flex;
padding: $gutter/2;
font-size: 0.875em;
background: $header_bg_color;
color: $doc_coverage_color;
}
.header-col {
margin: 0;
padding: 0 $gutter/2
}
.header-col--primary {
flex: 1;
}
.header-link {
color: $header_link_color;
}
.header-image, .header-icon {
padding-right: 6px;
vertical-align: -4px;
height: 16px;
}
// ===========================================================================
//
// Breadcrumbs
//
// ===========================================================================
.breadcrumbs {
font-size: 0.875em;
padding: $gutter / 2 $gutter;
margin: 0;
background: $breadcrumbs_bg_color;
border-bottom: 1px solid $breadcrumbs_border_color;
}
.carat {
height: 10px;
margin: 0 5px;
}
// ===========================================================================
//
// Navigation
//
// ===========================================================================
.navigation {
order: 2;
@media (min-width: 768px) {
order: 1;
width: 25%;
min-width: $navigation_min_width;
max-width: $navigation_max_width;
padding-bottom: $gutter*4;
font-size: 12px;
line-height: 20px;
overflow: hidden;
background: $navigation_bg_color;
border-right: 1px solid $navigation_border_color;
}
}
.nav-groups {
list-style-type: none;
padding-left: 0;
}
.nav-group-name {
border-bottom: 1px solid $navigation_border_color;
padding: $gutter/2 0 $gutter/2 $gutter;
}
.nav-group-name-link {
font-family: $header_font;
color: $navigation_title_color;
}
.nav-group-tasks {
margin: $gutter/2 0;
padding: 0 0 0 $gutter/2;
}
.nav-group-task {
font-size: 1em;
list-style-type: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: $navigation_task_color;
}
.nav-group-task-link {
color: $navigation_task_color;
}
// ===========================================================================
//
// Content
//
// ===========================================================================
.main-content {
order: 1;
@media (min-width: 768px) {
order: 2;
flex: 1;
padding-bottom: 60px;
max-width: 80%;
}
}
.section {
padding: 0 $gutter * 2;
border-bottom: 1px solid $navigation_border_color;
}
.section-content {
margin: 0 auto;
padding: $gutter 0;
}
.section-content img {
margin: 0 auto;
display: block;
}
.section-name {
color: $section_name_color;
display: block;
}
.declaration .highlight {
overflow-x: initial; // This allows the scrollbar to show up inside declarations
padding: $gutter/2 0;
margin: 0;
background-color: transparent;
border: none;
}
.task-group-section {
border-top: $gray_border;
}
.task-group {
padding-top: 0px;
}
.task-name-container {
a[name] {
&:before {
content: "";
display: block;
}
}
}
.item-container { }
.item {
padding-top: 8px;
width: 100%;
list-style-type: none;
a[name] {
&:before {
content: "";
display: block;
}
}
.token {
padding-left: 3px;
margin-left: 0px;
font-size: 1em;
word-break: break-all;
}
.declaration-note {
font-size: .85em;
color: #808080;
font-style: italic;
}
}
.pointer-container {
border-bottom: $gray_border;
left: -23px;
padding-bottom: 13px;
position: relative;
width: 110%;
}
.pointer {
left: 21px;
top: 7px;
display: block;
position: absolute;
width: 12px;
height: 12px;
border-left: 1px solid $declaration_border_color;
border-top: 1px solid $declaration_border_color;
background: $declaration_bg_color;
transform: rotate(45deg);
}
.height-container {
display: none;
position: relative;
width: 100%;
overflow: hidden;
.section {
background: $declaration_bg_color;
border: $gray_border;
border-top-width: 0;
padding: $gutter / 1.5 $gutter;
}
}
.aside, .language {
padding: 6px 12px;
margin: 12px 0;
border-left: $aside_border;
overflow-y: hidden;
.aside-title {
font-size: 9px;
letter-spacing: 2px;
text-transform: uppercase;
padding-bottom: 0;
margin: 0;
color: $aside_color;
-webkit-user-select: none;
}
p:last-child {
margin-bottom: 0;
}
}
.language {
border-left: $declaration_language_border;
.aside-title {
color: $declaration_title_language_color;
}
}
.aside-warning {
border-left: $aside_warning_border;
.aside-title {
color: $aside_warning_color;
}
}
.graybox {
border-collapse: collapse;
width: 100%;
p {
margin: 0;
word-break: break-word;
min-width: 50px;
}
td {
border: $gray_border;
padding: 5px 25px 5px 10px;
vertical-align: middle;
}
tr td:first-of-type {
text-align: right;
padding: 7px;
vertical-align: top;
word-break: normal;
width: 40px;
}
}
.slightly-smaller {
font-size: 0.9em;
}
.show-on-github {
font-variant: small-caps;
}
.show-on-github-icon {
width: 16px;
display: inline-block !important;
vertical-align: -3px;
padding-left: 2px;
}
// ===========================================================================
//
// Footer
//
// ===========================================================================
.footer {
border-top: 1px $navigation_border_color solid;
padding: $gutter/2 $gutter;
color: $footer_text_color;
font-size: 0.8em;
p {
display: inline;
}
a {
color: $footer_link_color;
}
}
// ===========================================================================
//
// Dash
//
// ===========================================================================
html.dash {
.header, .breadcrumbs, .navigation {
display: none;
}
.height-container {
display: block;
}
}
// ===========================================================================
//
// Fonts
//
// ===========================================================================
@font-face {
font-family:'Open Sans';
src:url('../fonts/opensans-regular.eot');
src:url('../fonts/opensans-regular.eot#iefix') format('embedded-opentype'),
url('../fonts/opensans-regular.woff') format('woff');
}
@font-face {
font-family:'Open Sans Bold';
src:url('../fonts/opensans-bold.eot');
src:url('../fonts/opensans-bold.eot#iefix') format('embedded-opentype'),
url('../fonts/opensans-bold.woff') format('woff');
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

BIN
platform/darwin/docs/theme/assets/img/dash.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg 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" fill="#555" 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>

After

Width:  |  Height:  |  Size: 916 B

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="580px" height="156px" viewBox="0 0 580 156" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<title>layer1</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="mapbox" transform="translate(-1.000000, -1.000000)" fill="#FFFFFF">
<g id="layer1" transform="translate(0.428470, 0.781010)">
<g id="g3024" transform="translate(0.542850, 0.401720)">
<path d="M0.028592,0.417258 L0.028592,122.817276 L18.028592,122.817276 L18.028592,22.017258 L54.028592,83.217258 L90.028592,22.017258 L90.028592,122.817276 L108.028592,122.817276 L108.028592,0.417258 L93.628592,0.417258 C86.428592,0.394218 80.77382,2.217258 77.597342,7.617258 L54.028592,47.667258 L30.459842,7.617258 C27.283364,2.217258 21.628592,0.394218 14.428592,0.417258 L0.028592,0.417258 L0.028592,0.417258 Z" id="path4479"></path>
<path d="M315.028592,0.417258 L315.028592,124.617276 L349.228592,124.617276 C374.428592,124.617276 394.228592,104.81724 394.228592,77.817258 C394.228592,50.81724 374.428592,31.01724 349.228592,31.017258 C343.529972,31.041018 338.884892,30.824568 333.028592,30.848598 L333.028592,0.417348 L315.028592,0.417348 L315.028592,0.417258 Z M333.028592,49.017258 L349.228592,49.017258 C364.381892,49.017258 376.228592,62.677008 376.228592,77.817258 C376.228592,92.95632 365.621732,106.617258 349.228592,106.617258 L333.028592,106.617258 L333.028592,49.017258 L333.028592,49.017258 Z" id="path4477"></path>
<path d="M165.628592,31.017258 C140.428592,31.017258 122.428592,50.817258 122.428592,77.817258 C122.428592,104.817258 140.428574,124.617276 165.628592,124.617276 L208.828592,124.617276 L208.828592,77.817258 C208.828592,50.817258 190.82861,31.017258 165.628592,31.017258 L165.628592,31.017258 Z M165.628592,49.017258 C180.028592,49.017258 190.828592,61.424226 190.828592,77.817258 L190.828592,106.617258 L165.628592,106.617258 C151.228574,106.617258 140.428628,93.994254 140.428592,77.817258 C140.428574,61.617258 151.228592,49.017258 165.628592,49.017258 L165.628592,49.017258 Z" id="path4475"></path>
<path d="M223.228592,31.017258 L223.228592,155.217276 L241.228592,155.217276 L241.228592,124.729776 C247.084856,124.753536 251.729954,124.593516 257.428592,124.617276 C282.628592,124.617276 302.428592,104.817258 302.428592,77.817258 C302.428592,50.817258 282.628592,31.017258 257.428592,31.017258 L223.228592,31.017258 L223.228592,31.017258 Z M241.228592,49.017258 L257.428592,49.017258 C273.821552,49.017258 284.428592,62.678196 284.428592,77.817258 C284.428592,92.957508 272.581892,106.617258 257.428592,106.617258 L241.228592,106.617258 L241.228592,49.017258 L241.228592,49.017258 Z" id="path4473"></path>
<path d="M450.028592,31.017258 C425.175812,31.017258 405.028592,51.970374 405.028592,77.817258 C405.028592,103.664142 425.175812,124.617276 450.028592,124.617276 C474.881372,124.617276 495.028592,103.664142 495.028592,77.817258 C495.028592,51.970374 474.881372,31.017258 450.028592,31.017258 L450.028592,31.017258 Z M450.028592,49.017258 C464.940332,49.017258 477.028592,61.911522 477.028592,77.817258 C477.028592,93.722994 464.940332,106.617258 450.028592,106.617258 C435.116852,106.617258 423.028592,93.722994 423.028592,77.817258 C423.028592,61.911522 435.116852,49.017258 450.028592,49.017258 L450.028592,49.017258 Z" id="path4471"></path>
<polygon id="path4469" points="493.116092 32.794182 524.447342 76.444182 491.428592 122.7942 513.478592 122.7942 535.472342 91.856682 557.578592 122.7942 579.628592 122.7942 546.553592 76.444182 577.828592 32.794182 555.666092 32.794182 535.472342 60.975432 515.278592 32.794218"></polygon>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

40
platform/darwin/docs/theme/assets/js/jazzy.js vendored Executable file
View File

@@ -0,0 +1,40 @@
window.jazzy = {'docset': false}
if (typeof window.dash != 'undefined') {
document.documentElement.className += ' dash'
window.jazzy.docset = true
}
if (navigator.userAgent.match(/xcode/i)) {
document.documentElement.className += ' xcode'
window.jazzy.docset = true
}
// On doc load, toggle the URL hash discussion if present
$(document).ready(function() {
if (!window.jazzy.docset) {
var linkToHash = $('a[href="' + window.location.hash +'"]');
linkToHash.trigger("click");
}
});
// On token click, toggle its discussion and animate token.marginLeft
$(".token").click(function(event) {
if (window.jazzy.docset) {
return;
}
var link = $(this);
var animationDuration = 300;
var tokenOffset = "-15px";
var original = link.css('marginLeft') == tokenOffset;
link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration);
$content = link.parent().parent().next();
$content.slideToggle(animationDuration);
// Keeps the document from jumping to the hash.
var href = $(this).attr('href');
if (history.pushState) {
history.pushState({}, '', href);
} else {
location.hash = href;
}
event.preventDefault();
});

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{name}} {{kind}} Reference</title>
<link rel="stylesheet" type="text/css" href="{{path_to_root}}css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="{{path_to_root}}css/highlight.css" />
<meta charset="utf-8">
<script src="{{path_to_root}}js/jquery.min.js" defer></script>
<script src="{{path_to_root}}js/jazzy.js" defer></script>
{{{custom_head}}}
</head>
<body>
{{#dash_type}}
<a name="//apple_ref/{{language_stub}}/{{dash_type}}/{{name}}" class="dashAnchor"></a>
{{/dash_type}}
<a title="{{name}} {{kind}} Reference"></a>
{{> 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="content-wrapper">
{{> nav}}
<article class="main-content">
<section class="section">
<div class="section-content">
{{^hide_name}}<h1>{{name}}</h1>{{/hide_name}}
{{#declaration}}
<div class="declaration">
<div class="language">
{{{declaration}}}
</div>
</div>
{{/declaration}}
{{{overview}}}
</div>
</section>
{{> tasks}}
</article>
</div>
{{> footer}}
</body>
</div>
</html>

View File

@@ -0,0 +1,3 @@
<section class="footer">
{{{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>

View File

@@ -0,0 +1,28 @@
<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
</a>
</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}}
</header>

View File

@@ -0,0 +1,16 @@
<nav class="navigation">
<ul class="nav-groups">
{{#structure}}
<li class="nav-group-name">
<a class="nav-group-name-link" href="{{path_to_root}}{{section}}.html">{{section}}</a>
<ul class="nav-group-tasks">
{{#children}}
<li class="nav-group-task">
<a class="nav-group-task-link" href="{{path_to_root}}{{url}}">{{name}}</a>
</li>
{{/children}}
</ul>
</li>
{{/structure}}
</ul>
</nav>

View File

@@ -0,0 +1,12 @@
<tr>
<td>
<code>
<em>{{name}}</em>
</code>
</td>
<td>
<div>
{{{discussion}}}
</div>
</td>
</tr>

View File

@@ -0,0 +1,95 @@
<div class="task-group">
{{#name}}
<div class="task-name-container">
<a name="/{{uid}}"></a>
<a name="//apple_ref/{{language_stub}}/Section/{{name}}" class="dashAnchor"></a>
<a href="#/{{uid}}">
<h3 class="section-name">{{name}}</h3>
</a>
</div>
{{/name}}
<ul class="item-container">
{{#items}}
<li class="item">
<div>
<code>
<a name="/{{usr}}"></a>
<a name="//apple_ref/{{language_stub}}/{{dash_type}}/{{name}}" class="dashAnchor"></a>
<a class="token" href="#/{{usr}}">{{name}}</a>
</code>
{{#default_impl_abstract}}
<span class="declaration-note">
Default implementation
</span>
{{/default_impl_abstract}}
{{#from_protocol_extension}}
<span class="declaration-note">
Extension method
</span>
{{/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}}}
{{#url}}
<a href="{{{path_to_root}}}{{{url}}}" class="slightly-smaller">See more</a>
{{/url}}
</div>
{{/abstract}}
{{#default_impl_abstract}}
<h4>Default Implementation</h4>
<div class="default_impl abstract">
{{{default_impl_abstract}}}
</div>
{{/default_impl_abstract}}
{{#declaration}}
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">{{language}}</p>
{{{declaration}}}
</div>
{{#other_language_declaration}}
<div class="language">
<p class="aside-title">Swift</p>
{{{other_language_declaration}}}
</div>
{{/other_language_declaration}}
</div>
{{/declaration}}
{{#parameters.count}}
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
{{#parameters}}
{{> parameter}}
{{/parameters}}
</tbody>
</table>
</div>
{{/parameters.count}}
{{#return}}
<div>
<h4>Return Value</h4>
{{{return}}}
</div>
{{/return}}
{{#github_token_url}}
<div class="slightly-smaller show-on-github">
<a href="{{{github_token_url}}}">
show on github
<img class="show-on-github-icon" src="{{{path_to_root}}}img/github.svg"/>
</a>
</div>
{{/github_token_url}}
</section>
</div>
</li>
{{/items}}
</ul>
</div>

View File

@@ -0,0 +1,9 @@
{{#tasks.count}}
<section class="section">
<div class="section-content">
{{#tasks}}
{{> task}}
{{/tasks}}
</div>
</section>
{{/tasks.count}}

View File

@@ -40,6 +40,7 @@ jazzy \
--module-version ${SHORT_VERSION} \
--readme ${README} \
--root-url https://www.mapbox.com/ios-sdk/api/${RELEASE_VERSION}/ \
--theme platform/darwin/docs/theme \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411
find ${OUTPUT} -name *.html -exec \

View File

@@ -2,7 +2,7 @@
The Mapbox macOS SDK is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa applications on macOS 10.10.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the [Mapbox GL Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/), applies them to vector tiles that conform to the [Mapbox Vector Tile Specification](https://www.mapbox.com/developers/vector-tiles/), and renders them using OpenGL.
<img alt="" src="https://raw.githubusercontent.com/mapbox/mapbox-gl-native/master/platform/macos/screenshot.png" width="645">
<img alt="Mapbox macOS SDK screenshot" src="screenshot.png" width="645">
For setup information, consult the README.md that comes with this documentation. The [Mapbox iOS SDK](https://www.mapbox.com/ios-sdk/)’s [API documentation](https://www.mapbox.com/ios-sdk/api/) and [online examples](https://www.mapbox.com/ios-sdk/examples/) apply to the Mapbox macOS SDK with few differences, mostly around unimplemented features like user location tracking. A [full changelog](https://github.com/mapbox/mapbox-gl-native/blob/master/platform/macos/CHANGELOG.md) is also available.

View File

@@ -32,6 +32,8 @@ sed -n -e '/^## /{' -e ':a' -e 'n' -e '/^##/q' -e 'p' -e 'ba' -e '}' platform/ma
rm -rf ${OUTPUT}
mkdir -p ${OUTPUT}
cp platform/macos/screenshot.png "${OUTPUT}"
jazzy \
--config platform/macos/jazzy.yml \
--sdk macosx \
@@ -39,6 +41,7 @@ jazzy \
--github-file-prefix https://github.com/mapbox/mapbox-gl-native/tree/${BRANCH} \
--module-version ${SHORT_VERSION} \
--readme ${README} \
--theme platform/darwin/docs/theme \
--output ${OUTPUT}
# https://github.com/realm/jazzy/issues/411
find ${OUTPUT} -name *.html -exec \