diff --git a/Gruntfile.js b/Gruntfile.js
index 9292ce56..efb3bee5 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -19,6 +19,14 @@ module.exports = function(grunt) {
}
}
},
+ copy: {
+ fonts: {
+ files: [
+ // includes files within path
+ {expand: true, flatten: true, src: ['bower_components/font-awesome/fonts/*'], dest: 'sphinx_rtd_theme/static/fonts/', filter: 'isFile'}
+ ]
+ }
+ },
compass: {
build: {
@@ -45,7 +53,8 @@ module.exports = function(grunt) {
}
},
clean: {
- build: ["demo_docs/build"]
+ build: ["demo_docs/build"],
+ fonts: ["sphinx_rtd_theme/static/fonts"]
},
watch: {
@@ -73,8 +82,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-open');
+ grunt.registerTask('fonts', ['clean:fonts','copy:fonts']);
grunt.registerTask('default', ['exec:bower_update','clean:build','compass:dev','exec:build_sphinx','connect','open','watch']);
grunt.registerTask('build', ['exec:bower_update','clean:build','compass:build','exec:build_sphinx']);
}
diff --git a/README.rst b/README.rst
index dbb67121..ce463e5b 100644
--- a/README.rst
+++ b/README.rst
@@ -159,6 +159,5 @@ you can add something like this to your config. Thanks to Daniel Oaks for this.
TODO
====
-* Update to font-awesome 4.0 and have it build from bower, not the copy/paste hack I have now.
* Separate some sass variables at the theme level so you can overwrite some basic colors.
diff --git a/compass.rb b/compass.rb
index a5dc816e..41f0b9d9 100644
--- a/compass.rb
+++ b/compass.rb
@@ -18,6 +18,7 @@ fonts_dir = "font"
add_import_path "../../bower_components/bourbon/app/assets/stylesheets"
add_import_path "../../bower_components/neat/app/assets/stylesheets"
add_import_path "../../bower_components/wyrm/sass"
+add_import_path "../../bower_components/font-awesome/scss"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
diff --git a/demo_docs/source/demo.rst b/demo_docs/source/demo.rst
index 5f46e117..9c4e9f81 100644
--- a/demo_docs/source/demo.rst
+++ b/demo_docs/source/demo.rst
@@ -435,6 +435,12 @@ A figure directive:
This paragraph is also part of the legend.
+A figure directive with center alignment
+
+.. figure:: images/title.png
+ :align: center
+ :width: 300
+
Admonitions
```````````
diff --git a/package.json b/package.json
index 963416a3..5dbb8967 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,7 @@
"grunt-contrib-watch": "~0.4.3",
"grunt-contrib-connect": "0.5.0",
"grunt-contrib-clean": "0.5.0",
+ "grunt-contrib-copy": "0.5.0",
"connect-livereload": "~0.3.0",
"grunt-exec": "~0.4.2",
"grunt-open": "0.2.2",
diff --git a/sass/_theme_badge.sass b/sass/_theme_badge.sass
index a5c8d9b5..bde70927 100644
--- a/sass/_theme_badge.sass
+++ b/sass/_theme_badge.sass
@@ -22,8 +22,10 @@
cursor: pointer
color: $green
+clearfix
- .icon
+ .fa
color: $section-background-color
+ .fa-book
+ float: left
.icon-book
float: left
&.rst-out-of-date
@@ -62,8 +64,12 @@
max-width: $nav-desktop-width
.icon-book
float: none
+ .fa-book
+ float: none
&.shift-up .rst-current-version
text-align: right
+ .fa-book
+ float: left
.icon-book
float: left
.rst-current-version
diff --git a/sass/_theme_badge_fa.sass b/sass/_theme_badge_fa.sass
index 6230b943..040c1a8d 100644
--- a/sass/_theme_badge_fa.sass
+++ b/sass/_theme_badge_fa.sass
@@ -2,7 +2,7 @@
+font-face(fontawesome-webfont, '#{$font-awesome-dir}fontawesome_webfont')
-.icon:before
+.fa:before
display: inline-block
font-family: fontawesome-webfont
font-style: normal
@@ -11,43 +11,58 @@
text-decoration: inherit
+font-smooth
-a .icon
+a .fa
display: inline-block
text-decoration: inherit
li
- .icon
+ .fa
display: inline-block
- .icon-large:before,
- .icon-large:before
- /* 1.5 increased font size for icon-large * 1.25 width
+ .fa-large:before,
+ .fa-large:before
+ /* 1.5 increased font size for fa-large * 1.25 width
width: 1.5 * 1.25em
-ul.icons
+ul.fas
list-style-type: none
margin-left: 2em
text-indent: -0.8em
li
- .icon
+ .fa
width: .8em
- .icon-large:before,
- .icon-large:before
- /* 1.5 increased font size for icon-large * 1.25 width
+ .fa-large:before,
+ .fa-large:before
+ /* 1.5 increased font size for fa-large * 1.25 width
vertical-align: baseline
// width: 1.5*1.25em
+.fa-book:before
+ content: "\f02d"
+
.icon-book:before
content: "\f02d"
+.fa-caret-down:before
+ content: "\f0d7"
+
.icon-caret-down:before
content: "\f0d7"
+.fa-caret-up:before
+ content: "\f0d8"
+
.icon-caret-up:before
content: "\f0d8"
+.fa-caret-left:before
+ content: "\f0d9"
+
.icon-caret-left:before
content: "\f0d9"
+.fa-caret-right:before
+ content: "\f0da"
+
.icon-caret-right:before
content: "\f0da"
diff --git a/sass/_theme_font_awesome_compatability.sass b/sass/_theme_font_awesome_compatability.sass
new file mode 100644
index 00000000..e2420c98
--- /dev/null
+++ b/sass/_theme_font_awesome_compatability.sass
@@ -0,0 +1,20 @@
+.icon
+ @extend .fa
+.icon-home
+ @extend .fa-home
+.icon-search
+ @extend .fa-search
+.icon-book
+ @extend .fa-book
+.icon-caret-down
+ @extend .fa-caret-down
+.icon-github
+ @extend .fa-github
+.icon-bitbucket
+ @extend .fa-bitbucket
+.icon-fire
+ @extend .fa-fire
+.icon-circle-arrow-right
+ @extend .fa-arrow-circle-right
+.icon-circle-arrow-left
+ @extend .fa-arrow-circle-left
diff --git a/sass/_theme_rst.sass b/sass/_theme_rst.sass
index 562a399a..e4aefd68 100644
--- a/sass/_theme_rst.sass
+++ b/sass/_theme_rst.sass
@@ -19,6 +19,12 @@
max-width: 100%
height: auto !important
+ div.figure
+ margin-bottom: $base-line-height
+
+ div.figure.align-center
+ text-align: center
+
// Usually it's a good idea to give images some space.
.section > img
margin-bottom: $base-line-height
@@ -45,8 +51,8 @@
margin-bottom: 0
.admonition-title
@extend .wy-alert-title
- @extend .icon
- @extend .icon-exclamation-sign
+ @extend .fa
+ @extend .fa-exclamation-circle
&:before
margin-right: 4px
.note, .seealso
@@ -98,7 +104,7 @@
display: none
visibility: hidden
font-size: 14px
- @extend .icon
+ @extend .fa
&:after
visibility: visible
content: "\f0c1"
@@ -186,6 +192,9 @@
.xref, a &
font-weight: bold
+ // If the literal is inside an a tag, let's color it like a link
+ a tt
+ color: $link-color
dl
margin-bottom: $base-line-height
dt
diff --git a/sass/theme.sass b/sass/theme.sass
index cdff2718..5c0aee32 100644
--- a/sass/theme.sass
+++ b/sass/theme.sass
@@ -29,8 +29,11 @@
// Wyrm mixins
@import wyrm_core/mixin
+// Font Awesome 4.0 with wyrm extras
+@import font-awesome
+@import wyrm_core/font_awesome_extra
+
// Wyrm core styles used in this theme
-@import wyrm_core/font_awesome
@import wyrm_core/alert
@import wyrm_core/button
@import wyrm_core/dropdown
@@ -50,3 +53,4 @@
@import theme_badge
@import theme_rst
@import theme_mathjax
+@import theme_font_awesome_compatability
diff --git a/sphinx_rtd_theme/breadcrumbs.html b/sphinx_rtd_theme/breadcrumbs.html
index 982c856f..d9b29371 100644
--- a/sphinx_rtd_theme/breadcrumbs.html
+++ b/sphinx_rtd_theme/breadcrumbs.html
@@ -7,9 +7,9 @@
{{ title }}
{% if display_github %}
- Edit on GitHub
+ Edit on GitHub
{% elif display_bitbucket %}
- Edit on Bitbucket
+ Edit on Bitbucket
{% elif show_source and has_source and sourcename %}
View page source
{% endif %}
diff --git a/sphinx_rtd_theme/footer.html b/sphinx_rtd_theme/footer.html
index c740b24c..21a6b55d 100644
--- a/sphinx_rtd_theme/footer.html
+++ b/sphinx_rtd_theme/footer.html
@@ -2,10 +2,10 @@
{% if next or prev %}
{% endif %}
diff --git a/sphinx_rtd_theme/layout.html b/sphinx_rtd_theme/layout.html
index 831c3841..9e746f74 100644
--- a/sphinx_rtd_theme/layout.html
+++ b/sphinx_rtd_theme/layout.html
@@ -82,7 +82,7 @@
{# SIDE NAV, TOGGLES ON MOBILE #}