mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Merge branch 'master' into increase-color-accessibility
This commit is contained in:
commit
ece48667b9
28
Gruntfile.js
28
Gruntfile.js
@ -4,6 +4,9 @@ module.exports = function(grunt) {
|
||||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
||||
|
||||
grunt.initConfig({
|
||||
// Read package.json
|
||||
pkg: grunt.file.readJSON("package.json"),
|
||||
|
||||
open : {
|
||||
dev: {
|
||||
path: 'http://localhost:1919'
|
||||
@ -46,14 +49,6 @@ module.exports = function(grunt) {
|
||||
'bower_components/robotoslab-googlefont/RobotoSlab-Regular.ttf'],
|
||||
dest: 'sphinx_rtd_theme/static/fonts/',
|
||||
filter: 'isFile'
|
||||
},
|
||||
{
|
||||
expand: true,
|
||||
flatten: true,
|
||||
src: ['bower_components/inconsolata-googlefont/Inconsolata-Bold.ttf',
|
||||
'bower_components/inconsolata-googlefont/Inconsolata-Regular.ttf'],
|
||||
dest: 'sphinx_rtd_theme/static/fonts/',
|
||||
filter: 'isFile'
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -131,6 +126,19 @@ module.exports = function(grunt) {
|
||||
}]
|
||||
}
|
||||
},
|
||||
usebanner: {
|
||||
dist: {
|
||||
options: {
|
||||
position: 'top',
|
||||
banner: '/* <%= pkg.name %> version <%= pkg.version %> | MIT license */\n' +
|
||||
'/* Built <%= grunt.template.today("yyyymmdd HH:mm") %> */',
|
||||
linebreak: true
|
||||
},
|
||||
files: {
|
||||
src: [ 'sphinx_rtd_theme/static/js/theme.js', 'sphinx_rtd_theme/static/css/theme.css' ]
|
||||
}
|
||||
}
|
||||
},
|
||||
exec: {
|
||||
bower_update: {
|
||||
cmd: 'bower update'
|
||||
@ -180,6 +188,6 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-open');
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
|
||||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','exec:build_sphinx','connect','open','watch']);
|
||||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','exec:build_sphinx']);
|
||||
grunt.registerTask('default', ['exec:bower_update','clean','copy:fonts','sass:dev','browserify:dev','usebanner','exec:build_sphinx','connect','open','watch']);
|
||||
grunt.registerTask('build', ['exec:bower_update','clean','copy:fonts','sass:build','browserify:build','uglify','usebanner','exec:build_sphinx']);
|
||||
}
|
||||
|
@ -1,6 +1,4 @@
|
||||
sphinx_rtd_theme/static/fonts/Inconsolata-Bold.ttf
|
||||
sphinx_rtd_theme/static/fonts/Lato-Bold.ttf
|
||||
sphinx_rtd_theme/static/fonts/Inconsolata.ttf
|
||||
sphinx_rtd_theme/static/fonts/Lato-Regular.ttf
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
"dependencies": {
|
||||
"lato-googlefont": "*",
|
||||
"robotoslab-googlefont": "*",
|
||||
"inconsolata-googlefont": "*",
|
||||
"font-awesome": "~4.7"
|
||||
},
|
||||
"resolutions": {
|
||||
|
@ -6,11 +6,20 @@ Changelog
|
||||
Master
|
||||
======
|
||||
|
||||
New Features
|
||||
-------------
|
||||
|
||||
Fixes
|
||||
-----
|
||||
|
||||
* Color accessibility improvements on the left navigation
|
||||
|
||||
Other Changes
|
||||
--------------
|
||||
|
||||
* Write theme version and build date at top of JavaScript and CSS
|
||||
* Changed code and literals to use a native font stack (#612)
|
||||
* Fix small styling issues
|
||||
|
||||
v0.3.1
|
||||
======
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
"browserify": "^13.0.0",
|
||||
"connect-livereload": "~0.6.0",
|
||||
"grunt": "~1.0.1",
|
||||
"grunt-banner": "^0.6.0",
|
||||
"grunt-browserify": "^5.0.0",
|
||||
"grunt-contrib-clean": "^1.0.0",
|
||||
"grunt-contrib-connect": "^1.0.2",
|
||||
|
@ -1,15 +1,3 @@
|
||||
@font-face
|
||||
font-family: 'Inconsolata'
|
||||
font-style: normal
|
||||
font-weight: 400
|
||||
src: local('Inconsolata'), local('Inconsolata-Regular'), url(../fonts/Inconsolata-Regular.ttf) format('truetype')
|
||||
|
||||
@font-face
|
||||
font-family: 'Inconsolata'
|
||||
font-style: normal
|
||||
font-weight: 700
|
||||
src: local('Inconsolata Bold'), local('Inconsolata-Bold'), url(../fonts/Inconsolata-Bold.ttf) format('truetype')
|
||||
|
||||
@font-face
|
||||
font-family: 'Lato'
|
||||
font-style: normal
|
||||
|
@ -53,13 +53,20 @@
|
||||
line-height: $base-line-height
|
||||
margin-bottom: $base-line-height
|
||||
|
||||
pre.literal-block
|
||||
white-space: pre
|
||||
margin: 0
|
||||
padding: $base-line-height / 2 $base-line-height / 2
|
||||
font-family: $code-font-family
|
||||
display: block
|
||||
overflow: auto
|
||||
pre.literal-block, div[class^='highlight']
|
||||
border: 1px solid $table-border-color
|
||||
padding: 0px
|
||||
overflow-x: auto
|
||||
// 1px hack otherwise border won't show. lame
|
||||
margin: 1px 0 $base-line-height 0
|
||||
div[class^='highlight']
|
||||
padding: 0px
|
||||
border: none
|
||||
margin: 0
|
||||
// Needs 100% width for line highlighting to work properly
|
||||
@ -76,7 +83,6 @@
|
||||
white-space: pre
|
||||
margin: 0
|
||||
padding: $base-line-height / 2 $base-line-height / 2
|
||||
font-family: $code-font-family
|
||||
display: block
|
||||
overflow: auto
|
||||
& .hll
|
||||
@ -85,6 +91,7 @@
|
||||
margin: 0 -1 * $base-line-height / 2
|
||||
padding: 0 $base-line-height / 2
|
||||
pre.literal-block, div[class^='highlight'] pre, .linenodiv pre
|
||||
font-family: $code-font-family
|
||||
font-size: 12px
|
||||
line-height: normal
|
||||
|
||||
@ -132,6 +139,7 @@
|
||||
.line-block
|
||||
margin-left: 0px
|
||||
margin-bottom: $base-line-height
|
||||
line-height: $base-line-height
|
||||
.line-block .line-block
|
||||
margin-left: $base-line-height
|
||||
margin-bottom: 0px
|
||||
@ -246,6 +254,9 @@
|
||||
border-color: $table-border-color
|
||||
&:not(.field-list)
|
||||
@extend .wy-table-striped
|
||||
// Remove bottom margin for the last element (and it's last child)
|
||||
td .last, td .last :last-child
|
||||
margin-bottom: 0
|
||||
// This table is what gets spit out for auto-generated API stuff. I style it smaller bits of padding.
|
||||
table.field-list
|
||||
@extend .wy-table
|
||||
@ -265,6 +276,7 @@
|
||||
tt, code
|
||||
@extend code
|
||||
color: $black
|
||||
font-family: $code-font-family
|
||||
padding: 2px 5px
|
||||
big, em
|
||||
font-size: 100% !important
|
||||
@ -275,6 +287,8 @@
|
||||
&.xref, a &
|
||||
font-weight: bold
|
||||
color: $text-codexref-color
|
||||
pre, kbd, samp
|
||||
font-family: $code-font-family
|
||||
// If the literal is inside an a tag, let's color it like a link
|
||||
a tt, a code
|
||||
color: $link-color
|
||||
@ -282,12 +296,14 @@
|
||||
margin-bottom: $base-line-height
|
||||
dt
|
||||
font-weight: bold
|
||||
margin-bottom: $base-line-height / 2
|
||||
// Most of the content within these dls are one liners, so I halve the normal margins.
|
||||
p, table, ul, ol
|
||||
margin-bottom: $base-line-height / 2 !important
|
||||
// rST seems to want dds to be treated as the browser would, indented.
|
||||
dd
|
||||
margin: 0 0 $base-line-height / 2 $base-line-height
|
||||
line-height: $base-line-height
|
||||
// This is what Sphinx spits out for it's autodocs. Depending upon what language the person is referencing
|
||||
// these things usually have a class of "method" or "class" or something similar, but really who knows.
|
||||
// Sphinx doesn't give me a generic class on these, so unfortunately I have to apply it to the root dl.
|
||||
|
@ -63,4 +63,4 @@ $highlight-color: $yellow
|
||||
$base-font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif
|
||||
$custom-font-family: "Roboto Slab", "ff-tisa-web-pro", "Georgia", Arial, sans-serif
|
||||
$custom-font-family2: Georgia, serif
|
||||
$code-font-family: Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace
|
||||
$code-font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user