This is an automated email from the ASF dual-hosted git repository. kamilbregula pushed a commit to branch aip-11 in repository https://gitbox.apache.org/repos/asf/airflow-site.git
The following commit(s) were added to refs/heads/aip-11 by this push: new 91f760c Add sphinx theme (#123) 91f760c is described below commit 91f760cd62cb4b3aa5b40d455bed9ae694f7083d Author: Kamil Breguła <mik-...@users.noreply.github.com> AuthorDate: Fri Nov 8 18:17:31 2019 +0100 Add sphinx theme (#123) --- .gitignore | 4 + .pre-commit-config.yaml | 77 ++- landing-pages/site/assets/scss/_roadmap.scss | 7 +- landing-pages/src/docs-index.js | 26 + landing-pages/src/js/tocTree.js | 27 + landing-pages/webpack.common.js | 3 +- license-templates/LICENSE.rst | 16 + .../LICENSE.txt | 0 site.sh | 18 +- sphinx_airflow_theme/README.md | 20 + sphinx_airflow_theme/demo/awesome-cat.jpg | Bin 0 -> 5873700 bytes sphinx_airflow_theme/demo/conf.py | 77 +++ sphinx_airflow_theme/demo/docs.sh | 80 +++ sphinx_airflow_theme/demo/index.rst | 36 ++ sphinx_airflow_theme/demo/playground.rst | 600 +++++++++++++++++++++ sphinx_airflow_theme/setup.py | 86 +++ .../sphinx_airflow_theme/__init__.py | 20 +- .../sphinx_airflow_theme/breadcrumbs.html | 41 ++ .../sphinx_airflow_theme/footer.html | 148 +++++ .../sphinx_airflow_theme/globaltoc.html | 90 ++++ .../sphinx_airflow_theme/header.html | 171 ++++++ .../sphinx_airflow_theme/layout.html | 365 +++++++++++++ .../sphinx_airflow_theme/searchbox.html | 47 ++ .../sphinx_airflow_theme/searchresults.html | 58 ++ .../suggest_change_button.html | 74 +++ .../sphinx_airflow_theme/theme.conf | 8 + .../sphinx_airflow_theme/version-selector.html | 33 ++ 27 files changed, 2098 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index 4a0474a..67169bd 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,7 @@ .idea/ .DS_Store dist/ +*.egg-info/ +__pycache__/ +_build/ +sphinx_airflow_theme/sphinx_airflow_theme/static/_gen/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1599c5b..91653d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo files: ^\.gitmodules$|^\.gitignore$|^\.gitignore$|^Dockerfile.*$ - id: insert-license @@ -46,7 +46,7 @@ repos: - --comment-style - "/**| *| */" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all shell files @@ -56,7 +56,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all yaml files @@ -65,7 +65,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all TOML files @@ -74,7 +74,7 @@ repos: - --comment-style - "|#|" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo - id: insert-license name: Add licence for all HTML files @@ -83,9 +83,36 @@ repos: - --comment-style - "{{/*||*/}}" - --license-filepath - - license-templates.txt + - license-templates/LICENSE.txt - --fuzzy-match-generates-todo files: ^landing-pages/site/layouts/.+\.html$ + - id: insert-license + name: Add licence for all Python files + types: [python] + args: + - --comment-style + - "|#|" + - --license-filepath + - license-templates/LICENSE.txt + - --fuzzy-match-generates-todo + - id: insert-license + name: Add license for all rst files + args: + - --comment-style + - "||" + - --license-filepath + - license-templates/LICENSE.rst + - --fuzzy-match-generates-todo + files: \.rst$ + - id: insert-license + name: Add license for all JINJA template files + files: ^sphinx_airflow_theme/.*\.html$ + args: + - --comment-style + - "{#||#}" + - --license-filepath + - license-templates/LICENSE.txt + - --fuzzy-match-generates-todo - repo: local hooks: - id: shellcheck @@ -110,22 +137,22 @@ repos: entry: ./site.sh lint-js language: system files: \.js$ - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 - hooks: - - id: check-executables-have-shebangs - - id: check-json - - id: check-merge-conflict - - id: check-toml - - id: check-yaml - - id: detect-private-key - - id: end-of-file-fixer - - id: pretty-format-json - args: - - --indent=2 - - --autofix - - --top-keys=name,version,description,repository,main,author,license,scripts - - id: mixed-line-ending - - id: requirements-txt-fixer - - id: trailing-whitespace - args: [--markdown-linebreak-ext=md] + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.3.0 + hooks: + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-yaml + - id: detect-private-key + - id: end-of-file-fixer + - id: pretty-format-json + args: + - --indent=2 + - --autofix + - --top-keys=name,version,description,repository,main,author,license,scripts + - id: mixed-line-ending + - id: requirements-txt-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] diff --git a/landing-pages/site/assets/scss/_roadmap.scss b/landing-pages/site/assets/scss/_roadmap.scss index 2c2563e..b89090d 100644 --- a/landing-pages/site/assets/scss/_roadmap.scss +++ b/landing-pages/site/assets/scss/_roadmap.scss @@ -227,18 +227,17 @@ li.current > a { border-left: solid 4px #017cee; color: #017cee; - padding-left: 1.25em; } - li.toctree-l2 > a { + li li > a { padding-left: 2.427em; } - li.toctree-l3 > a { + li li li > a { padding-left: 4.045em; } - li.toctree-l4 > a { + li li li li > a { padding-left: 5.663em; } } diff --git a/landing-pages/src/docs-index.js b/landing-pages/src/docs-index.js new file mode 100644 index 0000000..884ea65 --- /dev/null +++ b/landing-pages/src/docs-index.js @@ -0,0 +1,26 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import "./js/navbarScroll"; +import "./js/drawer"; +import "./js/contentDrawer"; +import "./js/progressTracking"; +import "./js/rating"; +import "./js/makeTableResponsive"; +import "./js/tocTree"; diff --git a/landing-pages/src/js/tocTree.js b/landing-pages/src/js/tocTree.js new file mode 100644 index 0000000..a8801d4 --- /dev/null +++ b/landing-pages/src/js/tocTree.js @@ -0,0 +1,27 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +Array.from(document.querySelectorAll(".toctree ul")).forEach((listElement) => { + const siblingsLinks = Array.from(listElement.parentNode.children).filter((d) => d.tagName === "A"); + siblingsLinks.forEach((linkElement) => { + const expandElement = document.createElement("span"); + expandElement.classList.add("toctree-expand"); + linkElement.insertBefore(expandElement, linkElement.firstChild); + }); +}); diff --git a/landing-pages/webpack.common.js b/landing-pages/webpack.common.js index 2d236e5..d83b646 100644 --- a/landing-pages/webpack.common.js +++ b/landing-pages/webpack.common.js @@ -25,7 +25,8 @@ const AssetsPlugin = require("assets-webpack-plugin"); module.exports = { entry: { - main: path.join(__dirname, "src", "index.js") + main: path.join(__dirname, "src", "index.js"), + docs: path.join(__dirname, "src", "docs-index.js") }, output: { diff --git a/license-templates/LICENSE.rst b/license-templates/LICENSE.rst new file mode 100644 index 0000000..adf897d --- /dev/null +++ b/license-templates/LICENSE.rst @@ -0,0 +1,16 @@ +.. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + +.. http://www.apache.org/licenses/LICENSE-2.0 + +.. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. diff --git a/license-templates.txt b/license-templates/LICENSE.txt similarity index 100% rename from license-templates.txt rename to license-templates/LICENSE.txt diff --git a/site.sh b/site.sh index 1d405f3..851bd55 100755 --- a/site.sh +++ b/site.sh @@ -36,7 +36,9 @@ These are ${0} commands used in various situations: cleanup Delete the virtual environment in Docker build-image Build a Docker image with a environment install-node-deps Download all the Node dependencies - preview Starts the web server + preview-site Starts the web server with preview of the website + preview-docs Starts the web server with preview of the Sphinx theme + prepare-theme Prepares and copies files needed for the proper functioning of the sphinx theme. build-landing-pages Builds a landing pages build-site Builds a website with documentation check-site-links Checks if the links are correct in the website @@ -222,6 +224,7 @@ function build_site { EOF } + function cleanup_environment { container_status="$(docker inspect "${CONTAINER_NAME}" --format '{{.State.Status}}')" echo "Current container status: ${container_status}" @@ -241,6 +244,16 @@ function cleanup_environment { fi } +function prepare_theme { + SITE_DIST="landing-pages/dist" + THEME_GEN="sphinx_airflow_theme/sphinx_airflow_theme/static/_gen" + mkdir -p "${THEME_GEN}/css" "${THEME_GEN}/js" + cp ${SITE_DIST}/docs.*.js "${THEME_GEN}/js/docs.js" + cp ${SITE_DIST}/scss/main.min.*.css "${THEME_GEN}/css/main.min.css" + cp ${SITE_DIST}/scss/main-custom.min.*.css "${THEME_GEN}/css/main-custom.min.css" + echo "Successful copied required files" +} + if [[ "$#" -eq 0 ]]; then echo "You must provide at least one command." echo @@ -289,6 +302,9 @@ elif [[ "${CMD}" == "check-site-links" ]]; then ensure_node_module_exists ensure_that_website_is_build run_command "/opt/site/landing-pages/" ./check-links.sh +elif [[ "${CMD}" == "prepare-theme" ]]; then + ensure_that_website_is_build + prepare_theme elif [[ "${CMD}" == "lint-js" ]]; then ensure_node_module_exists if [[ "$#" -eq 0 ]]; then diff --git a/sphinx_airflow_theme/README.md b/sphinx_airflow_theme/README.md new file mode 100644 index 0000000..0d1aaa9 --- /dev/null +++ b/sphinx_airflow_theme/README.md @@ -0,0 +1,20 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +# Sphinx theme for Airflow diff --git a/sphinx_airflow_theme/demo/awesome-cat.jpg b/sphinx_airflow_theme/demo/awesome-cat.jpg new file mode 100644 index 0000000..b2fce15 Binary files /dev/null and b/sphinx_airflow_theme/demo/awesome-cat.jpg differ diff --git a/sphinx_airflow_theme/demo/conf.py b/sphinx_airflow_theme/demo/conf.py new file mode 100644 index 0000000..44cc1a5 --- /dev/null +++ b/sphinx_airflow_theme/demo/conf.py @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'Theme demo' +copyright = '2019, Apache Software Foundation' +author = 'Apache Software Foundation' + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ +] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] + +# Custom sidebar templates, +html_sidebars = { + '**': [ + 'version-selector.html', + 'searchbox.html', + 'globaltoc.html', + ] +} + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'sphinx_airflow_theme' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] diff --git a/sphinx_airflow_theme/demo/docs.sh b/sphinx_airflow_theme/demo/docs.sh new file mode 100755 index 0000000..3348e82 --- /dev/null +++ b/sphinx_airflow_theme/demo/docs.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +set -euox pipefail + +MY_DIR="$(cd "$(dirname "$0")" && pwd)" +pushd "${MY_DIR}" &>/dev/null || exit 1 + +SOURCE_DIR="." +BUILD_DIR="_build" + +function usage { +cat << EOF +usage: ${0} <command> [<args>] + +These are ${0} commands used in various situations: + + build Build the documentation + preview Build a Docker image with a environment + help Display usage + +EOF +} + +function ensure_that_documentation_is_built { + if [[ ! -f _build/html/index.html ]] ; then + echo "Documentation is not built. Start build." + sphinx-build -M html "${SOURCE_DIR}" "${BUILD_DIR}" -E + fi +} + +function start_preview { + ensure_that_documentation_is_built + pushd "${BUILD_DIR}/html" + python -m http.server --cgi 3001 + popd +} + +if [[ "$#" -eq 0 ]]; then + echo "You must provide at least one command." + echo + usage + exit 1 +fi + + +CMD=$1 + +shift + +# Check fundamentals commands +if [[ "${CMD}" == "build" ]] ; then + sphinx-build -M html "." "_build" -E + exit 0 +elif [[ "${CMD}" == "preview" ]] ; then + start_preview + exit 0 +else + usage + exit 0 +fi + + +popd &>/dev/null || exit 1 diff --git a/sphinx_airflow_theme/demo/index.rst b/sphinx_airflow_theme/demo/index.rst new file mode 100644 index 0000000..ab1d133 --- /dev/null +++ b/sphinx_airflow_theme/demo/index.rst @@ -0,0 +1,36 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + .. http://www.apache.org/licenses/LICENSE-2.0 + + .. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Welcome to Theme demo's documentation! +====================================== + +AAA + +.. toctree:: + :maxdepth: 1 + :caption: References + + playground + +AAA + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/sphinx_airflow_theme/demo/playground.rst b/sphinx_airflow_theme/demo/playground.rst new file mode 100644 index 0000000..27d251d --- /dev/null +++ b/sphinx_airflow_theme/demo/playground.rst @@ -0,0 +1,600 @@ + .. Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + .. http://www.apache.org/licenses/LICENSE-2.0 + + .. Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +Playground +========== + +.. contents:: Content + :local: + :depth: 1 + +Inline markup +""""""""""""" + +*text* - emphasis (italics), +**text** - emphasis (boldface), and +``text`` - code samples. + + +List and quotes blocks +"""""""""""""""""""""" + +* This is a bulleted list. +* It has two items, the second + item uses two lines. + +1. This is a numbered list. +2. It has two items too. + +#. This is a numbered list. +#. It has two items too. + +* this is +* a list + + * with a nested list + * and some subitems + +* and here the parent list continues + +Subsection +'''''''''' + +Subsubsection +------------- + +Definitions list +"""""""""""""""" + +term (up to a line of text) + Definition of the term, which must be indented + + and can even consist of multiple paragraphs + +next term + Description. + +Parameter list +"""""""""""""" + +:Date: 2001-08-16 +:Version: 1 +:Authors: - Me + - Myself + - I +:Indentation: Since the field marker may be quite long, the second + and subsequent lines of the field body do not have to line up + with the first line, but they must be indented relative to the + field name marker, and they must line up with each other. +:Parameter i: integer + +Option list +""""""""""" + +-a Output all. +-b Output both (this description is + quite long). +-c arg Output just arg. +--long Output all day long. + +-p This option has two paragraphs in the description. + This is the first. + + This is the second. Blank lines may be omitted between + options (as above) or left in (as here and below). + +--very-long-option A VMS-style option. Note the adjustment for + the required two spaces. + +--an-even-longer-option + The description can also start on the next line. + +-2, --two This option has two variants. + +-f FILE, --file=FILE These two options are synonyms; both have + arguments. + +/V A VMS/DOS-style option. + +Literal blocks +"""""""""""""" + +This is a typical paragraph. An indented literal block follows. + +:: + + for a in [5,4,3,2,1]: # this is program code, shown as-is + print a + print "it's..." + # a literal block continues until the indentation ends + +This text has returned to the indentation of the first paragraph, +is outside of the literal block, and is therefore treated as an +ordinary paragraph. + + +Quoted literal blocks +""""""""""""""""""""" + +John Doe wrote:: + +>> Great idea! +> +> Why didn't I think of that? + +You just did! ;-) + + +Doc test blocks +""""""""""""""" + +This is an ordinary paragraph. + +>>> print 'this is a Doctest block' +this is a Doctest block + +The following is a literal block:: + + >>> This is not recognized as a doctest block by + reStructuredText. It *will* be recognized by the doctest + module, though! + + +Grid tables +""""""""""" + ++------------------------+------------+----------+----------+ +| Header row, column 1 | Header 2 | Header 3 | Header 4 | +| (header rows optional) | | | | ++========================+============+==========+==========+ +| body row 1, column 1 | column 2 | column 3 | column 4 | ++------------------------+------------+----------+----------+ +| body row 2 | Cells may span columns. | ++------------------------+------------+---------------------+ +| body row 3 | Cells may | - Table cells | ++------------------------+ span rows. | - contain | +| body row 4 | | - body elements. | ++------------------------+------------+---------------------+ + + +Footnotes +""""""""" + +[#]_ is a reference to footnote 1, and [#]_ is a reference to +footnote 2. + +.. [#] This is footnote 1. +.. [#] This is footnote 2. +.. [#] This is footnote 3. + +[#]_ is a reference to footnote 3. + + +[2]_ will be "2" (manually numbered), +[#]_ will be "3" (anonymous auto-numbered), and +[#label]_ will be "1" (labeled auto-numbered). + +.. [2] This footnote is labeled manually, so its number is fixed. + +.. [#label] This autonumber-labeled footnote will be labeled "1". + It is the first auto-numbered footnote and no other footnote + with label "1" exists. The order of the footnotes is used to + determine numbering, not the order of the footnote references. + +.. [#] This footnote will be labeled "3". It is the second + auto-numbered footnote, but footnote label "2" is already used. + + +Here is a citation reference: [CIT2002]_. + +.. [CIT2002] This is the citation. It's just like a footnote, + except the label is textual. + + +Para. + +---------- + +Para. + + +Admonitions +""""""""""" + +.. attention:: + Beware killer rabbits! + +.. caution:: + Beware killer rabbits! + +.. danger:: + Beware killer rabbits! + +.. error:: + Beware killer rabbits! + +.. hint:: + Beware killer rabbits! + +.. important:: + Beware killer rabbits! + +.. note:: + Beware killer rabbits! + +.. tip:: + Beware killer rabbits! + +.. warning:: + Beware killer rabbits! + + +.. note:: This is a note admonition. + This is the second line of the first paragraph. + + - The note contains all indented body elements + following. + - It includes this bullet list. + + +.. versionadded:: 2.5 + The *spam* parameter. + +.. versionchanged:: 2.5 + The *spam* parameter. + +.. deprecated:: 2.5 + The *spam* parameter. + + +.. seealso:: + + Module :py:mod:`zipfile` + Documentation of the :py:mod:`zipfile` standard module. + + `GNU tar manual, Basic Tar Format <http://link>`_ + Documentation for tar archive files, including GNU tar extensions. + +.. seealso:: modules :py:mod:`zipfile`, :py:mod:`tarfile` + +.. rubric:: AAAAAA + + +.. glossary:: + + environment + A structure where information about all documents under the root is + saved, and used for cross-referencing. The environment is pickled + after the parsing stage, so that successive runs only need to read + and parse new and changed documents. + + source directory + The directory which, including its subdirectories, contains all + source files for one Sphinx project. + +Figure +"""""" + +.. figure:: awesome-cat.jpg + :scale: 10 % + :alt: Photo by Jae Park on Unsplash + + Awesome cat because everyone loves cats. + + +Topic +""""" + +.. topic:: Topic Title + + Subsequent indented lines comprise + the body of the topic, and are + interpreted as body elements. + +Sidebar +""""""" + +.. sidebar:: Sidebar Title + :subtitle: Optional Sidebar Subtitle + + Subsequent indented lines comprise + the body of the sidebar, and are + interpreted as body elements. + + +Code +"""" + +.. code:: python + + def my_function(): + "just a test" + print 8/2 + + +rubric +"""""" + +.. rubric:: I like kitty + +Epigraph +"""""""" + +.. epigraph:: + + No matter where you go, there you are. + + -- Buckaroo Banzai + + +compound +"""""""" + + +.. compound:: + + The 'rm' command is very dangerous. If you are logged + in as root and enter :: + + cd / + rm -rf * + + you will erase the entire contents of your file system. + + +Table of Contents +""""""""""""""""" + +.. contents:: Table of Contents + + +Awesome +""""""" + +.. header:: This space for rent. + + +Replacement Text +"""""""""""""""" + +.. |reST| replace:: reStructuredText + +Yes, |reST| is a long word, so I can't blame anyone for wanting to +abbreviate it. + + +I recommend you try |Python|_. + +.. |Python| replace:: Python, *the* best language around +.. _Python: http://www.python.org/ + + +Unicode Character Codes +""""""""""""""""""""""" + +Copyright |copy| 2003, |BogusMegaCorp (TM)| |---| +all rights reserved. + +.. |copy| unicode:: 0xA9 .. copyright sign +.. |BogusMegaCorp (TM)| unicode:: BogusMegaCorp U+2122 + .. with trademark sign +.. |---| unicode:: U+02014 .. em dash + :trim: + + +Date +"""" + +.. |date| date:: +.. |time| date:: %H:%M + +Today's date is |date|. + +This document was generated on |date| at |time|. + + +Roles +""""" +:envvar:`envvar` + +... is installed in :file:`/usr/lib/python2.{x}/site-packages` ... + +The function :py:func:`datetime.datetime.today()` does a similar thing. + +The function :py:class:`datetime.datetime` does a similar thing. + +The function :py:class:`datetime.INVALID` does a similar thing. + + +Class description +""""""""""""""""" + +https://airflow.readthedocs.io/en/latest/_api/airflow/contrib/hooks/gcp_api_base_hook/index.html + +.. py:class:: GoogleCloudBaseHookDDD(gcp_conn_id:str='google_cloud_default', delegate_to:str=None) + + Bases: :class:`airflow.hooks.base_hook.BaseHook` + + A base hook for Google cloud-related hooks. Google cloud has a shared REST + API client that is built in the same way no matter which service you use. + This class helps construct and authorize the credentials needed to then + call googleapiclient.discovery.build() to actually discover and build a client + for a Google cloud service. + + The class also contains some miscellaneous helper functions. + + All hook derived from this base hook use the 'Google Cloud Platform' connection + type. Three ways of authentication are supported: + + Default credentials: Only the 'Project Id' is required. You'll need to + have set up default credentials, such as by the + ``GOOGLE_APPLICATION_DEFAULT`` environment variable or from the metadata + server on Google Compute Engine. + + JSON key file: Specify 'Project Id', 'Keyfile Path' and 'Scope'. + + Legacy P12 key files are not supported. + + JSON data provided in the UI: Specify 'Keyfile JSON'. + + :param gcp_conn_id: The connection ID to use when fetching connection info. + :type gcp_conn_id: str + :param delegate_to: The account to impersonate, if any. + For this to work, the service account making the request must have + domain-wide delegation enabled. + :type delegate_to: str + + .. py:function:: send_message(sender, recipient, message_body, [priority=1]) + + Send a message to a recipient + + :param str sender: The person sending the message + :param str recipient: The recipient of the message + :param str message_body: The body of the message + :param priority: The priority of the message, can be a number 1-5 + :type priority: integer or None + :return: the message id + :rtype: int + :raises ValueError: if the message_body exceeds 160 characters + :raises TypeError: if the message_body is not a basestring + + .. py:staticmethod:: send_message + + Send a message to a recipient + + .. py:staticmethod:: send_message + + Send a message to a recipient + + .. py:classmethod:: send_message + + Send a message to a recipient + + .. py:decorator:: send_message + + Send a message to a recipient + + .. py:decoratormethod:: send_message + + Send a message to a recipient + + + .. attribute:: project_id + + + Returns project id. + + :return: id of the project + :rtype: str + + + .. attribute:: num_retries + + + Returns num_retries from Connection. + + :return: the number of times each API request should be retried + :rtype: int + + + .. attribute:: client_info + + + Return client information used to generate a user-agent for API calls. + + It allows for better errors tracking. + + This object is only used by the google-cloud-* libraries that are built specifically for + the Google Cloud Platform. It is not supported by The Google APIs Python Client that use Discovery + based APIs. + + + .. attribute:: scopes + + + Return OAuth 2.0 scopes. + + :return: Returns the scope defined in the connection configuration, or the default scope + :rtype: Sequence[str] + + + + .. method:: _get_credentials_and_project_id(self) + + Returns the Credentials object for Google API and the associated project_id + + + + + .. method:: _get_credentials(self) + + Returns the Credentials object for Google API + + + + + .. method:: _get_access_token(self) + + Returns a valid access token from Google API Credentials + + + + + .. method:: _authorize(self) + + Returns an authorized HTTP object to be used to build a Google cloud + service hook connection. + + + + + .. method:: _get_field(self, f:str, default:Any=None) + + Fetches a field from extras, and returns it. This is some Airflow + magic. The google_cloud_platform hook type adds custom UI elements + to the hook page, which allow admins to specify service_account, + key_path, etc. They get formatted as shown below. + + + + + .. staticmethod:: catch_http_exception(func:Callable[..., RT]) + + Function decorator that intercepts HTTP Errors and raises AirflowException + with more informative message. + + + + + .. staticmethod:: fallback_to_default_project_id(func:Callable[..., RT]) + + Decorator that provides fallback for Google Cloud Platform project id. If + the project is None it will be replaced with the project_id from the + service account the Hook is authenticated with. Project id can be specified + either via project_id kwarg or via first parameter in positional args. + + :param func: function to wrap + :return: result of the function call + + + + + .. staticmethod:: provide_gcp_credential_file(func:Callable[..., RT]) + + Function decorator that provides a ``GOOGLE_APPLICATION_CREDENTIALS`` + environment variable, pointing to file path of a JSON file of service + account key. diff --git a/sphinx_airflow_theme/setup.py b/sphinx_airflow_theme/setup.py new file mode 100644 index 0000000..c466748 --- /dev/null +++ b/sphinx_airflow_theme/setup.py @@ -0,0 +1,86 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import os +from setuptools import setup + +REQUIRED_ADDITIONAL_FILES=[ + "sphinx_airflow_theme/static/_gen/css/main.min.css", + "sphinx_airflow_theme/static/_gen/css/main-custom.min.css", + "sphinx_airflow_theme/static/_gen/js/docs.js""" +] +missing_files = [ + f + for f in REQUIRED_ADDITIONAL_FILES + if not os.path.isfile(f) +] +if missing_files: + raise Exception( + "Missing files: {}. You need copy these files from dist of website.".format(missing_files) + ) + +with open('README.md', encoding='utf-8') as file: + long_description = file.read() + +setup( + name='sphinx_airflow_theme', + version='0.0.01', + url='https://github.com/apache/airflow-site/tree/aip-11', + license='Apache License 2.0', + author='Apache Software Foundation', + author_email='d...@airflow.apache.org', + description='Airflow theme for Sphinx', + long_description=long_description, + long_description_content_type='text/markdown', + zip_safe=False, + packages=['sphinx_airflow_theme'], + package_data={'sphinx_airflow_theme': [ + 'theme.conf', + '*.html', + 'static/css/*.css', + 'static/css/fonts/*.*' + 'static/js/*.js', + ]}, + include_package_data=True, + # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package + entry_points = { + 'sphinx.html_themes': [ + 'sphinx_airflow_theme = sphinx_airflow_theme', + ] + }, + install_requires=[ + 'sphinx' + ], + tests_require=[], + extras_require={ + 'dev': [], + }, + classifiers=[ + 'Framework :: Sphinx', + 'Framework :: Sphinx :: Theme', + 'License :: OSI Approved :: Apache Software License', + 'Environment :: Console', + 'Environment :: Web Environment', + 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Operating System :: OS Independent', + 'Topic :: Documentation', + 'Topic :: Software Development :: Documentation', + ], +) diff --git a/.gitignore b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py similarity index 59% copy from .gitignore copy to sphinx_airflow_theme/sphinx_airflow_theme/__init__.py index 4a0474a..7165840 100644 --- a/.gitignore +++ b/sphinx_airflow_theme/sphinx_airflow_theme/__init__.py @@ -15,6 +15,20 @@ # specific language governing permissions and limitations # under the License. -.idea/ -.DS_Store -dist/ +from os import path + +__version__ = '0.0.1' +__version_full__ = __version__ + + +def get_html_theme_path(): + """Return list of HTML theme paths.""" + cur_dir = path.abspath(path.dirname(path.dirname(__file__))) + return cur_dir + + +# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package +def setup(app): + app.add_html_theme('sphinx_airflow_theme', path.abspath(path.dirname(__file__))) + app.add_stylesheet('_gen/css//main-custom.min.css') + app.add_js_file('_gen/js/docs.js') diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html b/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html new file mode 100644 index 0000000..14361ec --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/breadcrumbs.html @@ -0,0 +1,41 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +{% if meta is defined and meta is not none %} + {% set check_meta = True %} +{% else %} + {% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + +<div role="navigation" aria-label="breadcrumbs navigation" class="d-none d-md-block d-print-none"> + + <ul class="breadcrumb"> + {% block breadcrumbs %} + <li class="breadcrumb-item"><a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ _('Home') }}</a></li> + {% for doc in parents %} + <li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li> + {% endfor %} + <li class="breadcrumb-item"><a href="{{ pagename }}{{ file_suffix }}"> {{ title }}</li> + {% endblock %} + </ul> +</div> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/footer.html b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html new file mode 100644 index 0000000..f0a3c11 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/footer.html @@ -0,0 +1,148 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<footer> + <div class="footer-section footer-section__media-section"> + <div class="d-flex align-items-center"> + + <a class="footer-section__media-section--link" target="_blank" href="https://github.com"> + <svg xmlns="http://www.w3.org/2000/svg" width="46.14" height="45" viewBox="0 0 46.14 45"> + <path id="Path_207" d="M228.962 1078.578a23.072 23.072 0 0 0-7.29 44.96c1.154.212 1.574-.5 1.574-1.112 0-.548-.02-2-.031-3.924-6.417 1.394-7.771-3.093-7.771-3.093a6.109 6.109 0 0 0-2.562-3.375c-2.095-1.431.159-1.4.159-1.4a4.846 4.846 0 0 1 3.533 2.377c2.058 3.525 5.4 2.507 6.714 1.917a4.926 4.926 0 0 1 1.464-3.084c-5.123-.582-10.508-2.562-10.508-11.4a8.919 8.919 0 0 1 2.374-6.191 8.3 8.3 0 0 1 .226-6.105s1.937-.62 6.344 2.365a21.857 21.857 0 0 1 11.551 0c4.4-2.985 6.3 [...] + </svg> + + </a> + + <a class="footer-section__media-section--link" target="_blank" href="https://jira.atlassian.com/"> + <svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="0 0 45 45"> + <g id="Group_210" data-name="Group 210" transform="translate(-339.789 -1315.282)"> + <path id="Path_218" d="M394.82 1315.282h-21.671a9.784 9.784 0 0 0 9.784 9.778h3.986v3.857a9.784 9.784 0 0 0 9.784 9.771v-21.523a1.884 1.884 0 0 0-1.883-1.883z" fill="#fff" data-name="Path 218" transform="translate(-11.914)"></path> + <path id="Path_219" d="M378.14 1332.072h-21.671a9.778 9.778 0 0 0 9.778 9.778h4.018v3.857a9.784 9.784 0 0 0 9.752 9.778v-21.536a1.877 1.877 0 0 0-1.877-1.877z" fill="#fff" data-name="Path 219" transform="translate(-5.957 -5.996)"></path> + <path id="Path_220" d="M361.46 1348.862h-21.671a9.778 9.778 0 0 0 9.778 9.778h3.992v3.857a9.778 9.778 0 0 0 9.778 9.778v-21.529a1.883 1.883 0 0 0-1.877-1.884z" fill="#fff" data-name="Path 220" transform="translate(0 -11.993)"></path> + </g> + </svg> + + </a> + + <a class="footer-section__media-section--link" target="_blank" href="https://slack.com"> + <svg xmlns="http://www.w3.org/2000/svg" width="45.073" height="45.073" viewBox="0 0 45.073 45.073"> + <g id="Group_208" data-name="Group 208" transform="translate(-661.145 -806.287)"> + <g id="Group_204" data-name="Group 204" transform="translate(661.145 830.01)"> + <path id="Path_208" d="M670.634 856.859a4.744 4.744 0 1 1-4.744-4.744h4.744z" fill="#fff" data-name="Path 208" transform="translate(-661.145 -852.115)"></path> + <path id="Path_209" d="M684.059 856.859a4.744 4.744 0 0 1 9.489 0v11.861a4.744 4.744 0 1 1-9.489 0z" fill="#fff" data-name="Path 209" transform="translate(-672.198 -852.115)"></path> + </g> + <g id="Group_205" data-name="Group 205" transform="translate(661.145 806.287)"> + <path id="Path_210" d="M688.8 815.776a4.744 4.744 0 1 1 4.744-4.745v4.745z" fill="#fff" data-name="Path 210" transform="translate(-672.198 -806.287)"></path> + <path id="Path_211" d="M677.751 829.2a4.744 4.744 0 0 1 0 9.489H665.89a4.744 4.744 0 1 1 0-9.489z" fill="#fff" data-name="Path 211" transform="translate(-661.145 -817.34)"></path> + </g> + <g id="Group_206" data-name="Group 206" transform="translate(684.868 806.287)"> + <path id="Path_212" d="M729.887 833.945a4.744 4.744 0 1 1 4.745 4.745h-4.745z" fill="#fff" data-name="Path 212" transform="translate(-718.026 -817.34)"></path> + <path id="Path_213" d="M716.462 822.893a4.744 4.744 0 1 1-9.489 0v-11.862a4.744 4.744 0 0 1 9.489 0z" fill="#fff" data-name="Path 213" transform="translate(-706.973 -806.287)"></path> + </g> + <g id="Group_207" data-name="Group 207" transform="translate(684.868 830.01)"> + <path id="Path_214" d="M711.718 875.029a4.744 4.744 0 1 1-4.745 4.744v-4.744z" fill="#fff" data-name="Path 214" transform="translate(-706.973 -863.168)"></path> + <path id="Path_215" d="M711.718 861.6a4.744 4.744 0 1 1 0-9.489h11.861a4.744 4.744 0 0 1 0 9.489z" fill="#fff" data-name="Path 215" transform="translate(-706.973 -852.115)"></path> + </g> + </g> + </svg> + + </a> + + <a class="footer-section__media-section--link" target="_blank" href="https://stackoverflow.com"> + <svg xmlns="http://www.w3.org/2000/svg" width="37.647" height="44.6" viewBox="0 0 37.647 44.6"> + <g id="Group_209" data-name="Group 209" transform="translate(-645.2 -975.455)"> + <path id="Path_216" d="M677.028 1043.1v-11.948h3.966v15.914H645.2v-15.914h3.966v11.948z" fill="#fff" data-name="Path 216" transform="translate(0 -27.014)"></path> + <path id="Path_217" d="M661.012 1003.008l19.467 4.069.824-3.914-19.467-4.069zm2.575-9.27l18.025 8.395 1.648-3.605-18.025-8.446zm5-8.858l15.3 12.721 2.524-3.039-15.3-12.721zm9.888-9.425l-3.193 2.369 11.845 15.965 3.193-2.369zm-17.875 36.617h19.879v-3.966H660.6z" fill="#fff" data-name="Path 217" transform="translate(-7.469)"></path> + </g> + </svg> + + </a> + + <a class="footer-section__media-section--link" target="_blank" href="https://twitter.com"> + <svg xmlns="http://www.w3.org/2000/svg" width="44.355" height="44.355" viewBox="0 0 44.355 44.355"> + <g id="Group_211" data-name="Group 211" transform="translate(-503 -1382.2)"> + <path id="Path_221" d="M541.811 1382.2h-33.267a5.546 5.546 0 0 0-5.544 5.544v33.266a5.547 5.547 0 0 0 5.544 5.545h33.267a5.546 5.546 0 0 0 5.544-5.545v-33.266a5.546 5.546 0 0 0-5.544-5.544zm-5.611 16.533c.011.244.011.488.011.732 0 7.507-5.722 16.178-16.179 16.178a16.173 16.173 0 0 1-8.7-2.539 10.92 10.92 0 0 0 1.353.078 11.4 11.4 0 0 0 7.064-2.44 5.685 5.685 0 0 1-5.311-3.947 5.725 5.725 0 0 0 2.561-.1 5.7 5.7 0 0 1-4.557-5.578v-.078a5.752 5.752 0 0 0 2.572.71 5.7 [...] + </g> + </svg> + + </a> + + <a class="footer-section__media-section--link" target="_blank" href="https://youtube.com"> + <svg xmlns="http://www.w3.org/2000/svg" width="49.594" height="34.941" viewBox="0 0 49.594 34.941"> + <path id="Path_223" d="M1124.557 1230a6.232 6.232 0 0 0-4.385-4.413c-3.867-1.043-19.376-1.043-19.376-1.043s-15.508 0-19.376 1.043a6.232 6.232 0 0 0-4.385 4.413c-1.036 3.893-1.036 12.014-1.036 12.014s0 8.122 1.036 12.015a6.232 6.232 0 0 0 4.385 4.413c3.867 1.043 19.376 1.043 19.376 1.043s15.509 0 19.376-1.043a6.232 6.232 0 0 0 4.385-4.413c1.036-3.893 1.036-12.015 1.036-12.015s.001-8.123-1.036-12.014zm-28.833 19.388v-14.748l12.962 7.374z" fill="#fff" data-name="Path 223 [...] + </svg> + + </a> + + </div> + <div class="footer-section__media-section--button-with-text"> + <span class="footer-section__media-section--text">Want to be a part of Apache Airflow?</span> + <a href="/community"> + + <button id="" class="btn-filled bodytext__medium--white ">Join community</button> + + </a> + </div> + </div> + <div class="footer-section footer-section__policies-section"> + <span>© The Apache Software Foundation 2019</span> + <div class="footer-section__policies-section--policies"> + + <a href="https://www.apache.org/licenses/" class="footer-section__policies-section--policy-item"> + <span>License</span> + </a> + + <a href="https://www.apache.org/foundation/sponsorship.html" class="footer-section__policies-section--policy-item"> + <span>Donate</span> + </a> + + <a href="https://www.apache.org/foundation/thanks.html" class="footer-section__policies-section--policy-item"> + <span>Thanks</span> + </a> + + <a href="https://www.apache.org/security/" class="footer-section__policies-section--policy-item"> + <span>Security</span> + </a> + + <a href="/docs" class="footer-section__policies-section--policy-item"> + <span>Season of Docs</span> + </a> + + <a href="/" class="footer-section__policies-section--policy-item"> + <span>Privacy policy & terms</span> + </a> + + <a href="/" class="footer-section__policies-section--policy-item"> + <span>Cookies</span> + </a> + + <div class="footer-section__policies-section--language-toggle"> + + <a class="dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <span>English</span> + </a> + <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> + + <a class="dropdown-item" href="/no/">Norsk</a> + + </div> + + </div> + </div> + </div> +</footer> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html b/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html new file mode 100644 index 0000000..00a552f --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/globaltoc.html @@ -0,0 +1,90 @@ + +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<div class="toctree" role="navigation" aria-label="main navigation"> + {{ toctree() }} +</div> + +<style type="text/css"> + .toctree { + } + .toctree li { + list-style: none; + } + .toctree .caption { + font-family: Roboto; + font-size: 18px; + font-weight: bold; + font-stretch: normal; + font-style: normal; + line-height: 1.33; + letter-spacing: normal; + color: #51504f; + padding-bottom: 13px; + text-transform: uppercase; + margin-bottom: 0; + } + .toctree .current > a:not([href="#"]) { + color: #017cee; + } + .toctree > ul { + padding-left: 0; + } + .toctree ul { + padding-left: 15px; + display: none; + } + .toctree > ul, + .toctree li.current > ul { + display: block; + } + + .toctree a .toctree-expand { + display: inline-block; + position: relative; + height: 1em; + } + + .toctree a .toctree-expand:before { + position: absolute; + top: 6px; + left: -12px; + content: '►'; + font-size: 7px; + } + .toctree .current > a > .toctree-expand:before { + content: '▼'; + } + + .toctree .current { + color: #017cee; + } + .toctree li { + font-family: Roboto; + font-size: 16px; + font-weight: normal; + font-stretch: normal; + font-style: normal; + line-height: 1.63; + letter-spacing: normal; + color: #707070; + } + +</style> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/header.html b/sphinx_airflow_theme/sphinx_airflow_theme/header.html new file mode 100644 index 0000000..e5081af --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/header.html @@ -0,0 +1,171 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<header> + + <nav class="js-navbar-scroll navbar"> + <div class="navbar__icon-container"> + <a href="/"> + <svg xmlns="http://www.w3.org/2000/svg" width="155.314" height="60" viewBox="0 0 155.314 60"> + <defs> + <clipPath id="clip-path"> + <path id="Rectangle_1" d="M0 0h155.314v60H0z" fill="none" data-name="Rectangle 1"></path> + </clipPath> + </defs> + <g id="logo" transform="translate(-1305 -780.355)"> + <g id="Group_2" clip-path="url(#clip-path)" data-name="Group 2" transform="translate(1305 780.355)"> + <g id="Group_1" data-name="Group 1" transform="translate(.486 .486)"> + <path id="Path_1" d="M1307.562 880.867l28.187-28.893a.521.521 0 0 0 .063-.666c-1.714-2.393-4.877-2.808-6.049-4.416-3.472-4.763-4.353-7.459-5.845-7.292a.456.456 0 0 0-.271.143l-10.182 10.438c-5.858 6-6.7 19.225-6.852 30.3a.552.552 0 0 0 .949.386z" fill="#017cee" data-name="Path 1" transform="translate(-1306.613 -822.232)"></path> + <path id="Path_2" d="M1405.512 908.489l-28.893-28.189a.521.521 0 0 0-.667-.063c-2.393 1.715-2.808 4.877-4.416 6.049-4.763 3.472-7.459 4.353-7.292 5.845a.456.456 0 0 0 .143.27l10.438 10.182c6 5.858 19.225 6.7 30.3 6.852a.552.552 0 0 0 .387-.946z" fill="#00ad46" data-name="Path 2" transform="translate(-1346.876 -850.567)"></path> + <path id="Path_3" d="M1373.909 902.252c-3.28-3.2-4.8-9.53 1.486-22.583-10.219 4.567-13.8 10.57-12.039 12.289z" fill="#04d659" data-name="Path 3" transform="translate(-1345.96 -850.233)"></path> + <path id="Path_4" d="M1433.132 782.359l-28.186 28.893a.52.52 0 0 0-.063.666c1.715 2.393 4.876 2.808 6.049 4.416 3.472 4.763 4.354 7.459 5.845 7.292a.454.454 0 0 0 .271-.143l10.182-10.438c5.858-6 6.7-19.225 6.852-30.3a.553.553 0 0 0-.95-.386z" fill="#00c7d4" data-name="Path 4" transform="translate(-1375.21 -782.123)"></path> + <path id="Path_5" d="M1426.9 881.155c-3.2 3.28-9.53 4.8-22.584-1.486 4.567 10.219 10.57 13.8 12.289 12.039z" fill="#11e1ee" data-name="Path 5" transform="translate(-1374.875 -850.233)"></path> + <path id="Path_6" d="M1307 782.919l28.893 28.186a.521.521 0 0 0 .666.063c2.393-1.715 2.808-4.877 4.416-6.049 4.763-3.472 7.459-4.353 7.292-5.845a.459.459 0 0 0-.143-.271l-10.438-10.182c-6-5.858-19.225-6.7-30.3-6.852a.552.552 0 0 0-.386.95z" fill="#e43921" data-name="Path 6" transform="translate(-1306.766 -781.97)"></path> + <path id="Path_7" d="M1405.8 804.711c3.28 3.2 4.8 9.53-1.486 22.584 10.219-4.567 13.8-10.571 12.039-12.289z" fill-rule="evenodd" fill="#ff7557" data-name="Path 7" transform="translate(-1374.875 -797.859)"></path> + <path id="Path_8" d="M1329.355 849.266c3.2-3.28 9.53-4.8 22.584 1.486-4.567-10.219-10.57-13.8-12.289-12.039z" fill="#0cb6ff" data-name="Path 8" transform="translate(-1322.503 -821.316)"></path> + <circle id="Ellipse_1" cx="1.26" cy="1.26" r="1.26" fill="#4a4848" data-name="Ellipse 1" transform="translate(28.18 28.171)"></circle> + <path id="Path_9" d="M1527.558 827.347a.229.229 0 0 1-.223-.223.458.458 0 0 1 .011-.123l2.766-7.214a.346.346 0 0 1 .357-.245h.758a.348.348 0 0 1 .357.245l2.754 7.214.022.123a.228.228 0 0 1-.223.223h-.568a.288.288 0 0 1-.19-.056.352.352 0 0 1-.089-.134l-.613-1.583h-3.657l-.613 1.583a.317.317 0 0 1-.1.134.269.269 0 0 1-.178.056zm4.795-2.732l-1.505-3.958-1.505 3.958zm3.322 4.85a.258.258 0 0 1-.189-.078.241.241 0 0 1-.067-.178v-7.4a.241.241 0 0 1 .067-.178.258 [...] + <path id="Path_10" d="M1527.2 827.081l-.061.061zm-.056-.279l-.08-.031zm2.766-7.214l.08.031zm1.472 0l-.081.029zm2.754 7.214l.084-.015a.064.064 0 0 0 0-.015zm.022.123h.086v-.015zm-.067.156l.06.061zm-.914.011l-.061.061.006.005zm-.089-.134l.081-.027zm-.613-1.583l.08-.031a.086.086 0 0 0-.08-.055zm-3.657 0v-.086a.086.086 0 0 0-.08.055zm-.613 1.583l-.08-.031zm-.1.134l.055.066zm4.047-2.676v.086a.086.086 0 0 0 .08-.116zm-1.505-3.958l.08-.03a.086.086 0 0 0-.16 0zm-1 [...] + <path id="Path_11" d="M1519.066 884.011a.581.581 0 0 1-.567-.567 1.151 1.151 0 0 1 .028-.312l7.026-18.328a.881.881 0 0 1 .906-.623h1.926a.882.882 0 0 1 .907.623l7 18.328.057.312a.583.583 0 0 1-.567.567h-1.445a.735.735 0 0 1-.482-.142.9.9 0 0 1-.226-.34l-1.558-4.023h-9.292l-1.558 4.023a.8.8 0 0 1-.255.34.688.688 0 0 1-.453.142zm12.181-6.94l-3.824-10.056-3.823 10.055zm8.184-10.538a.592.592 0 0 1-.652-.651v-1.53a.714.714 0 0 1 .17-.482.656.656 0 0 1 .482-.2h1 [...] + </g> + </g> + </g> + </svg> + + </a> + </div> + <div class="desktop-only navbar__menu-container"> + + <div class="navbar__menu-content" id="main_navbar"> + + <div class="navbar__links-container"> + + <a class="navbar__text-link " href="/community/"> + Community + </a> + + <a class="navbar__text-link " href="/meetups/"> + Meetups + </a> + + <a class="navbar__text-link " href="/docs/"> + Documentation + </a> + + <a class="navbar__text-link " href="/roadmap/"> + Roadmap + </a> + + <a class="navbar__text-link " href="/case-studies/"> + Case studies + </a> + + <a class="navbar__text-link " href="/blog/"> + Blog + </a> + + </div> + + <a href="/install/"> + + <button id="" class="btn-filled bodytext__medium--white ">Install</button> + + </a> + + </div> + + </div> + <div class="mobile-only navbar__drawer-container"> + <button class="navbar__toggle-button" id="navbar-toggle-button"> + + <div id="hamburger-icon" class="navbar__toggle-button--icon visible"> + <svg xmlns="http://www.w3.org/2000/svg" width="26" height="20" viewBox="0 0 26 20"> + <g id="Group_1294" data-name="Group 1294" transform="translate(-38.791 291)"> + <g id="Group_1291" data-name="Group 1291" transform="translate(39 -291)"> + <rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect> + </g> + <g id="Group_1292" data-name="Group 1292" transform="translate(39 -281.822)"> + <rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect> + </g> + <g id="Group_1293" data-name="Group 1293" transform="translate(39 -272.644)"> + <rect id="Rectangle_463" width="26" height="2" fill="#51504f" data-name="Rectangle 463" rx="1" transform="translate(-.209 -.356)"></rect> + </g> + </g> + </svg> + + </div> + + <div id="close-icon" class="navbar__toggle-button--icon"> + <svg xmlns="http://www.w3.org/2000/svg" width="19.799" height="19.799" viewBox="0 0 19.799 19.799"> + <g id="Group_1574" data-name="Group 1574" transform="translate(-41.892 290.899)"> + <g id="Group_1291" data-name="Group 1291" transform="rotate(-45 -308.114 -187.077)"> + <rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect> + </g> + <g id="Group_1292" data-name="Group 1292" transform="rotate(45 372.48 -93.011)"> + <rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect> + </g> + </g> + </svg> + + </div> + + </button> + <div class="navbar__drawer" id="navbar-drawer"> + <div class="navbar__menu-content" id="main_navbar"> + + <div class="navbar__links-container"> + + <a class="navbar__text-link " href="/community/"> + Community + </a> + + <a class="navbar__text-link " href="/meetups/"> + Meetups + </a> + + <a class="navbar__text-link " href="/docs/"> + Documentation + </a> + + <a class="navbar__text-link " href="/roadmap/"> + Roadmap + </a> + + <a class="navbar__text-link " href="/case-studies/"> + Case studies + </a> + + <a class="navbar__text-link " href="/blog/"> + Blog + </a> + + </div> + + <a href="/install/"> + + <button id="" class="btn-filled bodytext__medium--white ">Install</button> + + </a> + + </div> + </div> + </div> + </nav> + +</header> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/layout.html b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html new file mode 100644 index 0000000..25eecb1 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/layout.html @@ -0,0 +1,365 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +{# + basic/layout.html + ~~~~~~~~~~~~~~~~~ + + Master layout template for Sphinx themes. + + :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- set url_root = pathto('', 1) %} +{%- if url_root == '#' %}{% set url_root = '' %}{% endif %} +{%- if not embedded and docstitle %} + {%- set titlesuffix = " — "|safe + docstitle|e %} +{%- else %} + {%- set titlesuffix = "" %} +{%- endif %} +{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %} + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]--> + +{%- macro pager() %} + <div class="pager" role="navigation" aria-label="related navigation"> + {%- if prev %} + <a rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" > + <button class="btn-hollow btn-blue bodytext__medium--cerulean-blue" accesskey="p">{{ _('Previous') }}</button> + </a> + {%- else -%} + <button class="btn-hollow btn-blue bodytext__medium--cerulean-blue" disabled>{{ _('Previous') }}</button> + {%- endif %} + {%- if next %} + <a rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" > + <button class="btn-hollow btn-blue bodytext__medium--cerulean-blue" accesskey="n">{{ _('Next') }}</button> + </a> + {%- else -%} + <button class="btn-hollow btn-blue bodytext__medium--cerulean-blue" disabled>{{ _('Next') }}</button> + {%- endif %} + </div> +{%- endmacro %} + +{%- macro rating() %} + <div class="rating-container"> + <p class="bodytext__medium--greyish-brown font-weight-500">Was this entry helpful?</p> + <div class="rating"> + + <div id="rate-star-5" class="rate-star"> + <svg xmlns="http://www.w3.org/2000/svg" width="21.05" height="20.02" viewBox="0 0 21.05 20.02"> + <g id="Group_806" data-name="Group 806" transform="translate(-774.404 -13.178)"> + <path id="Path_715" d="M791.434 33.2l-6.5-3.42-6.5 3.42 1.242-7.243-5.262-5.13 7.273-1.057 3.252-6.59 3.252 6.59 7.273 1.057-5.262 5.13z" fill="#017cee" data-name="Path 715"></path> + </g> + </svg> + + </div> + + <div id="rate-star-4" class="rate-star"> + <svg xmlns="http://www.w3.org/2000/svg" width="21.05" height="20.02" viewBox="0 0 21.05 20.02"> + <g id="Group_806" data-name="Group 806" transform="translate(-774.404 -13.178)"> + <path id="Path_715" d="M791.434 33.2l-6.5-3.42-6.5 3.42 1.242-7.243-5.262-5.13 7.273-1.057 3.252-6.59 3.252 6.59 7.273 1.057-5.262 5.13z" fill="#017cee" data-name="Path 715"></path> + </g> + </svg> + + </div> + + <div id="rate-star-3" class="rate-star"> + <svg xmlns="http://www.w3.org/2000/svg" width="21.05" height="20.02" viewBox="0 0 21.05 20.02"> + <g id="Group_806" data-name="Group 806" transform="translate(-774.404 -13.178)"> + <path id="Path_715" d="M791.434 33.2l-6.5-3.42-6.5 3.42 1.242-7.243-5.262-5.13 7.273-1.057 3.252-6.59 3.252 6.59 7.273 1.057-5.262 5.13z" fill="#017cee" data-name="Path 715"></path> + </g> + </svg> + + </div> + + <div id="rate-star-2" class="rate-star"> + <svg xmlns="http://www.w3.org/2000/svg" width="21.05" height="20.02" viewBox="0 0 21.05 20.02"> + <g id="Group_806" data-name="Group 806" transform="translate(-774.404 -13.178)"> + <path id="Path_715" d="M791.434 33.2l-6.5-3.42-6.5 3.42 1.242-7.243-5.262-5.13 7.273-1.057 3.252-6.59 3.252 6.59 7.273 1.057-5.262 5.13z" fill="#017cee" data-name="Path 715"></path> + </g> + </svg> + + </div> + + <div id="rate-star-1" class="rate-star"> + <svg xmlns="http://www.w3.org/2000/svg" width="21.05" height="20.02" viewBox="0 0 21.05 20.02"> + <g id="Group_806" data-name="Group 806" transform="translate(-774.404 -13.178)"> + <path id="Path_715" d="M791.434 33.2l-6.5-3.42-6.5 3.42 1.242-7.243-5.262-5.13 7.273-1.057 3.252-6.59 3.252 6.59 7.273 1.057-5.262 5.13z" fill="#017cee" data-name="Path 715"></path> + </g> + </svg> + + </div> + + </div> + </div> +{%- endmacro %} + +{%- macro sidebar() %} + <div class="td-sidebar desktop-only d-print-none"> + {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} + </div> +{%- endmacro %} + +{%- macro mobileSidebar() %} + <div class="content-drawer-wrapper"> + <button class="content-drawer__toggle-button" id="content-open-button"> + + <div id="hamburger-icon" class="content-drawer__toggle-button--icon visible"> + <svg xmlns="http://www.w3.org/2000/svg" width="20.005" height="13.879" viewBox="0 0 20.005 13.879"> + <g id="Group_1619" data-name="Group 1619" transform="translate(271.132 -418.872)"> + <g id="Group_1613" data-name="Group 1613" transform="translate(-266.229 431.045)"> + <path id="Path_1337" d="M-218.5 513.215h-14.583a.259.259 0 0 1-.259-.26.259.259 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.259.259 0 0 1-.259.26z" fill="#51504f" data-name="Path 1337" transform="translate(233.345 -512.696)"></path> + </g> + <g id="Group_1614" data-name="Group 1614" transform="translate(-266.229 425.684)"> + <path id="Path_1338" d="M-218.5 471.9h-14.583a.259.259 0 0 1-.259-.26.26.26 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.26.26 0 0 1-.259.26z" fill="#51504f" data-name="Path 1338" transform="translate(233.345 -471.376)"></path> + </g> + <g id="Group_1615" data-name="Group 1615" transform="translate(-266.229 420.323)"> + <path id="Path_1339" d="M-218.5 430.574h-14.583a.259.259 0 0 1-.259-.259.259.259 0 0 1 .259-.259h14.583a.26.26 0 0 1 .259.259.259.259 0 0 1-.259.259z" fill="#51504f" data-name="Path 1339" transform="translate(233.345 -430.055)"></path> + </g> + <g id="Group_1616" data-name="Group 1616" transform="translate(-271.132 429.814)"> + <path id="Path_1340" d="M-269.663 506.145a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.95z" fill="#51504f" data-name="Path 1340" transform="translate(271.132 -503.208)"></path> + </g> + <g id="Group_1617" data-name="Group 1617" transform="translate(-271.132 424.556)"> + <path id="Path_1341" d="M-269.663 465.62a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.952z" fill="#51504f" data-name="Path 1341" transform="translate(271.132 -462.683)"></path> + </g> + <g id="Group_1618" data-name="Group 1618" transform="translate(-271.132 418.872)"> + <path id="Path_1342" d="M-269.663 421.809a1.47 1.47 0 0 1-1.469-1.469 1.47 1.47 0 0 1 1.469-1.469 1.47 1.47 0 0 1 1.469 1.469 1.47 1.47 0 0 1-1.469 1.469zm0-2.418a.951.951 0 0 0-.95.95.951.951 0 0 0 .95.95.951.951 0 0 0 .95-.95.951.951 0 0 0-.95-.95z" fill="#51504f" data-name="Path 1342" transform="translate(271.132 -418.872)"></path> + </g> + </g> + </svg> + + <span class="bodytext__mobile--brownish-grey">Content</span> + </div> + + </button> + <nav id="content-navbar" class="navbar navbar--hidden"> + <div class="navbar__icon-container"> + <a href="/"> + <svg xmlns="http://www.w3.org/2000/svg" width="155.314" height="60" viewBox="0 0 155.314 60"> + <defs> + <clipPath id="clip-path"> + <path id="Rectangle_1" d="M0 0h155.314v60H0z" fill="none" data-name="Rectangle 1"></path> + </clipPath> + </defs> + <g id="logo" transform="translate(-1305 -780.355)"> + <g id="Group_2" clip-path="url(#clip-path)" data-name="Group 2" transform="translate(1305 780.355)"> + <g id="Group_1" data-name="Group 1" transform="translate(.486 .486)"> + <path id="Path_1" d="M1307.562 880.867l28.187-28.893a.521.521 0 0 0 .063-.666c-1.714-2.393-4.877-2.808-6.049-4.416-3.472-4.763-4.353-7.459-5.845-7.292a.456.456 0 0 0-.271.143l-10.182 10.438c-5.858 6-6.7 19.225-6.852 30.3a.552.552 0 0 0 .949.386z" fill="#017cee" data-name="Path 1" transform="translate(-1306.613 -822.232)"></path> + <path id="Path_2" d="M1405.512 908.489l-28.893-28.189a.521.521 0 0 0-.667-.063c-2.393 1.715-2.808 4.877-4.416 6.049-4.763 3.472-7.459 4.353-7.292 5.845a.456.456 0 0 0 .143.27l10.438 10.182c6 5.858 19.225 6.7 30.3 6.852a.552.552 0 0 0 .387-.946z" fill="#00ad46" data-name="Path 2" transform="translate(-1346.876 -850.567)"></path> + <path id="Path_3" d="M1373.909 902.252c-3.28-3.2-4.8-9.53 1.486-22.583-10.219 4.567-13.8 10.57-12.039 12.289z" fill="#04d659" data-name="Path 3" transform="translate(-1345.96 -850.233)"></path> + <path id="Path_4" d="M1433.132 782.359l-28.186 28.893a.52.52 0 0 0-.063.666c1.715 2.393 4.876 2.808 6.049 4.416 3.472 4.763 4.354 7.459 5.845 7.292a.454.454 0 0 0 .271-.143l10.182-10.438c5.858-6 6.7-19.225 6.852-30.3a.553.553 0 0 0-.95-.386z" fill="#00c7d4" data-name="Path 4" transform="translate(-1375.21 -782.123)"></path> + <path id="Path_5" d="M1426.9 881.155c-3.2 3.28-9.53 4.8-22.584-1.486 4.567 10.219 10.57 13.8 12.289 12.039z" fill="#11e1ee" data-name="Path 5" transform="translate(-1374.875 -850.233)"></path> + <path id="Path_6" d="M1307 782.919l28.893 28.186a.521.521 0 0 0 .666.063c2.393-1.715 2.808-4.877 4.416-6.049 4.763-3.472 7.459-4.353 7.292-5.845a.459.459 0 0 0-.143-.271l-10.438-10.182c-6-5.858-19.225-6.7-30.3-6.852a.552.552 0 0 0-.386.95z" fill="#e43921" data-name="Path 6" transform="translate(-1306.766 -781.97)"></path> + <path id="Path_7" d="M1405.8 804.711c3.28 3.2 4.8 9.53-1.486 22.584 10.219-4.567 13.8-10.571 12.039-12.289z" fill-rule="evenodd" fill="#ff7557" data-name="Path 7" transform="translate(-1374.875 -797.859)"></path> + <path id="Path_8" d="M1329.355 849.266c3.2-3.28 9.53-4.8 22.584 1.486-4.567-10.219-10.57-13.8-12.289-12.039z" fill="#0cb6ff" data-name="Path 8" transform="translate(-1322.503 -821.316)"></path> + <circle id="Ellipse_1" cx="1.26" cy="1.26" r="1.26" fill="#4a4848" data-name="Ellipse 1" transform="translate(28.18 28.171)"></circle> + <path id="Path_9" d="M1527.558 827.347a.229.229 0 0 1-.223-.223.458.458 0 0 1 .011-.123l2.766-7.214a.346.346 0 0 1 .357-.245h.758a.348.348 0 0 1 .357.245l2.754 7.214.022.123a.228.228 0 0 1-.223.223h-.568a.288.288 0 0 1-.19-.056.352.352 0 0 1-.089-.134l-.613-1.583h-3.657l-.613 1.583a.317.317 0 0 1-.1.134.269.269 0 0 1-.178.056zm4.795-2.732l-1.505-3.958-1.505 3.958zm3.322 4.85a.258.258 0 0 1-.189-.078.241.241 0 0 1-.067-.178v-7.4a.241.241 0 0 1 .067-.178 [...] + <path id="Path_10" d="M1527.2 827.081l-.061.061zm-.056-.279l-.08-.031zm2.766-7.214l.08.031zm1.472 0l-.081.029zm2.754 7.214l.084-.015a.064.064 0 0 0 0-.015zm.022.123h.086v-.015zm-.067.156l.06.061zm-.914.011l-.061.061.006.005zm-.089-.134l.081-.027zm-.613-1.583l.08-.031a.086.086 0 0 0-.08-.055zm-3.657 0v-.086a.086.086 0 0 0-.08.055zm-.613 1.583l-.08-.031zm-.1.134l.055.066zm4.047-2.676v.086a.086.086 0 0 0 .08-.116zm-1.505-3.958l.08-.03a.086.086 0 0 0-.16 0 [...] + <path id="Path_11" d="M1519.066 884.011a.581.581 0 0 1-.567-.567 1.151 1.151 0 0 1 .028-.312l7.026-18.328a.881.881 0 0 1 .906-.623h1.926a.882.882 0 0 1 .907.623l7 18.328.057.312a.583.583 0 0 1-.567.567h-1.445a.735.735 0 0 1-.482-.142.9.9 0 0 1-.226-.34l-1.558-4.023h-9.292l-1.558 4.023a.8.8 0 0 1-.255.34.688.688 0 0 1-.453.142zm12.181-6.94l-3.824-10.056-3.823 10.055zm8.184-10.538a.592.592 0 0 1-.652-.651v-1.53a.714.714 0 0 1 .17-.482.656.656 0 0 1 .482- [...] + </g> + </g> + </g> + </svg> + + </a> + </div> + + <div id="content-close-button"> + <svg xmlns="http://www.w3.org/2000/svg" width="19.799" height="19.799" viewBox="0 0 19.799 19.799"> + <g id="Group_1574" data-name="Group 1574" transform="translate(-41.892 290.899)"> + <g id="Group_1291" data-name="Group 1291" transform="rotate(-45 -308.114 -187.077)"> + <rect id="Rectangle_461" width="26" height="2" fill="#51504f" data-name="Rectangle 461" rx="1" transform="translate(-.209)"></rect> + </g> + <g id="Group_1292" data-name="Group 1292" transform="rotate(45 372.48 -93.011)"> + <rect id="Rectangle_462" width="26" height="2" fill="#51504f" data-name="Rectangle 462" rx="1" transform="translate(-.209 -.178)"></rect> + </g> + </g> + </svg> + + </div> + + </nav> + <div class="content-drawer-container" id="content-drawer"> + <div class="content-drawer"> + <div class="td-sidebar"> + {%- for sidebartemplate in sidebars %} + {%- include sidebartemplate %} + {%- endfor %} + </div> + </div> + </div> + </div> +{%- endmacro %} + +{%- macro script() %} + <script type="text/javascript" src="{{ pathto('_static/_gen/js/docs.js', 1) }}"></script> + <script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script> + <script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> + {%- for js in script_files %} + {{ js_tag(js) }} + {%- endfor %} +{%- endmacro %} + +{%- macro css() %} + <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> + + {%- for css in css_files %} + {%- if css|attr("filename") %} + {{ css_tag(css) }} + {%- else %} + <link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" /> + {%- endif %} + {%- endfor %} +{%- endmacro %} + +{%- macro sidetoc() %} + <nav class="wy-nav-side-toc"> + <div class="wy-side-scroll"> + <div class="wy-menu-vertical"> + {{ toc }} + </div> + </div> + </nav> +{%- endmacro %} + +{%- if html_tag %} + {{ html_tag }} +{%- else %} + <html xmlns="http://www.w3.org/1999/xhtml"{% if language is not none %} lang="{{ language }}"{% endif %}> +{%- endif %} +<head> + {%- if not html5_doctype and not skip_ua_compatible %} + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> + {%- endif %} + {%- if use_meta_charset or html5_doctype %} + <meta charset="{{ encoding }}" /> + {%- else %} + <meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}" /> + {%- endif %} + <meta name="viewport" content="width=device-width, initial-scale=1"> + {{- metatags }} + {%- block htmltitle %} + <title>{{ title|striptags|e }}{{ titlesuffix }}</title> + {%- endblock %} + {%- block css %} + {{- css() }} + {%- endblock %} + {%- if not embedded %} + {%- if pageurl %} + <link rel="canonical" href="{{ pageurl }}" /> + {%- endif %} + {%- if use_opensearch %} + <link rel="search" type="application/opensearchdescription+xml" + title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" + href="{{ pathto('_static/opensearch.xml', 1) }}"/> + {%- endif %} + {%- if favicon %} + <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/> + {%- endif %} + {%- endif %} + {%- block linktags %} + {%- if hasdoc('about') %} + <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" /> + {%- endif %} + {%- if hasdoc('genindex') %} + <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" /> + {%- endif %} + {%- if hasdoc('search') %} + <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" /> + {%- endif %} + {%- if hasdoc('copyright') %} + <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" /> + {%- endif %} + {%- if next %} + <link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" /> + {%- endif %} + {%- if prev %} + <link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" /> + {%- endif %} + {%- endblock %} + {%- block extrahead %} {% endblock %} +</head> + +{%- block body_tag %}<body class="td-section">{% endblock %} + +{%- block header %} + {% include "header.html" %} +{% endblock %} + +{%- block content %} + + <div class="roadmap container-fluid td-default base-layout"> + {# START MOBILE SIDEBAR #} + {{ mobileSidebar() }} + {# END MOBILE SIDEBAR #} + <div class="d-flex"> + {# START SIDEBAR #} + {{ sidebar() }} + {# END SIDEBAR #} + + {# START BODY #} + + <main class="col-12 col-md-9 col-xl-8" role="main"> + {% include "breadcrumbs.html" %} + {# START CONTENT #} + <div class="rst-content"> + <div class="document"> + {%- block document %} + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body" role="main"> + {% block body %} {% endblock %} + {%- block pager %}{{ pager() }}{% endblock %} + </div> + + </div> + </div> + {%- endblock %} + </div> + </div> + {%- block rating %}{{ rating() }}{% endblock %} + {# END CONTENT #} + </main> + {# END BODY #} + + {# START SIDEBAR #} + {{ sidetoc() }} + {# END SIDEBAR #} + </div> + {% include "suggest_change_button.html" %} + </div> + +{%- endblock %} + +{#{%- block relbar2 %}{{ relbar() }}{% endblock %}#} + +{%- block footer %} + {% include "footer.html" %} +{%- endblock %} +{%- block scripts %} + {{- script() }} +{%- endblock %} +</body> +</html> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html b/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html new file mode 100644 index 0000000..4c32df8 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/searchbox.html @@ -0,0 +1,47 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<div class="searchb-box"> + <form class="search-form" action="{{ pathto('search') }}" method="get"> + <input class="search-form__input" type="text" name="q" placeholder="{{ _('Search docs') }}"> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + + <button class="search-form__button" type="submit"> + + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> + <g id="Group_1579" data-name="Group 1579" transform="translate(-41.001 -41)"> + <path id="Path_169" d="M71.415 64.687a7.215 7.215 0 1 0-6.729 6.728 7.222 7.222 0 0 0 6.729-6.728z" fill="none" data-name="Path 169" transform="translate(-14.277 -14.276)"></path> + <path id="Path_170" d="M60.863 59.8l-6.093-6.09a7.78 7.78 0 1 0-1.06 1.06l6.09 6.093a.468.468 0 0 0 .662 0l.4-.4a.468.468 0 0 0 .001-.663zM42.512 49.183a6.274 6.274 0 1 1 5.851 5.85 6.28 6.28 0 0 1-5.851-5.85z" fill="#51504f" data-name="Path 170"></path> + </g> + </svg> + </button> + </form> +</div> + + +<style> + .searchb-box { + margin-bottom: 26px; + } + .searchb-box .search-form { + width: 100%; + margin-top: 20px; + } +</style> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html b/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html new file mode 100644 index 0000000..6387f64 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/searchresults.html @@ -0,0 +1,58 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<h1 id="search-documentation">{{ _('Search') }}</h1> +<p> + From here you can search these documents. Enter your search + words into the box below and click "search". +</p> +<form action="" method="get"> + <input type="text" name="q" value="" /> + <input type="submit" value="{{ _('search') }}" /> + <span id="search-progress" style="padding-left: 10px"></span> +</form> + +<form class="search-form" action="" method="get"> + <input class="search-form__input" placeholder="{{ _('Search docs') }}" name="q" type="search"> + <button class="search-form__button" type="submit"> + <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"> + <g id="Group_1579" data-name="Group 1579" transform="translate(-41.001 -41)"> + <path id="Path_169" d="M71.415 64.687a7.215 7.215 0 1 0-6.729 6.728 7.222 7.222 0 0 0 6.729-6.728z" fill="none" data-name="Path 169" transform="translate(-14.277 -14.276)"></path> + <path id="Path_170" d="M60.863 59.8l-6.093-6.09a7.78 7.78 0 1 0-1.06 1.06l6.09 6.093a.468.468 0 0 0 .662 0l.4-.4a.468.468 0 0 0 .001-.663zM42.512 49.183a6.274 6.274 0 1 1 5.851 5.85 6.28 6.28 0 0 1-5.851-5.85z" fill="#51504f" data-name="Path 170"></path> + </g> + </svg> + </button> +</form> +{%- if search_performed %} + <h2>{{ _('Search Results') }}</h2> + {%- if not search_results %} + <p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p> + {%- endif %} +{%- endif %} +<div id="search-results"> + {%- if search_results %} + <ul class="search"> + {% for href, caption, context in search_results %} + <li><a href="{{ docroot }}{{ href }}/?highlight={{ q }}">{{ caption }}</a> + <div class="context">{{ context|e }}</div> + </li> + {% endfor %} + </ul> + {%- endif %} +</div> diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html b/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html new file mode 100644 index 0000000..98ee9a7 --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/suggest_change_button.html @@ -0,0 +1,74 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +{% if meta is defined and meta is not none %} + {% set check_meta = True %} +{% else %} + {% set check_meta = False %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + +{% if check_meta and 'github_url' in meta %} + {% set display_github = True %} +{% endif %} + +{% if hasdoc(pagename) %} + {% if display_github %} + {% if check_meta and 'github_url' in meta %} + {% set github_link = meta['github_url'] %} + {% else %} + {% set github_link = 'https://' ~ github_host|default("github.com") ~ '/' ~ github_user ~ '/' ~ github_repo ~ '/' ~ theme_vcs_pageview_mode|default("blob") ~ '/' ~ github_version ~ conf_py_path ~ pagename ~ suffix %} + {% endif %} + <div class="base-layout--button"> + <a href="{{ github_link }}" rel="nofollow"> + + <button class="btn-hollow btn-brown btn-with-icon with-box-shadow button-fixed"> + <svg xmlns="http://www.w3.org/2000/svg" width="30.76" height="30"> + <path d="M15.379 0a15.381 15.381 0 00-4.86 29.974c.769.141 1.05-.334 1.05-.741 0-.365-.013-1.332-.021-2.616-4.278.929-5.181-2.062-5.181-2.062a4.071 4.071 0 00-1.708-2.25c-1.4-.954.106-.935.106-.935a3.231 3.231 0 012.356 1.585 3.274 3.274 0 004.476 1.278 3.287 3.287 0 01.976-2.056c-3.415-.388-7.005-1.707-7.005-7.6a5.947 5.947 0 011.583-4.127 5.53 5.53 0 01.151-4.07s1.291-.413 4.229 1.577a14.577 14.577 0 017.7 0c2.936-1.99 4.225-1.577 4.225-1.577a5.523 5.523 0 01.15 [...] + </svg> + + <span class="bodytext__medium--brownish-grey">{{ _('Suggest a change on this page') }}</span> + </button> + </a> + </div> + {% else %} + {% if source_url_prefix %} + {% set sourcce_link = source_url_prefix ~ pagename ~ suffix %} + {% elif has_source and sourcename %} + {% set sourcce_link = pathto('_sources/' + sourcename, true)|e %} + {% else %} + {% set sourcce_link = None %} + {% endif %} + <div class="base-layout--button"> + <a href="{{ source_link }}" rel="nofollow"> + + <button class="btn-hollow btn-brown btn-with-icon with-box-shadow button-fixed"> + <svg xmlns="http://www.w3.org/2000/svg" width="30.76" height="30"> + <path d="M15.379 0a15.381 15.381 0 00-4.86 29.974c.769.141 1.05-.334 1.05-.741 0-.365-.013-1.332-.021-2.616-4.278.929-5.181-2.062-5.181-2.062a4.071 4.071 0 00-1.708-2.25c-1.4-.954.106-.935.106-.935a3.231 3.231 0 012.356 1.585 3.274 3.274 0 004.476 1.278 3.287 3.287 0 01.976-2.056c-3.415-.388-7.005-1.707-7.005-7.6a5.947 5.947 0 011.583-4.127 5.53 5.53 0 01.151-4.07s1.291-.413 4.229 1.577a14.577 14.577 0 017.7 0c2.936-1.99 4.225-1.577 4.225-1.577a5.523 5.523 0 01.15 [...] + </svg> + + <span class="bodytext__medium--brownish-grey">{{ _('View page source') }}</span> + </button> + </a> + </div> + {% endif %} +{% endif %} diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf b/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf new file mode 100644 index 0000000..577040e --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/theme.conf @@ -0,0 +1,8 @@ +[theme] +inherit = basic +stylesheet = _gen/css/main.min.css +pygments_style = default + +[options] +canonical_url = +analytics_id = diff --git a/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html b/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html new file mode 100644 index 0000000..d5e400a --- /dev/null +++ b/sphinx_airflow_theme/sphinx_airflow_theme/version-selector.html @@ -0,0 +1,33 @@ +{# + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +#} + +<div id="version-selector" class="sidebar__version-selector"> + <a class="dropdown-toggle" href="#" id="versionDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + <span class="bodytext__medium--greyish-brown">Version: </span><span id="selected-version">undefined</span> + </a> + <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink" x-placement="bottom-start" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(15px, 33px, 0px);"> + <a class="dropdown-item" href="/docs/1.10.1">1.10.1</a> + <a class="dropdown-item" href="/docs/1.10.2">1.10.2</a> + <a class="dropdown-item" href="/docs/1.10.3">1.10.3</a> + <a class="dropdown-item" href="/docs/1.10.4">1.10.4</a> + <a class="dropdown-item" href="/docs/1.10.5">1.10.5</a> + <a class="dropdown-item" href="/docs/1.10.6">1.10.6</a> + <a class="dropdown-item" href="/docs/1.10.7">1.10.7</a> + </div> +</div>