mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Merge pull request #494 from jessetan/style-external-links-option
Add option to style external links
This commit is contained in:
commit
b40d5e8c50
@ -96,7 +96,8 @@ file of this repository, and can be defined in your project's ``conf.py`` via
|
|||||||
'includehidden': True
|
'includehidden': True
|
||||||
'logo_only':
|
'logo_only':
|
||||||
'display_version': True
|
'display_version': True
|
||||||
'prev_next_buttons_location': bottom
|
'prev_next_buttons_location': bottom,
|
||||||
|
'style_external_links': False
|
||||||
}
|
}
|
||||||
|
|
||||||
The following options are available:
|
The following options are available:
|
||||||
@ -107,6 +108,7 @@ The following options are available:
|
|||||||
* ``includehidden`` Specifies if the global toctree includes toctrees marked with the `:hidden:` option
|
* ``includehidden`` Specifies if the global toctree includes toctrees marked with the `:hidden:` option
|
||||||
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
|
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
|
||||||
and will display the "Next" and "Previous" buttons accordingly
|
and will display the "Next" and "Previous" buttons accordingly
|
||||||
|
* ``style_external_links`` Add an icon next to external links. Defaults to ``False``.
|
||||||
|
|
||||||
Page-level configuration
|
Page-level configuration
|
||||||
------------------------
|
------------------------
|
||||||
|
@ -33,13 +33,15 @@
|
|||||||
// Usually it's a good idea to give images some space.
|
// Usually it's a good idea to give images some space.
|
||||||
.section > img, .section > a > img
|
.section > img, .section > a > img
|
||||||
margin-bottom: $base-line-height
|
margin-bottom: $base-line-height
|
||||||
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
|
|
||||||
// a.reference.external:after
|
// Style external links
|
||||||
// font-family: FontAwesome
|
&.style-external-links a.reference.external:after
|
||||||
// content: " \f08e "
|
font-family: FontAwesome
|
||||||
// color: $text-light
|
content: "\f08e"
|
||||||
// vertical-align: super
|
color: $text-light
|
||||||
// font-size: 60%
|
vertical-align: super
|
||||||
|
font-size: 60%
|
||||||
|
margin: 0 0.2em
|
||||||
|
|
||||||
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
|
// For the most part, its safe to assume that sphinx wants you to use a blockquote as an indent. It gets
|
||||||
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.
|
// used in many different ways, so don't assume you can apply some fancy style, just leave it be.
|
||||||
|
@ -159,7 +159,11 @@
|
|||||||
|
|
||||||
{# PAGE CONTENT #}
|
{# PAGE CONTENT #}
|
||||||
<div class="wy-nav-content">
|
<div class="wy-nav-content">
|
||||||
|
{% if (theme_style_external_links == 'True') %}
|
||||||
|
<div class="rst-content style-external-links">
|
||||||
|
{% else %}
|
||||||
<div class="rst-content">
|
<div class="rst-content">
|
||||||
|
{% endif %}
|
||||||
{% include "breadcrumbs.html" %}
|
{% include "breadcrumbs.html" %}
|
||||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
<div itemprop="articleBody">
|
<div itemprop="articleBody">
|
||||||
|
@ -14,3 +14,4 @@ includehidden = True
|
|||||||
logo_only =
|
logo_only =
|
||||||
display_version = True
|
display_version = True
|
||||||
prev_next_buttons_location = bottom
|
prev_next_buttons_location = bottom
|
||||||
|
style_external_links = False
|
||||||
|
Loading…
Reference in New Issue
Block a user