adds program library logo and link back to docs (#191)
* adds program library logo and link back to docs * adds logo and link to docs * formatting fixes Co-authored-by: Raj Gokal <rajgokal@macbook-pro.lan>
This commit is contained in:
parent
b006741718
commit
ef94e22067
|
@ -28,6 +28,7 @@ $ docs/build.sh
|
|||
```
|
||||
|
||||
### CI Build Flow
|
||||
|
||||
The docs are built and published in Travis CI with the `docs/build.sh` script.
|
||||
On each PR, the docs are built, but not published.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ module.exports = {
|
|||
title: "Solana Program Library Docs",
|
||||
tagline:
|
||||
"Solana is an open source project implementing a new, high-performance, permissionless blockchain.",
|
||||
url: "https://spl.docs.solana.com",
|
||||
url: "https://spl.solana.com",
|
||||
baseUrl: "/",
|
||||
favicon: "img/favicon.ico",
|
||||
organizationName: "solana-labs", // Usually your GitHub org/user name.
|
||||
|
@ -14,6 +14,24 @@ module.exports = {
|
|||
src: "img/logo-horizontal.svg",
|
||||
srcDark: "img/logo-horizontal-dark.svg",
|
||||
},
|
||||
links: [
|
||||
{
|
||||
href: "https://docs.solana.com/",
|
||||
label: "Docs »",
|
||||
position: "left",
|
||||
},
|
||||
{
|
||||
href: "https://discordapp.com/invite/pquxPsq",
|
||||
label: "Chat",
|
||||
position: "right",
|
||||
},
|
||||
|
||||
{
|
||||
href: "https://github.com/solana-labs/solana",
|
||||
label: "GitHub",
|
||||
position: "right",
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: "dark",
|
||||
|
@ -55,7 +73,7 @@ module.exports = {
|
|||
docs: {
|
||||
path: "src",
|
||||
routeBasePath: "/",
|
||||
homePageId: 'introduction',
|
||||
homePageId: "introduction",
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
},
|
||||
theme: {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
module.exports = {
|
||||
docs: {
|
||||
"Introduction": ["introduction"],
|
||||
"Programs": [
|
||||
"Other Thing": [],
|
||||
"Solana Program Library (SPL)": [
|
||||
"introduction",
|
||||
"token",
|
||||
"token-swap",
|
||||
"memo",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Solana Program Library
|
||||
title: Introduction
|
||||
---
|
||||
|
||||
The Solana Program Library (SPL) is a collection of on-chain programs targeting
|
||||
|
|
|
@ -10,6 +10,7 @@ transaction.
|
|||
|
||||
Solana's programming model and the definitions of the Solana terms used in this
|
||||
document are available at:
|
||||
|
||||
- https://docs.solana.com/apps
|
||||
- https://docs.solana.com/terminology
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ utilize to create and use their tokens.
|
|||
|
||||
Solana's programming model and the definitions of the Solana terms used in this
|
||||
document are available at:
|
||||
|
||||
- https://docs.solana.com/apps
|
||||
- https://docs.solana.com/terminology
|
||||
|
||||
|
@ -114,6 +115,7 @@ Accounts containing wrapped SOL are associated with a specific Mint called the
|
|||
`So11111111111111111111111111111111111111111`.
|
||||
|
||||
These accounts have a few unique behaviors
|
||||
|
||||
- `InitializeAccount` sets the balance of the initialized Account to the SOL
|
||||
balance of the Solana account being initialized, resulting in a token balance
|
||||
equal to the SOL balance.
|
||||
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 15 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 15 KiB |
|
@ -1,18 +1,18 @@
|
|||
// Turn off ESLint for this file because it's sent down to users as-is.
|
||||
/* eslint-disable */
|
||||
window.addEventListener('load', function() {
|
||||
window.addEventListener("load", function () {
|
||||
function button(label, ariaLabel, icon, className) {
|
||||
const btn = document.createElement('button');
|
||||
btn.classList.add('btnIcon', className);
|
||||
btn.setAttribute('type', 'button');
|
||||
btn.setAttribute('aria-label', ariaLabel);
|
||||
const btn = document.createElement("button");
|
||||
btn.classList.add("btnIcon", className);
|
||||
btn.setAttribute("type", "button");
|
||||
btn.setAttribute("aria-label", ariaLabel);
|
||||
btn.innerHTML =
|
||||
'<div class="btnIcon__body">' +
|
||||
icon +
|
||||
'<strong class="btnIcon__label">' +
|
||||
label +
|
||||
'</strong>' +
|
||||
'</div>';
|
||||
"</strong>" +
|
||||
"</div>";
|
||||
return btn;
|
||||
}
|
||||
|
||||
|
@ -26,23 +26,22 @@ window.addEventListener('load', function() {
|
|||
'<svg width="12" height="12" viewBox="340 364 14 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M342 375.974h4v.998h-4v-.998zm5-5.987h-5v.998h5v-.998zm2 2.994v-1.995l-3 2.993 3 2.994v-1.996h5v-1.995h-5zm-4.5-.997H342v.998h2.5v-.997zm-2.5 2.993h2.5v-.998H342v.998zm9 .998h1v1.996c-.016.28-.11.514-.297.702-.187.187-.422.28-.703.296h-10c-.547 0-1-.452-1-.998v-10.976c0-.546.453-.998 1-.998h3c0-1.107.89-1.996 2-1.996 1.11 0 2 .89 2 1.996h3c.547 0 1 .452 1 .998v4.99h-1v-2.995h-10v8.98h10v-1.996zm-9-7.983h8c0-.544-.453-.996-1-.996h-1c-.547 0-1-.453-1-.998 0-.546-.453-.998-1-.998-.547 0-1 .452-1 .998 0 .545-.453.998-1 .998h-1c-.547 0-1 .452-1 .997z" fill-rule="evenodd"/></svg>';
|
||||
|
||||
addButtons(
|
||||
'.hljs',
|
||||
button('Copy', 'Copy code to clipboard', copyIcon, 'btnClipboard'),
|
||||
".hljs",
|
||||
button("Copy", "Copy code to clipboard", copyIcon, "btnClipboard")
|
||||
);
|
||||
|
||||
const clipboard = new ClipboardJS('.btnClipboard', {
|
||||
const clipboard = new ClipboardJS(".btnClipboard", {
|
||||
target: function (trigger) {
|
||||
return trigger.parentNode.querySelector('code');
|
||||
return trigger.parentNode.querySelector("code");
|
||||
},
|
||||
});
|
||||
|
||||
clipboard.on('success', function(event) {
|
||||
clipboard.on("success", function (event) {
|
||||
event.clearSelection();
|
||||
const textEl = event.trigger.querySelector('.btnIcon__label');
|
||||
textEl.textContent = 'Copied';
|
||||
const textEl = event.trigger.querySelector(".btnIcon__label");
|
||||
textEl.textContent = "Copied";
|
||||
setTimeout(function () {
|
||||
textEl.textContent = 'Copy';
|
||||
textEl.textContent = "Copy";
|
||||
}, 2000);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue