From 16d0e17aa5ba120277c6d43d3e19288d63ebfa3a Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 12 Apr 2018 23:30:49 +0200 Subject: [PATCH] Added GitHub links to API --- pages/apiview/api.pixy | 17 ++++++++++------- pages/apiview/api.scarlet | 2 +- pages/apiview/apidocs/apidocs.pixy | 14 +++++++------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/pages/apiview/api.pixy b/pages/apiview/api.pixy index dc920864..89006cf8 100644 --- a/pages/apiview/api.pixy +++ b/pages/apiview/api.pixy @@ -1,21 +1,24 @@ component API(types []*autodocs.Type) .api-docs-page - h1 API + h1.mountable API - h2 Endpoints + h2.mountable Endpoints ul - li + li.mountable strong REST: span https://notify.moe/api - li + li.mountable strong GraphQL: span https://notify.moe/graphql - h2 Types + h2.mountable Types table.api-types tbody each typ in types - tr + tr.mountable td a(href=typ.Endpoint())= typ.Name - td= typ.Comment \ No newline at end of file + td= typ.Comment + td + a(href=typ.GitHubLink()) + RawIcon("github") \ No newline at end of file diff --git a/pages/apiview/api.scarlet b/pages/apiview/api.scarlet index 5a358616..f9a3ca57 100644 --- a/pages/apiview/api.scarlet +++ b/pages/apiview/api.scarlet @@ -1,2 +1,2 @@ .api-types - max-width 100% \ No newline at end of file + // ... \ No newline at end of file diff --git a/pages/apiview/apidocs/apidocs.pixy b/pages/apiview/apidocs/apidocs.pixy index 6ddc6dd8..0617758d 100644 --- a/pages/apiview/apidocs/apidocs.pixy +++ b/pages/apiview/apidocs/apidocs.pixy @@ -1,28 +1,28 @@ component APIDocs(t reflect.Type, examples []string, fields []*utils.APIField) .api-docs-page - h1= t.Name() + h1.mountable= t.Name() - h2 Examples + h2.mountable Examples if len(examples) == 0 - p.no-data No examples available yet. + p.no-data.mountable No examples available yet. else - .buttons + .buttons.mountable each example in examples a.button(href=example, target="_blank") Icon("external-link") span= strings.TrimPrefix(example, "/api") - h2 Fields + h2.mountable Fields table thead - tr + tr.mountable th Field th Type tbody each field in fields - tr.api-field + tr.api-field.mountable td.api-field-json(title=field.Name + " (Go)")= field.JSON td.api-field-type= field.Type