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
|
||||
'logo_only':
|
||||
'display_version': True
|
||||
'prev_next_buttons_location': bottom
|
||||
'prev_next_buttons_location': bottom,
|
||||
'style_external_links': False
|
||||
}
|
||||
|
||||
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
|
||||
* ``prev_next_buttons_location`` can take the value ``bottom``, ``top``, ``both`` , or ``None``
|
||||
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
|
||||
------------------------
|
||||
|
@ -33,13 +33,15 @@
|
||||
// Usually it's a good idea to give images some space.
|
||||
.section > img, .section > a > img
|
||||
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
|
||||
// font-family: FontAwesome
|
||||
// content: " \f08e "
|
||||
// color: $text-light
|
||||
// vertical-align: super
|
||||
// font-size: 60%
|
||||
|
||||
// Style external links
|
||||
&.style-external-links a.reference.external:after
|
||||
font-family: FontAwesome
|
||||
content: "\f08e"
|
||||
color: $text-light
|
||||
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
|
||||
// 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 #}
|
||||
<div class="wy-nav-content">
|
||||
{% if (theme_style_external_links == 'True') %}
|
||||
<div class="rst-content style-external-links">
|
||||
{% else %}
|
||||
<div class="rst-content">
|
||||
{% endif %}
|
||||
{% include "breadcrumbs.html" %}
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
@ -14,3 +14,4 @@ includehidden = True
|
||||
logo_only =
|
||||
display_version = True
|
||||
prev_next_buttons_location = bottom
|
||||
style_external_links = False
|
||||
|
Loading…
Reference in New Issue
Block a user