Skip to content

Commit

Permalink
Add languages tab
Browse files Browse the repository at this point in the history
  • Loading branch information
thejsj committed Feb 25, 2019
1 parent 46c8a76 commit a0f4a5d
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 13 deletions.
6 changes: 3 additions & 3 deletions basilica/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Installation
3. Sign up at http://basilica.ai/signup to get an API key.

Connecting to Basilica
===========
======================
You can connect to Basilica using your API key::

import basilica
Expand All @@ -50,7 +50,7 @@ If you don't have an API key, you can visit http://basilica.ai/signup
to get one.

Embedding Images
===========
================

You can embed a single image with `Connection.embed_image`, which
takes bytes, or `Connection.embed_image_file`, which takes a path to a
Expand All @@ -69,7 +69,7 @@ batches requests to the server::
...

Embedding Sentences
===========
===================

You can embed a single sentence with `Connection.embed_sentence`,
which takes a utf-8 string, or with `Connection.embed_sentences`,
Expand Down
4 changes: 2 additions & 2 deletions basilica/docs/build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mkdir -p _build _static _templates
pip install ..
mkdir -p _build
pip install ../
sphinx-build -b html . _build
17 changes: 10 additions & 7 deletions basilica/docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import basilica
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
Expand All @@ -19,12 +20,12 @@

# -- Project information -----------------------------------------------------

project = u'Basilica'
copyright = u'2018, Michael Lucy, Jorge Silva'
project = u'Basilica Python Client'
copyright = u'2019, Michael Lucy, Jorge Silva'
author = u'Michael Lucy, Jorge Silva'

# The short X.Y version
version = u'0.2.1'
version = basilica.__version__
# The full version, including alpha/beta/rc tags
release = version

Expand All @@ -48,7 +49,7 @@
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand Down Expand Up @@ -91,7 +92,7 @@
# 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']
html_static_path = ['static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down Expand Up @@ -185,7 +186,9 @@
# return False
# return skip

# def setup(app):
# app.connect("autodoc-skip-member", skip)
def setup(app):
app.add_stylesheet('css/main.css')

autoclass_content = 'both'

html_favicon = 'basilica.ico'
1 change: 0 additions & 1 deletion basilica/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ Table of Contents

quickstart
basilica

Binary file added basilica/docs/static/basilica.ico
Binary file not shown.
42 changes: 42 additions & 0 deletions basilica/docs/static/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.basilica-languages-menu {
display: block;
font-size: 13px;
letter-spacing: 0.05em;
}

.basilica-languages-menu .languages {
display: inline-block;
}

.basilica-languages-menu a {
display: inline-block;
margin-left: 10px;
}

.basilica-languages-menu a:first-child {
margin-left: 0px;
}

.basilica-languages-menu a span {
display: inline-block;
color: #cdcdcd;
margin: 12px 5px 0 5px;
opacity: 0.8;
}

.basilica-languages-menu a.active span {
display: inline-block;
color: white;
opacity: 1;
}

.wy-side-nav-search .basilica-languages-menu a img {
display: inline-block;
width: 20px;
height: 20px;
border-radius: 0;
margin: 0;
background: none;
padding: 0;
margin-top: -6px;
}
Binary file added basilica/docs/static/pyton-bw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added basilica/docs/static/pyton-original.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added basilica/docs/static/pyton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added basilica/docs/static/r-bw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added basilica/docs/static/r-original.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added basilica/docs/static/r.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions basilica/docs/templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "!layout.html" %}

{% block sidebartitle %}
{{ super() }}
<div class="basilica-languages-menu">
<span class="languages">Languages:</span>
<a href="https://basilica-client.readthedocs.io/en/latest/basilica.html" class="active">
<img src="_static/pyton.png">
<span>Python</span>
</a>
<a href="https://basilica-r-client.readthedocs.io/en/latest/">
<img src="_static/r-bw.png">
<span>R</span>
</a>

</div>
{% endblock %}

0 comments on commit a0f4a5d

Please sign in to comment.