Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 21 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ See the LICENSE file for specific terms.
Authors
=======

.. start-authors

Sphinx template, css, packaging
-------------------------------
* tell-k <ffk2005 at gmail.com>
Expand All @@ -71,21 +73,31 @@ Great thanks!
History
=======

0.5.0(May 6, 2019)
0.6.0 (Jan 8, 2026)
---------------------

* Fix ``'style' variable undefined`` error for Sphinx >= 7.x
* Fix deprecated 'css_files' and 'script_files' backwards-compability; it's
``cssfile.filename`` and ``scriptfile.filename``
for Sphinx >= 9.0.
* Fix setup.py and setup.cfg: build-base -> build_base, add
PytestCommand

0.5.0 (May 6, 2019)
---------------------

* `Fix deprecated app.info warning, removed in Sphinx 2.x <https://github.com/tell-k/sphinxjp.themes.basicstrap/pull/25>`_
* Drop support Python2.6, Python2.7, Python3.3
* Fix pytest integration.

0.4.3(May 7, 2015)
0.4.3 (May 7, 2015)
---------------------
* `#19 ENH: Add id=content-wrapper to content column div for CSS. <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/19>`_
* Update Bootstrap ver3.3.4
* Update Font Awesome ver4.3.0
* Update jQuery ver1.11.1

0.4.2(Feb 16, 2015)
0.4.2 (Feb 16, 2015)
---------------------

* `#18 Header search box. <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/18>`_
Expand All @@ -96,12 +108,12 @@ History
* Fixed bug `#13 Invalid body css. <https://github.com/tell-k/sphinxjp.themes.basicstrap/pull/13>`_ Thanks to 3rdarm.
* Support wheel format.

0.4.1(Sep 29, 2014)
0.4.1 (Sep 29, 2014)
---------------------

* Fixed bug `#11 Font Icon does not appear. <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/11>`_.

0.4.0(Sep 29, 2014)
0.4.0 (Sep 29, 2014)
---------------------

* `#8 Navbar hides initial content when jumping to in-page anchor <https://github.com/tell-k/sphinxjp.themes.basicstrap/pull/8>`_.
Expand All @@ -118,18 +130,18 @@ History
* Remove bootstrap.py and buildout.cfg
* Starting Travis CI and Coveralls.

0.3.2(Dec 31, 2013)
0.3.2 (Dec 31, 2013)
---------------------

* Add tox test.
* Python3 support.

0.3.1(Nov 4, 2013)
0.3.1 (Nov 4, 2013)
---------------------
* Update stylesheet for 'h1_size' - 'h6_size' options.
* Changed. When you visit in the smartphone, GoogleWeb fonts to not used.

0.3.0(Jun 28, 2013)
0.3.0 (Jun 28, 2013)
---------------------
* Fixed bug `#5 "Goolgle Web Font" is not reflected <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/5>`_.
* Update Twitter Bootstrap ver2.3.2
Expand All @@ -139,7 +151,7 @@ History
* Add new Innner Theme `geo-bootstrap <http://divshot.github.io/geo-bootstrap/>`_.
* Add new option of html_theme_optios. 'h1_size' - 'h6_size'.

0.2.0(Feb 11, 2013)
0.2.0 (Feb 11, 2013)
---------------------
* Fixed bug `#1 "Quick Search" in the table of contents is missing <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/1>`_.
* `#2 adding "navbar-inverse" option <https://github.com/tell-k/sphinxjp.themes.basicstrap/issues/4>`_.
Expand Down
20 changes: 20 additions & 0 deletions docs/customization.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
====================
Customization
====================

Overriding the Default Stylesheet
=================================

The theme allows you to override the main stylesheet (which defaults to ``css/basicstrap.css``) by setting the ``style`` variable in ``html_context`` within your ``conf.py``.

This is useful if you want to completely replace the base styles or provide a different CSS file located in your ``_static`` directory.

Example configuration in `conf.py`:

.. code-block:: python

html_context = {
'style': 'my_custom_style.css',
}

In this example, Sphinx will look for ``_static/my_custom_style.css`` and use it instead of the default theme CSS.
5 changes: 3 additions & 2 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
History and Authors
=====================

.. include:: ../src/HISTORY.txt
.. include:: ../src/AUTHORS.txt
.. include:: ../README.rst
:start-after: .. start-authors
:end-before: .. |travis|
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ Contents
options
design
sample
customization
history

3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
;tag_build = dev

[build]
build-base = _build
build_base = _build

[sdist]
formats = gztar
Expand All @@ -15,7 +15,6 @@ strict = 1

[aliases]
release = sdist bdist_wheel
test = pytest

[tool:pytest]
addopts = -vv --cov sphinxjp --cov-report term-missing
28 changes: 19 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- coding: utf-8 -*-
import re
import os

from setuptools import setup, find_packages

import sys
from setuptools import setup, find_packages, Command

here = os.path.dirname(__file__)

Expand All @@ -17,9 +16,7 @@
'Sphinx',
]

setup_requires = [
"pytest-runner"
]
setup_requires = []

tests_require = [
'pytest-cov',
Expand All @@ -33,7 +30,6 @@

classifiers = [
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
Expand All @@ -48,6 +44,18 @@
'Topic :: Text Processing :: Markup',
]

class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import subprocess
print("Running tests with pytest...")
errno = subprocess.call([sys.executable, '-m', 'pytest'])
raise SystemExit(errno)

setup(
name='sphinxjp.themes.basicstrap',
version=version,
Expand All @@ -59,12 +67,14 @@
author_email='ffk2005@gmail.com',
url='https://github.com/tell-k/sphinxjp.themes.basicstrap',
license='MIT',
namespace_packages=['sphinxjp', 'sphinxjp.themes'],
packages=find_packages('src', exclude=['tests']),
package_dir={'': 'src'},
setup_requires=setup_requires,
install_requires=install_requires,
tests_require=tests_require,
extras_require={
'test': tests_require,
},
cmdclass={'test': PyTest},
include_package_data=True,
entry_points={
'sphinx.html_themes': [
Expand Down
10 changes: 6 additions & 4 deletions src/sphinxjp/themes/basicstrap/templates/basicstrap/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@
};
</script>
{%- for scriptfile in script_files %}
{%- if scriptfile == '_static/jquery.js' %}
{%- set scriptfile_url = scriptfile.filename|default(scriptfile) %}
{%- if scriptfile_url == '_static/jquery.js' %}
<script type="text/javascript" src="{{ pathto('_static/js/jquery.min.js', 1) }}"></script>
{%- else %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
<script type="text/javascript" src="{{ pathto(scriptfile_url, 1) }}"></script>
{%- endif %}
{%- endfor %}
<script type="text/javascript" src="{{ pathto('_static/js/jquery.cookie.min.js', 1) }}"></script>
Expand Down Expand Up @@ -171,10 +172,11 @@
}
</style>
{% endif %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
{% set style_path = style|default('css/basicstrap.css') %}
<link rel="stylesheet" href="{{ pathto('_static/' + style_path, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto(cssfile.filename|default(cssfile), 1) }}" type="text/css" />
{%- endfor %}
{%- if (not theme_noresponsive|tobool) and theme_bootstrap_version == "2" %}
<link rel="stylesheet" href="{{ pathto('_static/css/bootstrap2/bootstrap-responsive.min.css', 1) }}" type="text/css" />
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py34,py35,py36,py37,flake8
envlist=py310,py312,py313,py314,flake8

[testenv]
commands=
Expand Down