Skip to content

Commit

Permalink
web-api readme, and documentation homepage.
Browse files Browse the repository at this point in the history
improve styles on documentation site to fix the header, tweak the in-page styles,
build an in-document focussed navigation.
  • Loading branch information
aoberoi committed Mar 22, 2019
1 parent 4566337 commit 0be167b
Show file tree
Hide file tree
Showing 19 changed files with 824 additions and 494 deletions.
2 changes: 2 additions & 0 deletions docs/_config.yml
Expand Up @@ -57,6 +57,8 @@ google_tag_manager: GTM-KFZ5MK7

# Plugin settings
markdown: kramdown
kramdown:
parse_block_html: true
plugins:
- jemoji
- jekyll-redirect-from
Expand Down
4 changes: 3 additions & 1 deletion docs/_includes/focussed_nav.html
Expand Up @@ -5,7 +5,9 @@
</div>

<div class="sidebar_menu invisible_until_anchor">
<h4 class="sidebar_menu_header">Recipes</h4>
{% if page.anchor_links_header %}
<h4 class="sidebar_menu_header">{{ page.anchor_links_header }}</h4>
{% endif %}
<ul class="sidebar_menu_list">
<li class="anchor_template"><a href="#" class="sidebar_menu_list_item"></a></li>
</ul>
Expand Down
841 changes: 399 additions & 442 deletions docs/_packages/web_api.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions docs/_tutorials/migrating_to_v5.md
@@ -0,0 +1,5 @@
---
title: Migrating to v5.x
order: 1
slug: migrating_to_v5
---
36 changes: 30 additions & 6 deletions docs/styles/docs.css
Expand Up @@ -3,11 +3,24 @@ body {
font-family: Slack-Lato,appleLogo,sans-serif;
}

/* Replaces old sidebar styled links */
.sidebar_menu h5 {
font-size: 0.8rem;
font-weight: 800;
margin-bottom: 3px;
/*
* Unfix the header position. Otherwise, anchor links take you to a spot on the page that's covered.
* The API site fixes this by offsetting anchor tags from the headers in a weird and also error-prone way.
* It's a better tradeoff to unfix the header, and the side benefit is we get some screen space back.
*/
body > header {
position: initial;
}
@media only screen and (min-width: 641px) {
.api #page_contents {
padding-top: 2rem;
padding-bottom: 2rem;
}
}
@media only screen and (max-width: 640px) {
#page_contents {
margin-top: 0;
}
}

/* Aligns footer navigation to the left of the sidebar */
Expand Down Expand Up @@ -47,7 +60,6 @@ footer {
font-weight: 600;
font-size: 1.1rem;
}

.nav_home_icon {
vertical-align: middle;
}
Expand All @@ -57,6 +69,18 @@ footer {
visibility: hidden;
}

/* Details tags aren't styled in the rollup, but need the same margin bottom as paragraphs */
details {
margin-bottom: 1rem;
}
summary > strong > i {
font-style: normal;
}

/*
* ☁️ Maybe one day, #page_contents will be able to go beyond a fixed width...
*/

/*
* Github theme stylesheet from: http://jwarby.github.io/jekyll-pygments-themes/languages/javascript.html
*/
Expand Down
8 changes: 4 additions & 4 deletions node-slack-sdk.code-workspace
Expand Up @@ -9,16 +9,16 @@
"path": "packages/web-api"
},
{
"name": "RTM API",
"path": "packages/rtm-api"
"name": "Events API",
"path": "packages/events-api"
},
{
"name": "Interactive Messages",
"path": "packages/interactive-messages"
},
{
"name": "Events API",
"path": "packages/events-api"
"name": "RTM API",
"path": "packages/rtm-api"
},
{
"name": "Incoming Webhook",
Expand Down
11 changes: 0 additions & 11 deletions packages/client/README.md
@@ -1,11 +0,0 @@
# `client`

> TODO: description
## Usage

```
const client = require('client');
// TODO: DEMONSTRATE API
```
2 changes: 1 addition & 1 deletion packages/client/package.json
Expand Up @@ -30,7 +30,7 @@
"npm": ">= 5.5.1"
},
"repository": "slackapi/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk/tutorials/migrating_to_v5/",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/events-api/package.json
Expand Up @@ -27,7 +27,7 @@
"node": ">=4.2.0"
},
"repository": "slackapi/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk/events-api",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/interactive-messages/package.json
Expand Up @@ -31,7 +31,7 @@
"node": ">=4.2.0"
},
"repository": "slackapi/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk/interactive-messages",
"publishConfig": {
"access": "public"
},
Expand Down
11 changes: 0 additions & 11 deletions packages/logger/README.md
@@ -1,11 +0,0 @@
# `logger`

> TODO: description
## Usage

```
const logger = require('logger');
// TODO: DEMONSTRATE API
```
Empty file added packages/rtm-api/README.md
Empty file.
2 changes: 1 addition & 1 deletion packages/rtm-api/package.json
Expand Up @@ -26,7 +26,7 @@
"npm": ">= 5.5.1"
},
"repository": "slackapi/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk",
"homepage": "https://slack.dev/node-slack-sdk/rtm-api",
"publishConfig": {
"access": "public"
},
Expand Down
11 changes: 0 additions & 11 deletions packages/types/README.md
@@ -1,11 +0,0 @@
# `types`

> TODO: description
## Usage

```
const types = require('types');
// TODO: DEMONSTRATE API
```

0 comments on commit 0be167b

Please sign in to comment.