breezeblocks 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.ruby-version +1 -0
- data/Gemfile +11 -0
- data/README.md +55 -0
- data/Rakefile +22 -0
- data/bin/deploy +12 -0
- data/bin/setup +13 -0
- data/breezeblocks.gemspec +22 -0
- data/config.rb +24 -0
- data/lib/breezeblocks.rb +2 -0
- data/lib/breezeblocks/import_generator.rb +80 -0
- data/lib/breezeblocks/list_generator.rb +22 -0
- data/lib/breezeblocks/version.rb +3 -0
- data/lib/snippet_helpers.rb +89 -0
- data/source/_accordion.html.haml +15 -0
- data/source/_accordion_tabs.html.haml +17 -0
- data/source/_accordion_tabs_minimal.html.haml +17 -0
- data/source/_animate.html.haml +3 -0
- data/source/_animate_info.html.haml +7 -0
- data/source/_badges.html.haml +6 -0
- data/source/_breadcrumbs.html.haml +6 -0
- data/source/_button_group.html.haml +13 -0
- data/source/_cards.html.haml +23 -0
- data/source/_centered_navigation.html.haml +42 -0
- data/source/_code.html.haml +6 -0
- data/source/_comment.html.haml +14 -0
- data/source/_device.html.haml +7 -0
- data/source/_dropdown.html.haml +9 -0
- data/source/_expander.html.haml +4 -0
- data/source/_fade_in.html.haml +10 -0
- data/source/_flashes.html.haml +16 -0
- data/source/_flex_boxes.html.haml +25 -0
- data/source/_footer.html.haml +31 -0
- data/source/_footer_2.html.haml +30 -0
- data/source/_grid_items.html.haml +29 -0
- data/source/_grid_items_lines.html.haml +35 -0
- data/source/_hero.html.haml +8 -0
- data/source/_hover_tile_animation.html.haml +6 -0
- data/source/_icon_bullet_points.html.haml +19 -0
- data/source/_image_gradient_dynamic.html.haml +5 -0
- data/source/_maps.html.haml +70 -0
- data/source/_modal.html.haml +10 -0
- data/source/_navigation.html.haml +42 -0
- data/source/_pagination.html.haml +22 -0
- data/source/_parallax.html.haml +4 -0
- data/source/_progress_bar.html.haml +2 -0
- data/source/_progress_bar_indication.html.haml +3 -0
- data/source/_ribbon.html.haml +3 -0
- data/source/_scroll_on_page.html.haml +17 -0
- data/source/_search_bar.html.haml +4 -0
- data/source/_search_tools.html.haml +39 -0
- data/source/_side_image.html.haml +9 -0
- data/source/_sliding_menu.html.haml +11 -0
- data/source/_snippet.html.haml +11 -0
- data/source/_stats.html.haml +14 -0
- data/source/_switch.html.haml +3 -0
- data/source/_tables.html.haml +31 -0
- data/source/_tables_minimal.html.haml +31 -0
- data/source/_texture-legend.html.haml +20 -0
- data/source/_textures.html.haml +3 -0
- data/source/_tooltip.html.haml +4 -0
- data/source/_type_system_geometric.html.haml +30 -0
- data/source/_type_system_rounded.html.haml +30 -0
- data/source/_type_system_sans.html.haml +30 -0
- data/source/_type_system_serif.html.haml +31 -0
- data/source/_type_system_slab.html.haml +30 -0
- data/source/_type_system_traditional.html.haml +30 -0
- data/source/_vertical_tabs.html.haml +19 -0
- data/source/_video.html.haml +3 -0
- data/source/components.html.haml +162 -0
- data/source/images/EmeraldLake.jpg +0 -0
- data/source/images/ZeroClipboard.swf +0 -0
- data/source/images/bourbon-nav/bitters.png +0 -0
- data/source/images/bourbon-nav/bitters@2x.png +0 -0
- data/source/images/bourbon-nav/bourbon.png +0 -0
- data/source/images/bourbon-nav/bourbon@2x.png +0 -0
- data/source/images/bourbon-nav/neat.png +0 -0
- data/source/images/bourbon-nav/neat@2x.png +0 -0
- data/source/images/bourbon-nav/refills.png +0 -0
- data/source/images/bourbon-nav/refills@2x.png +0 -0
- data/source/images/cat.png +0 -0
- data/source/images/cosmin_capitanu_screen.jpg +0 -0
- data/source/images/facebook-logo-circle-dark.png +0 -0
- data/source/images/facebook-logo-circle.png +0 -0
- data/source/images/indesign-logo-circle.png +0 -0
- data/source/images/lake-transparent.png +0 -0
- data/source/images/menu-white.png +0 -0
- data/source/images/menu.png +0 -0
- data/source/images/mountain-thin.png +0 -0
- data/source/images/mountains-2.png +0 -0
- data/source/images/mountains-3.png +0 -0
- data/source/images/mountains-4.png +0 -0
- data/source/images/mountains.png +0 -0
- data/source/images/placeholder_logo_1.png +0 -0
- data/source/images/placeholder_logo_1_dark.png +0 -0
- data/source/images/placeholder_logo_2.png +0 -0
- data/source/images/placeholder_logo_2_dark.png +0 -0
- data/source/images/placeholder_logo_3.png +0 -0
- data/source/images/placeholder_logo_3_dark.png +0 -0
- data/source/images/placeholder_logo_4.png +0 -0
- data/source/images/placeholder_logo_4_dark.png +0 -0
- data/source/images/ralph-gray.png +0 -0
- data/source/images/ralph.png +0 -0
- data/source/images/refills-logo.svg +18 -0
- data/source/images/refills-screenshot1.png +0 -0
- data/source/images/refills-screenshot2.jpg +0 -0
- data/source/images/refills-screenshot3.png +0 -0
- data/source/images/search-icon-black.png +0 -0
- data/source/images/search-icon.png +0 -0
- data/source/images/sliding-menu.png +0 -0
- data/source/images/textures/45degreee_fabric.png +0 -0
- data/source/images/textures/45degreee_fabric_@2X.png +0 -0
- data/source/images/textures/absurdidad.png +0 -0
- data/source/images/textures/absurdidad_@2X.png +0 -0
- data/source/images/textures/az_subtle.png +0 -0
- data/source/images/textures/az_subtle_@2X.png +0 -0
- data/source/images/textures/bgnoise_lg.png +0 -0
- data/source/images/textures/bgnoise_lg_@2X.png +0 -0
- data/source/images/textures/binding_light.png +0 -0
- data/source/images/textures/binding_light@2x.png +0 -0
- data/source/images/textures/brillant.png +0 -0
- data/source/images/textures/brillant_@2X.png +0 -0
- data/source/images/textures/brushed.png +0 -0
- data/source/images/textures/brushed_@2X.png +0 -0
- data/source/images/textures/brushed_alu.png +0 -0
- data/source/images/textures/brushed_alu_@2X.png +0 -0
- data/source/images/textures/chruch.png +0 -0
- data/source/images/textures/chruch_@2X.png +0 -0
- data/source/images/textures/circles.png +0 -0
- data/source/images/textures/circles_@2X.png +0 -0
- data/source/images/textures/concrete_wall_2.png +0 -0
- data/source/images/textures/concrete_wall_2_@2X.png +0 -0
- data/source/images/textures/concrete_wall_3.png +0 -0
- data/source/images/textures/concrete_wall_3_@2X.png +0 -0
- data/source/images/textures/corrugation.png +0 -0
- data/source/images/textures/corrugation_@2X.png +0 -0
- data/source/images/textures/cream_pixels.png +0 -0
- data/source/images/textures/cream_pixels@2x.png +0 -0
- data/source/images/textures/cross_scratches.png +0 -0
- data/source/images/textures/cross_scratches_@2X.png +0 -0
- data/source/images/textures/crosses.png +0 -0
- data/source/images/textures/crosses_@2X.png +0 -0
- data/source/images/textures/debut_light.png +0 -0
- data/source/images/textures/debut_light_@2X.png +0 -0
- data/source/images/textures/diagonal-noise.png +0 -0
- data/source/images/textures/diagonal-noise_@2X.png +0 -0
- data/source/images/textures/diagonal_waves.png +0 -0
- data/source/images/textures/diagonal_waves_@2X.png +0 -0
- data/source/images/textures/double_lined.png +0 -0
- data/source/images/textures/double_lined_@2X.png +0 -0
- data/source/images/textures/dust.png +0 -0
- data/source/images/textures/dust@2x.png +0 -0
- data/source/images/textures/dust_@2X.png +0 -0
- data/source/images/textures/fabric_plaid.png +0 -0
- data/source/images/textures/fabric_plaid_@2X.png +0 -0
- data/source/images/textures/fancy_deboss.png +0 -0
- data/source/images/textures/fancy_deboss_@2X.png +0 -0
- data/source/images/textures/farmer.png +0 -0
- data/source/images/textures/farmer_@2X.png +0 -0
- data/source/images/textures/first_aid_kit.png +0 -0
- data/source/images/textures/first_aid_kit_@2X.png +0 -0
- data/source/images/textures/graphy.png +0 -0
- data/source/images/textures/graphy_@2X.png +0 -0
- data/source/images/textures/grey.png +0 -0
- data/source/images/textures/grey_@2X.png +0 -0
- data/source/images/textures/grid.png +0 -0
- data/source/images/textures/grid_@2X.png +0 -0
- data/source/images/textures/grid_noise.png +0 -0
- data/source/images/textures/grid_noise_@2X.png +0 -0
- data/source/images/textures/gridme.png +0 -0
- data/source/images/textures/gridme_@2X.png +0 -0
- data/source/images/textures/grilled.png +0 -0
- data/source/images/textures/grilled_@2X.png +0 -0
- data/source/images/textures/groovepaper.png +0 -0
- data/source/images/textures/groovepaper_@2X.png +0 -0
- data/source/images/textures/honey_im_subtle.png +0 -0
- data/source/images/textures/honey_im_subtle_@2X.png +0 -0
- data/source/images/textures/husk.png +0 -0
- data/source/images/textures/husk_@2X.png +0 -0
- data/source/images/textures/inverted/45degreee_fabric.png +0 -0
- data/source/images/textures/inverted/45degreee_fabric_@2X.png +0 -0
- data/source/images/textures/inverted/absurdidad.png +0 -0
- data/source/images/textures/inverted/absurdidad_@2X.png +0 -0
- data/source/images/textures/inverted/az_subtle.png +0 -0
- data/source/images/textures/inverted/az_subtle_@2X.png +0 -0
- data/source/images/textures/inverted/bgnoise_lg.png +0 -0
- data/source/images/textures/inverted/bgnoise_lg_@2X.png +0 -0
- data/source/images/textures/inverted/binding_light.png +0 -0
- data/source/images/textures/inverted/binding_light@2x.png +0 -0
- data/source/images/textures/inverted/brillant.png +0 -0
- data/source/images/textures/inverted/brillant_@2X.png +0 -0
- data/source/images/textures/inverted/brushed.png +0 -0
- data/source/images/textures/inverted/brushed_@2X.png +0 -0
- data/source/images/textures/inverted/brushed_alu.png +0 -0
- data/source/images/textures/inverted/brushed_alu_@2X.png +0 -0
- data/source/images/textures/inverted/chruch.png +0 -0
- data/source/images/textures/inverted/chruch_@2X.png +0 -0
- data/source/images/textures/inverted/circles.png +0 -0
- data/source/images/textures/inverted/circles_@2X.png +0 -0
- data/source/images/textures/inverted/concrete_wall_2.png +0 -0
- data/source/images/textures/inverted/concrete_wall_2_@2X.png +0 -0
- data/source/images/textures/inverted/concrete_wall_3.png +0 -0
- data/source/images/textures/inverted/concrete_wall_3_@2X.png +0 -0
- data/source/images/textures/inverted/corrugation.png +0 -0
- data/source/images/textures/inverted/corrugation_@2X.png +0 -0
- data/source/images/textures/inverted/cream_pixels.png +0 -0
- data/source/images/textures/inverted/cream_pixels@2x.png +0 -0
- data/source/images/textures/inverted/cross_scratches.png +0 -0
- data/source/images/textures/inverted/cross_scratches_@2X.png +0 -0
- data/source/images/textures/inverted/crosses.png +0 -0
- data/source/images/textures/inverted/crosses_@2X.png +0 -0
- data/source/images/textures/inverted/debut_light.png +0 -0
- data/source/images/textures/inverted/debut_light_@2X.png +0 -0
- data/source/images/textures/inverted/diagonal-noise.png +0 -0
- data/source/images/textures/inverted/diagonal-noise_@2X.png +0 -0
- data/source/images/textures/inverted/diagonal_waves.png +0 -0
- data/source/images/textures/inverted/diagonal_waves_@2X.png +0 -0
- data/source/images/textures/inverted/double_lined.png +0 -0
- data/source/images/textures/inverted/double_lined_@2X.png +0 -0
- data/source/images/textures/inverted/dust.png +0 -0
- data/source/images/textures/inverted/dust@2x.png +0 -0
- data/source/images/textures/inverted/dust_@2X.png +0 -0
- data/source/images/textures/inverted/fabric_plaid.png +0 -0
- data/source/images/textures/inverted/fabric_plaid_@2X.png +0 -0
- data/source/images/textures/inverted/fancy_deboss.png +0 -0
- data/source/images/textures/inverted/fancy_deboss_@2X.png +0 -0
- data/source/images/textures/inverted/farmer.png +0 -0
- data/source/images/textures/inverted/farmer_@2X.png +0 -0
- data/source/images/textures/inverted/first_aid_kit.png +0 -0
- data/source/images/textures/inverted/first_aid_kit_@2X.png +0 -0
- data/source/images/textures/inverted/graphy.png +0 -0
- data/source/images/textures/inverted/graphy_@2X.png +0 -0
- data/source/images/textures/inverted/grey.png +0 -0
- data/source/images/textures/inverted/grey_@2X.png +0 -0
- data/source/images/textures/inverted/grid.png +0 -0
- data/source/images/textures/inverted/grid_@2X.png +0 -0
- data/source/images/textures/inverted/grid_noise.png +0 -0
- data/source/images/textures/inverted/grid_noise_@2X.png +0 -0
- data/source/images/textures/inverted/gridme.png +0 -0
- data/source/images/textures/inverted/gridme_@2X.png +0 -0
- data/source/images/textures/inverted/grilled.png +0 -0
- data/source/images/textures/inverted/grilled_@2X.png +0 -0
- data/source/images/textures/inverted/groovepaper.png +0 -0
- data/source/images/textures/inverted/groovepaper_@2X.png +0 -0
- data/source/images/textures/inverted/honey_im_subtle.png +0 -0
- data/source/images/textures/inverted/honey_im_subtle_@2X.png +0 -0
- data/source/images/textures/inverted/husk.png +0 -0
- data/source/images/textures/inverted/husk_@2X.png +0 -0
- data/source/images/textures/inverted/kindajean.png +0 -0
- data/source/images/textures/inverted/kindajean_@2X.png +0 -0
- data/source/images/textures/inverted/lghtmesh.png +0 -0
- data/source/images/textures/inverted/lghtmesh_@2X.png +0 -0
- data/source/images/textures/inverted/light_alu.png +0 -0
- data/source/images/textures/inverted/light_alu_@2X.png +0 -0
- data/source/images/textures/inverted/light_noise_diagonal.png +0 -0
- data/source/images/textures/inverted/light_noise_diagonal_@2X.png +0 -0
- data/source/images/textures/inverted/lil_fiber.png +0 -0
- data/source/images/textures/inverted/lil_fiber_@2X.png +0 -0
- data/source/images/textures/inverted/line_diagonal1.png +0 -0
- data/source/images/textures/inverted/line_diagonal2.png +0 -0
- data/source/images/textures/inverted/line_horizontal1.png +0 -0
- data/source/images/textures/inverted/line_horizontal2.png +0 -0
- data/source/images/textures/inverted/linen.png +0 -0
- data/source/images/textures/inverted/linen_@2X.png +0 -0
- data/source/images/textures/inverted/little_pluses.png +0 -0
- data/source/images/textures/inverted/little_pluses_@2X.png +0 -0
- data/source/images/textures/inverted/mooning.png +0 -0
- data/source/images/textures/inverted/mooning@2x.png +0 -0
- data/source/images/textures/inverted/noise_lines.png +0 -0
- data/source/images/textures/inverted/noise_lines_@2X.png +0 -0
- data/source/images/textures/inverted/noise_pattern_with_crosslines.png +0 -0
- data/source/images/textures/inverted/noise_pattern_with_crosslines_@2X.png +0 -0
- data/source/images/textures/inverted/noisy.png +0 -0
- data/source/images/textures/inverted/noisy_@2X.png +0 -0
- data/source/images/textures/inverted/noisy_grid.png +0 -0
- data/source/images/textures/inverted/noisy_grid_@2X.png +0 -0
- data/source/images/textures/inverted/noisy_grid_simple.png +0 -0
- data/source/images/textures/inverted/old_mathematics.png +0 -0
- data/source/images/textures/inverted/old_mathematics_@2X.png +0 -0
- data/source/images/textures/inverted/old_wall.png +0 -0
- data/source/images/textures/inverted/old_wall_@2X.png +0 -0
- data/source/images/textures/inverted/p5.png +0 -0
- data/source/images/textures/inverted/p5_@2X.png +0 -0
- data/source/images/textures/inverted/paper.png +0 -0
- data/source/images/textures/inverted/paper_@2X.png +0 -0
- data/source/images/textures/inverted/pinstripe.png +0 -0
- data/source/images/textures/inverted/pinstripe_@2X.png +0 -0
- data/source/images/textures/inverted/ps_neutral.png +0 -0
- data/source/images/textures/inverted/ps_neutral_@2X.png +0 -0
- data/source/images/textures/inverted/pw_maze_white.png +0 -0
- data/source/images/textures/inverted/pw_maze_white_@2X.png +0 -0
- data/source/images/textures/inverted/pw_pattern.png +0 -0
- data/source/images/textures/inverted/pw_pattern_@2X.png +0 -0
- data/source/images/textures/inverted/retina_dust.png +0 -0
- data/source/images/textures/inverted/retina_dust_@2X.png +0 -0
- data/source/images/textures/inverted/rice_paper.png +0 -0
- data/source/images/textures/inverted/rice_paper@2x.png +0 -0
- data/source/images/textures/inverted/rough_diagonal.png +0 -0
- data/source/images/textures/inverted/rough_diagonal_@2X.png +0 -0
- data/source/images/textures/inverted/shinedotted.png +0 -0
- data/source/images/textures/inverted/shinedotted_@2X.png +0 -0
- data/source/images/textures/inverted/skin_side_up.png +0 -0
- data/source/images/textures/inverted/skin_side_up_@2X.png +0 -0
- data/source/images/textures/inverted/squairy_light.png +0 -0
- data/source/images/textures/inverted/squairy_light_@2X.png +0 -0
- data/source/images/textures/inverted/stacked_circles.png +0 -0
- data/source/images/textures/inverted/stacked_circles_@2X.png +0 -0
- data/source/images/textures/inverted/striped_lens.png +0 -0
- data/source/images/textures/inverted/striped_lens_@2X.png +0 -0
- data/source/images/textures/inverted/struckaxiom.png +0 -0
- data/source/images/textures/inverted/struckaxiom_@2X.png +0 -0
- data/source/images/textures/inverted/stucco.png +0 -0
- data/source/images/textures/inverted/stucco_@2X.png +0 -0
- data/source/images/textures/inverted/subtle_dots.png +0 -0
- data/source/images/textures/inverted/subtle_dots_@2X.png +0 -0
- data/source/images/textures/inverted/subtle_freckles.png +0 -0
- data/source/images/textures/inverted/subtle_freckles_@2X.png +0 -0
- data/source/images/textures/inverted/subtle_grunge.png +0 -0
- data/source/images/textures/inverted/subtle_grunge_@2X.png +0 -0
- data/source/images/textures/inverted/subtle_surface.png +0 -0
- data/source/images/textures/inverted/subtle_surface_@2X.png +0 -0
- data/source/images/textures/inverted/subtle_zebra_3d.png +0 -0
- data/source/images/textures/inverted/subtle_zebra_3d_@2X.png +0 -0
- data/source/images/textures/inverted/subtlenet2.png +0 -0
- data/source/images/textures/inverted/subtlenet2_@2X.png +0 -0
- data/source/images/textures/inverted/tex2res5.png +0 -0
- data/source/images/textures/inverted/tex2res5_@2X.png +0 -0
- data/source/images/textures/inverted/texturetastic_gray.png +0 -0
- data/source/images/textures/inverted/texturetastic_gray_@2X.png +0 -0
- data/source/images/textures/inverted/tiny_grid.png +0 -0
- data/source/images/textures/inverted/tiny_grid_@2X.png +0 -0
- data/source/images/textures/inverted/vichy.png +0 -0
- data/source/images/textures/inverted/vichy_@2X.png +0 -0
- data/source/images/textures/inverted/vintage_speckles.png +0 -0
- data/source/images/textures/inverted/vintage_speckles_@2X.png +0 -0
- data/source/images/textures/inverted/wavecut.png +0 -0
- data/source/images/textures/inverted/wavecut_@2X.png +0 -0
- data/source/images/textures/inverted/wavegrid.png +0 -0
- data/source/images/textures/inverted/wavegrid_@2X.png +0 -0
- data/source/images/textures/inverted/white_carbon.png +0 -0
- data/source/images/textures/inverted/white_carbon_@2X.png +0 -0
- data/source/images/textures/inverted/white_texture.png +0 -0
- data/source/images/textures/inverted/white_texture_@2X.png +0 -0
- data/source/images/textures/inverted/white_wave.png +0 -0
- data/source/images/textures/inverted/white_wave_@2X.png +0 -0
- data/source/images/textures/inverted/whitey.png +0 -0
- data/source/images/textures/inverted/whitey_@2X.png +0 -0
- data/source/images/textures/inverted/worn_dots.png +0 -0
- data/source/images/textures/inverted/worn_dots_@2X.png +0 -0
- data/source/images/textures/kindajean.png +0 -0
- data/source/images/textures/kindajean_@2X.png +0 -0
- data/source/images/textures/lghtmesh.png +0 -0
- data/source/images/textures/lghtmesh_@2X.png +0 -0
- data/source/images/textures/light_alu.png +0 -0
- data/source/images/textures/light_alu_@2X.png +0 -0
- data/source/images/textures/light_noise_diagonal.png +0 -0
- data/source/images/textures/light_noise_diagonal_@2X.png +0 -0
- data/source/images/textures/lil_fiber.png +0 -0
- data/source/images/textures/lil_fiber_@2X.png +0 -0
- data/source/images/textures/line_diagonal1.png +0 -0
- data/source/images/textures/line_diagonal2.png +0 -0
- data/source/images/textures/line_horizontal1.png +0 -0
- data/source/images/textures/line_horizontal2.png +0 -0
- data/source/images/textures/linen.png +0 -0
- data/source/images/textures/linen_@2X.png +0 -0
- data/source/images/textures/little_pluses.png +0 -0
- data/source/images/textures/little_pluses_@2X.png +0 -0
- data/source/images/textures/mooning.png +0 -0
- data/source/images/textures/mooning@2x.png +0 -0
- data/source/images/textures/noise_lines.png +0 -0
- data/source/images/textures/noise_lines_@2X.png +0 -0
- data/source/images/textures/noise_pattern_with_crosslines.png +0 -0
- data/source/images/textures/noise_pattern_with_crosslines_@2X.png +0 -0
- data/source/images/textures/noisy.png +0 -0
- data/source/images/textures/noisy_@2X.png +0 -0
- data/source/images/textures/noisy_grid.png +0 -0
- data/source/images/textures/noisy_grid_@2X.png +0 -0
- data/source/images/textures/noisy_grid_simple.png +0 -0
- data/source/images/textures/old_mathematics.png +0 -0
- data/source/images/textures/old_mathematics_@2X.png +0 -0
- data/source/images/textures/old_wall.png +0 -0
- data/source/images/textures/old_wall_@2X.png +0 -0
- data/source/images/textures/p5.png +0 -0
- data/source/images/textures/p5_@2X.png +0 -0
- data/source/images/textures/paper.png +0 -0
- data/source/images/textures/paper_@2X.png +0 -0
- data/source/images/textures/pinstripe.png +0 -0
- data/source/images/textures/pinstripe_@2X.png +0 -0
- data/source/images/textures/ps_neutral.png +0 -0
- data/source/images/textures/ps_neutral_@2X.png +0 -0
- data/source/images/textures/pw_maze_white.png +0 -0
- data/source/images/textures/pw_maze_white_@2X.png +0 -0
- data/source/images/textures/pw_pattern.png +0 -0
- data/source/images/textures/pw_pattern_@2X.png +0 -0
- data/source/images/textures/retina_dust.png +0 -0
- data/source/images/textures/retina_dust_@2X.png +0 -0
- data/source/images/textures/rice_paper.png +0 -0
- data/source/images/textures/rice_paper@2x.png +0 -0
- data/source/images/textures/rough_diagonal.png +0 -0
- data/source/images/textures/rough_diagonal_@2X.png +0 -0
- data/source/images/textures/shinedotted.png +0 -0
- data/source/images/textures/shinedotted_@2X.png +0 -0
- data/source/images/textures/skin_side_up.png +0 -0
- data/source/images/textures/skin_side_up_@2X.png +0 -0
- data/source/images/textures/squairy_light.png +0 -0
- data/source/images/textures/squairy_light_@2X.png +0 -0
- data/source/images/textures/stacked_circles.png +0 -0
- data/source/images/textures/stacked_circles_@2X.png +0 -0
- data/source/images/textures/striped_lens.png +0 -0
- data/source/images/textures/striped_lens_@2X.png +0 -0
- data/source/images/textures/struckaxiom.png +0 -0
- data/source/images/textures/struckaxiom_@2X.png +0 -0
- data/source/images/textures/stucco.png +0 -0
- data/source/images/textures/stucco_@2X.png +0 -0
- data/source/images/textures/subtle_dots.png +0 -0
- data/source/images/textures/subtle_dots_@2X.png +0 -0
- data/source/images/textures/subtle_freckles.png +0 -0
- data/source/images/textures/subtle_freckles_@2X.png +0 -0
- data/source/images/textures/subtle_grunge.png +0 -0
- data/source/images/textures/subtle_grunge_@2X.png +0 -0
- data/source/images/textures/subtle_surface.png +0 -0
- data/source/images/textures/subtle_surface_@2X.png +0 -0
- data/source/images/textures/subtle_zebra_3d.png +0 -0
- data/source/images/textures/subtle_zebra_3d_@2X.png +0 -0
- data/source/images/textures/subtlenet2.png +0 -0
- data/source/images/textures/subtlenet2_@2X.png +0 -0
- data/source/images/textures/tex2res5.png +0 -0
- data/source/images/textures/tex2res5_@2X.png +0 -0
- data/source/images/textures/texturetastic_gray.png +0 -0
- data/source/images/textures/texturetastic_gray_@2X.png +0 -0
- data/source/images/textures/tiny_grid.png +0 -0
- data/source/images/textures/tiny_grid_@2X.png +0 -0
- data/source/images/textures/vichy.png +0 -0
- data/source/images/textures/vichy_@2X.png +0 -0
- data/source/images/textures/vintage_speckles.png +0 -0
- data/source/images/textures/vintage_speckles_@2X.png +0 -0
- data/source/images/textures/wavecut.png +0 -0
- data/source/images/textures/wavecut_@2X.png +0 -0
- data/source/images/textures/wavegrid.png +0 -0
- data/source/images/textures/wavegrid_@2X.png +0 -0
- data/source/images/textures/white_carbon.png +0 -0
- data/source/images/textures/white_carbon_@2X.png +0 -0
- data/source/images/textures/white_texture.png +0 -0
- data/source/images/textures/white_texture_@2X.png +0 -0
- data/source/images/textures/white_wave.png +0 -0
- data/source/images/textures/white_wave_@2X.png +0 -0
- data/source/images/textures/whitey.png +0 -0
- data/source/images/textures/whitey_@2X.png +0 -0
- data/source/images/textures/worn_dots.png +0 -0
- data/source/images/textures/worn_dots_@2X.png +0 -0
- data/source/images/twitter-logo-circle-dark.png +0 -0
- data/source/images/twitter-logo-circle.png +0 -0
- data/source/images/youtube-logo-circle-dark.png +0 -0
- data/source/images/youtube-logo-circle.png +0 -0
- data/source/index.html.haml +127 -0
- data/source/javascripts/all.js +10 -0
- data/source/javascripts/breezeblocks/accordion.js +5 -0
- data/source/javascripts/breezeblocks/accordion_tabs.js +19 -0
- data/source/javascripts/breezeblocks/accordion_tabs_minimal.js +19 -0
- data/source/javascripts/breezeblocks/animate.js +10 -0
- data/source/javascripts/breezeblocks/centered_navigation.js +13 -0
- data/source/javascripts/breezeblocks/coffeescript/accordion.coffee +6 -0
- data/source/javascripts/breezeblocks/coffeescript/accordion_tabs.coffee +19 -0
- data/source/javascripts/breezeblocks/coffeescript/accordion_tabs_minimal.coffee +19 -0
- data/source/javascripts/breezeblocks/coffeescript/animate.coffee +12 -0
- data/source/javascripts/breezeblocks/coffeescript/centered_navigation.coffee +13 -0
- data/source/javascripts/breezeblocks/coffeescript/dropdown.coffee +15 -0
- data/source/javascripts/breezeblocks/coffeescript/expander.coffee +9 -0
- data/source/javascripts/breezeblocks/coffeescript/fade_in.coffee +20 -0
- data/source/javascripts/breezeblocks/coffeescript/modal.coffee +18 -0
- data/source/javascripts/breezeblocks/coffeescript/navigation.coffee +13 -0
- data/source/javascripts/breezeblocks/coffeescript/parallax.coffee +22 -0
- data/source/javascripts/breezeblocks/coffeescript/scroll_on_page.coffee +23 -0
- data/source/javascripts/breezeblocks/coffeescript/search_tools.coffee +85 -0
- data/source/javascripts/breezeblocks/coffeescript/sliding_menu.coffee +8 -0
- data/source/javascripts/breezeblocks/coffeescript/vertical_tabs.coffee +28 -0
- data/source/javascripts/breezeblocks/dropdown.js +12 -0
- data/source/javascripts/breezeblocks/expander.js +8 -0
- data/source/javascripts/breezeblocks/fade_in.js +23 -0
- data/source/javascripts/breezeblocks/modal.js +17 -0
- data/source/javascripts/breezeblocks/navigation.js +13 -0
- data/source/javascripts/breezeblocks/parallax.js +30 -0
- data/source/javascripts/breezeblocks/scroll_on_page.js +26 -0
- data/source/javascripts/breezeblocks/search_tools.js +110 -0
- data/source/javascripts/breezeblocks/sliding_menu.js +6 -0
- data/source/javascripts/breezeblocks/vertical_tabs.js +32 -0
- data/source/javascripts/jquery.erToc.js +477 -0
- data/source/javascripts/jquery.glide.js +941 -0
- data/source/javascripts/menuAnchorAnimation.js +11 -0
- data/source/javascripts/vendor/ZeroClipboard.min.js +9 -0
- data/source/javascripts/vendor/fixedsticky.js +185 -0
- data/source/javascripts/vendor/prism.js +13 -0
- data/source/javascripts/vendor/smooth-scroll.js +125 -0
- data/source/layouts/layout.haml +108 -0
- data/source/refills-hero.html.haml +15 -0
- data/source/refills-menu.html.haml +4 -0
- data/source/refills-page-scripts.html.haml +65 -0
- data/source/stylesheets/_bourbon-nav.sass +57 -0
- data/source/stylesheets/_refills-nav.sass +80 -0
- data/source/stylesheets/_refills-styles.sass +483 -0
- data/source/stylesheets/all.sass +66 -0
- data/source/stylesheets/breezeblocks/_accordion-tabs-minimal.sass +52 -0
- data/source/stylesheets/breezeblocks/_accordion-tabs.sass +76 -0
- data/source/stylesheets/breezeblocks/_accordion.sass +56 -0
- data/source/stylesheets/breezeblocks/_animate-info.sass +10 -0
- data/source/stylesheets/breezeblocks/_animate.sass +58 -0
- data/source/stylesheets/breezeblocks/_badges.sass +31 -0
- data/source/stylesheets/breezeblocks/_breadcrumbs.sass +74 -0
- data/source/stylesheets/breezeblocks/_button-group.sass +74 -0
- data/source/stylesheets/breezeblocks/_cards.sass +69 -0
- data/source/stylesheets/breezeblocks/_centered-navigation.sass +182 -0
- data/source/stylesheets/breezeblocks/_comment.sass +49 -0
- data/source/stylesheets/breezeblocks/_device.sass +67 -0
- data/source/stylesheets/breezeblocks/_dropdown.sass +112 -0
- data/source/stylesheets/breezeblocks/_expander.sass +40 -0
- data/source/stylesheets/breezeblocks/_fade-in.sass +30 -0
- data/source/stylesheets/breezeblocks/_flashes.sass +32 -0
- data/source/stylesheets/breezeblocks/_flex-boxes.sass +59 -0
- data/source/stylesheets/breezeblocks/_footer-2.sass +102 -0
- data/source/stylesheets/breezeblocks/_footer.sass +62 -0
- data/source/stylesheets/breezeblocks/_grid-items-lines.sass +76 -0
- data/source/stylesheets/breezeblocks/_grid-items.sass +80 -0
- data/source/stylesheets/breezeblocks/_hero.sass +44 -0
- data/source/stylesheets/breezeblocks/_hover-tile-animation.sass +40 -0
- data/source/stylesheets/breezeblocks/_icon-bullet-points.sass +49 -0
- data/source/stylesheets/breezeblocks/_image-gradient-dynamic.sass +43 -0
- data/source/stylesheets/breezeblocks/_maps.sass +20 -0
- data/source/stylesheets/breezeblocks/_modal.sass +119 -0
- data/source/stylesheets/breezeblocks/_navigation.sass +247 -0
- data/source/stylesheets/breezeblocks/_pagination.sass +51 -0
- data/source/stylesheets/breezeblocks/_parallax.sass +28 -0
- data/source/stylesheets/breezeblocks/_progress-bar-indication.sass +42 -0
- data/source/stylesheets/breezeblocks/_progress-bar.sass +70 -0
- data/source/stylesheets/breezeblocks/_ribbon.sass +28 -0
- data/source/stylesheets/breezeblocks/_scroll-on-page.sass +37 -0
- data/source/stylesheets/breezeblocks/_search-bar.sass +37 -0
- data/source/stylesheets/breezeblocks/_search-tools.sass +79 -0
- data/source/stylesheets/breezeblocks/_side-image.sass +58 -0
- data/source/stylesheets/breezeblocks/_sliding-menu.sass +63 -0
- data/source/stylesheets/breezeblocks/_stats.sass +27 -0
- data/source/stylesheets/breezeblocks/_switch.sass +61 -0
- data/source/stylesheets/breezeblocks/_tables-minimal.sass +59 -0
- data/source/stylesheets/breezeblocks/_tables.sass +78 -0
- data/source/stylesheets/breezeblocks/_texture-legend.sass +78 -0
- data/source/stylesheets/breezeblocks/_textures.sass +26 -0
- data/source/stylesheets/breezeblocks/_tooltip.sass +60 -0
- data/source/stylesheets/breezeblocks/_type-system-geometric.sass +100 -0
- data/source/stylesheets/breezeblocks/_type-system-rounded.sass +101 -0
- data/source/stylesheets/breezeblocks/_type-system-sans.sass +105 -0
- data/source/stylesheets/breezeblocks/_type-system-serif.sass +106 -0
- data/source/stylesheets/breezeblocks/_type-system-slab.sass +102 -0
- data/source/stylesheets/breezeblocks/_type-system-traditional.sass +107 -0
- data/source/stylesheets/breezeblocks/_vertical-tabs.sass +91 -0
- data/source/stylesheets/breezeblocks/_video.sass +11 -0
- data/source/stylesheets/vendor/fixedsticky.css +22 -0
- data/source/stylesheets/vendor/normalize.css +427 -0
- data/source/stylesheets/vendor/prism.css +126 -0
- data/source/type-systems.html.haml +54 -0
- data/spec/breezeblocks/import_generator_spec.rb +106 -0
- data/spec/spec_helper.rb +2 -0
- metadata +633 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
var menuToggle = $('#js-mobile-menu').unbind();
|
3
|
+
$('#js-navigation-menu').removeClass("show");
|
4
|
+
|
5
|
+
menuToggle.on('click', function(e) {
|
6
|
+
e.preventDefault();
|
7
|
+
$('#js-navigation-menu').slideToggle(function(){
|
8
|
+
if($('#js-navigation-menu').is(':hidden')) {
|
9
|
+
$('#js-navigation-menu').removeAttr('style');
|
10
|
+
}
|
11
|
+
});
|
12
|
+
});
|
13
|
+
});
|
@@ -0,0 +1,30 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
if ($("#js-parallax-window").length) {
|
3
|
+
parallax();
|
4
|
+
}
|
5
|
+
});
|
6
|
+
|
7
|
+
$(window).scroll(function(e) {
|
8
|
+
if ($("#js-parallax-window").length) {
|
9
|
+
parallax();
|
10
|
+
}
|
11
|
+
});
|
12
|
+
|
13
|
+
function parallax(){
|
14
|
+
if( $("#js-parallax-window").length > 0 ) {
|
15
|
+
var plxBackground = $("#js-parallax-background");
|
16
|
+
var plxWindow = $("#js-parallax-window");
|
17
|
+
|
18
|
+
var plxWindowTopToPageTop = $(plxWindow).offset().top;
|
19
|
+
var windowTopToPageTop = $(window).scrollTop();
|
20
|
+
var plxWindowTopToWindowTop = plxWindowTopToPageTop - windowTopToPageTop;
|
21
|
+
|
22
|
+
var plxBackgroundTopToPageTop = $(plxBackground).offset().top;
|
23
|
+
var windowInnerHeight = window.innerHeight;
|
24
|
+
var plxBackgroundTopToWindowTop = plxBackgroundTopToPageTop - windowTopToPageTop;
|
25
|
+
var plxBackgroundTopToWindowBottom = windowInnerHeight - plxBackgroundTopToWindowTop;
|
26
|
+
var plxSpeed = 0.35;
|
27
|
+
|
28
|
+
plxBackground.css('top', - (plxWindowTopToWindowTop * plxSpeed) + 'px');
|
29
|
+
}
|
30
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
(function (jQuery) {
|
2
|
+
jQuery.mark = {
|
3
|
+
jump: function (options) {
|
4
|
+
var defaults = {
|
5
|
+
selector: 'a.scroll-on-page-link'
|
6
|
+
};
|
7
|
+
if (typeof options == 'string') defaults.selector = options;
|
8
|
+
var options = jQuery.extend(defaults, options);
|
9
|
+
return jQuery(options.selector).click(function (e) {
|
10
|
+
var jumpobj = jQuery(this);
|
11
|
+
var target = jumpobj.attr('href');
|
12
|
+
var thespeed = 1000;
|
13
|
+
var offset = jQuery(target).offset().top;
|
14
|
+
jQuery('html,body').animate({
|
15
|
+
scrollTop: offset
|
16
|
+
}, thespeed, 'swing')
|
17
|
+
e.preventDefault();
|
18
|
+
})
|
19
|
+
}
|
20
|
+
}
|
21
|
+
})(jQuery);
|
22
|
+
|
23
|
+
|
24
|
+
jQuery(function(){
|
25
|
+
jQuery.mark.jump();
|
26
|
+
});
|
@@ -0,0 +1,110 @@
|
|
1
|
+
var Filter = (function() {
|
2
|
+
function Filter(element) {
|
3
|
+
this._element = $(element);
|
4
|
+
this._optionsContainer = this._element.find(this.constructor.optionsContainerSelector);
|
5
|
+
}
|
6
|
+
|
7
|
+
Filter.selector = '.filter';
|
8
|
+
Filter.optionsContainerSelector = '> div';
|
9
|
+
Filter.hideOptionsClass = 'hide-options';
|
10
|
+
|
11
|
+
Filter.enhance = function() {
|
12
|
+
var klass = this;
|
13
|
+
|
14
|
+
return $(klass.selector).each(function() {
|
15
|
+
return new klass(this).enhance();
|
16
|
+
});
|
17
|
+
};
|
18
|
+
|
19
|
+
Filter.prototype.enhance = function() {
|
20
|
+
this._buildUI();
|
21
|
+
this._bindEvents();
|
22
|
+
};
|
23
|
+
|
24
|
+
Filter.prototype._buildUI = function() {
|
25
|
+
this._summaryElement = $('<label></label>').
|
26
|
+
addClass('summary').
|
27
|
+
attr('data-role', 'summary').
|
28
|
+
prependTo(this._optionsContainer);
|
29
|
+
|
30
|
+
this._clearSelectionButton = $('<button></button>').
|
31
|
+
text('Clear').
|
32
|
+
attr('type', 'button').
|
33
|
+
insertAfter(this._summaryElement);
|
34
|
+
|
35
|
+
this._optionsContainer.addClass(this.constructor.hideOptionsClass);
|
36
|
+
this._updateSummary();
|
37
|
+
};
|
38
|
+
|
39
|
+
Filter.prototype._bindEvents = function() {
|
40
|
+
var self = this;
|
41
|
+
|
42
|
+
this._summaryElement.click(function() {
|
43
|
+
self._toggleOptions();
|
44
|
+
});
|
45
|
+
|
46
|
+
this._clearSelectionButton.click(function() {
|
47
|
+
self._clearSelection();
|
48
|
+
});
|
49
|
+
|
50
|
+
this._checkboxes().change(function() {
|
51
|
+
self._updateSummary();
|
52
|
+
});
|
53
|
+
|
54
|
+
$('body').click(function(e) {
|
55
|
+
var inFilter = $(e.target).closest(self.constructor.selector).length > 0;
|
56
|
+
|
57
|
+
if (!inFilter) {
|
58
|
+
self._allOptionsContainers().addClass(self.constructor.hideOptionsClass);
|
59
|
+
}
|
60
|
+
});
|
61
|
+
};
|
62
|
+
|
63
|
+
Filter.prototype._toggleOptions = function() {
|
64
|
+
this._allOptionsContainers().
|
65
|
+
not(this._optionsContainer).
|
66
|
+
addClass(this.constructor.hideOptionsClass);
|
67
|
+
|
68
|
+
this._optionsContainer.toggleClass(this.constructor.hideOptionsClass);
|
69
|
+
};
|
70
|
+
|
71
|
+
Filter.prototype._updateSummary = function() {
|
72
|
+
var summary = 'All';
|
73
|
+
var checked = this._checkboxes().filter(':checked');
|
74
|
+
|
75
|
+
if (checked.length > 0 && checked.length < this._checkboxes().length) {
|
76
|
+
summary = this._labelsFor(checked).join(', ');
|
77
|
+
}
|
78
|
+
|
79
|
+
this._summaryElement.text(summary);
|
80
|
+
};
|
81
|
+
|
82
|
+
Filter.prototype._clearSelection = function() {
|
83
|
+
this._checkboxes().each(function() {
|
84
|
+
$(this).prop('checked', false);
|
85
|
+
});
|
86
|
+
|
87
|
+
this._updateSummary();
|
88
|
+
};
|
89
|
+
|
90
|
+
Filter.prototype._checkboxes = function() {
|
91
|
+
return this._element.find(':checkbox');
|
92
|
+
};
|
93
|
+
|
94
|
+
Filter.prototype._labelsFor = function(inputs) {
|
95
|
+
return inputs.map(function() {
|
96
|
+
var id = $(this).attr('id');
|
97
|
+
return $("label[for='" + id + "']").text();
|
98
|
+
}).get();
|
99
|
+
};
|
100
|
+
|
101
|
+
Filter.prototype._allOptionsContainers = function() {
|
102
|
+
return $(this.constructor.selector + " " + this.constructor.optionsContainerSelector);
|
103
|
+
};
|
104
|
+
|
105
|
+
return Filter;
|
106
|
+
})();
|
107
|
+
|
108
|
+
$(function() {
|
109
|
+
Filter.enhance();
|
110
|
+
});
|
@@ -0,0 +1,32 @@
|
|
1
|
+
$(".js-vertical-tab-content").hide();
|
2
|
+
$(".js-vertical-tab-content:first").show();
|
3
|
+
|
4
|
+
/* if in tab mode */
|
5
|
+
$(".js-vertical-tab").click(function(event) {
|
6
|
+
event.preventDefault();
|
7
|
+
|
8
|
+
$(".js-vertical-tab-content").hide();
|
9
|
+
var activeTab = $(this).attr("rel");
|
10
|
+
$("#"+activeTab).show();
|
11
|
+
|
12
|
+
$(".js-vertical-tab").removeClass("is-active");
|
13
|
+
$(this).addClass("is-active");
|
14
|
+
|
15
|
+
$(".js-vertical-tab-accordion-heading").removeClass("is-active");
|
16
|
+
$(".js-vertical-tab-accordion-heading[rel^='"+activeTab+"']").addClass("is-active");
|
17
|
+
});
|
18
|
+
|
19
|
+
/* if in accordion mode */
|
20
|
+
$(".js-vertical-tab-accordion-heading").click(function(event) {
|
21
|
+
event.preventDefault();
|
22
|
+
|
23
|
+
$(".js-vertical-tab-content").hide();
|
24
|
+
var accordion_activeTab = $(this).attr("rel");
|
25
|
+
$("#"+accordion_activeTab).show();
|
26
|
+
|
27
|
+
$(".js-vertical-tab-accordion-heading").removeClass("is-active");
|
28
|
+
$(this).addClass("is-active");
|
29
|
+
|
30
|
+
$(".js-vertical-tab").removeClass("is-active");
|
31
|
+
$(".js-vertical-tab[rel^='"+accordion_activeTab+"']").addClass("is-active");
|
32
|
+
});
|
@@ -0,0 +1,477 @@
|
|
1
|
+
/*
|
2
|
+
* Plugin Name: erToc plugin for jQuery
|
3
|
+
* Version: 1.0
|
4
|
+
* Author: everright.chen
|
5
|
+
* Email: everright.chen@gmail.com
|
6
|
+
* Website: http://everright.cn
|
7
|
+
* Testd on: jQuery 1.4+, IE 6+, Firefox, Chrome, Safari, Oprea
|
8
|
+
* erToc is a jQuery plugin that will automatically generate a table of contents for your page.
|
9
|
+
*/
|
10
|
+
(function($) {
|
11
|
+
$.erToc = function(el, options) {
|
12
|
+
var base = this;
|
13
|
+
|
14
|
+
base.$this = $(el);
|
15
|
+
|
16
|
+
base.init = function() {
|
17
|
+
// merege custom options
|
18
|
+
base.options = $.extend({}, $.erToc.defaults, options);
|
19
|
+
|
20
|
+
// get nodes length, break down when have't nodes
|
21
|
+
var nodeLength = base.options.nodes.length;
|
22
|
+
if (!nodeLength) {
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
|
26
|
+
// get and set the last node id number from $body data
|
27
|
+
base.nodeNum = $('body').data(base.options.nodeNumKey) || 1;
|
28
|
+
// initialize current level, current original level, current original min level
|
29
|
+
base.currentLevel = base.currentOriLevel = base.currentOriMinLevel = 0;
|
30
|
+
// get is tiered output of toc
|
31
|
+
base.tiered = base.tieredList();
|
32
|
+
// initialize output for toc
|
33
|
+
base.toc = '';
|
34
|
+
|
35
|
+
// get start level, if value is string, then auto convert to int
|
36
|
+
if (base.options.startLevel != parseInt(base.options.startLevel)) {
|
37
|
+
base.options.startLevel = $.inArray(base.options.startLevel, base.options.nodes);
|
38
|
+
} else {
|
39
|
+
base.options.startLevel -= 1;
|
40
|
+
}
|
41
|
+
|
42
|
+
if (!base.options.startLevel || 0 > base.options.startLevel) {
|
43
|
+
base.options.startLevel = 0;
|
44
|
+
}
|
45
|
+
|
46
|
+
// get max level, if value is string, then auto convert to int, auto set max level to nodes length when max level less than start level
|
47
|
+
if (base.options.maxLevel != parseInt(base.options.maxLevel)) {
|
48
|
+
base.options.maxLevel = $.inArray(base.options.maxLevel, base.options.nodes) + 1;
|
49
|
+
}
|
50
|
+
|
51
|
+
if (!base.options.maxLevel || base.options.maxLevel < base.options.startLevel) {
|
52
|
+
base.options.maxLevel = base.options.nodes.length;
|
53
|
+
}
|
54
|
+
|
55
|
+
// check and reset the max leven with new computed
|
56
|
+
var validLevel = nodeLength - base.options.startLevel;
|
57
|
+
|
58
|
+
if (base.options.startLevel > base.options.maxLevel || validLevel < base.options.maxLevel) {
|
59
|
+
base.options.maxLevel = validLevel;
|
60
|
+
}
|
61
|
+
|
62
|
+
// automatically broken down when the nodes does not meet the conditions
|
63
|
+
if (!base.initNodes()) {
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
// initialize and append to toc output
|
67
|
+
base.initToc();
|
68
|
+
// append toc content to toc target element
|
69
|
+
base.createToc();
|
70
|
+
|
71
|
+
// set main scroll object when toc scroll or go to top feature was enabled
|
72
|
+
if (base.options.goTop || base.options.tocScroll) {
|
73
|
+
base.$body = (window.opera) ? ('CSS1Compat' == document.compatMode ? $('html') : $('body')) : $('html, body');
|
74
|
+
}
|
75
|
+
|
76
|
+
// initialize go to top
|
77
|
+
if (false !== base.options.goTop) {
|
78
|
+
// set go to top object, if not set, then set with body object
|
79
|
+
base.$topNode = $(base.options.goTopNode);
|
80
|
+
|
81
|
+
if (!base.$topNode.length) {
|
82
|
+
base.$topNode = $('body');
|
83
|
+
}
|
84
|
+
|
85
|
+
base.options.goTopNodes = base.options.goTopNodes || 'auto';
|
86
|
+
|
87
|
+
if ('auto' === base.options.goTopNodes) {
|
88
|
+
base.$topNode.data('isGoTopPosition', 'yes');
|
89
|
+
}
|
90
|
+
|
91
|
+
base.addGoTop();
|
92
|
+
}
|
93
|
+
};
|
94
|
+
|
95
|
+
/*
|
96
|
+
* Prepare nodes
|
97
|
+
* Min & Max conditions
|
98
|
+
* Group nodes, sort nodes
|
99
|
+
*/
|
100
|
+
base.initNodes = function() {
|
101
|
+
var defaultNodes = [];
|
102
|
+
for (var i = 0, len = base.options.nodes.length; i < len; i++) {
|
103
|
+
defaultNodes[i] = base.options.nodes[i];
|
104
|
+
}
|
105
|
+
var tag,
|
106
|
+
nodes = defaultNodes.splice(base.options.startLevel, base.options.maxLevel);
|
107
|
+
base.$nodes = base.$this.find(nodes.join(', '));
|
108
|
+
|
109
|
+
if (!base.$nodes.length || (base.options.nodeMin > 0 && base.$nodes.length < base.options.nodeMin)) {
|
110
|
+
return false;
|
111
|
+
}
|
112
|
+
|
113
|
+
if (base.options.nodeMax > 0) {
|
114
|
+
base.$nodes = base.$nodes.filter(':lt(' + base.options.nodeMax + ')');
|
115
|
+
}
|
116
|
+
|
117
|
+
base.nodes = {
|
118
|
+
'ids': [],
|
119
|
+
'classes': [],
|
120
|
+
'sorts': {'ids': {}, 'classes': {}}
|
121
|
+
};
|
122
|
+
|
123
|
+
for (var i in nodes) {
|
124
|
+
if ('.' == nodes[i].substring(0, 1)) {
|
125
|
+
tag = nodes[i].substring(1);
|
126
|
+
base.nodes.classes.push(tag);
|
127
|
+
base.nodes.sorts.classes[tag] = i;
|
128
|
+
} else {
|
129
|
+
tag = nodes[i].toLowerCase();
|
130
|
+
base.nodes.ids.push(tag);
|
131
|
+
base.nodes.sorts.ids[tag] = i;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
return true;
|
136
|
+
};
|
137
|
+
|
138
|
+
/*
|
139
|
+
* Prepare toc content
|
140
|
+
*/
|
141
|
+
base.initToc = function() {
|
142
|
+
if (base.tiered) {
|
143
|
+
base.listO = '<' + base.options.tocListType + '>';
|
144
|
+
base.listC = '</' + base.options.tocListType + '>';
|
145
|
+
base.listEO = '<li>';
|
146
|
+
base.listEC = '</li>';
|
147
|
+
base.toc += base.listO + base.listEO;
|
148
|
+
}
|
149
|
+
|
150
|
+
var node, level, currentLevel;
|
151
|
+
|
152
|
+
var numCurrLabel = '';
|
153
|
+
if (true === base.options.numbered) {
|
154
|
+
var numPrevLevel = 0,
|
155
|
+
numLevelCount = {},
|
156
|
+
numPrefix = {},
|
157
|
+
numPrevPrefix = '',
|
158
|
+
numLastPrefix = '';
|
159
|
+
}
|
160
|
+
|
161
|
+
base.$nodes.addClass(base.options.nodeClass).each(function(i, obj) {
|
162
|
+
node = $(obj);
|
163
|
+
level = base.getLevel(node);
|
164
|
+
if (base.tiered) {
|
165
|
+
currentLevel = base.currentLevel;
|
166
|
+
|
167
|
+
if (0 == i) {
|
168
|
+
base.currentOriLevel = level;
|
169
|
+
base.currentOriMinLevel = level;
|
170
|
+
} else {
|
171
|
+
if (level > base.currentOriLevel) {
|
172
|
+
currentLevel = base.currentLevel + 1;
|
173
|
+
base.currentOriLevel = level;
|
174
|
+
} else if (level < base.currentOriLevel) {
|
175
|
+
currentLevel = level <= base.currentOriMinLevel ? 0 : level - base.currentOriMinLevel;
|
176
|
+
base.currentOriLevel = level;
|
177
|
+
|
178
|
+
if (level < base.currentOriMinLevel) {
|
179
|
+
base.currentOriMinLevel = level;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
base.toc += base.formatLevel(currentLevel, false);
|
184
|
+
}
|
185
|
+
|
186
|
+
if (true === base.options.numbered) {
|
187
|
+
if (!numLevelCount[currentLevel] || numPrevLevel < currentLevel) {
|
188
|
+
numLevelCount[currentLevel] = 1;
|
189
|
+
} else {
|
190
|
+
numLevelCount[currentLevel] += 1;
|
191
|
+
}
|
192
|
+
|
193
|
+
if (numPrevLevel == currentLevel) {
|
194
|
+
numCurrLabel = numLastPrefix + numLevelCount[currentLevel];
|
195
|
+
} else {
|
196
|
+
if (numPrevLevel < currentLevel) {
|
197
|
+
numLastPrefix = numPrevPrefix + base.options.numberedJoin;
|
198
|
+
numPrefix[currentLevel] = numLastPrefix;
|
199
|
+
} else{
|
200
|
+
numLastPrefix = '';
|
201
|
+
}
|
202
|
+
numCurrLabel = (currentLevel == 0) ? numLevelCount[currentLevel] : numPrefix[currentLevel] + numLevelCount[currentLevel];
|
203
|
+
|
204
|
+
}
|
205
|
+
numPrevPrefix = numCurrLabel;
|
206
|
+
numCurrLabel = base.options.numberedPrefix + numCurrLabel + base.options.numberedSuffix;
|
207
|
+
numPrevLevel = currentLevel;
|
208
|
+
}
|
209
|
+
}
|
210
|
+
|
211
|
+
base.toc += base.formatLink(node, level, numCurrLabel);
|
212
|
+
|
213
|
+
if (base.tiered && ((i + 1) == base.$nodes.length)) {
|
214
|
+
base.toc += base.formatLevel(currentLevel, true);
|
215
|
+
}
|
216
|
+
|
217
|
+
base.currentLevel = currentLevel;
|
218
|
+
});
|
219
|
+
|
220
|
+
if (base.tiered) {
|
221
|
+
base.toc += base.listEC + base.listC;
|
222
|
+
}
|
223
|
+
|
224
|
+
// set last nodeNum for other erToc use
|
225
|
+
$('body').data(base.options.nodeNumKey, base.nodeNum);
|
226
|
+
};
|
227
|
+
|
228
|
+
/*
|
229
|
+
* Append toc to target element
|
230
|
+
* title, title enable clicked, toc element scroll
|
231
|
+
*/
|
232
|
+
base.createToc = function() {
|
233
|
+
base.$target = $(base.options.tocTarget);
|
234
|
+
base.$toc = $('<div class="er_toc_content"></div>').html(base.toc);
|
235
|
+
|
236
|
+
if (!base.$target.length) {
|
237
|
+
base.$target = $('<div></div>').prependTo(base.$this);
|
238
|
+
}
|
239
|
+
if (base.options.tocClass) {
|
240
|
+
base.$target.addClass(base.options.tocClass);
|
241
|
+
}
|
242
|
+
|
243
|
+
base.$target.append(base.$toc);
|
244
|
+
|
245
|
+
// set toc title
|
246
|
+
var title = $.trim(base.options.tocTitle);
|
247
|
+
|
248
|
+
if (title.length) {
|
249
|
+
var $title = $('<div></div>').html(title).append('<span></span>'),
|
250
|
+
hasTitleClass = base.options.tocTitleClass.length;
|
251
|
+
|
252
|
+
if (hasTitleClass) {
|
253
|
+
$title.addClass(base.options.tocTitleClass);
|
254
|
+
}
|
255
|
+
|
256
|
+
// bind hide show event
|
257
|
+
if (true === base.options.tocControl) {
|
258
|
+
var titleOpenClass = hasTitleClass ? base.options.tocTitleClass + '_open' : 'er_toc_title_open',
|
259
|
+
titleCloseClass = hasTitleClass ? base.options.tocTitleClass + '_close' : 'er_toc_title_close';
|
260
|
+
|
261
|
+
$title.css('cursor', 'pointer').click(function() {
|
262
|
+
if ($(this).hasClass(titleOpenClass)) {
|
263
|
+
$(this).removeClass(titleOpenClass).addClass(titleCloseClass);
|
264
|
+
base.$toc.slideUp();
|
265
|
+
} else {
|
266
|
+
$(this).removeClass(titleCloseClass).addClass(titleOpenClass);
|
267
|
+
base.$toc.slideDown();
|
268
|
+
}
|
269
|
+
}).click();
|
270
|
+
}
|
271
|
+
|
272
|
+
$title.prependTo(base.$target);
|
273
|
+
}
|
274
|
+
|
275
|
+
// binkd click scroll when toc scroll is enabled
|
276
|
+
if (base.options.tocScroll) {
|
277
|
+
base.$toc.find('a').click(function() {
|
278
|
+
base.$body.animate({scrollTop: ($($(this).attr('href')).offset().top - base.options.goTopBaseHeight)}, base.options.scrollSpeed);
|
279
|
+
return false;
|
280
|
+
});
|
281
|
+
}
|
282
|
+
};
|
283
|
+
|
284
|
+
/*
|
285
|
+
* Bind goTop action to nodes which can random, all, custom elements
|
286
|
+
*/
|
287
|
+
base.addGoTop = function() {
|
288
|
+
var top,
|
289
|
+
goTop,
|
290
|
+
text = (true === base.options.goTop) ? 'Top' : base.options.goTop;
|
291
|
+
|
292
|
+
if ('all' === base.options.goTopNodes) {
|
293
|
+
goTop = base.$nodes;
|
294
|
+
} else if ('auto' === base.options.goTopNodes) {
|
295
|
+
var currentTop,
|
296
|
+
filterNodes = [],
|
297
|
+
lastTop = 0,
|
298
|
+
preTop = base.getPositionToTop(base.$this),
|
299
|
+
depth = Math.round(base.$this.height() / base.$nodes.length);
|
300
|
+
|
301
|
+
if (base.options.goTopDepth > depth) {
|
302
|
+
depth = base.options.goTopDepth;
|
303
|
+
}
|
304
|
+
|
305
|
+
base.$nodes.each(function(i) {
|
306
|
+
currentTop = $(this).position().top - lastTop;
|
307
|
+
|
308
|
+
if (0 == i) {
|
309
|
+
currentTop += preTop;
|
310
|
+
}
|
311
|
+
|
312
|
+
if (currentTop >= depth) {
|
313
|
+
filterNodes.push('#' + $(this).attr('id'));
|
314
|
+
lastTop = $(this).position().top;
|
315
|
+
}
|
316
|
+
});
|
317
|
+
|
318
|
+
if (filterNodes.length) {
|
319
|
+
goTop = base.$nodes.filter(filterNodes.join(', '));
|
320
|
+
}
|
321
|
+
} else {
|
322
|
+
goTop = base.$nodes.filter(base.options.goTopNodes);
|
323
|
+
}
|
324
|
+
|
325
|
+
top = $('<a href="#" class="' + base.options.goTopClass + '" title="' + text + '">' + text + '</a>');
|
326
|
+
goTop.append(top);
|
327
|
+
goTop.children('a.' + base.options.goTopClass).click(function() {
|
328
|
+
base.$body.animate({scrollTop: (base.$topNode.offset().top - base.options.goTopBaseHeight)}, base.options.scrollSpeed);
|
329
|
+
return false;
|
330
|
+
});
|
331
|
+
};
|
332
|
+
|
333
|
+
/*
|
334
|
+
* Get node element in which level
|
335
|
+
*/
|
336
|
+
base.getLevel = function(node) {
|
337
|
+
var n;
|
338
|
+
|
339
|
+
if (base.nodes.ids.length) {
|
340
|
+
n = node.get(0).nodeName.toLowerCase();
|
341
|
+
|
342
|
+
if ($.inArray(n, base.nodes.ids) >= 0) {
|
343
|
+
return base.nodes.sorts.ids[n];
|
344
|
+
}
|
345
|
+
}
|
346
|
+
|
347
|
+
if (base.nodes.classes.length) {
|
348
|
+
for(var i in base.nodes.classes) {
|
349
|
+
n = base.nodes.classes[i];
|
350
|
+
|
351
|
+
if (node.hasClass(n)) {
|
352
|
+
return base.nodes.sorts.classes[n];
|
353
|
+
}
|
354
|
+
}
|
355
|
+
}
|
356
|
+
|
357
|
+
return 0;
|
358
|
+
};
|
359
|
+
|
360
|
+
/*
|
361
|
+
* Toc output with tieredList
|
362
|
+
*/
|
363
|
+
base.tieredList = function() {
|
364
|
+
var exist = $.inArray(base.options.tocListType, ['ul', 'ol']);
|
365
|
+
return exist < 0 ? false : true;
|
366
|
+
};
|
367
|
+
|
368
|
+
/*
|
369
|
+
* Get current obj to go to the top of the height
|
370
|
+
*/
|
371
|
+
base.getPositionToTop = function($obj) {
|
372
|
+
var top = 0, end;
|
373
|
+
|
374
|
+
while($obj) {
|
375
|
+
end = ($obj.data('isGoTopPosition') && 'yes' === $obj.data('isGoTopPosition')) ? true : false;
|
376
|
+
|
377
|
+
if (!end) {
|
378
|
+
top += $obj.position().top;
|
379
|
+
$obj = $obj.parent();
|
380
|
+
} else {
|
381
|
+
$obj = null;
|
382
|
+
break;
|
383
|
+
}
|
384
|
+
}
|
385
|
+
|
386
|
+
return top;
|
387
|
+
};
|
388
|
+
|
389
|
+
/*
|
390
|
+
* Prepare toc each text with link
|
391
|
+
*/
|
392
|
+
base.formatLink = function(node, level, label) {
|
393
|
+
var text = node.text(),
|
394
|
+
id = node.attr('id') || base.options.nodeIdPrefix + base.nodeNum,
|
395
|
+
style = (base.tiered ? '' : ' class="' + base.options.tocClassPrefix + level + '"');
|
396
|
+
|
397
|
+
node.attr('id', id);
|
398
|
+
base.nodeNum++;
|
399
|
+
|
400
|
+
return label + '<a href="#' + id + '" title="' + text + '"' + style + '>' + text + '</a>';
|
401
|
+
};
|
402
|
+
|
403
|
+
/*
|
404
|
+
* Format tag with levels
|
405
|
+
*/
|
406
|
+
base.formatLevel = function(level, last) {
|
407
|
+
if (true !== last) {
|
408
|
+
last = false;
|
409
|
+
}
|
410
|
+
|
411
|
+
var output = (level > base.currentLevel) ? base.formatTag(base.currentLevel, level, !last) : base.formatTag(level, base.currentLevel) + ((true === last) ? base.formatTag(0, base.currentLevel) : base.listEC + base.listEO);
|
412
|
+
|
413
|
+
return output;
|
414
|
+
};
|
415
|
+
|
416
|
+
/*
|
417
|
+
* Format tag
|
418
|
+
* <ul><li>, </ul><ul>, </li><li>
|
419
|
+
*/
|
420
|
+
base.formatTag = function(start, end, open) {
|
421
|
+
var tags = [];
|
422
|
+
|
423
|
+
if (true !== open) {
|
424
|
+
open = false;
|
425
|
+
}
|
426
|
+
|
427
|
+
for (var i = start; i < end; i++) {
|
428
|
+
tags.push(open ? base.listO : base.listC);
|
429
|
+
}
|
430
|
+
|
431
|
+
return (open ? tags.join(base.listEO) + base.listEO : base.listEC + tags.join(base.listEC));
|
432
|
+
};
|
433
|
+
|
434
|
+
// ready go
|
435
|
+
base.init();
|
436
|
+
};
|
437
|
+
|
438
|
+
/*
|
439
|
+
* erToc default options
|
440
|
+
*/
|
441
|
+
$.erToc.defaults = {
|
442
|
+
startLevel: 'h5', // node name, class or node array subscript [0|1]...n
|
443
|
+
maxLevel: 'h6', // node name, class or node array subscript [0|1]...n
|
444
|
+
nodes: ['h5', 'h6'], // nodes for prepare toc, support class ['.p1', '.p2', '.p3', '.p4', '.p5', '.p6']
|
445
|
+
nodeMin: 0, // min nodes for toc
|
446
|
+
nodeMax: 0, // max nodes for toc
|
447
|
+
nodeClass: 'er_toc_tag',
|
448
|
+
nodeIdPrefix: 'er-toc-id-',
|
449
|
+
tocTarget: '', // which element the toc will be append
|
450
|
+
tocClass: 'er_toc',
|
451
|
+
tocTitle: 'Table of Contents', // title for toc, if set empty string, then title will be hidden
|
452
|
+
tocTitleClass: 'er_toc_title',
|
453
|
+
tocListType: 'ul', // toc output type, ul, li, others will only include text with link
|
454
|
+
tocControl: true, // if have toc title, then can set true to control toc hide or show
|
455
|
+
tocClassPrefix: 'er_toc_level_',
|
456
|
+
tocScroll: true, // enable toc can be scroll, true or false
|
457
|
+
goTop: true, // enable go to top action, true or false
|
458
|
+
goTopBaseHeight: 0, //if the top is floating to fixed, then it should reduce the height of the top
|
459
|
+
goTopNodes: 'auto', // bind to which nodes, auto, all, and custom elements
|
460
|
+
goTopDepth: 450, // if go to top nodes was set auto, then here is the depth for two elements
|
461
|
+
goTopClass: 'er_toc_top',
|
462
|
+
goTopNode: 'body', // go to top element
|
463
|
+
scrollSpeed: 1000, // scroll speed, n seconds, slow, fast
|
464
|
+
nodeNumKey: 'erTocNodeNum',
|
465
|
+
numbered: false,
|
466
|
+
numberedJoin: '.',
|
467
|
+
numberedPrefix: '',
|
468
|
+
numberedSuffix: ' '
|
469
|
+
};
|
470
|
+
|
471
|
+
$.fn.erToc = function(options) {
|
472
|
+
return this.each(function(i){
|
473
|
+
(new $.erToc(this, options));
|
474
|
+
});
|
475
|
+
};
|
476
|
+
|
477
|
+
})(jQuery);
|