├── .babelrc
├── .gitignore
├── LICENSE
├── README.md
├── assets
└── images
│ ├── backbone-and-spa
│ ├── backbone.png
│ ├── backbone_mvc.png
│ ├── bower.png
│ ├── bower_cli.png
│ ├── compare.png
│ ├── creator.png
│ ├── grunt.png
│ ├── grunt_cli.png
│ ├── rails.png
│ ├── wshop_front.png
│ ├── yeoman.png
│ └── yeoman_cli.png
│ ├── beyond-rails
│ ├── cap.png
│ ├── cqrs.png
│ ├── ddd.jpg
│ ├── difference-war3-view.jpg
│ ├── event-sourced-dice-game.png
│ ├── mengbi.jpeg
│ ├── mvc.jpg
│ ├── new-world.jpg
│ ├── rails-components.png
│ ├── rails-mvc.png
│ ├── single-model.png
│ ├── todo-mvc.jpg
│ ├── uncle-bob-tweet.png
│ └── war3-record.jpg
│ ├── build-your-own-technology-radar
│ └── d3.png
│ ├── china-network
│ └── httpdns.png
│ ├── opensource-times
│ ├── 2b-pr.png
│ ├── babel.jpg
│ ├── rails-releases.png
│ ├── react-modular-css.png
│ └── root-files.png
│ ├── rake-is-the-apple-of-my-eye
│ └── example.jpg
│ └── talk-about-test
│ └── redgreenrefacor.png
├── backbone-and-spa
└── index.html
├── beyond-rails
└── index.html
├── build-minimal-emacs-clone-with-rust
└── index.html
├── build-your-own-technology-radar
└── index.html
├── china-network
└── index.html
├── clean.js
├── demos
├── d3-book
│ ├── .gitignore
│ ├── README.md
│ ├── chapter_04
│ │ └── 01_empty_page_template.html
│ ├── chapter_05
│ │ ├── 01_empty_page_template.html
│ │ ├── 02_new_element.html
│ │ ├── 03_csv_loading_example.html
│ │ ├── 04_creating_paragraphs.html
│ │ ├── 05_creating_paragraphs_text.html
│ │ ├── 06_creating_paragraphs_counting.html
│ │ ├── 07_creating_paragraphs_with_style.html
│ │ ├── 08_creating_paragraphs_with_style_functions.html
│ │ └── food.csv
│ ├── chapter_06
│ │ ├── 01_drawing_divs.html
│ │ ├── 02_drawing_divs_height.html
│ │ ├── 03_drawing_divs_spaced.html
│ │ ├── 04_power_of_data.html
│ │ ├── 05_power_of_data_more_points.html
│ │ ├── 06_power_of_data_random.html
│ │ ├── 07_power_of_data_rounded.html
│ │ ├── 08_drawing_svgs.html
│ │ ├── 09_drawing_svgs_size.html
│ │ ├── 10_drawing_svgs_circles.html
│ │ ├── 11_drawing_svgs_color.html
│ │ ├── 12_making_a_bar_chart_divs.html
│ │ ├── 13_making_a_bar_chart_rects.html
│ │ ├── 14_making_a_bar_chart_offset.html
│ │ ├── 15_making_a_bar_chart_even.html
│ │ ├── 16_making_a_bar_chart_widths.html
│ │ ├── 17_making_a_bar_chart_heights.html
│ │ ├── 18_making_a_bar_chart_teal.html
│ │ ├── 19_making_a_bar_chart_blues.html
│ │ ├── 20_making_a_bar_chart_labels.html
│ │ ├── 21_making_a_bar_chart_aligned.html
│ │ ├── 22_scatterplot.html
│ │ ├── 23_scatterplot_sqrt.html
│ │ └── 24_scatterplot_labels.html
│ ├── chapter_07
│ │ ├── 01_scale_test.html
│ │ ├── 02_scaled_plot.html
│ │ ├── 03_scaled_plot_inverted.html
│ │ ├── 04_scaled_plot_padding.html
│ │ ├── 05_scaled_plot_radii.html
│ │ ├── 06_scaled_plot_big.html
│ │ └── 07_scaled_plot_large.html
│ ├── chapter_08
│ │ ├── 01_axes.html
│ │ ├── 02_axes_bottom.html
│ │ ├── 03_axes_clean.html
│ │ ├── 04_axes_y.html
│ │ ├── 05_axes_random.html
│ │ ├── 06_axes_no_labels.html
│ │ └── 07_axes_format.html
│ ├── chapter_09
│ │ ├── 01_bar_chart.html
│ │ ├── 02_bar_chart_with_scales.html
│ │ ├── 03_updates_all_data.html
│ │ ├── 04_updates_all_data_fixed.html
│ │ ├── 05_transition.html
│ │ ├── 06_duration.html
│ │ ├── 07_duration_slow.html
│ │ ├── 08_duration_slow_labels_fixed.html
│ │ ├── 09_ease_linear.html
│ │ ├── 10_ease_circle.html
│ │ ├── 11_ease_elastic.html
│ │ ├── 12_ease_bounce.html
│ │ ├── 13_delay_static.html
│ │ ├── 14_delay_dynamic.html
│ │ ├── 15_delay_dynamic_scaled.html
│ │ ├── 16_delay_dynamic_scaled_fewer.html
│ │ ├── 17_randomized_data.html
│ │ ├── 18_dynamic_scale.html
│ │ ├── 19_axes_static.html
│ │ ├── 20_axes_dynamic.html
│ │ ├── 21_each.html
│ │ ├── 22_each_combo_transition.html
│ │ ├── 23_each_combo_transition_chained.html
│ │ ├── 24_clip-path.html
│ │ ├── 25_adding_values.html
│ │ ├── 26_removing_values.html
│ │ ├── 27_data_join_with_key.html
│ │ ├── 28_adding_and_removing.html
│ │ └── 29_dynamic_labels.html
│ ├── chapter_10
│ │ ├── 01_start.html
│ │ ├── 02_click.html
│ │ ├── 03_hover.html
│ │ ├── 04_mouseover.html
│ │ ├── 05_mouseout.html
│ │ ├── 06_smoother.html
│ │ ├── 07_sort.html
│ │ ├── 08_sort_hover.html
│ │ ├── 09_resort.html
│ │ ├── 10_delay.html
│ │ ├── 11_browser_tooltip.html
│ │ ├── 12_browser_tooltip_text.html
│ │ ├── 13_svg_tooltip.html
│ │ └── 14_div_tooltip.html
│ ├── chapter_11
│ │ ├── 01_pie.html
│ │ ├── 02_ring.html
│ │ ├── 03_stacked_bar.html
│ │ └── 04_force.html
│ ├── chapter_12
│ │ ├── 01_paths.html
│ │ ├── 02_projection.html
│ │ ├── 03_scaled.html
│ │ ├── 04_fill.html
│ │ ├── 05_choropleth.html
│ │ ├── 06_points.html
│ │ ├── 07_points_sized.html
│ │ ├── 08_oceans.html
│ │ ├── 09_mercator.html
│ │ ├── README.md
│ │ ├── oceans.json
│ │ ├── us-ag-productivity-2004.csv
│ │ ├── us-cities.csv
│ │ └── us-states.json
│ └── d3
│ │ └── d3.v3.js
├── radar
│ ├── d3.v3.min.js
│ ├── index.html
│ ├── sandian.html
│ └── svg.html
├── techradar
│ ├── .gitignore
│ ├── d3.v2.min.js
│ ├── files
│ │ ├── corporate_logo.png
│ │ ├── css
│ │ │ └── css_bf4b5d81c8c755ace50b050d524d6b9b.css
│ │ ├── images
│ │ │ └── 52
│ │ │ │ ├── radar-march-2012-landscape-small.jpg
│ │ │ │ ├── radar-march-2012-languages-small.jpg
│ │ │ │ ├── radar-march-2012-platforms-small.jpg
│ │ │ │ ├── radar-march-2012-techniques-small.jpg
│ │ │ │ ├── radar-march-2012-tools-small.jpg
│ │ │ │ ├── tech-radar-march-2012-new-thumb.jpg
│ │ │ │ └── tech-radar-march-2012-thumb.jpg
│ │ └── js
│ │ │ └── js_fe33c885c2f5a25a5ca4430547504573.jsmin.js
│ ├── first-quad.svg
│ ├── index.html
│ ├── radar.css
│ ├── radar.js
│ ├── radar.svg
│ ├── themes
│ │ └── corporate
│ │ │ ├── favicon.ico
│ │ │ └── images
│ │ │ ├── bg_black_opacity_75.png
│ │ │ ├── bg_black_opacity_95.png
│ │ │ ├── bg_grey_opacity_75.png
│ │ │ ├── blue-arrow.jpg
│ │ │ ├── button-png.xzy
│ │ │ ├── career-passionate.gif
│ │ │ ├── careers_left.png
│ │ │ ├── careers_right.png
│ │ │ ├── circle-loader.gif
│ │ │ ├── close-button.png
│ │ │ ├── edit-icon-1.png
│ │ │ ├── external_link.gif
│ │ │ ├── external_link_12x11.gif
│ │ │ ├── external_link_light.gif
│ │ │ ├── fb_count.png
│ │ │ ├── fb_share.gif
│ │ │ ├── footer_li_arrow.gif
│ │ │ ├── lang_select.gif
│ │ │ ├── minus.gif
│ │ │ ├── open-button.png
│ │ │ ├── page-background.jpg
│ │ │ ├── people-text-2.png
│ │ │ ├── plus.gif
│ │ │ ├── rss.jpg
│ │ │ ├── search_bg.gif
│ │ │ ├── social-black-white-icons.png
│ │ │ ├── titles-png.xzy
│ │ │ └── world-map.png
│ └── thoughtworks_tech_radar_jan_2012.json
└── todomvc_on_rails
│ ├── .gitignore
│ ├── .ruby-version
│ ├── Gemfile
│ ├── Gemfile.lock
│ ├── README.rdoc
│ ├── Rakefile
│ ├── app
│ ├── assets
│ │ ├── images
│ │ │ └── bg.png
│ │ ├── javascripts
│ │ │ ├── application.js
│ │ │ └── todos.js.coffee
│ │ └── stylesheets
│ │ │ ├── application.css
│ │ │ ├── base.css.scss
│ │ │ └── todos.css.scss
│ ├── controllers
│ │ ├── application_controller.rb
│ │ ├── concerns
│ │ │ └── .keep
│ │ └── todos_controller.rb
│ ├── helpers
│ │ ├── application_helper.rb
│ │ └── todos_helper.rb
│ ├── mailers
│ │ └── .keep
│ ├── models
│ │ ├── .keep
│ │ ├── concerns
│ │ │ └── .keep
│ │ └── todo.rb
│ └── views
│ │ ├── layouts
│ │ ├── application.html.erb
│ │ └── todos.js.erb
│ │ └── todos
│ │ ├── _destroy.js.erb
│ │ ├── _footer.html.erb
│ │ ├── _todo.html.erb
│ │ ├── _toggle.js.erb
│ │ ├── create.js.erb
│ │ ├── destroy.js.erb
│ │ ├── destroy_completed.js.erb
│ │ ├── index.html.erb
│ │ ├── toggle.js.erb
│ │ ├── toggle_all.js.erb
│ │ └── update.js.erb
│ ├── bin
│ ├── bundle
│ ├── rails
│ └── rake
│ ├── config.ru
│ ├── config
│ ├── application.rb
│ ├── boot.rb
│ ├── database.yml
│ ├── environment.rb
│ ├── environments
│ │ ├── development.rb
│ │ ├── production.rb
│ │ └── test.rb
│ ├── initializers
│ │ ├── backtrace_silencers.rb
│ │ ├── filter_parameter_logging.rb
│ │ ├── inflections.rb
│ │ ├── mime_types.rb
│ │ ├── secret_token.rb
│ │ ├── session_store.rb
│ │ └── wrap_parameters.rb
│ ├── locales
│ │ └── en.yml
│ └── routes.rb
│ ├── db
│ ├── development.sqlite3
│ ├── migrate
│ │ └── 20130518030840_create_todos.rb
│ ├── schema.rb
│ ├── seeds.rb
│ └── test.sqlite3
│ ├── lib
│ ├── assets
│ │ └── .keep
│ └── tasks
│ │ └── .keep
│ ├── log
│ └── .keep
│ ├── test
│ ├── controllers
│ │ └── .keep
│ ├── fixtures
│ │ ├── .keep
│ │ └── todos.yml
│ ├── helpers
│ │ └── .keep
│ ├── integration
│ │ └── .keep
│ ├── mailers
│ │ └── .keep
│ ├── models
│ │ ├── .keep
│ │ └── todo_test.rb
│ └── test_helper.rb
│ └── vendor
│ └── assets
│ ├── javascripts
│ └── .keep
│ └── stylesheets
│ └── .keep
├── domain-special-language
└── index.html
├── git-a-trivial-matter
└── index.html
├── index.html
├── opensource-times
└── index.html
├── package.json
├── rake-is-the-apple-of-my-eye
└── index.html
├── revealjs
├── .travis.yml
├── CONTRIBUTING.md
├── Gruntfile.js
├── LICENSE
├── README.md
├── bower.json
├── css
│ ├── print
│ │ ├── paper.css
│ │ └── pdf.css
│ ├── reveal.css
│ ├── reveal.scss
│ └── theme
│ │ ├── README.md
│ │ ├── beige.css
│ │ ├── black.css
│ │ ├── blood.css
│ │ ├── league.css
│ │ ├── moon.css
│ │ ├── night.css
│ │ ├── serif.css
│ │ ├── simple.css
│ │ ├── sky.css
│ │ ├── solarized.css
│ │ ├── source
│ │ ├── beige.scss
│ │ ├── black.scss
│ │ ├── blood.scss
│ │ ├── league.scss
│ │ ├── moon.scss
│ │ ├── night.scss
│ │ ├── serif.scss
│ │ ├── simple.scss
│ │ ├── sky.scss
│ │ ├── solarized.scss
│ │ └── white.scss
│ │ ├── template
│ │ ├── mixins.scss
│ │ ├── settings.scss
│ │ └── theme.scss
│ │ └── white.css
├── index.html
├── js
│ └── reveal.js
├── lib
│ ├── css
│ │ └── zenburn.css
│ ├── font
│ │ ├── league-gothic
│ │ │ ├── LICENSE
│ │ │ ├── league-gothic.css
│ │ │ ├── league-gothic.eot
│ │ │ ├── league-gothic.ttf
│ │ │ └── league-gothic.woff
│ │ └── source-sans-pro
│ │ │ ├── LICENSE
│ │ │ ├── source-sans-pro-italic.eot
│ │ │ ├── source-sans-pro-italic.ttf
│ │ │ ├── source-sans-pro-italic.woff
│ │ │ ├── source-sans-pro-regular.eot
│ │ │ ├── source-sans-pro-regular.ttf
│ │ │ ├── source-sans-pro-regular.woff
│ │ │ ├── source-sans-pro-semibold.eot
│ │ │ ├── source-sans-pro-semibold.ttf
│ │ │ ├── source-sans-pro-semibold.woff
│ │ │ ├── source-sans-pro-semibolditalic.eot
│ │ │ ├── source-sans-pro-semibolditalic.ttf
│ │ │ ├── source-sans-pro-semibolditalic.woff
│ │ │ └── source-sans-pro.css
│ └── js
│ │ ├── classList.js
│ │ ├── head.min.js
│ │ └── html5shiv.js
├── package.json
├── plugin
│ ├── highlight
│ │ └── highlight.js
│ ├── markdown
│ │ ├── example.html
│ │ ├── example.md
│ │ ├── markdown.js
│ │ └── marked.js
│ ├── math
│ │ └── math.js
│ ├── multiplex
│ │ ├── client.js
│ │ ├── index.js
│ │ └── master.js
│ ├── notes-server
│ │ ├── client.js
│ │ ├── index.js
│ │ └── notes.html
│ ├── notes
│ │ ├── notes.html
│ │ └── notes.js
│ ├── print-pdf
│ │ └── print-pdf.js
│ ├── search
│ │ └── search.js
│ └── zoom-js
│ │ └── zoom.js
└── test
│ ├── examples
│ ├── assets
│ │ ├── image1.png
│ │ └── image2.png
│ ├── barebones.html
│ ├── embedded-media.html
│ ├── math.html
│ ├── slide-backgrounds.html
│ └── slide-transitions.html
│ ├── qunit-1.12.0.css
│ ├── qunit-1.12.0.js
│ ├── test-markdown-element-attributes.html
│ ├── test-markdown-element-attributes.js
│ ├── test-markdown-slide-attributes.html
│ ├── test-markdown-slide-attributes.js
│ ├── test-markdown.html
│ ├── test-markdown.js
│ ├── test-pdf.html
│ ├── test-pdf.js
│ ├── test.html
│ └── test.js
├── src
├── china-network.md
├── data.js
├── git-a-trivial-matter.md
├── index.tpl
├── list.tpl
└── main.js
├── talk-about-test
└── index.html
└── webpack.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["es2015"]
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | public
2 | bundle.js
3 | bundle.js.map
4 | # Logs
5 | logs
6 | *.log
7 |
8 | # Runtime data
9 | pids
10 | *.pid
11 | *.seed
12 |
13 | # Directory for instrumented libs generated by jscoverage/JSCover
14 | lib-cov
15 |
16 | # Coverage directory used by tools like istanbul
17 | coverage
18 |
19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
20 | .grunt
21 |
22 | # node-waf configuration
23 | .lock-wscript
24 |
25 | # Compiled binary addons (http://nodejs.org/api/addons.html)
26 | build/Release
27 |
28 | # Dependency directory
29 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
30 | node_modules
31 | >DS_Store
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Ma Lucheng
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 我的 sliders
2 |
3 | 自己做的小工具, 可以直接把 markdown 文件转换成 revealjs 的 ppt 文件.
4 |
5 | 配合 gh-pages 可以很方便的制作 ppt.
6 |
7 | ## 使用方式
8 |
9 | ### 克隆项目(可以 fork 到自己的仓库)
10 |
11 | git clone https://github.com/teddy-ma/sliders.git
12 | cd sliders
13 |
14 | ### 安装依赖并构建(确保 node 环境已安装)
15 |
16 | npm install
17 | edit src/xxx.md
18 | npm run build
19 |
20 | ### 清理构建
21 |
22 | npm run clean
23 |
24 | ### 预览
25 |
26 | npm run preview
27 |
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/backbone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/backbone.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/backbone_mvc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/backbone_mvc.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/bower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/bower.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/bower_cli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/bower_cli.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/compare.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/compare.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/creator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/creator.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/grunt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/grunt.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/grunt_cli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/grunt_cli.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/rails.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/wshop_front.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/wshop_front.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/yeoman.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/yeoman.png
--------------------------------------------------------------------------------
/assets/images/backbone-and-spa/yeoman_cli.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/backbone-and-spa/yeoman_cli.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/cap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/cap.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/cqrs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/cqrs.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/ddd.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/ddd.jpg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/difference-war3-view.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/difference-war3-view.jpg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/event-sourced-dice-game.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/event-sourced-dice-game.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/mengbi.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/mengbi.jpeg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/mvc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/mvc.jpg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/new-world.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/new-world.jpg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/rails-components.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/rails-components.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/rails-mvc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/rails-mvc.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/single-model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/single-model.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/todo-mvc.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/todo-mvc.jpg
--------------------------------------------------------------------------------
/assets/images/beyond-rails/uncle-bob-tweet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/uncle-bob-tweet.png
--------------------------------------------------------------------------------
/assets/images/beyond-rails/war3-record.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/beyond-rails/war3-record.jpg
--------------------------------------------------------------------------------
/assets/images/build-your-own-technology-radar/d3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/build-your-own-technology-radar/d3.png
--------------------------------------------------------------------------------
/assets/images/china-network/httpdns.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/china-network/httpdns.png
--------------------------------------------------------------------------------
/assets/images/opensource-times/2b-pr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/opensource-times/2b-pr.png
--------------------------------------------------------------------------------
/assets/images/opensource-times/babel.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/opensource-times/babel.jpg
--------------------------------------------------------------------------------
/assets/images/opensource-times/rails-releases.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/opensource-times/rails-releases.png
--------------------------------------------------------------------------------
/assets/images/opensource-times/react-modular-css.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/opensource-times/react-modular-css.png
--------------------------------------------------------------------------------
/assets/images/opensource-times/root-files.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/opensource-times/root-files.png
--------------------------------------------------------------------------------
/assets/images/rake-is-the-apple-of-my-eye/example.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/rake-is-the-apple-of-my-eye/example.jpg
--------------------------------------------------------------------------------
/assets/images/talk-about-test/redgreenrefacor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/assets/images/talk-about-test/redgreenrefacor.png
--------------------------------------------------------------------------------
/clean.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 | var rimraf = require('rimraf');
3 | var files = fs.readdirSync('src');
4 | console.log(files);
5 | files.forEach(function(file){
6 | if(file.indexOf('.md') > 1){
7 | var path = file.slice(0, file.length - 3);
8 | console.log(path);
9 | rimraf(path, fs, function(){
10 | console.log("rm -rf " + path + "!");
11 | })
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/demos/d3-book/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/demos/d3-book/README.md:
--------------------------------------------------------------------------------
1 | # d3-book
2 |
3 | These are sample code files to accompany the book “Interactive Data Visualization for the Web” by Scott Murray, published in March 2013 by O’Reilly.
4 |
5 | - [O’Reilly book page](http://shop.oreilly.com/product/0636920026938.do)
6 | - [Online version with inline examples](http://chimera.labs.oreilly.com/books/1230000000345)
7 | - [Author’s website](http://alignedleft.com/)
8 |
9 |
10 |
11 | ### Version
12 |
13 | **Important:** Make sure you are using the correct version of these example files! Otherwise, the examples you see here may not exactly match the ones you see in the book.
14 |
15 | This is version **1.0**. This release matches examples seen in the first edition of the book, published March 2013.
16 |
17 |
18 |
19 | ### License
20 |
21 | This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
22 |
23 | http://creativecommons.org/licenses/by-nc-nd/3.0/
24 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_04/01_empty_page_template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3 Page Template
6 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/01_empty_page_template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3 Page Template
6 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/02_new_element.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3 Page Template
6 |
7 |
8 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/03_csv_loading_example.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Loading data from a CSV file
6 |
7 |
8 |
9 |
16 |
17 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/04_creating_paragraphs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Creating paragraphs dynamically from data
6 |
7 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/05_creating_paragraphs_text.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Setting the content of paragraphs from data
6 |
7 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/06_creating_paragraphs_counting.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Inserting additional text into paragraphs
6 |
7 |
8 |
9 |
22 |
23 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/07_creating_paragraphs_with_style.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Setting the style of paragraphs
6 |
7 |
8 |
9 |
23 |
24 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/08_creating_paragraphs_with_style_functions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Setting paragraphs' style conditionally, based on data
6 |
7 |
8 |
9 |
29 |
30 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_05/food.csv:
--------------------------------------------------------------------------------
1 | Food,Deliciousness
2 | Apples,9
3 | Green Beans,5
4 | Egg Salad Sandwich,4
5 | Cookies,10
6 | Vegemite,0.2
7 | Burrito,7
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/01_drawing_divs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Drawing divs with data
6 |
7 |
17 |
18 |
19 |
30 |
31 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/02_drawing_divs_height.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Setting div heights from data
6 |
7 |
17 |
18 |
19 |
33 |
34 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/03_drawing_divs_spaced.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Drawing divs, spaced out
6 |
7 |
18 |
19 |
20 |
35 |
36 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/04_power_of_data.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Our first bar chart with data
6 |
7 |
18 |
19 |
20 |
35 |
36 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/05_power_of_data_more_points.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Bar chart, extended with more values
6 |
7 |
18 |
19 |
20 |
35 |
36 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/06_power_of_data_random.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Bar chart with random values
6 |
7 |
18 |
19 |
20 |
39 |
40 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/07_power_of_data_rounded.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Bar chart with random (rounded) values
6 |
7 |
18 |
19 |
20 |
39 |
40 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/08_drawing_svgs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Creating an empty SVG
6 |
7 |
10 |
11 |
12 |
21 |
22 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/09_drawing_svgs_size.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Putting the SVG's width and height into variables
6 |
7 |
10 |
11 |
12 |
25 |
26 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/10_drawing_svgs_circles.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Drawing SVG circles with data
6 |
7 |
10 |
11 |
12 |
41 |
42 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/11_drawing_svgs_color.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Using color in SVG
6 |
7 |
10 |
11 |
12 |
46 |
47 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/12_making_a_bar_chart_divs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A bar chart with divs
6 |
7 |
18 |
19 |
20 |
36 |
37 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/13_making_a_bar_chart_rects.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Making a bar chart with SVG rects
6 |
7 |
10 |
11 |
12 |
37 |
38 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/14_making_a_bar_chart_offset.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Making a bar chart with SVG rects, spacing
6 |
7 |
10 |
11 |
12 |
39 |
40 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/15_making_a_bar_chart_even.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Making a bar chart with SVG rects, evenly spaced
6 |
7 |
10 |
11 |
12 |
40 |
41 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/16_making_a_bar_chart_widths.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Making a bar chart with SVG rects, dynamic widths and spacing
6 |
7 |
10 |
11 |
12 |
40 |
41 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/17_making_a_bar_chart_heights.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A true bar chart with SVG rects
6 |
7 |
10 |
11 |
12 |
44 |
45 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/18_making_a_bar_chart_teal.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Adding color to an SVG bar chart
6 |
7 |
10 |
11 |
12 |
45 |
46 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/19_making_a_bar_chart_blues.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Adding dynamic color, based on data
6 |
7 |
10 |
11 |
12 |
47 |
48 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/20_making_a_bar_chart_labels.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: SVG bar chart with value labels
6 |
7 |
10 |
11 |
12 |
66 |
67 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/21_making_a_bar_chart_aligned.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: SVG bar chart with value labels (centered)
6 |
7 |
10 |
11 |
12 |
67 |
68 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/22_scatterplot.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple scatterplot with SVG
6 |
7 |
10 |
11 |
12 |
42 |
43 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/23_scatterplot_sqrt.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple scatterplot, setting radii from data
6 |
7 |
10 |
11 |
12 |
44 |
45 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_06/24_scatterplot_labels.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple scatterplot with value labels
6 |
7 |
10 |
11 |
12 |
61 |
62 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/01_scale_test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Empty page for testing scale functions
6 |
7 |
10 |
11 |
12 |
28 |
29 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/02_scaled_plot.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Linear scales with a scatterplot
6 |
7 |
10 |
11 |
12 |
70 |
71 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/03_scaled_plot_inverted.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: An inverted linear scale
6 |
7 |
10 |
11 |
12 |
70 |
71 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/04_scaled_plot_padding.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Adding padding to the scatterplot
6 |
7 |
10 |
11 |
12 |
71 |
72 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/05_scaled_plot_radii.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Adjusted radii
6 |
7 |
10 |
11 |
12 |
75 |
76 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/06_scaled_plot_big.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Scaled scatterplot, with new (large) data value added
6 |
7 |
10 |
11 |
12 |
76 |
77 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_07/07_scaled_plot_large.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Scaled scatterplot, resized to be bigger!
6 |
7 |
10 |
11 |
12 |
76 |
77 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_08/01_axes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple, unstyled axis
6 |
7 |
10 |
11 |
12 |
88 |
89 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_09/01_bar_chart.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple bar chart
6 |
7 |
10 |
11 |
12 |
67 |
68 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_09/02_bar_chart_with_scales.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A flexible, scalable bar chart
6 |
7 |
10 |
11 |
12 |
74 |
75 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/01_start.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A starting point for interactivity
6 |
7 |
10 |
11 |
12 |
74 |
75 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/02_click.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Click to log the data values to the console
6 |
7 |
10 |
11 |
12 |
77 |
78 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/03_hover.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A simple CSS-only hover effect
6 |
7 |
14 |
15 |
16 |
78 |
79 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/04_mouseover.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Using D3 to change fill color on mouseover
6 |
7 |
10 |
11 |
12 |
78 |
79 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/05_mouseout.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Using D3 to change fill color on mouseover AND mouseout
6 |
7 |
10 |
11 |
12 |
82 |
83 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/06_smoother.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Smoother highlight transitions
6 |
7 |
10 |
11 |
12 |
84 |
85 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_10/11_browser_tooltip.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: A browser default tooltip
6 |
7 |
14 |
15 |
16 |
94 |
95 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_11/01_pie.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Pie layout
6 |
7 |
16 |
17 |
18 |
69 |
70 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_11/02_ring.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Pie layout ring chart
6 |
7 |
16 |
17 |
18 |
69 |
70 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/01_paths.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Loading GeoJSON data and generating SVG paths
6 |
7 |
10 |
11 |
12 |
40 |
41 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/02_projection.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Applying a projection to SVG paths
6 |
7 |
10 |
11 |
12 |
45 |
46 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/03_scaled.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Scaling the AlbersUSA projection
6 |
7 |
10 |
11 |
12 |
46 |
47 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/04_fill.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Setting path fills
6 |
7 |
10 |
11 |
12 |
47 |
48 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/08_oceans.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Loading oceans GeoJSON data
6 |
7 |
10 |
11 |
12 |
47 |
48 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/09_mercator.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D3: Mercator projection applied to oceans
6 |
7 |
10 |
11 |
12 |
47 |
48 |
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/README.md:
--------------------------------------------------------------------------------
1 |
2 | ### us-states.json
3 |
4 | This file consists of GeoJSON data generated by Mike Bostock from US Census data, and is in the public domain. This file used to be included in earlier versions of the D3 repository, and included this summary on its origins:
5 |
6 | > These are derived from the cartographic boundary files from the 2000 [U.S. Census](http://www.census.gov/geo/www/cob/bdy_files.html
7 | ). Then, MapShaper was used to simplify the geometry, and ogr2ogr to convert the shapefiles to GeoJSON. Some additional work was done to preserve the FIPS codes, which are dropped from the shapefiles by MapShaper.
8 |
9 |
10 |
11 |
12 | ### us-ag-productivity-2004.csv
13 |
14 | This file consists of data provided by the USDA, and is in the public domain. The values report agricultural productivty, by state, for 2004. Values are relative to an arbitrary baseline of the productivity of the state of Alabama in 1996 (1.0).
15 |
16 | "Table 19. Indices of total factor productivity by State, 1960-2004"
17 | http://ers.usda.gov/data-products/agricultural-productivity-in-the-us.aspx
18 |
19 |
20 |
21 | ### us-cities.csv
22 |
23 | File derived from data provided by the United States Census Bureau, and integrated with geocoding data from: http://www.gpsvisualizer.com/geocoder/
24 |
25 | "Table 1. Annual Estimates of the Resident Population for Incorporated Places Over 50,000, Ranked by July 1, 2011 Population: April 1, 2010 to July 1, 2011"
26 | http://www.census.gov/popest/data/cities/totals/2011/tables/SUB-EST2011-01.csv
--------------------------------------------------------------------------------
/demos/d3-book/chapter_12/us-ag-productivity-2004.csv:
--------------------------------------------------------------------------------
1 | state,value
2 | Alabama,1.1791
3 | Arkansas,1.3705
4 | Arizona,1.3847
5 | California,1.7979
6 | Colorado,1.0325
7 | Connecticut,1.3209
8 | Delaware,1.4345
9 | Florida,1.6304
10 | Georgia,1.3891
11 | Iowa,1.5297
12 | Idaho,1.4285
13 | Illinois,1.5297
14 | Indiana,1.4220
15 | Kansas,1.0124
16 | Kentucky,0.9403
17 | Louisiana,0.9904
18 | Maine,1.3877
19 | Maryland,1.2457
20 | Massachusetts,1.1458
21 | Michigan,1.1058
22 | Minnesota,1.2359
23 | Missouri,1.0212
24 | Mississippi,1.1306
25 | Montana,0.8145
26 | North Carolina,1.3554
27 | North Dakota,1.0278
28 | Nebraska,1.1619
29 | New Hampshire,1.0204
30 | New Jersey,1.2831
31 | New Mexico,0.8925
32 | Nevada,0.9640
33 | New York,1.1327
34 | Ohio,1.2075
35 | Oklahoma,0.7693
36 | Oregon,1.3154
37 | Pennsylvania,1.0601
38 | Rhode Island,1.4192
39 | South Carolina,1.1247
40 | South Dakota,1.0760
41 | Tennessee,0.7648
42 | Texas,0.8873
43 | Utah,0.9638
44 | Virginia,0.9660
45 | Vermont,1.0762
46 | Washington,1.1457
47 | Wisconsin,1.1130
48 | West Virginia,0.5777
49 | Wyoming,0.5712
--------------------------------------------------------------------------------
/demos/radar/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | d3
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/demos/radar/sandian.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | d3
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demos/radar/svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | d3
6 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/demos/techradar/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 |
--------------------------------------------------------------------------------
/demos/techradar/files/corporate_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/corporate_logo.png
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/radar-march-2012-landscape-small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/radar-march-2012-landscape-small.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/radar-march-2012-languages-small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/radar-march-2012-languages-small.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/radar-march-2012-platforms-small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/radar-march-2012-platforms-small.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/radar-march-2012-techniques-small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/radar-march-2012-techniques-small.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/radar-march-2012-tools-small.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/radar-march-2012-tools-small.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/tech-radar-march-2012-new-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/tech-radar-march-2012-new-thumb.jpg
--------------------------------------------------------------------------------
/demos/techradar/files/images/52/tech-radar-march-2012-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/files/images/52/tech-radar-march-2012-thumb.jpg
--------------------------------------------------------------------------------
/demos/techradar/radar.css:
--------------------------------------------------------------------------------
1 | #blipDetails {
2 | display: block;
3 | width: 500px;
4 | position: absolute;
5 | right: 30px;
6 | top: 70px;
7 | padding: 0 20px;
8 | background: white;
9 | border: 1px solid #CCC;
10 | border-radius: 6px;
11 | box-shadow: #BBB 0 0 2px;
12 | }
13 | /* SVG STYLES */
14 | path {
15 | stroke: #CCC;
16 | stroke-width: 1px;
17 | fill: none;
18 | }
19 | text.label {
20 | cursor: pointer;
21 | font: 9px arial,helvetica,clean,sans-serif;
22 | }
23 | g.blip-container {
24 | cursor: pointer;
25 | }
26 | g.blip-container use {
27 | fill: #11A5E3;
28 | }
29 | g.active use {
30 | fill: red;
31 | }
32 | g.active text {
33 | opacity: 1 !important;
34 | display: block !important;
35 | }
36 | /* shows text only when zoomed */
37 | text.blip {
38 | text-shadow: #fff 1px 1px 0;
39 | font-weight: 100;
40 | }
41 | path.largest-arc {
42 | fill: red;
43 | fill-opacity: 0;
44 | }
45 |
--------------------------------------------------------------------------------
/demos/techradar/radar.svg:
--------------------------------------------------------------------------------
1 |
48 |
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/favicon.ico
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/bg_black_opacity_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/bg_black_opacity_75.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/bg_black_opacity_95.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/bg_black_opacity_95.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/bg_grey_opacity_75.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/bg_grey_opacity_75.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/blue-arrow.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/blue-arrow.jpg
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/button-png.xzy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/button-png.xzy
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/career-passionate.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/career-passionate.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/careers_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/careers_left.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/careers_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/careers_right.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/circle-loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/circle-loader.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/close-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/close-button.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/edit-icon-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/edit-icon-1.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/external_link.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/external_link.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/external_link_12x11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/external_link_12x11.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/external_link_light.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/external_link_light.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/fb_count.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/fb_count.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/fb_share.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/fb_share.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/footer_li_arrow.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/footer_li_arrow.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/lang_select.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/lang_select.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/minus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/minus.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/open-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/open-button.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/page-background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/page-background.jpg
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/people-text-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/people-text-2.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/plus.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/plus.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/rss.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/rss.jpg
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/search_bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/search_bg.gif
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/social-black-white-icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/social-black-white-icons.png
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/titles-png.xzy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/titles-png.xzy
--------------------------------------------------------------------------------
/demos/techradar/themes/corporate/images/world-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/techradar/themes/corporate/images/world-map.png
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile '~/.gitignore_global'
6 |
7 | # Ignore bundler config.
8 | /.bundle
9 |
10 | # Ignore the default SQLite database.
11 | /db/*.sqlite3
12 | /db/*.sqlite3-journal
13 |
14 | # Ignore all logfiles and tempfiles.
15 | /log/*.log
16 | /tmp
17 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.3.0
2 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://gems.ruby-china.org'
2 |
3 | ruby "2.3.0"
4 |
5 | gem 'rails', '~> 4.2.6'
6 |
7 | gem 'sass-rails', '~> 4.0.0'
8 | gem 'uglifier', '>= 1.3.0'
9 | gem 'coffee-rails', '~> 4.0.0'
10 | gem 'jquery-rails'
11 | gem 'turbolinks'
12 |
13 | gem 'jbuilder', '~> 1.0.1'
14 |
15 | group :development do
16 | gem 'sqlite3'
17 | end
18 |
19 | group :doc do
20 | gem 'sdoc', require: false
21 | end
22 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/README.rdoc:
--------------------------------------------------------------------------------
1 | == TodoMVC on Rails
2 |
3 | I built the TodoMVC app according to its spec using only Rails 4 and a hint of javascript. See my article for more details
4 |
5 | http://www.mattdeleon.net/
6 |
7 | Want to see TodoMVC on Rails tested with Capybara and Rspec? Check out this fork by kashiro: https://github.com/kashiro/todomvc_on_rails_with_test
8 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3 |
4 | require File.expand_path('../config/application', __FILE__)
5 |
6 | Todos::Application.load_tasks
7 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/assets/images/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/app/assets/images/bg.png
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11 | // GO AFTER THE REQUIRES BELOW.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require turbolinks
16 | //= require_tree .
17 |
18 | Turbolinks.enableTransitionCache();
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/assets/javascripts/todos.js.coffee:
--------------------------------------------------------------------------------
1 | (($) ->
2 | class TodoTitleInput
3 | constructor: (input) ->
4 | @$input = $(input)
5 |
6 | @$input.on "keypress", (e) => @keypress(e)
7 | @$input.on "blur", (e) => @blur(e)
8 |
9 | keypress: (e) ->
10 | if e.keyCode is 27
11 | @handleEscape()
12 | else if e.keyCode is 13
13 | @handleEnter()
14 |
15 | blur: ->
16 | @submitFormOrDestroy()
17 |
18 | handleEscape: ->
19 | @$input
20 | .val(@$input.data("original-value"))
21 | .parents("li")
22 | .removeClass("editing")
23 |
24 | handleEnter: ->
25 | @submitFormOrDestroy()
26 | return false
27 |
28 | submitFormOrDestroy: ->
29 | if @$input.val().trim().length is 0
30 | @destroyTodo()
31 | else
32 | @submitForm()
33 |
34 | submitForm: ->
35 | @$input.parents("form").submit()
36 |
37 | destroyTodo: ->
38 | @$input.parents("li").find(".destroy").click()
39 |
40 | $.fn.todoTitleInput = ->
41 | @each ->
42 | data = $.data(@, 'todoTitleInput')
43 | data = $.data(@, 'todoTitleInput', new TodoTitleInput(@)) unless data
44 | )($)
45 |
46 | $(document).on "keypress", "[data-behavior~=submit_on_enter]", (e) ->
47 | if e.keyCode is 13
48 | $(@).closest("form").submit() if $(@).val().trim().length
49 | e.preventDefault()
50 |
51 | $(document).on "click", "[data-behavior~=submit_on_check]", ->
52 | $(@).closest("form").submit()
53 |
54 | $(document).on "dblclick", "[data-behavior~=todo_title]", ->
55 | $(@).closest("li")
56 | .addClass("editing")
57 | .siblings()
58 | .removeClass("editing")
59 |
60 | $(@).closest("li").find("[data-behavior~=todo_title_input]").focus()
61 |
62 | $(document).on "focus", "[data-behavior~=todo_title_input]", ->
63 | $(@).todoTitleInput()
64 |
65 | $(document).on "ajax:before", "form[data-remote]", ->
66 | $(@).addClass("submitting")
67 |
68 | $(document).on "ajax:complete", "form[data-remote]", ->
69 | $(@).removeClass("submitting")
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the top of the
9 | * compiled file, but it's generally better to create a new file per style scope.
10 | *
11 | *= require_self
12 | *= require_tree .
13 | */
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/assets/stylesheets/todos.css.scss:
--------------------------------------------------------------------------------
1 | #main,
2 | #footer { display: none; }
3 |
4 | #todoapp {
5 | &.has_todos #main,
6 | &.has_todos #footer { display: inherit; }
7 |
8 | #footer {
9 | a.all { font-weight: bold; }
10 | }
11 |
12 | &.filtered.active {
13 | #todo-list li.completed { display: none; }
14 |
15 | #footer {
16 | a.all { font-weight: normal; }
17 | a.active { font-weight: bold; }
18 | }
19 | }
20 |
21 | &.filtered.completed {
22 | #todo-list li:not(.completed) { display: none; }
23 |
24 | #footer {
25 | a.all { font-weight: normal; }
26 | a.completed { font-weight: bold; }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 | end
6 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/controllers/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/app/controllers/concerns/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/controllers/todos_controller.rb:
--------------------------------------------------------------------------------
1 | class TodosController < ApplicationController
2 | helper_method :current_filter
3 |
4 | def index
5 | @todos = Todo
6 | end
7 |
8 | def active
9 | @todos = Todo.active
10 |
11 | set_current_filter(:active)
12 |
13 | render :index
14 | end
15 |
16 | def completed
17 | @todos = Todo.completed
18 |
19 | set_current_filter(:completed)
20 |
21 | render :index
22 | end
23 |
24 | def create
25 | @todo = Todo.new(todo_params)
26 | @todo.save
27 | end
28 |
29 | def update
30 | @todo = Todo.find(params[:id])
31 | @todo.update(todo_params)
32 | end
33 |
34 | def destroy_completed
35 | @todos_for_destruction = Todo.completed.all
36 |
37 | Todo.completed.destroy_all
38 | end
39 |
40 | def destroy
41 | @todo = Todo.find(params[:id])
42 | @todo.destroy
43 | end
44 |
45 | def toggle
46 | @todo = Todo.find(params[:id])
47 | @todo.toggle!(:completed)
48 | end
49 |
50 | def toggle_all
51 | Todo.update_all(completed: params[:completed] ? 't' : 'f')
52 |
53 | @todos = Todo.all
54 | end
55 |
56 | private
57 |
58 | def todo_params
59 | params.require(:todo).permit(:title, :completed)
60 | end
61 |
62 | def set_current_filter(filter)
63 | @current_filter = filter
64 | end
65 |
66 | def current_filter
67 | @current_filter
68 | end
69 | end
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/helpers/todos_helper.rb:
--------------------------------------------------------------------------------
1 | module TodosHelper
2 | def todos_filter_class
3 | "filtered " + current_filter.to_s
4 | end
5 | end
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/app/mailers/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/app/models/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/models/concerns/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/app/models/concerns/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/models/todo.rb:
--------------------------------------------------------------------------------
1 | class Todo < ActiveRecord::Base
2 | scope :completed, -> { where("completed = ?", true) }
3 | scope :active, -> { where("completed = ?", false) }
4 |
5 | def title=(title)
6 | write_attribute(:title, title.strip)
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Todos
5 | <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6 | <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 |
11 | <%= yield %>
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/layouts/todos.js.erb:
--------------------------------------------------------------------------------
1 | <%= yield %>
2 |
3 | $("#toggle-all").prop("checked", <%= Todo.active.count == 0 %>);
4 |
5 | $("#todoapp").toggleClass("has_todos", <%= Todo.count > 0 %>);
6 |
7 | $("#footer").replaceWith("<%= j(render("footer")) %>");
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/_destroy.js.erb:
--------------------------------------------------------------------------------
1 | $("#<%= dom_id(todo) %>").remove();
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/_footer.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/_todo.html.erb:
--------------------------------------------------------------------------------
1 | " id="<%= dom_id(todo) %>">
2 |
3 | <%= form_for(todo, url: toggle_todo_path(todo), method: :post, remote: true) do |f| %>
4 | <%= f.check_box :completed, class: "toggle", "data-behavior" => "submit_on_check" %>
5 | <% end %>
6 |
7 | <%= form_for(todo, method: :delete, remote: true) do |f| %>
8 |
9 | <% end %>
10 |
11 | <%= form_for(todo, remote: true, html: { "data-behavior" => "edit_todo_form" }) do |f| %>
12 | <%= f.text_field :title, class: "edit", "data-behavior" => "todo_title_input", "data-original-value" => todo.title %>
13 | <% end %>
14 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/_toggle.js.erb:
--------------------------------------------------------------------------------
1 | $("#<%= dom_id(todo) %>")
2 | .toggleClass("completed", <%= todo.completed? %>)
3 | .find("input.toggle")
4 | .prop("checked", <%= todo.completed? %>);
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/create.js.erb:
--------------------------------------------------------------------------------
1 | $("#todo-list").append("<%= j(render(@todo)) %>");
2 |
3 | $("#new-todo").val("");
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/destroy.js.erb:
--------------------------------------------------------------------------------
1 | <%= render "destroy", todo: @todo %>
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/destroy_completed.js.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: "destroy", collection: @todos_for_destruction, as: :todo %>
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/index.html.erb:
--------------------------------------------------------------------------------
1 | 0 %> <%= todos_filter_class %>">
2 |
3 |
4 |
10 |
11 |
12 |
21 |
22 |
23 | <%= render "footer" %>
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/toggle.js.erb:
--------------------------------------------------------------------------------
1 | <%= render "toggle", todo: @todo %>
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/toggle_all.js.erb:
--------------------------------------------------------------------------------
1 | <%= render partial: "toggle", collection: @todos, as: :todo %>
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/app/views/todos/update.js.erb:
--------------------------------------------------------------------------------
1 | $("#<%= dom_id(@todo) %>").replaceWith("<%= j(render(@todo)) %>");
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | APP_PATH = File.expand_path('../../config/application', __FILE__)
3 | require_relative '../config/boot'
4 | require 'rails/commands'
5 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require_relative '../config/boot'
3 | require 'rake'
4 | Rake.application.run
5 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | require 'rails/all'
4 |
5 | # Assets should be precompiled for production (so we don't need the gems loaded then)
6 | Bundler.require(*Rails.groups(assets: %w(development test)))
7 |
8 | module Todos
9 | class Application < Rails::Application
10 | # Settings in config/environments/* take precedence over those specified here.
11 | # Application configuration should go into files in config/initializers
12 | # -- all .rb files in that directory are automatically loaded.
13 |
14 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16 | # config.time_zone = 'Central Time (US & Canada)'
17 |
18 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20 | # config.i18n.default_locale = :de
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 |
4 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | development:
7 | adapter: sqlite3
8 | database: db/development.sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: db/test.sqlite3
18 | pool: 5
19 | timeout: 5000
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application.
5 | Todos::Application.initialize!
6 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Todos::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 | end
30 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Todos::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure static asset server for tests with Cache-Control for performance.
16 | config.serve_static_assets = true
17 | config.static_cache_control = "public, max-age=3600"
18 |
19 | # Show full error reports and disable caching.
20 | config.consider_all_requests_local = true
21 | config.action_controller.perform_caching = false
22 |
23 | # Raise exceptions instead of rendering exception templates.
24 | config.action_dispatch.show_exceptions = false
25 |
26 | # Disable request forgery protection in test environment.
27 | config.action_controller.allow_forgery_protection = false
28 |
29 | # Tell Action Mailer not to deliver emails to the real world.
30 | # The :test delivery method accumulates sent emails in the
31 | # ActionMailer::Base.deliveries array.
32 | config.action_mailer.delivery_method = :test
33 |
34 | # Print deprecation notices to the stderr.
35 | config.active_support.deprecation = :stderr
36 | end
37 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure your secret_key_base is kept private
11 | # if you're sharing your code publicly.
12 | Todos::Application.config.secret_key_base = '0ff5449d23a6eb51950e555e6dfd6348bd06c232e6b0e765970e93f90788960e107e1b9b69d50465ea7f4b322117b883b8800b539b8430bf8ff0b4e379577eb0'
13 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Todos::Application.config.session_store :cookie_store, key: '_todos_session'
4 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/config/routes.rb:
--------------------------------------------------------------------------------
1 | Todos::Application.routes.draw do
2 | resources :todos do
3 | member do
4 | post :toggle
5 | end
6 |
7 | collection do
8 | post :toggle_all
9 | get :active
10 | get :completed
11 | delete :destroy_completed
12 | end
13 | end
14 |
15 | root to: "todos#index"
16 | end
17 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/db/development.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/db/development.sqlite3
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/db/migrate/20130518030840_create_todos.rb:
--------------------------------------------------------------------------------
1 | class CreateTodos < ActiveRecord::Migration
2 | def change
3 | create_table :todos do |t|
4 | t.boolean :completed, default: false, null: false
5 | t.string :title
6 | t.timestamps
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended that you check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(version: 20130518030840) do
15 |
16 | create_table "todos", force: true do |t|
17 | t.boolean "completed", default: false, null: false
18 | t.string "title"
19 | t.datetime "created_at"
20 | t.datetime "updated_at"
21 | end
22 |
23 | end
24 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/db/test.sqlite3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/db/test.sqlite3
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/lib/assets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/lib/assets/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/lib/tasks/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/lib/tasks/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/log/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/log/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/controllers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/controllers/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/fixtures/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/fixtures/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/fixtures/todos.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/helpers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/helpers/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/integration/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/integration/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/mailers/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/mailers/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/models/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/test/models/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/models/todo_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TodoTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/test/test_helper.rb:
--------------------------------------------------------------------------------
1 | ENV["RAILS_ENV"] ||= "test"
2 | require File.expand_path('../../config/environment', __FILE__)
3 | require 'rails/test_help'
4 |
5 | class ActiveSupport::TestCase
6 | ActiveRecord::Migration.check_pending!
7 |
8 | # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
9 | #
10 | # Note: You'll currently still have to declare fixtures explicitly in integration tests
11 | # -- they do not yet inherit this setting
12 | fixtures :all
13 |
14 | # Add more helper methods to be used by all tests here...
15 | end
16 |
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/vendor/assets/javascripts/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/vendor/assets/javascripts/.keep
--------------------------------------------------------------------------------
/demos/todomvc_on_rails/vendor/assets/stylesheets/.keep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/demos/todomvc_on_rails/vendor/assets/stylesheets/.keep
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "sliders",
3 | "version": "0.0.1",
4 | "description": "",
5 | "main": "''",
6 | "scripts": {
7 | "build": "node_modules/webpack/bin/webpack.js --progress --colors --watch",
8 | "preview": "node_modules/http-server/bin/http-server -a localhost -p 8000",
9 | "clean": "node clean.js"
10 | },
11 | "author": "Ma Lucheng",
12 | "license": "MIT",
13 | "devDependencies": {
14 | "babel-core": "6.3.26",
15 | "babel-loader": "6.2.0",
16 | "babel-preset-es2015": "6.3.13",
17 | "cheerio": "^0.19.0",
18 | "commander": "2.8.1",
19 | "css-loader": "0.23.1",
20 | "file-loader": "0.8.4",
21 | "front-matter": "^1.0.0",
22 | "glob": "5.0.14",
23 | "highlight.js": "8.7.0",
24 | "json-loader": "^0.5.3",
25 | "marked": "^0.3.5",
26 | "mustache": "2.1.3",
27 | "raw-loader": "^0.5.1",
28 | "reveal.js": "3.1.0",
29 | "static-site-generator-webpack-plugin": "^2.0.1",
30 | "style-loader": "0.13.0",
31 | "url-loader": "0.5.6",
32 | "webpack": "1.12.9",
33 | "webpack-dev-server": "1.14.0",
34 | "http-server": "^0.8.5"
35 | },
36 | "dependencies": {
37 | "rimraf": "^2.5.2"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/revealjs/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 4.1.1
4 | before_script:
5 | - npm install -g grunt-cli
--------------------------------------------------------------------------------
/revealjs/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | Please keep the [issue tracker](http://github.com/hakimel/reveal.js/issues) limited to **bug reports**, **feature requests** and **pull requests**.
4 |
5 |
6 | ### Personal Support
7 | If you have personal support or setup questions the best place to ask those are [StackOverflow](http://stackoverflow.com/questions/tagged/reveal.js).
8 |
9 |
10 | ### Bug Reports
11 | When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested.
12 |
13 |
14 | ### Pull Requests
15 | - Should follow the coding style of the file you work in, most importantly:
16 | - Tabs to indent
17 | - Single-quoted strings
18 | - Should be made towards the **dev branch**
19 | - Should be submitted from a feature/topic branch (not your master)
20 |
21 |
22 | ### Plugins
23 | Please do not submit plugins as pull requests. They should be maintained in their own separate repository. More information here: https://github.com/hakimel/reveal.js/wiki/Plugin-Guidelines
24 |
--------------------------------------------------------------------------------
/revealjs/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2015 Hakim El Hattab, http://hakim.se
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/revealjs/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "reveal.js",
3 | "version": "3.2.0",
4 | "main": [
5 | "js/reveal.js",
6 | "css/reveal.css"
7 | ],
8 | "homepage": "http://lab.hakim.se/reveal-js/",
9 | "license": "MIT",
10 | "description": "The HTML Presentation Framework",
11 | "authors": [
12 | "Hakim El Hattab "
13 | ],
14 | "dependencies": {
15 | "headjs": "~1.0.3"
16 | },
17 | "repository": {
18 | "type": "git",
19 | "url": "git://github.com/hakimel/reveal.js.git"
20 | },
21 | "ignore": [
22 | "**/.*",
23 | "node_modules",
24 | "bower_components",
25 | "test"
26 | ]
27 | }
--------------------------------------------------------------------------------
/revealjs/css/theme/README.md:
--------------------------------------------------------------------------------
1 | ## Dependencies
2 |
3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup
4 |
5 | ## Creating a Theme
6 |
7 | To create your own theme, start by duplicating a ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source). It will be automatically compiled by Grunt from Sass to CSS (see the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js)) when you run `grunt css-themes`.
8 |
9 | Each theme file does four things in the following order:
10 |
11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)**
12 | Shared utility functions.
13 |
14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)**
15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3.
16 |
17 | 3. **Override**
18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please.
19 |
20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)**
21 | The template theme file which will generate final CSS output based on the currently defined variables.
22 |
--------------------------------------------------------------------------------
/revealjs/css/theme/source/beige.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Beige theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(../../lib/font/league-gothic/league-gothic.css);
17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainColor: #333;
22 | $headingColor: #333;
23 | $headingTextShadow: none;
24 | $backgroundColor: #f7f3de;
25 | $linkColor: #8b743d;
26 | $linkColorHover: lighten( $linkColor, 20% );
27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99);
28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
29 |
30 | // Background generator
31 | @mixin bodyBackground() {
32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) );
33 | }
34 |
35 |
36 |
37 | // Theme template ------------------------------
38 | @import "../template/theme";
39 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/source/black.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js. This is the opposite of the 'white' theme.
3 | *
4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #222;
20 |
21 | $mainColor: #fff;
22 | $headingColor: #fff;
23 |
24 | $mainFontSize: 38px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #42affa;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-light-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #222;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/source/blood.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Blood theme for reveal.js
3 | * Author: Walther http://github.com/Walther
4 | *
5 | * Designed to be used with highlight.js theme
6 | * "monokai_sublime.css" available from
7 | * https://github.com/isagalaev/highlight.js/
8 | *
9 | * For other themes, change $codeBackground accordingly.
10 | *
11 | */
12 |
13 | // Default mixins and settings -----------------
14 | @import "../template/mixins";
15 | @import "../template/settings";
16 | // ---------------------------------------------
17 |
18 | // Include theme-specific fonts
19 |
20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic);
21 |
22 | // Colors used in the theme
23 | $blood: #a23;
24 | $coal: #222;
25 | $codeBackground: #23241f;
26 |
27 | $backgroundColor: $coal;
28 |
29 | // Main text
30 | $mainFont: Ubuntu, 'sans-serif';
31 | $mainFontSize: 36px;
32 | $mainColor: #eee;
33 |
34 | // Headings
35 | $headingFont: Ubuntu, 'sans-serif';
36 | $headingTextShadow: 2px 2px 2px $coal;
37 |
38 | // h1 shadow, borrowed humbly from
39 | // (c) Default theme by Hakim El Hattab
40 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
41 |
42 | // Links
43 | $linkColor: $blood;
44 | $linkColorHover: lighten( $linkColor, 20% );
45 |
46 | // Text selection
47 | $selectionBackgroundColor: $blood;
48 | $selectionColor: #fff;
49 |
50 |
51 | // Theme template ------------------------------
52 | @import "../template/theme";
53 | // ---------------------------------------------
54 |
55 | // some overrides after theme template import
56 |
57 | .reveal p {
58 | font-weight: 300;
59 | text-shadow: 1px 1px $coal;
60 | }
61 |
62 | .reveal h1,
63 | .reveal h2,
64 | .reveal h3,
65 | .reveal h4,
66 | .reveal h5,
67 | .reveal h6 {
68 | font-weight: 700;
69 | }
70 |
71 | .reveal p code {
72 | background-color: $codeBackground;
73 | display: inline-block;
74 | border-radius: 7px;
75 | }
76 |
77 | .reveal small code {
78 | vertical-align: baseline;
79 | }
--------------------------------------------------------------------------------
/revealjs/css/theme/source/league.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * League theme for reveal.js.
3 | *
4 | * This was the default theme pre-3.0.0.
5 | *
6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(../../lib/font/league-gothic/league-gothic.css);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 | // Override theme settings (see ../template/settings.scss)
22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2);
23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15);
24 |
25 | // Background generator
26 | @mixin bodyBackground() {
27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) );
28 | }
29 |
30 |
31 |
32 | // Theme template ------------------------------
33 | @import "../template/theme";
34 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/source/moon.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Solarized Dark theme for reveal.js.
3 | * Author: Achim Staebler
4 | */
5 |
6 |
7 | // Default mixins and settings -----------------
8 | @import "../template/mixins";
9 | @import "../template/settings";
10 | // ---------------------------------------------
11 |
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/league-gothic/league-gothic.css);
16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
17 |
18 | /**
19 | * Solarized colors by Ethan Schoonover
20 | */
21 | html * {
22 | color-profile: sRGB;
23 | rendering-intent: auto;
24 | }
25 |
26 | // Solarized colors
27 | $base03: #002b36;
28 | $base02: #073642;
29 | $base01: #586e75;
30 | $base00: #657b83;
31 | $base0: #839496;
32 | $base1: #93a1a1;
33 | $base2: #eee8d5;
34 | $base3: #fdf6e3;
35 | $yellow: #b58900;
36 | $orange: #cb4b16;
37 | $red: #dc322f;
38 | $magenta: #d33682;
39 | $violet: #6c71c4;
40 | $blue: #268bd2;
41 | $cyan: #2aa198;
42 | $green: #859900;
43 |
44 | // Override theme settings (see ../template/settings.scss)
45 | $mainColor: $base1;
46 | $headingColor: $base2;
47 | $headingTextShadow: none;
48 | $backgroundColor: $base03;
49 | $linkColor: $blue;
50 | $linkColorHover: lighten( $linkColor, 20% );
51 | $selectionBackgroundColor: $magenta;
52 |
53 |
54 |
55 | // Theme template ------------------------------
56 | @import "../template/theme";
57 | // ---------------------------------------------
58 |
--------------------------------------------------------------------------------
/revealjs/css/theme/source/night.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Black theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700);
16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic);
17 |
18 |
19 | // Override theme settings (see ../template/settings.scss)
20 | $backgroundColor: #111;
21 |
22 | $mainFont: 'Open Sans', sans-serif;
23 | $linkColor: #e7ad52;
24 | $linkColorHover: lighten( $linkColor, 20% );
25 | $headingFont: 'Montserrat', Impact, sans-serif;
26 | $headingTextShadow: none;
27 | $headingLetterSpacing: -0.03em;
28 | $headingTextTransform: none;
29 | $selectionBackgroundColor: #e7ad52;
30 | $mainFontSize: 30px;
31 |
32 |
33 | // Theme template ------------------------------
34 | @import "../template/theme";
35 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/source/serif.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is brown.
4 | *
5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed.
6 | */
7 |
8 |
9 | // Default mixins and settings -----------------
10 | @import "../template/mixins";
11 | @import "../template/settings";
12 | // ---------------------------------------------
13 |
14 |
15 |
16 | // Override theme settings (see ../template/settings.scss)
17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
18 | $mainColor: #000;
19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
20 | $headingColor: #383D3D;
21 | $headingTextShadow: none;
22 | $headingTextTransform: none;
23 | $backgroundColor: #F0F1EB;
24 | $linkColor: #51483D;
25 | $linkColorHover: lighten( $linkColor, 20% );
26 | $selectionBackgroundColor: #26351C;
27 |
28 | .reveal a {
29 | line-height: 1.3em;
30 | }
31 |
32 |
33 | // Theme template ------------------------------
34 | @import "../template/theme";
35 | // ---------------------------------------------
36 |
--------------------------------------------------------------------------------
/revealjs/css/theme/source/simple.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * A simple theme for reveal.js presentations, similar
3 | * to the default theme. The accent color is darkblue.
4 | *
5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed.
6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
7 | */
8 |
9 |
10 | // Default mixins and settings -----------------
11 | @import "../template/mixins";
12 | @import "../template/settings";
13 | // ---------------------------------------------
14 |
15 |
16 |
17 | // Include theme-specific fonts
18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700);
19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
20 |
21 |
22 | // Override theme settings (see ../template/settings.scss)
23 | $mainFont: 'Lato', sans-serif;
24 | $mainColor: #000;
25 | $headingFont: 'News Cycle', Impact, sans-serif;
26 | $headingColor: #000;
27 | $headingTextShadow: none;
28 | $headingTextTransform: none;
29 | $backgroundColor: #fff;
30 | $linkColor: #00008B;
31 | $linkColorHover: lighten( $linkColor, 20% );
32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99);
33 |
34 |
35 |
36 | // Theme template ------------------------------
37 | @import "../template/theme";
38 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/source/sky.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Sky theme for reveal.js.
3 | *
4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 |
15 | // Include theme-specific fonts
16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic);
17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700);
18 |
19 |
20 | // Override theme settings (see ../template/settings.scss)
21 | $mainFont: 'Open Sans', sans-serif;
22 | $mainColor: #333;
23 | $headingFont: 'Quicksand', sans-serif;
24 | $headingColor: #333;
25 | $headingLetterSpacing: -0.08em;
26 | $headingTextShadow: none;
27 | $backgroundColor: #f7fbfc;
28 | $linkColor: #3b759e;
29 | $linkColorHover: lighten( $linkColor, 20% );
30 | $selectionBackgroundColor: #134674;
31 |
32 | // Fix links so they are not cut off
33 | .reveal a {
34 | line-height: 1.3em;
35 | }
36 |
37 | // Background generator
38 | @mixin bodyBackground() {
39 | @include radial-gradient( #add9e4, #f7fbfc );
40 | }
41 |
42 |
43 |
44 | // Theme template ------------------------------
45 | @import "../template/theme";
46 | // ---------------------------------------------
47 |
--------------------------------------------------------------------------------
/revealjs/css/theme/source/solarized.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * Solarized Light theme for reveal.js.
3 | * Author: Achim Staebler
4 | */
5 |
6 |
7 | // Default mixins and settings -----------------
8 | @import "../template/mixins";
9 | @import "../template/settings";
10 | // ---------------------------------------------
11 |
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/league-gothic/league-gothic.css);
16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic);
17 |
18 |
19 | /**
20 | * Solarized colors by Ethan Schoonover
21 | */
22 | html * {
23 | color-profile: sRGB;
24 | rendering-intent: auto;
25 | }
26 |
27 | // Solarized colors
28 | $base03: #002b36;
29 | $base02: #073642;
30 | $base01: #586e75;
31 | $base00: #657b83;
32 | $base0: #839496;
33 | $base1: #93a1a1;
34 | $base2: #eee8d5;
35 | $base3: #fdf6e3;
36 | $yellow: #b58900;
37 | $orange: #cb4b16;
38 | $red: #dc322f;
39 | $magenta: #d33682;
40 | $violet: #6c71c4;
41 | $blue: #268bd2;
42 | $cyan: #2aa198;
43 | $green: #859900;
44 |
45 | // Override theme settings (see ../template/settings.scss)
46 | $mainColor: $base00;
47 | $headingColor: $base01;
48 | $headingTextShadow: none;
49 | $backgroundColor: $base3;
50 | $linkColor: $blue;
51 | $linkColorHover: lighten( $linkColor, 20% );
52 | $selectionBackgroundColor: $magenta;
53 |
54 | // Background generator
55 | // @mixin bodyBackground() {
56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) );
57 | // }
58 |
59 |
60 |
61 | // Theme template ------------------------------
62 | @import "../template/theme";
63 | // ---------------------------------------------
64 |
--------------------------------------------------------------------------------
/revealjs/css/theme/source/white.scss:
--------------------------------------------------------------------------------
1 | /**
2 | * White theme for reveal.js. This is the opposite of the 'black' theme.
3 | *
4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se
5 | */
6 |
7 |
8 | // Default mixins and settings -----------------
9 | @import "../template/mixins";
10 | @import "../template/settings";
11 | // ---------------------------------------------
12 |
13 |
14 | // Include theme-specific fonts
15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css);
16 |
17 |
18 | // Override theme settings (see ../template/settings.scss)
19 | $backgroundColor: #fff;
20 |
21 | $mainColor: #222;
22 | $headingColor: #222;
23 |
24 | $mainFontSize: 38px;
25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif;
26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif;
27 | $headingTextShadow: none;
28 | $headingLetterSpacing: normal;
29 | $headingTextTransform: uppercase;
30 | $headingFontWeight: 600;
31 | $linkColor: #2a76dd;
32 | $linkColorHover: lighten( $linkColor, 15% );
33 | $selectionBackgroundColor: lighten( $linkColor, 25% );
34 |
35 | $heading1Size: 2.5em;
36 | $heading2Size: 1.6em;
37 | $heading3Size: 1.3em;
38 | $heading4Size: 1.0em;
39 |
40 | section.has-dark-background {
41 | &, h1, h2, h3, h4, h5, h6 {
42 | color: #fff;
43 | }
44 | }
45 |
46 |
47 | // Theme template ------------------------------
48 | @import "../template/theme";
49 | // ---------------------------------------------
--------------------------------------------------------------------------------
/revealjs/css/theme/template/mixins.scss:
--------------------------------------------------------------------------------
1 | @mixin vertical-gradient( $top, $bottom ) {
2 | background: $top;
3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% );
4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) );
5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% );
6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% );
7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% );
8 | background: linear-gradient( top, $top 0%, $bottom 100% );
9 | }
10 |
11 | @mixin horizontal-gradient( $top, $bottom ) {
12 | background: $top;
13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% );
14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) );
15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% );
16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% );
17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% );
18 | background: linear-gradient( left, $top 0%, $bottom 100% );
19 | }
20 |
21 | @mixin radial-gradient( $outer, $inner, $type: circle ) {
22 | background: $outer;
23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) );
25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% );
28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% );
29 | }
--------------------------------------------------------------------------------
/revealjs/css/theme/template/settings.scss:
--------------------------------------------------------------------------------
1 | // Base settings for all themes that can optionally be
2 | // overridden by the super-theme
3 |
4 | // Background of the presentation
5 | $backgroundColor: #2b2b2b;
6 |
7 | // Primary/body text
8 | $mainFont: 'Lato', sans-serif;
9 | $mainFontSize: 36px;
10 | $mainColor: #eee;
11 |
12 | // Vertical spacing between blocks of text
13 | $blockMargin: 20px;
14 |
15 | // Headings
16 | $headingMargin: 0 0 $blockMargin 0;
17 | $headingFont: 'League Gothic', Impact, sans-serif;
18 | $headingColor: #eee;
19 | $headingLineHeight: 1.2;
20 | $headingLetterSpacing: normal;
21 | $headingTextTransform: uppercase;
22 | $headingTextShadow: none;
23 | $headingFontWeight: normal;
24 | $heading1TextShadow: $headingTextShadow;
25 |
26 | $heading1Size: 3.77em;
27 | $heading2Size: 2.11em;
28 | $heading3Size: 1.55em;
29 | $heading4Size: 1.00em;
30 |
31 | // Links and actions
32 | $linkColor: #13DAEC;
33 | $linkColorHover: lighten( $linkColor, 20% );
34 |
35 | // Text selection
36 | $selectionBackgroundColor: #FF5E99;
37 | $selectionColor: #fff;
38 |
39 | // Generates the presentation background, can be overridden
40 | // to return a background image or gradient
41 | @mixin bodyBackground() {
42 | background: $backgroundColor;
43 | }
--------------------------------------------------------------------------------
/revealjs/lib/font/league-gothic/LICENSE:
--------------------------------------------------------------------------------
1 | SIL Open Font License (OFL)
2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL
3 |
--------------------------------------------------------------------------------
/revealjs/lib/font/league-gothic/league-gothic.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'League Gothic';
3 | src: url('league-gothic.eot');
4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'),
5 | url('league-gothic.woff') format('woff'),
6 | url('league-gothic.ttf') format('truetype');
7 |
8 | font-weight: normal;
9 | font-style: normal;
10 | }
--------------------------------------------------------------------------------
/revealjs/lib/font/league-gothic/league-gothic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/league-gothic/league-gothic.eot
--------------------------------------------------------------------------------
/revealjs/lib/font/league-gothic/league-gothic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/league-gothic/league-gothic.ttf
--------------------------------------------------------------------------------
/revealjs/lib/font/league-gothic/league-gothic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/league-gothic/league-gothic.woff
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.eot
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.ttf
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-italic.woff
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.eot
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.ttf
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-regular.woff
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.eot
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.ttf
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibold.woff
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/stormzhang/slides/8a65935538b7bd130e900fafc72c31279e82fb97/revealjs/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff
--------------------------------------------------------------------------------
/revealjs/lib/font/source-sans-pro/source-sans-pro.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Source Sans Pro';
3 | src: url('source-sans-pro-regular.eot');
4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'),
5 | url('source-sans-pro-regular.woff') format('woff'),
6 | url('source-sans-pro-regular.ttf') format('truetype');
7 | font-weight: normal;
8 | font-style: normal;
9 | }
10 |
11 | @font-face {
12 | font-family: 'Source Sans Pro';
13 | src: url('source-sans-pro-italic.eot');
14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'),
15 | url('source-sans-pro-italic.woff') format('woff'),
16 | url('source-sans-pro-italic.ttf') format('truetype');
17 | font-weight: normal;
18 | font-style: italic;
19 | }
20 |
21 | @font-face {
22 | font-family: 'Source Sans Pro';
23 | src: url('source-sans-pro-semibold.eot');
24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'),
25 | url('source-sans-pro-semibold.woff') format('woff'),
26 | url('source-sans-pro-semibold.ttf') format('truetype');
27 | font-weight: 600;
28 | font-style: normal;
29 | }
30 |
31 | @font-face {
32 | font-family: 'Source Sans Pro';
33 | src: url('source-sans-pro-semibolditalic.eot');
34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'),
35 | url('source-sans-pro-semibolditalic.woff') format('woff'),
36 | url('source-sans-pro-semibolditalic.ttf') format('truetype');
37 | font-weight: 600;
38 | font-style: italic;
39 | }
--------------------------------------------------------------------------------
/revealjs/lib/js/classList.js:
--------------------------------------------------------------------------------
1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p
2 |
3 |
4 |
5 |
6 |
7 | reveal.js - Barebones
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | Barebones Presentation
20 | This example contains the bare minimum includes and markup required to run a reveal.js presentation.
21 |
22 |
23 |
24 | No Theme
25 | There's no theme included, so it will fall back on browser defaults.
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/revealjs/test/examples/embedded-media.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | reveal.js - Embedded Media
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | Embedded Media Test
23 |
24 |
25 |
28 |
29 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/revealjs/test/test-markdown.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | reveal.js - Test Markdown
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/revealjs/test/test-markdown.js:
--------------------------------------------------------------------------------
1 |
2 |
3 | Reveal.addEventListener( 'ready', function() {
4 |
5 | QUnit.module( 'Markdown' );
6 |
7 | test( 'Vertical separator', function() {
8 | strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
9 | });
10 |
11 |
12 | } );
13 |
14 | Reveal.initialize();
15 |
16 |
--------------------------------------------------------------------------------
/revealjs/test/test-pdf.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | reveal.js - Test PDF exports
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 1
25 |
26 |
27 |
28 |
39 |
40 |
41 |
42 | 3.1
43 |
44 | - 4.1
45 | - 4.2
46 | - 4.3
47 |
48 |
49 |
50 |
57 |
58 |
59 | 3.3
60 |
61 | - 3.3.1
62 | - 3.3.2
63 | - 3.3.3
64 |
65 |
66 |
67 |
68 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/revealjs/test/test-pdf.js:
--------------------------------------------------------------------------------
1 |
2 | Reveal.addEventListener( 'ready', function() {
3 |
4 | // Only one test for now, we're mainly ensuring that there
5 | // are no execution errors when running PDF mode
6 |
7 | test( 'Reveal.isReady', function() {
8 | strictEqual( Reveal.isReady(), true, 'returns true' );
9 | });
10 |
11 |
12 | } );
13 |
14 | Reveal.initialize({ pdf: true });
15 |
16 |
--------------------------------------------------------------------------------
/revealjs/test/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | reveal.js - Tests
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 1
24 |
25 |
26 |
27 |
28 |
29 |
30 |
41 |
42 |
43 |
44 | 3.1
45 |
46 | - 4.1
47 | - 4.2
48 | - 4.3
49 |
50 |
51 |
52 |
60 |
61 |
62 | 3.3
63 |
64 | - 3.3.1
65 | - 3.3.2
66 | - 3.3.3
67 |
68 |
69 |
70 |
71 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/src/data.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 | var fs = require('fs');
5 |
6 | var filenames = fs.readdirSync("./src").filter(function (filename) {
7 | return filename.indexOf('.md') > 0
8 | });
9 |
10 | var routes = filenames.map(function(item){
11 | return "/" + item.split(".")[0] + "/";
12 | });
13 |
14 | routes.push("/");
15 |
16 | module.exports = {
17 | routes: routes
18 | }
19 |
--------------------------------------------------------------------------------
/src/list.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var path = require('path');
4 | var fm = require('front-matter');
5 | var marked = require('marked');
6 | var md = require('reveal.js/plugin/markdown/markdown');
7 | var Mustache = require('mustache');
8 | var fs = require('fs');
9 |
10 | function split_content(content){
11 | var ret = [];
12 | var lines = content.split('\n');
13 | lines.forEach(function (line, index, array){
14 | if(line.indexOf("###") >= 0){
15 | line = "----\n\n" + line;
16 | }else{
17 | if(line.indexOf("##") >= 0){
18 | line = "---\n\n" + line;
19 | }
20 | }
21 | ret.push(line);
22 | });
23 | return ret.join("\n");
24 | }
25 |
26 |
27 | module.exports = function render(locals, callback) {
28 | var opts = {
29 | printMode: false,
30 | separator: '^(\r\n?|\n)---(\r\n?|\n)$',
31 | verticalSeparator: '^(\r\n?|\n)----(\r\n?|\n)$',
32 | revealOptions: {}
33 | };
34 |
35 | if(locals.path == "/"){
36 | var tpl = require("./list.tpl");
37 | console.log(locals.data);
38 | var view = {
39 | links: locals.routes,
40 | };
41 | var output = Mustache.render(tpl, view);
42 | }else{
43 | var source_file = "./" + locals.path.split("/").join("") + ".md";
44 | var content = require(source_file);
45 | var content_with_split = split_content(content);
46 | var slides = md.slidify(content_with_split, opts);
47 | var view = {
48 | title: source_file,
49 | prefix: "../revealjs/",
50 | slides: slides
51 | };
52 | var tpl = require("./index.tpl");
53 | var output = Mustache.render(tpl, view);
54 | }
55 | callback(null, output);
56 | }
57 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var webpack = require('webpack');
2 | var path = require('path');
3 | var StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');
4 | var data = require('./src/data.js');
5 |
6 | module.exports = {
7 | entry: {
8 | 'main': './src/main.js'
9 | },
10 | debug: true,
11 | devtool: 'source-map',
12 | output: {
13 | filename: 'bundle.js',
14 | libraryTarget: 'umd'
15 | },
16 | plugins: [
17 | new StaticSiteGeneratorPlugin('main', data.routes, data)
18 | ],
19 | module: {
20 | loaders: [
21 | {
22 | test: /\.js$/,
23 | exclude: /(node_modules|bower_components)/,
24 | loader: "babel-loader"
25 | },
26 | {
27 | test: /\.json$/,
28 | loader: "json-loader"
29 | },
30 | {
31 | test: /\.md$/,
32 | loader: "raw-loader"
33 | },
34 | {
35 | test: /\.tpl$/,
36 | loader: "raw-loader"
37 | }
38 | ]
39 | },
40 | node: {
41 | fs: "empty"
42 | }
43 | };
44 |
--------------------------------------------------------------------------------