Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master to main #11

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb768ec
Renaming and switching to using autover
jsignell Feb 19, 2019
00a09b1
Merge pull request #1 from pyviz-dev/jsignell/rename
jsignell Feb 19, 2019
8d73205
Added option to enable two-level nav bar (#2)
jsignell May 9, 2019
032f8f0
Unminifying css and using sphinx templating (#5)
jsignell May 10, 2019
4269d34
Setting up release infrastructure (#6)
jsignell May 10, 2019
c3eae59
Updating conda recipe
jsignell May 10, 2019
dc87708
Cleaning up conda packaging (#7)
jsignell May 10, 2019
fd31d15
Trying to get release working (#8)
jsignell May 10, 2019
a15ded4
Fixing token name
jsignell May 10, 2019
3f9eae2
Updating included files, README
jsignell May 15, 2019
ce94599
Fixing up setup.py
jsignell May 15, 2019
210533f
Allow users to turn off first nav and footer (#9)
jsignell May 29, 2019
a62926b
Updating template to add `include_logo_text` (#10)
jsignell Oct 29, 2019
a64bdf4
Renaming from sphinx_pyviz_theme to sphinx_holoviz_theme (#11)
jsignell Nov 7, 2019
ee3a0c3
Fixing very spaced out lists (#12)
jsignell Nov 14, 2019
a9d1c34
Add configuration variables for Google integrations (#13)
philippjfr Dec 19, 2019
bb6fa91
Use new Google Analytics script (#14)
philippjfr Dec 19, 2019
93549e4
Fixes for Google Custom Search ID
philippjfr Jan 8, 2020
b822647
GDPR compliance in Google Analytics config (#15)
philippjfr Jan 15, 2020
bd1bac7
Added CSS for interactivity warning option
jlstevens Nov 11, 2020
340377c
Reverted accidental push to master
jlstevens Nov 11, 2020
52b7a56
Added CSS for interactivity warning option (#16)
jlstevens Dec 10, 2020
66a645e
master to main
maximlt Dec 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sphinx_ioam_theme/_version.py export-subst
sphinx_holoviz_theme/_version.py export-subst
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
*~
*.pyc
/dist
*.egg-info
pip-wheel-metadata
.pytest_cache
*__pycache__

# pyct
.doit.db
.tox

# autover
*/.version
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ jobs:
distributions: "sdist bdist_wheel"
on:
tags: true
user: ceball
password:
secure: VJpGRSoKsuSZSIuBwXmd/XtAviateO7xlU4LYVzz9wrfI1xzd7TQkrRLbL/JQIzPFPop79nrtWvREZC7p+e/o8llNGNWeS8GiZHjDZxaONWhvrZqJKGRu9SNfWH08dxut6gQ9XLZ1+jilAG4KMuEhD/dww7uT+rjVLUrXcKQTMzmMt6+tWlCiVc56rQ6ZZLEqTC0eVq2Ctd2GnKqpRqUbzb1ajp3Y1nqt7M8Nr/XEwTGswt5/kFZpAi7QUz2tW39W4LlPnlzGqx9fkeRxzZ0ws1vkAhB//oJOSh+ao07i3GdneGjydjWlTaqFGUlB+W/Qol/bQpMvI0PlTiGEKqRLsoqXTVyq+8yuLtFRj+C74Bbg6/heKmHhF4lRNZXbeYbQ1Z2yVhxr3i81+DTjT02+EExvJ//96iO08KJmPnjVxxFCY5DC16YMDzGZ04s1MR+Fe3CohWKkgigfnAsZukmyFpZT/Qc9MvRUEDX4/7hEptedUULs/TaQP7yMoDf1V2c7F3jDDqB5Fjkgedqmh2LRJ2YGSFl7ciJ9hpSOCg3FibOOxDX3RPMqUpxUbd9cNyYXykPBwTg2vAe6aFuRf0lahwR6b6hRp4Kbs5sFmpFcQrJjSS9ty1TbriVoeG7MEwmhLRo7L1FYXkcSHngwooxcziU1IntwWoJMhfUZ8cx+dw=
user: $PPU
password: $PPP

- stage: conda_package
install:
Expand All @@ -40,5 +39,4 @@ jobs:
- conda install anaconda-client conda-build
script:
- conda build conda.recipe/
- anaconda --token $CONDA_UPLOAD_TOKEN upload --user pyviz --label dev --label main `conda build --output conda.recipe`

- anaconda --token $ANACONDA_TOKEN upload --user pyviz --label dev --label main `conda build --output conda.recipe`
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2019, IOAM (ioam.github.com)
Copyright (c) 2017-2019, HoloViz (holoviz.org)
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand All @@ -13,7 +13,7 @@ met:
documentation and/or other materials provided with the
distribution.

* Neither the name of IOAM nor the names of its contributors
* Neither the name of HoloViz nor the names of its contributors
may be used to endorse or promote products derived from this
software without specific prior written permission.

Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include versioneer.py
include sphinx_ioam_theme/_version.py
include sphinx_holoviz_theme/_version.py
include LICENSE.txt
include README.md
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# sphinx_holoviz_theme: Theme for building HoloViz sites

| | |
| --- | --- |
| Build Status | [![Linux/MacOS Build Status](https://travis-ci.org/pyviz-dev/sphinx_holoviz_theme.svg?branch=main)](https://travis-ci.org/pyviz-dev/sphinx_holoviz_theme) |
| Latest dev release | [![Github tag](https://img.shields.io/github/tag/pyviz-dev/sphinx_holoviz_theme.svg?label=tag&colorB=11ccbb)](https://github.com/pyviz-dev/sphinx_holoviz_theme/tags) |
| Latest release | [![Github release](https://img.shields.io/github/release/pyviz-dev/sphinx_holoviz_theme.svg?label=tag&colorB=11ccbb)](https://github.com/pyviz-dev/sphinx_holoviz_theme/releases) [![PyPI version](https://img.shields.io/pypi/v/sphinx_holoviz_theme.svg?colorB=cc77dd)](https://pypi.python.org/pypi/sphinx_holoviz_theme) [![sphinx_holoviz_theme version](https://img.shields.io/conda/v/pyviz/sphinx_holoviz_theme.svg?colorB=4488ff&style=flat)](https://anaconda.org/pyviz/sphinx_holoviz_theme) [![conda-forge version](https://img.shields.io/conda/v/conda-forge/sphinx_holoviz_theme.svg?label=conda%7Cconda-forge&colorB=4488ff)](https://anaconda.org/conda-forge/sphinx_holoviz_theme) |

## What is it?
sphinx_holoviz_theme is the theme that is used when building sites in the
[HoloViz](https://holoviz.org) ecosystem. This theme is best used in conjunction
with [nbsite](https://github/pyviz-dev/nbsite). See the [nbsite docs](https://nbsite.pyviz.org)
for examples.

## How to use

To use this theme: `pip/conda install sphinx_holoviz_theme` and set html_theme to sphinx_holoviz_theme. To control the look and feel, change html_theme_options in conf.py:

```python
html_static_path += ['_static']
html_theme = 'sphinx_holoviz_theme'
html_theme_options = {
'custom_css': 'site.css',
'logo': 'nbsite-logo.png',
'favicon': 'favicon.ico',
'primary_color': '#F16A25',
'primary_color_dark': '#B5501C',
'secondary_color': '#F5C33C',
'second_nav': False,
}
```

- logo and favicon: provide paths relative to html_static_path (doc/_static by default)
- primary_color, primary_color_dark and secondary_color: control the colors that the
website uses for header, nav, links... These can be css named colors, or hex colors.
- second_nav: Boolean indicating whether to use a second nav bar.
- custom_css: path relative to html_static_path overriding styles.
Styles come first from the theme's main.css_t, which is populated with the
colors options, then extended/overridden by your site's own css.

**NOTE:** Only use the custom_css to overwrite small pieces of the css not to make
general improvements. If you have general improvements, please open a PR on the this repo.



## About HoloViz

sphinx_holoviz_theme is part of the HoloViz ecosystem for making high-level tools to simplify
visualization in Python. See [holoviz.org](http://holoviz.org) for related packages that you
can use with sphinx_holoviz_theme and [status.pyviz.org](http://status.pyviz.org) for the
current status of each HoloViz project.
17 changes: 9 additions & 8 deletions conda.recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% set sdata = load_setup_py_data() %}

package:
name: sphinx_ioam_theme
version: {{ sdata['version'] | replace('v','') }}
name: sphinx_holoviz_theme
version: {{ sdata['version'] }}

source:
path: ..
Expand All @@ -13,18 +13,19 @@ build:

requirements:
build:
- python
- python {{ sdata['python_requires'] }}
{% for dep in sdata.get('extras_require', {}).get('build', []) %}
- {{ dep }}
{% endfor %}
run:
- python {{ sdata['python_requires'] }}
{% for dep in sdata.get('install_requires',{}) %}
- {{ dep }}
{% endfor %}

{% for option in sdata.get('extras_require',{}) %}
{% for dep in sdata['extras_require'][option] %}
- {{ dep }}
{% endfor %}
{% endfor %}
test:
imports:
- sphinx_holoviz_theme

about:
home: {{ sdata['url'] }}
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ license_file = LICENSE.txt

[versioneer]
VCS = git
versionfile_source = sphinx_ioam_theme/_version.py
versionfile_build = sphinx_ioam_theme/_version.py
versionfile_source = sphinx_holoviz_theme/_version.py
versionfile_build = sphinx_holoviz_theme/_version.py
tag_prefix =
parentdir_prefix = sphinx_ioam_theme-
parentdir_prefix = sphinx_holoviz_theme-
style = pep440-pre
16 changes: 9 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@
import versioneer

setup_args = dict(
name='sphinx_ioam_theme',
name='sphinx_holoviz_theme',
version=versioneer.get_version(),
url="https://github.com/ioam/sphinx_ioam_theme",
description="For nbsite",
url="https://github.com/pyviz-dev/sphinx_holoviz_theme",
description="Theme for building HoloViz sites; best when used with nbsite.",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
license="BSD-3",
zip_safe=False,
packages=['sphinx_ioam_theme'],
package_data={'sphinx_ioam_theme': [
packages=['sphinx_holoviz_theme'],
package_data={'sphinx_holoviz_theme': [
'theme.conf',
'*.html',
'includes/*.html',
'static/css/*.css',
'static/css/*.css_t',
'static/js/*.js',
'static/images/*.*'
]},
include_package_data=True,
entry_points = {
'sphinx.html_themes': [
'sphinx_ioam_theme = sphinx_ioam_theme',
'sphinx_holoviz_theme = sphinx_holoviz_theme',
]
},
python_requires = ">=2.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
from os import path

import os
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions

def setup(app):
app.add_html_theme('sphinx_ioam_theme', path.abspath(path.dirname(__file__)))

app.add_html_theme('sphinx_holoviz_theme', os.path.abspath(os.path.dirname(__file__)))
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def get_config():
cfg.VCS = "git"
cfg.style = "pep440-pre"
cfg.tag_prefix = ""
cfg.parentdir_prefix = "sphinx_ioam_theme-"
cfg.versionfile_source = "sphinx_ioam_theme/_version.py"
cfg.parentdir_prefix = "sphinx_holoviz_theme-"
cfg.versionfile_source = "sphinx_holoviz_theme/_version.py"
cfg.verbose = False
return cfg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<button type="submit">
<img src="https://raw.githubusercontent.com/thoughtbot/refills/master/source/images/search-icon-black.png" alt="Search Icon">
</button>
</form>
</form>

98 changes: 69 additions & 29 deletions sphinx_ioam_theme/layout.html → sphinx_holoviz_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% if title == "&lt;no title&gt;" %}
<title>{{ shorttitle|striptags|e }}</title>
{% else %}
<title>{{ title|striptags|e }} &mdash; {{ shorttitle|striptags|e }}</title>
<title>{{ title|striptags|e }} &mdash; {{ shorttitle|striptags|e }}</title>
{% endif %}
<meta name="description" content="{{ DESCRIPTION }}">
<meta name="author" content="{{ AUTHOR }}">
Expand Down Expand Up @@ -38,7 +38,7 @@
{% if theme_custom_css %}
<link rel="stylesheet" href="{{ pathto('_static/' + theme_custom_css, 1) }}">
{% endif %}

<!-- Scripts
–––––––––––––––––––––––––––––––––––––––––––––––––– -->

Expand All @@ -61,25 +61,52 @@

</head>
<body class="">

{% if theme_first_nav|tobool %}
<header class="navigation">
<div class="wrapper">
<a href="{{ pathto('index') }}" class="logo">
<img src="{{ pathto('_static/' + theme_logo, 1) }}" alt="Logo">
</a>
<a href="{{ pathto('index') }}" class="navigation-menu logo-text">{{ PROJECT }}</a>
{% if theme_include_logo_text|tobool %}
<a href="{{ pathto('index') }}" class="navigation-menu logo-text">{{ PROJECT }}</a>
{% endif %}
<a href="javascript:void(0)" class="navigation-menu-button" id="js-mobile-menu">Menu</a>
<nav>
<ul id="js-navigation-menu" class="navigation-menu show">
{% for name, link in NAV %}
<li class="nav-link"><a href="{{ pathto(link) }}">{{ name }}</a></li>
{% endfor %}
<li class="nav-link"><div style="display:inline-block;vertical-align: middle;"><div class="search-bar">{% include 'includes/searchbox.html' %}</div></div></li>
{% if theme_second_nav|tobool %}
{% for name, link in SOCIAL %}
<li class="nav-link doc-head"><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
{% else %}
{% for name, link in NAV %}
<li class="nav-link doc-head"><a href="{{ pathto(link) }}">{{ name }}</a></li>
{% endfor %}
{% endif %}
{% if GOOGLE_SEARCH_ID %}
<li class="nav-link">
<div style="display:inline-block;vertical-align: middle;">
<div class="search-bar">
{% include 'includes/searchbox.html' %}
</div>
</div>
</li>
{% endif %}
</ul>
</nav>

</div>
</header>
{% endif %}
{% if theme_second_nav|tobool %}
<div class="second-nav">
<nav>
<ul class="navigation-menu show">
{% for name, link in NAV %}
<li class="nav-link doc-head"><a href="{{ pathto(link) }}">{{ name }}</a></li>
{% endfor %}
</ul>
</nav>
</div>
{% endif %}

<!-- MAIN BODY OF DOCS –––––––––––––––––– -->
<div class="docs section">
Expand All @@ -95,28 +122,41 @@

<!-- END MAIN BODY OF DOCS ––––––––––––– -->

<footer class="footer">
<div class="footer-links">
<ul>
<li><span class="footer-title">Links</span></li>
{% for name, link in LINKS %}
<li><a href="{{ pathto(link) }}">{{ name }}</a></li>
{% endfor %}
</ul>
<ul>
<li><span class="footer-title">Join Us</span></li>
{% for name, link in SOCIAL %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
<ul class="copyright">
<li>{{ copyright }}</li>
</ul>
</div>
</footer>
{% if theme_footer|tobool %}
<footer class="footer">
<div class="footer-links">
<ul>
<li><span class="footer-title">Links</span></li>
{% for name, link in LINKS %}
<li><a href="{{ pathto(link) }}">{{ name }}</a></li>
{% endfor %}
</ul>
<ul>
<li><span class="footer-title">Join Us</span></li>
{% for name, link in SOCIAL %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
<ul class="copyright">
<li>{{ copyright }}</li>
</ul>
</div>
</footer>
{% endif %}


<!-- Google Analytics -->
{% include 'includes/ga.html' %}
{% if GOOGLE_ANALYTICS_UA %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ GOOGLE_ANALYTICS_UA }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '{{ GOOGLE_ANALYTICS_UA }}', { 'anonymize_ip': true });
</script>
{% endif %}

<!-- MathJax Config -->
<script type="text/x-mathjax-config">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
<span id="search-progress" style="padding-left: 10px"></span>
</form>

{% if GOOGLE_SEARCH_ID %}
<div id="search-results">
<script>
(function() {
var cx = '006807479272082416678:p6n_f0d8taw';
var cx = '{{ GOOGLE_SEARCH_ID }}';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
Expand All @@ -33,7 +34,7 @@ <h1 id="search-documentation">{{ _('Search') }}</h1>
})();
</script>
<gcse:searchresults-only></gcse:searchresults-only>

</div>
{% endif %}

{% endblock %}
Loading