initial rewrite

This commit is contained in:
Wyatt Johnson
2018-02-16 13:31:37 -07:00
parent 4acb6aeb6c
commit 4c06d5659d
51 changed files with 3932 additions and 543 deletions
+1
View File
@@ -0,0 +1 @@
default_layout: doc
+18
View File
@@ -0,0 +1,18 @@
<style type="text/css" media="screen">
.container {
margin: 10px auto;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found. Try searching above for your page.</p>
</div>
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
{{ partial('partial/head') }}
<body>
<div>
<div>
{{ partial('partial/sidebar') }}
<main class="content" role="main">
{{ partial('partial/header') }}
{{ body }}
</main>
{{ partial('partial/footer') }}
</div>
</div>
</body>
</html>
+8
View File
@@ -0,0 +1,8 @@
<article{% if page.class %} class="{{ page.class }}"{% endif %}>
<a class="btn btn-sm btn-light float-right suggest-edits plain-link" href="https://github.com/coralproject/talk/edit/master/docs/source/{{ page.source }}" title="Suggest edits to this page">Suggest Edits</a>
<h1>{{ page.title }}</h1>
<hr/>
{{ page.content }}
</article>
+18
View File
@@ -0,0 +1,18 @@
<hr/>
<footer class="footer">
<p class="text-center">Coral Project Talk Technical Documentation. Design inspired by <a href="https://docs.minio.io/" rel="noreferrer" target="_blank">Minio Docs</a>.</p>
</footer>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js" integrity="sha256-Daf8GuI2eLKHJlOWLRR/zRy9Clqcj4TUSumbxYH9kGI=" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.4.1/docsearch.min.js" integrity="sha256-/cR58XeT7FS/4QEWCHJj/TdJ4b377Sf9p0DRto6I6cI=" crossorigin="anonymous"></script>
{{ js(['js/highlight.min.js', 'js/main.js']) }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)};
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
</script>
+10
View File
@@ -0,0 +1,10 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ config.title }}</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/docsearch.js/2.4.1/docsearch.min.css" integrity="sha256-imGt4ps5hI/tN3Tv+6oUNyaXzZ0AefV47v2Xa3RRVRg=" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" crossorigin="anonymous">
{{ css('css/talk') }}
</head>
+11
View File
@@ -0,0 +1,11 @@
<header class="header">
<form class="search d-flex align-items-center">
<input type="search" class="form-control" id="search-input" placeholder="Search documentation..." aria-label="Search for..." autocomplete="off">
<nav class="header__nav">
{% for item in config.sidebar.top %}
<a target="_blank" rel="nofollow noreferer" alt="{{ item.title }}" href="{{ item.url }}">{{ item.title }}</a>
{% endfor %}
<a href="#" alt="Toggle Sidebar" id="sidebar-toggle">{{ image_tag('images/hamburger.svg') }}</a>
</nav>
</form>
</header>
+30
View File
@@ -0,0 +1,30 @@
<aside class="sidebar">
<a class="brand" href="{{ url_for("/") }}">
<h2>
{{ image_tag('images/logo.svg', {width: 50, height: 50}) }}
<span>Talk</span>
</h2>
</a>
<ul class="sidebar__list">
{% for item in config.sidebar.side %}
<li class="sidebar__section{% for item in item.children %}{% if is_current(item.url) %} active toggled{% endif %}{% endfor %}">
<a href="#" class="sidebar__header">{{ item.title }}</a>
<ul class="sidebar__links">
{% for item in item.children %}
<li class="{% if is_current(item.url) %}active{% endif %}">
<a href="{% if !is_current(item.url) %}{{ url_for(item.url) }}{% else %}#{% endif %}">{{ item.title }}</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
<div class="notice">
<p>Don't see what you're looking for? We're upgrading the docs, check out our <a href="https://github.com/coralproject/talk/tree/ef49d9a3d2acc4d2fc03b00e0c872dfbc57f005a/docs/_docs" target="_blank" class="coral-link-invert">old docs</a>.</p>
<p><a href="https://coralproject.net/" class="coral-link-invert" target="_blank">The Coral Project</a> from Mozilla</p>
<a href="https://www.mozilla.org/" target="_blank" title="Mozilla"><figure class="mozilla" alt="Mozilla">{{ image_tag('images/moz-logo-bw-rgb.svg') }}</figure></a>
</div>
</aside>
<div class="sidebar__backdrop"></div>
+6
View File
@@ -0,0 +1,6 @@
<aside>
<nav class="toc">
{% if include.title %}<header><h4 class="nav__title">{{ include.title }}</h4></header>{% endif %}
<%- toc(page.content) %>
</nav>
</aside>
+99
View File
@@ -0,0 +1,99 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: $hljs_string_color;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}
+22
View File
@@ -0,0 +1,22 @@
/**
* Mixins
*/
@mixin transform($transforms) {
-moz-transform: $transforms;
-o-transform: $transforms;
-ms-transform: $transforms;
-webkit-transform: $transforms;
transform: $transforms;
}
@mixin transition($args, $duration) {
-webkit-transition: $args;
-moz-transition: $args;
-ms-transition: $args;
-o-transition: $args;
transition: $args;
-webkit-transition-duration: $duration;
transition-duration: $duration;
}
+21
View File
@@ -0,0 +1,21 @@
$coral_orange: #f67150;
$sidebar_width: 320px;
$sidebar_background: $coral_orange;
$sidebar_color: white;
$sidebar_gutter: 35px;
$content_gutter: 40px;
$header_padding_bottom: $content_gutter;
$breakpoint: 960px;
$hljs_string_color: $coral_orange;
$code_background: #F0F0F0;
$code_border: 1px solid darken($code_background, 10%);
$copy_button_background: white;
$coral_button_background: $coral_orange;
$coral_button_border: darken($coral_button_background, 5%);
$demo_border: lighten($coral_button_border, 30%);
$coral_button_border_color: $coral_orange;
$coral_button_color: black;
$coral_button_hover_color: $coral_button_border_color;
$coral_button_invert_border_color: lighten($coral_button_border_color, 20%);
$coral_button_invert_color: white;
$coral_button_invert_hover_color: $coral_button_invert_border_color;
+424
View File
@@ -0,0 +1,424 @@
@import "variables";
@import "mixins";
@import "hljs";
body {
font-family: 'Open Sans';
font-style: normal;
font-variant: normal;
font-weight: 400;
color: #333;
line-height: 23px;
@media (min-width: $breakpoint) {
padding: 0 0 0 $sidebar_width;
}
}
h1 {
font-size: 2rem;
}
h2 {
margin: 1.6em 0 0.8em;
font-size: 1.75rem;
font-weight: 600;
}
h3 {
margin: 1.6em 0 0.8em;
font-size: 1.5rem;
font-weight: 500;
}
h4 {
margin: 1.6em 0 0.8em;
font-size: 1.2rem;
font-weight: 500;
}
.btn-coral {
color: white;
background: $coral_button_background;
border: 1px solid $coral_button_border;
&:hover {
color: white;
cursor: pointer;
background: darken($coral_button_background, 5%);
border-color: darken($coral_button_border, 5%);
}
}
.param {
font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
article.configuration {
h2, .toc {
@extend .param;
}
}
.suggest-edits {
padding: .20rem .5rem;
}
/**
* Demo
*/
.demo {
background: $coral_orange;
border: 1px solid $demo_border;
overflow: hidden;
margin: 0 auto;
padding: 0;
margin-bottom: 1rem;
max-width: 650px;
.btn, .alert {
border: none;
border-radius: 0;
margin: 0;
}
.alert {
display: none;
}
.mount {
border-top: 1px solid $demo_border;
display: none;
background: white;
padding: 10px;
}
}
.copy-to-clipboard {
position: absolute;
top: 0;
right: 0;
background: $copy_button_background;
padding: 3px 10px;
border: $code_border;
&:hover {
background: darken($copy_button_background, 10%);
cursor: pointer;
}
}
code {
color: $hljs_string_color;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
font-size: 90%;
color: #212529;
position: relative;
& > code {
display: block;
overflow-x: auto;
padding: 0.5em;
background: $code_background;
border: $code_border;
min-height: 31px;
}
}
.code-aside {
margin-top: -1rem;
margin-bottom: 1rem;
border-bottom: $code-border;
border-left: $code-border;
border-right: $code-border;
padding: 10px;
font-size: 80%;
}
#sidebar-toggle {
display: none;
}
@media (max-width: $breakpoint) {
.sidebar--toggled .sidebar__backdrop {
cursor: pointer;
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 2;
}
#sidebar-toggle {
display: inline-block;
}
}
.header {
margin-bottom: $header_padding_bottom;
.search {
align-items: center;
display: flex;
}
.algolia-autocomplete {
width: 100%;
left: 0 !important;
.algolia-docsearch-suggestion--highlight {
color: $coral_orange;
background: fade-out($coral_orange, 0.9);
}
.ds-dropdown-menu {
min-width: 500px;
max-width: 700px;
width: 100%;
// Hide the carrot.
&:before {
display: none
}
// Fix for smaller screens.
@media (max-width: $breakpoint) {
min-width: 200px;
}
}
}
&.header--toggled {
.header__nav {
display: none;
}
}
.header__nav {
margin: 0 0 0 10px;
display: flex;
& > a {
display: inline-block;
text-align: center;
margin-left: 15px;
color: $coral_orange;
white-space: nowrap;
& > svg {
height: 20px;
width: 20px;
rect {
fill: $coral_orange;
}
}
&:hover {
color: darken($coral_orange, 10%);
}
}
}
}
.footer {
font-size: 90%;
text-align: center;
color: lighten(gray, 20%);
a {
@extend .coral-link;
}
}
.coral-link {
border-bottom: 1px solid $coral_button_border_color;
color: $coral_button_color;
text-decoration: none;
&:hover {
color: $coral_button_hover_color;
text-decoration: none;
}
}
.coral-link-invert {
@extend .coral-link;
border-color: $coral_button_invert_border_color;
color: $coral_button_invert_color;
&:hover {
color: $coral_button_invert_hover_color;
}
}
.toc {
a {
@extend .coral-link;
border-bottom: none;
}
}
.content {
article {
p a:not(.plain-link) {
@extend .coral-link;
}
ul:not(.toc__menu) li a,
ol li a {
@extend .coral-link;
}
}
}
.form-control:focus {
border-color: $coral_orange;
}
a.brand {
display: block;
padding: $sidebar_gutter;
color: #fff;
text-decoration: none;
h2 {
margin: 0;
line-height: 40px;
}
&:hover {
text-decoration: none;
}
span {
display: inline-block;
margin-left: 10px;
font-size: 30px;
vertical-align: middle;
font-weight: 500;
}
.logo {
vertical-align: middle;
height: 50px;
width: 50px;
@include transition(all, 250ms);
&:hover {
@include transform(rotate(8deg));
}
}
}
.content {
padding: $content_gutter $content_gutter 60px;
}
.mozilla {
width: 50%;
margin: 0 0 $sidebar_gutter;
}
.sidebar {
background: $sidebar_background;
color: $sidebar_color;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 2;
overflow-y: auto;
width: $sidebar_width;
@include transition(all, 150ms);
@media (max-width: $breakpoint) {
&.sidebar--toggled {
@include transform(translate3d(0, 0, 0));
box-shadow: 0 0 30px rgba(0,0,0,0.3);
z-index: 3;
}
}
@media (max-width: $breakpoint) {
@include transform(translate3d((-$sidebar_width), 0, 0));
}
.sidebar__list {
padding: 0px;
}
.notice {
padding: $sidebar_gutter $sidebar_gutter 0;
color: fade-out($sidebar_color, 0.5);
}
.sidebar__section {
list-style: none;
border-bottom: 1px solid lighten($sidebar_background, 3%);
&.active {
.sidebar__header {
background-color: darken($sidebar_background, 2%);
}
}
&.toggled {
.sidebar__links {
display: block;
}
}
}
a.sidebar__header {
font-size: 0.9em;
text-transform: uppercase;
font-weight: 700;
display: block;
padding: 15px $sidebar_gutter;
color: $sidebar_color;
&:hover {
text-decoration: none;
}
}
.sidebar__links {
margin: 0 0 10px;
list-style: none;
padding: 0;
display: none;
overflow-y: hidden;
& > li {
& > a {
display: block;
padding: 6px $sidebar_gutter;
color: fade-out($sidebar_color, 0.6);
&:hover {
color: fade-out($sidebar_color, 0.3);
text-decoration: none;
}
}
&.active > a {
color: fade-out($sidebar_color, 0.3);
}
&.active {
background: darken($sidebar_background, 5%);
}
}
}
}
+5
View File
@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" class="hamburger" viewBox="0 0 32 32">
<rect x="0" y="3" width="32" height="5" rx="3" ry="3"/>
<rect x="0" y="14" width="32" height="5" rx="3" ry="3"/>
<rect x="0" y="25" width="32" height="5" rx="3" ry="3"/>
</svg>

After

Width:  |  Height:  |  Size: 326 B

+41
View File
@@ -0,0 +1,41 @@
<svg version="1.1" class="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 255 255" style="enable-background:new 0 0 255 255;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<title>Artboard 1</title>
<g>
<path class="st0" d="M163.5,38.1c-2.8,12.8-2.1,21.9,2.1,26.9c5.6,6.7,18.4,5.6,25.7,0.2c5.8-4.3,7.7-12.3,8.9-19.6
c0.2-1.5,0.4-3.4,0.6-5.3c0.7-8.6,1.8-21.6,13.4-27c16.8-7.9,31.6,9.5,39.7,18.9c0.5,0.6,1.2,1.1,1.2,1.6v-8.9
c0.1-13.6-10.8-24.7-24.3-24.8c-0.1,0-0.2,0-0.3,0h-43.7C174.1,12,166.5,24.4,163.5,38.1z"/>
<path class="st0" d="M255,198.2v-38.5c-16,2.7-31.2-1.1-45.9-4.9c-7.3-2-14.7-3.6-22.1-4.8c-11.6-1.5-20.6,3.8-24.9,14.6
c-6,15.2,7,25.6,25.9,38.7c5.6,3.9,10.5,7.2,14.1,10.7c7.1-7.6,15-12.5,23.8-14.5C235.8,197.3,246,197.6,255,198.2z"/>
<path class="st0" d="M153.8,99.7c1.3,1,2.7,1.9,4.2,2.7c6,3.4,10.6,4.2,16.4,2.8c1.1-0.3,2.3-0.6,3.4-0.9c4.6-1.2,9.7-2.6,15.3-2.2
c7.8,0.4,14.4,4,20.6,7.6l0.6,0.3c4.7,2.8,9.2,5.4,13.7,6c6.3,0.9,11.2-4.9,17.5-13.1l0.5-0.7c0.6-0.8,1.2-1.8,2-2.8
c2.6-3.2,4.9-6.5,7-10.1V57.8c-1-2.2-3.4-4.5-5-6.7s-3.3-4.6-5.1-6.5c-0.7-0.8-1.4-1.7-2.2-2.6c-5.1-5.9-15.6-18.1-22.1-15.1
c-3.5,1.6-4.2,7.1-4.8,14.7c-0.2,2.2-0.4,4.4-0.7,6.4c-1.5,9.6-4.6,21.9-14.7,29.4c-6.7,4.9-14.7,7.5-23,7.6l0,0
c-9.6,0-17.8-3.8-23.2-10.3c-7.4-8.9-9.1-21.9-5.2-39.7c2.7-12.5,8.4-24,17.4-35h-33.5c-2.3,13-4.4,31.6-2.6,49.7
C132.4,73.1,140.4,89.9,153.8,99.7z"/>
<path class="st0" d="M81,130.4l3.4,0.4c1.9,0.2,4,0.6,6.2,1c8.1,1.4,19.2,3.4,22.5-1.6c2.7-4.1-0.8-12.9-5.7-18.2
c-3.5-3.8-7.9-6.9-12.5-10.2c-2.7-1.9-5.5-3.9-8.2-6.1c-6.4-5.2-13.3-12.8-9.4-25.4c1.3-3.8,3-7.4,5-10.8c1.9-3.4,3.5-6.3,4.2-9.5
c1.1-5.6-1.6-16.6-6.7-22c-2.7-2.8-4.7-2.8-6.1-2.6C62.8,27,58.7,38.5,54.1,54.6c-1.1,3.8-2.1,7.3-3.3,10.5l-0.1,0.4
c-3.2,8.8-8,22.1-20.7,25.6C19.4,94,9,89,0,82.8v32c3,6,8,11.9,14.7,17.8c5.5,4.6,11.4,8.8,17.6,12.3c3.9-6.3,9.9-11.1,16.9-13.6
C60,127.5,71.1,129,81,130.4z"/>
<path class="st0" d="M229.2,214.2c-6.6,1.5-12.5,5.4-18.1,12.1c4.9,9,8.5,18.7,10.6,28.8h8.6c13.5,0,24.6-10.9,24.6-24.4
c0-0.1,0-0.2,0-0.3v-17C246,212.7,237.5,212.3,229.2,214.2z"/>
<path class="st0" d="M26,76.6c5.2-1.4,8.3-10,10.5-16.2l0.1-0.4c1-2.8,2-6.1,3-9.6c4.5-15.5,10.6-36.8,31.8-39.9
c7-1,13.8,1.6,19.1,7.2c9,9.5,12.4,25.6,10.5,35.2c-1.1,5.4-3.6,9.9-5.8,13.8c-1.5,2.5-2.8,5.2-3.8,8c-0.9,3-0.8,5,4.6,9.3
c2.3,1.9,4.8,3.7,7.5,5.6c5,3.6,10.2,7.3,14.7,12.2c7.4,7.9,15.4,24.3,7.3,36.7c-8.8,13.3-26.2,10.2-37.7,8.1
c-2-0.4-3.9-0.7-5.5-0.9l-3.5-0.5c-8.6-1.2-17.5-2.4-24.9,0.1c-7.1,2.4-12.6,10.7-12.8,19.3c-0.1,3.8,0.8,10.5,8.3,13.5
c9.2,3.7,19.4,3.3,30.2,2.8c11.6-0.5,23.6-1,35.5,3.5c16,6.1,30.6,20.4,38,37.7c4.8,11.1,6.3,22.8,4.4,32.8h48.8
c-2-8-6.4-21.3-14.1-29.7c-2.5-2.8-7.5-6.1-12.8-9.8c-16.8-11.6-42.1-29.1-31.3-56.5c6.8-17.2,22.4-26.3,40.8-23.9
c8.3,1.1,16.1,3.1,23.8,5.1c14.5,3.7,28.2,7.2,42.2,4.1v-29.9c-5,7.5-13.8,16.5-25.8,16.5c-1.1,0-2.3-0.1-3.4-0.2
c-7.4-1-13.6-4.7-19.1-7.9l-0.6-0.3c-4.8-2.8-9.4-5.3-13.9-5.6c-3.2-0.2-6.8,0.8-10.6,1.8c-1.3,0.3-2.5,0.7-3.8,1
c-9.5,2.3-17.9,0.9-27.3-4.3c-1.9-1.1-3.8-2.3-5.6-3.6c-17-12.4-27-32.7-29.7-60.6c-1.8-18.6,0-37.2,2.3-51.2H25
C11.2,0,0.1,11.1,0,24.8v38.8C7,70,18.4,78.7,26,76.6z"/>
<path class="st0" d="M62.8,231.9c-20.2-1.1-32.2-2.7-43.4-23.9c-1.9-3.7-0.5-8.2,3.1-10.1c3.7-1.9,8.2-0.5,10.1,3.1
c7.5,14.2,12.6,14.9,31,15.9c14.4,0.8,26.2,14.1,35,38.1h43.7c2.1-8,1.2-17.6-2.8-26.9c-5.9-13.6-17.2-24.9-29.6-29.6
c-9-3.4-19-3-29.5-2.5C68.5,196.4,56.2,197,44,192c-11.4-4.6-18-15-17.6-27.9c0-1.8,0.2-3.6,0.5-5.3C17.1,153.6,8.1,147,0,139.4
v90.8C0.1,244,11.2,255.1,25,255c0,0,0,0,0,0h57.5C78.3,245,71.4,232.3,62.8,231.9z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.6 KiB

+22
View File
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 360 102.8" style="enable-background:new 0 0 360 102.8;" xml:space="preserve">
<style type="text/css">
.st0{fill:#FFFFFF;}
</style>
<g>
<rect y="-0.2" width="360" height="102.9"/>
<path class="st0" d="M343.8,73.7c-0.7,0.2-1.3,0.3-1.9,0.3c-2.1,0-3.1-0.9-3.1-3.5V51c0-10.3-8.2-15.3-17.9-15.3
c-7.4,0-11.4,0.9-19.3,4.1L300,50.2l10.3,1.1l1.5-5.1c2.1-1.1,4.2-1.3,6.9-1.3c7.3,0,7.4,5.5,7.4,10.1v1.5
c-2.3-0.3-4.9-0.4-7.4-0.4c-10.3,0-21,2.6-21,13.7c0,9.4,7.4,12.9,13.9,12.9c7.3,0,11.9-4.4,14.5-9c0.6,5.5,3.9,9,9.9,9
c2.8,0,5.7-0.8,8.1-2.1L343.8,73.7z M316.2,73.4c-3.9,0-5.3-2.3-5.3-5.2c0-4.9,4-6.2,8.6-6.2c2.1,0,4.4,0.3,6.5,0.6
C325.7,70.1,320.8,73.4,316.2,73.4z M298.9,12.9l-19.5,68.7h-12.7l19.5-68.7H298.9z M272.7,12.9l-19.5,68.7h-12.7L260,12.9H272.7z
M218.7,36.6h13.5v16.2h-13.5V36.6z M218.7,65.5h13.5v16.2h-13.5V65.5z M199,64.9l10.2,1l-2.8,15.8h-39.3l-1.3-6.8l24.8-28.5h-14.1
l-2,7l-9.3-1l1.6-15.8h39.5l1,6.8l-25,28.5h14.6L199,64.9z M134.5,35.7c-16.2,0-24.2,10.9-24.2,24.1c0,14.4,9.6,22.9,23.5,22.9
c14.4,0,24.8-9.1,24.8-23.5C158.6,46.6,150.7,35.7,134.5,35.7z M134.2,72.7c-7,0-10.6-6-10.6-13.8c0-8.5,4.1-13.4,10.7-13.4
c6.1,0,11,4.1,11,13.2C145.3,67.4,140.9,72.7,134.2,72.7z M98.7,71.8h6v9.8H85.9V56.3c0-7.8-2.6-10.8-7.7-10.8
c-6.2,0-8.7,4.4-8.7,10.7v15.7h6v9.8H56.6V56.3c0-7.8-2.6-10.8-7.7-10.8c-6.2,0-8.7,4.4-8.7,10.7v15.7h8.6v9.8H21.4v-9.8h6V46.4h-6
v-9.8h18.9v6.8c2.7-4.8,7.4-7.7,13.7-7.7c6.5,0,12.5,3.1,14.7,9.7c2.5-6,7.6-9.7,14.7-9.7c8.1,0,15.5,4.9,15.5,15.6V71.8z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long
+143
View File
@@ -0,0 +1,143 @@
$(document).ready(function() {
// Setup the highlighting.
hljs.initHighlighting();
// Setup code copying.
$("pre:not(.no-copy)").each(function() {
var button = $("<button type=\"button\" class=\"copy-to-clipboard\" aria-hidden=\"true\">Copy</button>");
$(this).prepend(button);
});
// Setup the clipboard links.
var clipboard = new Clipboard(".copy-to-clipboard",{
text: function(t) {
return t.nextElementSibling.innerText
}
});
clipboard.on("success", function(target) {
target.clearSelection(),
target.trigger.textContent = "Copied to clipboard",
setTimeout(function() {
target.trigger.textContent = "Copy"
}, 2e3)
});
// Setup the menu controls.
$("a.sidebar__header").on("click", function(e) {
e.preventDefault();
$(".sidebar__section.toggled").removeClass("toggled");
$(this).parents(".sidebar__section").addClass("toggled");
});
$("#sidebar-toggle, .sidebar__backdrop").on("click", function(e) {
e.preventDefault();
$("body, .sidebar").toggleClass("sidebar--toggled");
});
// Setup header controls for the search bar.
$("#search-input").on("focus", function() {
$(".header").addClass("header--toggled");
});
$("#search-input").on("blur", function() {
$(".header").removeClass("header--toggled");
});
// Setup the search control.
docsearch({
apiKey: '259b9f08146e7407341fa04498544ad6',
indexName: 'coralproject',
inputSelector: '#search-input',
debug: false
});
if ($(".demo").length > 0) {
var embedScriptLoaded = false;
function loadEmbedScript(callback) {
if (!embedScriptLoaded) {
$.getScript({
url: "http://127.0.0.1:3000/embed.js",
dataType: "script",
})
.done(function() {
embedScriptLoaded = true;
callback();
})
.fail(function(err) {
callback(err);
});
}
return null;
}
var embed = null;
function loadEmbed() {
if (embedScriptLoaded && embed === null) {
// Unhide the mount.
$(".demo .mount").show();
var el = $(".demo .mount")[0];
embed = Coral.Talk.render(el, {talk: 'http://127.0.0.1:3000/'});
$(".demo .alert")
.show()
.html("Demo is running below from your local Talk installation running at <a href=\"http://127.0.0.1:3000/\" target=\"_blank\">http://127.0.0.1:3000/</a>. Go ahead and comment!")
.removeClass("alert-warning alert-info")
.addClass("alert-success");
$(".demo button")
.off("click")
.on("click", removeEmbed)
.text("Stop Demo");
}
}
function removeEmbed() {
if (embed !== null) {
embed.remove();
embed = null;
$(".demo .mount").hide();
$(".demo .alert").hide();
$(".demo button")
.off("click")
.text("Start Demo")
.on("click", loadEmbed);
}
}
function demoCycle(firstRun) {
loadEmbedScript(function(err) {
if (err) {
if (firstRun !== true) {
$(".demo .alert")
.show()
.html("Can't load your embed.js script from your local Talk installation running at <a href=\"http://127.0.0.1:3000/\" target=\"_blank\">http://127.0.0.1:3000/</a>, ensure the server is running and try again.")
.addClass("alert-warning");
}
return;
}
if (firstRun === true) {
$(".demo .alert")
.show()
.html("We've loaded your embed.js from your local Talk installation running at <a href=\"http://127.0.0.1:3000/\" target=\"_blank\">http://127.0.0.1:3000/</a>, click Start Demo to embed Talk on the page from your local instance.")
.removeClass("alert-warning")
.addClass("alert-info");
$(".demo button")
.off("click")
.text("Start Demo")
.on("click", loadEmbed);
} else {
$(".demo button").off("click");
loadEmbed();
}
});
}
// // Run the cycle now.
// demoCycle(true);
// Initially bind the loadEmbedScript handler. We'll replace this with the
// loadEmbed handler when the script is loaded.
$(".demo button").on("click", demoCycle);
}
});