mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Merging upstream
This commit is contained in:
commit
abbd075ebe
43
Gruntfile.js
43
Gruntfile.js
|
@ -28,19 +28,32 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
compass: {
|
sass: {
|
||||||
build: {
|
|
||||||
options: {
|
|
||||||
config: 'compass.rb',
|
|
||||||
environment: 'production',
|
|
||||||
force: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dev: {
|
dev: {
|
||||||
options: {
|
options: {
|
||||||
config: 'compass.rb',
|
style: 'expanded',
|
||||||
force: true
|
loadPath: ['bower_components/bourbon/app/assets/stylesheets', 'bower_components/neat/app/assets/stylesheets', 'bower_components/font-awesome/scss', 'bower_components/wyrm/sass']
|
||||||
}
|
},
|
||||||
|
files: [{
|
||||||
|
expand: true,
|
||||||
|
cwd: 'sass',
|
||||||
|
src: ['*.sass'],
|
||||||
|
dest: 'sphinx_rtd_theme/static/css',
|
||||||
|
ext: '.css'
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
options: {
|
||||||
|
style: 'compressed',
|
||||||
|
loadPath: ['bower_components/bourbon/app/assets/stylesheets', 'bower_components/neat/app/assets/stylesheets', 'bower_components/font-awesome/scss', 'bower_components/wyrm/sass']
|
||||||
|
},
|
||||||
|
files: [{
|
||||||
|
expand: true,
|
||||||
|
cwd: 'sass',
|
||||||
|
src: ['*.sass'],
|
||||||
|
dest: 'sphinx_rtd_theme/static/css',
|
||||||
|
ext: '.css'
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -61,7 +74,7 @@ module.exports = function(grunt) {
|
||||||
/* Compile sass changes into theme directory */
|
/* Compile sass changes into theme directory */
|
||||||
sass: {
|
sass: {
|
||||||
files: ['sass/*.sass', 'bower_components/**/*.sass'],
|
files: ['sass/*.sass', 'bower_components/**/*.sass'],
|
||||||
tasks: ['compass:dev']
|
tasks: ['sass:dev']
|
||||||
},
|
},
|
||||||
/* Changes in theme dir rebuild sphinx */
|
/* Changes in theme dir rebuild sphinx */
|
||||||
sphinx: {
|
sphinx: {
|
||||||
|
@ -80,13 +93,13 @@ module.exports = function(grunt) {
|
||||||
grunt.loadNpmTasks('grunt-exec');
|
grunt.loadNpmTasks('grunt-exec');
|
||||||
grunt.loadNpmTasks('grunt-contrib-connect');
|
grunt.loadNpmTasks('grunt-contrib-connect');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
grunt.loadNpmTasks('grunt-contrib-compass');
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
grunt.loadNpmTasks('grunt-open');
|
grunt.loadNpmTasks('grunt-open');
|
||||||
|
|
||||||
grunt.registerTask('fonts', ['clean:fonts','copy:fonts']);
|
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('default', ['exec:bower_update','clean:build','sass:dev','exec:build_sphinx','connect','open','watch']);
|
||||||
grunt.registerTask('build', ['exec:bower_update','clean:build','compass:build','exec:build_sphinx']);
|
grunt.registerTask('build', ['exec:bower_update','clean:build','sass:build','exec:build_sphinx']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ Contributing or modifying the theme
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
The sphinx_rtd_theme is primarily a sass_ project that requires a few other sass libraries. I'm
|
The sphinx_rtd_theme is primarily a sass_ project that requires a few other sass libraries. I'm
|
||||||
using bower_ to manage these dependencies and compass_ to build the css. The good news is
|
using bower_ to manage these dependencies and sass_ to build the css. The good news is
|
||||||
I have a very nice set of grunt_ operations that will not only load these dependecies, but watch
|
I have a very nice set of grunt_ operations that will not only load these dependecies, but watch
|
||||||
for changes, rebuild the sphinx demo docs and build a distributable version of the theme.
|
for changes, rebuild the sphinx demo docs and build a distributable version of the theme.
|
||||||
The bad news is this means you'll need to set up your environment similar to that
|
The bad news is this means you'll need to set up your environment similar to that
|
||||||
|
@ -96,11 +96,11 @@ Set up your environment
|
||||||
|
|
||||||
pip install sphinx
|
pip install sphinx
|
||||||
|
|
||||||
2. Install sass and compass
|
2. Install sass
|
||||||
|
|
||||||
.. code::
|
.. code::
|
||||||
|
|
||||||
gem install sass compass
|
gem install sass
|
||||||
|
|
||||||
2. Install node, bower and grunt.
|
2. Install node, bower and grunt.
|
||||||
|
|
||||||
|
|
40
compass.rb
40
compass.rb
|
@ -1,40 +0,0 @@
|
||||||
# Require any additional compass plugins here.
|
|
||||||
|
|
||||||
# Set this to the root of your project when deployed:
|
|
||||||
|
|
||||||
#path = File.dirname(__FILE__)
|
|
||||||
|
|
||||||
project_path = "sphinx_rtd_theme/static"
|
|
||||||
http_path = "static"
|
|
||||||
sass_path = "sass"
|
|
||||||
|
|
||||||
css_dir = "css"
|
|
||||||
javascripts_dir = "js"
|
|
||||||
images_dir = "img"
|
|
||||||
fonts_dir = "font"
|
|
||||||
|
|
||||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
|
||||||
#relative_assets = true
|
|
||||||
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
|
|
||||||
output_style = (environment == :production) ? :compressed : :expanded
|
|
||||||
|
|
||||||
# To enable relative paths to assets via compass helper functions. Uncomment:
|
|
||||||
# relative_assets = true
|
|
||||||
|
|
||||||
# To disable debugging comments that display the original location of your selectors. Uncomment:
|
|
||||||
# line_comments = false
|
|
||||||
line_comments = (environment == :production) ? false : true
|
|
||||||
|
|
||||||
|
|
||||||
# If you prefer the indented syntax, you might want to regenerate this
|
|
||||||
# project again passing --syntax sass, or you can uncomment this:
|
|
||||||
# preferred_syntax = :sass
|
|
||||||
# and then run:
|
|
||||||
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
|
|
||||||
preferred_syntax = :sass
|
|
|
@ -2,9 +2,10 @@
|
||||||
"name": "sphinx_rtd_theme",
|
"name": "sphinx_rtd_theme",
|
||||||
"version": "0.0.11",
|
"version": "0.0.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"grunt": "~0.4.1",
|
"grunt": "~0.4.1",
|
||||||
"grunt-contrib-compass": "~0.2.0",
|
"grunt-contrib-sass": "~0.7.2",
|
||||||
"grunt-contrib-watch": "~0.4.3",
|
"grunt-contrib-watch": "~0.4.3",
|
||||||
"grunt-contrib-connect": "0.5.0",
|
"grunt-contrib-connect": "0.5.0",
|
||||||
"grunt-contrib-clean": "0.5.0",
|
"grunt-contrib-clean": "0.5.0",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
// Slimmer version of FA for use on the badge_only.sass file.
|
// Slimmer version of FA for use on the badge_only.sass file.
|
||||||
|
|
||||||
+font-face(fontawesome-webfont, '#{$font-awesome-dir}fontawesome_webfont')
|
+font-face(FontAwesome, '#{$font-awesome-dir}fontawesome_webfont')
|
||||||
|
|
||||||
.fa:before
|
.fa:before
|
||||||
display: inline-block
|
display: inline-block
|
||||||
font-family: fontawesome-webfont
|
font-family: FontAwesome
|
||||||
font-style: normal
|
font-style: normal
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
line-height: 1
|
line-height: 1
|
||||||
|
|
|
@ -18,3 +18,5 @@
|
||||||
@extend .fa-arrow-circle-right
|
@extend .fa-arrow-circle-right
|
||||||
.icon-circle-arrow-left
|
.icon-circle-arrow-left
|
||||||
@extend .fa-arrow-circle-left
|
@extend .fa-arrow-circle-left
|
||||||
|
.icon-link
|
||||||
|
@extend .fa-link
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
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.
|
// Questionable whether this is nice or not. It styles eternal links, but comes with some baggage.
|
||||||
// a.reference.external:after
|
// a.reference.external:after
|
||||||
// font-family: fontawesome-webfont
|
// font-family: FontAwesome
|
||||||
// content: " \f08e "
|
// content: " \f08e "
|
||||||
// color: $text-light
|
// color: $text-light
|
||||||
// vertical-align: super
|
// vertical-align: super
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
&:after
|
&:after
|
||||||
visibility: visible
|
visibility: visible
|
||||||
content: "\f0c1"
|
content: "\f0c1"
|
||||||
font-family: fontawesome-webfont
|
font-family: FontAwesome
|
||||||
display: inline-block
|
display: inline-block
|
||||||
&:hover .headerlink
|
&:hover .headerlink
|
||||||
display: inline-block
|
display: inline-block
|
||||||
|
|
|
@ -18,20 +18,18 @@
|
||||||
// Bourbon.io/neat framework, with some default media queries
|
// Bourbon.io/neat framework, with some default media queries
|
||||||
@import wyrm_core/grid_settings
|
@import wyrm_core/grid_settings
|
||||||
@import neat
|
@import neat
|
||||||
|
// Some corrections for neat
|
||||||
|
@import wyrm_core/neat_extra
|
||||||
|
|
||||||
// Custom reset
|
// Custom reset
|
||||||
@import wyrm_core/reset
|
@import wyrm_core/reset
|
||||||
|
|
||||||
// Some compass libs that bourbon doesn't have
|
|
||||||
@import compass/typography/vertical_rhythm
|
|
||||||
@import compass/typography/text/ellipsis
|
|
||||||
|
|
||||||
// Wyrm mixins
|
// Wyrm mixins
|
||||||
@import wyrm_core/mixin
|
@import wyrm_core/mixin
|
||||||
|
|
||||||
// Font Awesome 4.0 with wyrm extras
|
// Font Awesome 4.0 with wyrm extras
|
||||||
@import font-awesome
|
@import font-awesome
|
||||||
@import wyrm_core/font_awesome_extra
|
@import wyrm_core/font_icon_defaults
|
||||||
|
|
||||||
// Wyrm core styles used in this theme
|
// Wyrm core styles used in this theme
|
||||||
@import wyrm_core/alert
|
@import wyrm_core/alert
|
||||||
|
@ -39,7 +37,6 @@
|
||||||
@import wyrm_core/dropdown
|
@import wyrm_core/dropdown
|
||||||
@import wyrm_core/form
|
@import wyrm_core/form
|
||||||
@import wyrm_core/generic
|
@import wyrm_core/generic
|
||||||
@import wyrm_core/grid_layout
|
|
||||||
@import wyrm_core/table
|
@import wyrm_core/table
|
||||||
@import wyrm_core/type
|
@import wyrm_core/type
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
.font-smooth,.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:fontawesome-webfont;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#fontawesome-webfont") format("svg")}.fa:before{display:inline-block;font-family:fontawesome-webfont;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.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"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}
|
.font-smooth,.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.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"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user