diff --git a/docs/assets/images/city-seal-inverse-small.png b/docs/assets/images/city-seal-inverse-small.png new file mode 100644 index 0000000..f295b06 Binary files /dev/null and b/docs/assets/images/city-seal-inverse-small.png differ diff --git a/docs/assets/images/city-seal-small.png b/docs/assets/images/city-seal-small.png new file mode 100644 index 0000000..605687d Binary files /dev/null and b/docs/assets/images/city-seal-small.png differ diff --git a/docs/assets/images/favicon.png b/docs/assets/images/favicon.png new file mode 100644 index 0000000..84a406e Binary files /dev/null and b/docs/assets/images/favicon.png differ diff --git a/docs/extra.css b/docs/extra.css deleted file mode 100644 index e8524b9..0000000 --- a/docs/extra.css +++ /dev/null @@ -1,120 +0,0 @@ -// Import fonts -@font-face { - font-family: 'Rockwell'; - src: url('../../fonts/rockwell.eot'); /* IE9 Compatible */ - src: url('../../fonts/rockwell.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ - url('../../fonts/rockwell.woff') format('woff'), - url('../../fonts/rockwell.ttf') format('truetype'), /* Safari, Android, iOS */ - url('../../fonts/rockwell.svg') format('svg'); /* Legacy iOS */ -} - -@font-face { - font-family: 'Poppins'; - src: url('../../fonts/poppins/Poppins-Light.ttf') format('truetype'); - font-weight: 300; -} - -@font-face { - font-family: 'Poppins'; - src: url('../../fonts/poppins/Poppins-Regular.ttf') format('truetype'); - font-weight: 400; -} - -@font-face { - font-family: 'Poppins'; - src: url('../../fonts/poppins/Poppins-Medium.ttf') format('truetype'); - font-weight: 500; -} - -@font-face { - font-family: 'Poppins'; - src: url('../../fonts/poppins/Poppins-SemiBold.ttf') format('truetype'); - font-weight: 600; -} - -@font-face { - font-family: 'Poppins'; - src: url('../../fonts/poppins/Poppins-Bold.ttf') format('truetype'); - font-weight: 700; -} - -h1,h2,h3,h4 { - font-family: 'Poppins', 'Avenir Next', futurabc, 'Helvetica', Arial, sans-serif; - color: #333; -} - -h1 { - font-weight: 600; -} - -h2,h3,h4 { - font-weight: 400; -} - -body { - font-family: Rockwell; - color: #999; -} - -.navbar-brand { - font-family: 'Poppins', 'Avenir Next', futurabc, 'Helvetica', Arial, sans-serif; - font-weight: 700; -} - -/*.navbar-brand::before { - content: url("http://www.chicagocsc.com/Home_files/Chicago_city_seal_1.png"); -}*/ - -.navbar-default, .navbar-collapse, .navbar-default, .navbar-form { - border-color: #F1F1F1; - background-color: #F1F1F1; -} - -.navbar-default .navbar-brand { - color: #333; -} - -.navbar-default .navbar-nav>li>a { - color: #888; -} - -.navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:hover, .navbar-default navbar-nav>.active>a:focus { - border-bottom: #69c4e6; - border-bottom-style: solid; - background-color: #F1F1F1; - color: #888; -} - -.bs-slider .nav li a:hover, .bs-sidebar .nav li a:focus { - border-right: none; -} - -.bs-sidebar .nav > .active > a, .bs-sidebar .nav > .active:hover > a, .bs-sidebar .nav > .active:focus > a { - font-weight: normal; - border-right: none; -} - -.bs-sidebar .nav > li > a:hover, .bs-sidebar .nav > li > a:focus { - font-weight: bold; - border-right: none; - background-color: #91CFEB; -} - -.nav>li>a:hover, .nav>li>a:focus { - background-color: #91CFEB; - border-right: none; -} - - - -.bs-sidebar { /* Sidebar */ - background-color: #C0E6F5 -} - -a:hover, a:focus { - color: #333; -} - -a { - color: #333; -} \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 40f6cc1..3f24b95 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,7 @@ # Open311 API Documentation +Chicago's [311 system](https://www.cityofchicago.org/311) gives residents a central phone number and location to request city services, report non-emergency issues, and get updates on city work. Open311 provides greater access and transparency since it allows developers to build apps and websites on top of Chicago's 311 system. Open311 is a REST-based Application Programmer Inferface (API) that lets developers requests directly to 311 and also retrieve status on existing service requests. + ## Authentication You may need an API Key in order to call some endpoints in Chicago's Open311 system. This is indicated in the documentation by a field labeled **"Requires API Key?"**. @@ -23,6 +25,12 @@ Visit the above URL to request an API key from the test Open311 system. Your req ### Production [Request production API key](http://311api.cityofchicago.org/open311/v2/apps/new) may be requested after successfully using a test API key. +!!! attention + All requests for API keys must first be tested in the development environment. + Use the same application name as used with the test key to ensure quick turn-around + for your request. When testing, ensure that your application can successfully write + and retrieve service requests. + Production API keys may only be requested after successfully testing with a test API key. The API Key application you submit will need to be reviewed and approved by City of Chicago Staff to ensure compliance with the [Terms of Service](tos/). ## Service Request Meta Data diff --git a/docs/service_list.md b/docs/service_list.md index 5f2322e..f395528 100644 --- a/docs/service_list.md +++ b/docs/service_list.md @@ -19,11 +19,11 @@ Provide a list of acceptable 311 service request types and their associated serv ## Response Parameters | Argument | Description | -|----------------|------------------------------------------------------------------------| +|:---------------|:-----------------------------------------------------------------------| | `service_code` | The unique identifier for the service request type. | | `service_name` | The human readable name of the service request type. | -| `description` | A brief description of the service request type. | -| `metadata` | Determines whether there are additional form fields for this service type. | -| `type` | Explains how this deals with the Open311 service request ID dance. | -| `keywords` | A comma separated list of tags or keywords to help users identify the request type. This can provide synonyms of the service_name and group. | -| `group` | A category to group this service type within. This provides a way to group several service request types under one category such as 'sanitation'. | \ No newline at end of file +| `description` | A brief description of the service request type. | +| `metadata` | Determines whether there are additional form fields for this service type. | +| `type` | Explains how this deals with the Open311 service request ID dance. | +| `keywords` | A comma separated list of tags or keywords to help users identify the request type. This can provide synonyms of the service_name and group. | +| `group` | A category to group this service type within. This provides a way to group several service request types under one category such as 'sanitation'. | \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 5c4c23c..d816d3f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,10 +1,11 @@ + +# Site Information site_name: Open311 API -theme: readthedocs -site_url: http://dev.cityofchicago.org/docs/open311 -repo_url: http://github.com/Chicago/open311-api-docs -site_description: Open311 API Documentation site_author: City of Chicago +site_description: Open311 API Documentation +site_url: http://dev.cityofchicago.org/docs/open311 +# Page Tree pages: - Home: index.md - Metadata: @@ -16,4 +17,35 @@ pages: - post_service_request: post_service_request.md - 'Terms of Service': 'tos.md' +# Copyright copyright: Copyright © 2016-2017 City of Chicago and licensed under Creative Commons Attribution-ShareAlike 4.0 International. + +# Repository Information +repo_name: Chicago/open311-api-docs +repo_url: http://github.com/Chicago/open311-api-docs + +# Theme +theme_dir: 'theme/material' +site_favicon: 'assets/images/favicon.png' +extra: + logo: 'assets/images/city-seal-inverse-small.png' + palette: + primary: 'blue grey' + accent: 'light blue' + social: + - type: 'twitter' + link: 'https://twitter.com/ChicagoCDO' + - type: 'github' + link: 'https://github.com/Chicago' + - type: 'envelope-o' + link: 'mailto:developers@cityofchicago.org' + - type: 'home' + link: 'http://dev.cityofchicago.org' + +# Google Analytics +# google_analytics: + +# Extensions +markdown_extensions: + - admonition + - toc(permalink=true) diff --git a/theme/material/404.html b/theme/material/404.html new file mode 100644 index 0000000..52beb3b --- /dev/null +++ b/theme/material/404.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} +

404 - Not found

+{% endblock %} diff --git a/theme/material/__init__.py b/theme/material/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/theme/material/assets/images/favicon.ico b/theme/material/assets/images/favicon.ico new file mode 100644 index 0000000..e85006a Binary files /dev/null and b/theme/material/assets/images/favicon.ico differ diff --git a/theme/material/assets/images/favicon.png b/theme/material/assets/images/favicon.png new file mode 100644 index 0000000..23ccc2b Binary files /dev/null and b/theme/material/assets/images/favicon.png differ diff --git a/theme/material/assets/images/icons/bitbucket-670608a71a.svg b/theme/material/assets/images/icons/bitbucket-670608a71a.svg new file mode 100644 index 0000000..7d95cb2 --- /dev/null +++ b/theme/material/assets/images/icons/bitbucket-670608a71a.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/material/assets/images/icons/github-1da075986e.svg b/theme/material/assets/images/icons/github-1da075986e.svg new file mode 100644 index 0000000..3cacb2e --- /dev/null +++ b/theme/material/assets/images/icons/github-1da075986e.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/material/assets/images/icons/gitlab-5ad3f9f9e5.svg b/theme/material/assets/images/icons/gitlab-5ad3f9f9e5.svg new file mode 100644 index 0000000..b036a9b --- /dev/null +++ b/theme/material/assets/images/icons/gitlab-5ad3f9f9e5.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/theme/material/assets/javascripts/application-6940329b9f.js b/theme/material/assets/javascripts/application-6940329b9f.js new file mode 100644 index 0000000..4ce1717 --- /dev/null +++ b/theme/material/assets/javascripts/application-6940329b9f.js @@ -0,0 +1 @@ +window.app=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=35)}([function(e,t,n){"use strict";var r=n(23)("wks"),i=n(14),o=n(1).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t,n){"use strict";var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t,n){"use strict";var r=n(10),i=n(25);e.exports=n(5)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";var r=n(1),i=n(2),o=n(6),a=n(14)("src"),s=Function.toString,c=(""+s).split("toString");n(7).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},function(e,t,n){"use strict";e.exports=!n(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){"use strict";var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,n){"use strict";var r=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(3),i=n(38),o=n(39),a=Object.defineProperty;t.f=n(5)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return"object"===(void 0===e?"undefined":r(e))?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(18);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(9),i=n(0)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=a(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){"use strict";var r=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},function(e,t,n){"use strict";var r=n(11),i=n(1).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},function(e,t,n){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){"use strict";var r=n(47),i=n(17);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(23)("keys"),i=n(14);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){"use strict";var r=n(10).f,i=n(6),o=n(0)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={createElement:function(e,t){var n=document.createElement(e);t&&Array.prototype.forEach.call(Object.keys(t),function(e){n.setAttribute(e,t[e])});for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o0?i(r(e),9007199254740991):0}},function(e,t,n){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){"use strict";e.exports=n(1).document&&document.documentElement},function(e,t,n){"use strict";var r,i,o,a=n(12),s=n(63),c=n(31),u=n(15),l=n(1),f=l.process,h=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,m=0,y={},v=function(){var e=+this;if(y.hasOwnProperty(e)){var t=y[e];delete y[e],t()}},g=function(e){v.call(e.data)};h&&d||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return y[++m]=function(){s("function"==typeof e?e:Function(e),t)},r(m),m},d=function(e){delete y[e]},"process"==n(9)(f)?r=function(e){f.nextTick(a(v,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=g,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",g,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:h,clear:d}},function(e,t){(function(t){e.exports=t}).call(t,{})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n){"use strict";var r=n(16),i=n(17);e.exports=function(e){return function(t,n){var o,a,s=String(i(t)),c=r(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c),o<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536)}}},function(e,t,n){"use strict";var r=n(43),i=n(25),o=n(21),a={};n(2)(a,n(0)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){"use strict";var r=n(3),i=n(44),o=n(30),a=n(20)("IE_PROTO"),s=function(){},c=function(){var e,t=n(15)("iframe"),r=o.length;for(t.style.display="none",n(31).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(" + {% endblock %} + {% block styles %} + + {% if config.extra.palette %} + + {% endif %} + {% endblock %} + {% block fonts %} + {% if config.extra.font != false and config.extra.font != "none" %} + {% set text = config.extra.get("font", {}).text | default("Roboto") %} + {% set code = config.extra.get("font", {}).code + | default("Roboto Mono") %} + {% set font = text + ":300,400,400i,700|" + code | replace(" ", "+") %} + + + {% endif %} + + {% endblock %} + {% for path in extra_css %} + + {% endfor %} + {% block extrahead %}{% endblock %} + + {% set palette = config.extra.get("palette", {}) %} + {% set primary = palette.primary | replace(" ", "-") | lower %} + {% set accent = palette.accent | replace(" ", "-") | lower %} + {% if primary or accent %} + + {% else %} + + {% endif %} + + + {% set platform = config.extra.repo_icon or config.repo_url %} + {% if "github" in platform %} + {% include "assets/images/icons/github-1da075986e.svg" %} + {% elif "gitlab" in platform %} + {% include "assets/images/icons/gitlab-5ad3f9f9e5.svg" %} + {% elif "bitbucket" in platform %} + {% include "assets/images/icons/bitbucket-670608a71a.svg" %} + {% endif %} + + + + + + {% block header %} + {% include "partials/header.html" %} + {% endblock %} +
+ {% set feature = config.extra.get("feature", {}) %} + {% if feature.tabs %} + {% include "partials/tabs.html" %} + {% endif %} +
+
+ {% block site_nav %} + {% if nav %} +
+
+
+ {% include "partials/nav.html" %} +
+
+
+ {% endif %} + {% if page.toc %} +
+
+
+ {% include "partials/toc.html" %} +
+
+
+ {% endif %} + {% endblock %} +
+
+ {% block content %} + {% if config.edit_uri %} + edit + {% endif %} + {% if not "\x3ch1" in page.content %} +

{{ page.title | default(config.site_name, true)}}

+ {% endif %} + {{ page.content }} + {% block source %} + {% if page.meta.source %} +

{{ lang.t("meta.source") }}

+ {% set path = (page.meta.path | default([""]) | first) %} + {% for file in page.meta.source %} + + {{ file }} + + {% endfor %} + {% endif %} + {% endblock %} + {% endblock %} + {% block disqus %} + {% if config.extra.disqus and not page.is_homepage %} +

{{ lang.t("meta.comments") }}

+ {% include "partials/disqus.html" %} + {% endif %} + {% endblock %} +
+
+
+
+ {% block footer %} + {% include "partials/footer.html" %} + {% endblock %} +
+ {% block scripts %} + + {% set languages = lang.t("search.languages").split(",") %} + {% if languages | length and languages[0] != "" %} + {% set path = base_url + "/assets/javascripts/lunr" %} + + {% for language in languages | map("trim") %} + {% if language != "en" %} + {% if language == "jp" %} + + {% endif %} + + {% endif %} + {% endfor %} + {% if languages | length > 1 %} + + {% endif %} + {% endif %} + + {% for path in extra_javascript %} + + {% endfor %} + {% endblock %} + {% block analytics %} + {% if config.google_analytics %} + + {% endif %} + {% endblock %} + + diff --git a/theme/material/main.html b/theme/material/main.html new file mode 100644 index 0000000..94d9808 --- /dev/null +++ b/theme/material/main.html @@ -0,0 +1 @@ +{% extends "base.html" %} diff --git a/theme/material/partials/disqus.html b/theme/material/partials/disqus.html new file mode 100644 index 0000000..5f003ca --- /dev/null +++ b/theme/material/partials/disqus.html @@ -0,0 +1,14 @@ +
+ diff --git a/theme/material/partials/footer.html b/theme/material/partials/footer.html new file mode 100644 index 0000000..bf609cb --- /dev/null +++ b/theme/material/partials/footer.html @@ -0,0 +1,58 @@ +{% import "partials/language.html" as lang %} + diff --git a/theme/material/partials/header.html b/theme/material/partials/header.html new file mode 100644 index 0000000..77d06c8 --- /dev/null +++ b/theme/material/partials/header.html @@ -0,0 +1,46 @@ +
+ +
diff --git a/theme/material/partials/language.html b/theme/material/partials/language.html new file mode 100644 index 0000000..24ca018 --- /dev/null +++ b/theme/material/partials/language.html @@ -0,0 +1,17 @@ +{% macro t(key) %}{{ { + "language": "en", + "edit.link.title": "Edit this page", + "footer.previous": "Previous", + "footer.next": "Next", + "meta.comments": "Comments", + "meta.source": "Source", + "search.languages": "", + "search.placeholder": "Search", + "search.result.placeholder": "Type to start searching", + "search.result.none": "No matching documents", + "search.result.one": "1 matching document", + "search.result.other": "# matching documents", + "search.tokenizer": "[\s\-]+", + "source.link.title": "Go to repository", + "toc.title": "Table of contents" +}[key] }}{% endmacro %} diff --git a/theme/material/partials/nav-item.html b/theme/material/partials/nav-item.html new file mode 100644 index 0000000..c3e0b51 --- /dev/null +++ b/theme/material/partials/nav-item.html @@ -0,0 +1,54 @@ +{% set class = "md-nav__item" %} +{% if nav_item.active %} + {% set class = "md-nav__item md-nav__item--active" %} +{% endif %} +{% if nav_item.children %} +
  • + {% if nav_item.active %} + + {% else %} + + {% endif %} + + +
  • +{% elif nav_item == page %} +
  • + {% set toc_ = page.toc %} + + {% if toc_ | first is defined and "\x3ch1 id=" in page.content %} + {% set toc_ = (toc_ | first).children %} + {% endif %} + {% if toc_ | first is defined %} + + {% endif %} + + {{ nav_item.title }} + + {% if toc_ | first is defined %} + {% include "partials/toc.html" %} + {% endif %} +
  • +{% else %} +
  • + + {{ nav_item.title }} + +
  • +{% endif %} diff --git a/theme/material/partials/nav.html b/theme/material/partials/nav.html new file mode 100644 index 0000000..651608d --- /dev/null +++ b/theme/material/partials/nav.html @@ -0,0 +1,24 @@ + diff --git a/theme/material/partials/search.html b/theme/material/partials/search.html new file mode 100644 index 0000000..02d79e5 --- /dev/null +++ b/theme/material/partials/search.html @@ -0,0 +1,21 @@ +{% import "partials/language.html" as lang %} + diff --git a/theme/material/partials/social.html b/theme/material/partials/social.html new file mode 100644 index 0000000..cb68735 --- /dev/null +++ b/theme/material/partials/social.html @@ -0,0 +1,9 @@ +{% if config.extra.social %} + +{% endif %} diff --git a/theme/material/partials/source.html b/theme/material/partials/source.html new file mode 100644 index 0000000..221b551 --- /dev/null +++ b/theme/material/partials/source.html @@ -0,0 +1,25 @@ +{% import "partials/language.html" as lang %} +{% set platform = config.extra.repo_icon or config.repo_url %} +{% if "github" in platform %} + {% set repo_type = "github" %} +{% elif "gitlab" in platform %} + {% set repo_type = "gitlab" %} +{% elif "bitbucket" in platform %} + {% set repo_type = "bitbucket" %} +{% else %} + {% set repo_type = "" %} +{% endif %} +{% block repo %} + + {% if repo_type %} +
    + + + +
    + {% endif %} +
    + {{ config.repo_name }} +
    +
    +{% endblock %} diff --git a/theme/material/partials/tabs-item.html b/theme/material/partials/tabs-item.html new file mode 100644 index 0000000..686b5a5 --- /dev/null +++ b/theme/material/partials/tabs-item.html @@ -0,0 +1,31 @@ +{% if nav_item.is_homepage %} +
  • + {% if not page.ancestors | length and nav | selectattr("url", page.url) %} + + {{ nav_item.title }} + + {% else %} + + {{ nav_item.title }} + + {% endif %} +
  • +{% elif nav_item.children and nav_item.children | length > 0 %} + {% set title = title | default(nav_item.title) %} + {% if (nav_item.children | first).children | length > 0 %} + {% set nav_item = nav_item.children | first %} + {% include "partials/tabs-item.html" %} + {% else %} +
  • + {% if nav_item.active %} + + {{ title }} + + {% else %} + + {{ title }} + + {% endif %} +
  • + {% endif %} +{% endif %} diff --git a/theme/material/partials/tabs.html b/theme/material/partials/tabs.html new file mode 100644 index 0000000..e040436 --- /dev/null +++ b/theme/material/partials/tabs.html @@ -0,0 +1,13 @@ +{% set class = "md-tabs" %} +{% if page.ancestors | length > 0 %} + {% set class = "md-tabs md-tabs--active" %} +{% endif %} + diff --git a/theme/material/partials/toc-item.html b/theme/material/partials/toc-item.html new file mode 100644 index 0000000..3b4f4d7 --- /dev/null +++ b/theme/material/partials/toc-item.html @@ -0,0 +1,14 @@ +
  • + + {{ toc_item.title }} + + {% if toc_item.children %} + + {% endif %} +
  • diff --git a/theme/material/partials/toc.html b/theme/material/partials/toc.html new file mode 100644 index 0000000..57ced2c --- /dev/null +++ b/theme/material/partials/toc.html @@ -0,0 +1,29 @@ +{% import "partials/language.html" as lang %} +