├── website ├── source │ ├── images │ │ ├── .keep │ │ ├── favicon.png │ │ ├── screencast.gif │ │ ├── favicon-troll.png │ │ ├── quotes │ │ │ ├── chris.png │ │ │ ├── nicolas.jpg │ │ │ ├── sacha.png │ │ │ ├── vjeux.png │ │ │ ├── smashing.jpg │ │ │ └── porteneuve.jpg │ │ ├── css-logo-aprilfool.png │ │ ├── clients │ │ │ ├── scala-bce891cf.svg │ │ │ ├── ruby-00bdd41f.svg │ │ │ ├── php-53888094.svg │ │ │ ├── python-dd5a8a8d.svg │ │ │ ├── javascript-68104683.svg │ │ │ ├── android-f03624e7.svg │ │ │ ├── csharp-4075daa3.svg │ │ │ ├── java-65dd222f.svg │ │ │ ├── swift-4cb5cf0e.svg │ │ │ └── go-5f1359de.svg │ │ ├── triangle-background.svg │ │ ├── quote.svg │ │ ├── github.svg │ │ ├── hero-cover.svg │ │ ├── browser.svg │ │ ├── illustrations │ │ │ ├── flexbox_illustration.svg │ │ │ └── offline_illustration.svg │ │ └── algolia-fast-bg.svg │ ├── stylesheets │ │ ├── components │ │ │ ├── _navbar.sass │ │ │ ├── _footer.sass │ │ │ ├── _header.sass │ │ │ ├── _cards.sass │ │ │ ├── _message.sass │ │ │ ├── _free-trial.sass │ │ │ ├── _hero.sass │ │ │ ├── _icons.scss │ │ │ ├── _quotes.sass │ │ │ ├── _modal.sass │ │ │ └── _buttons.sass │ │ ├── vendors │ │ │ └── bootstrap │ │ │ │ ├── mixins │ │ │ │ ├── _center-block.scss │ │ │ │ ├── _opacity.scss │ │ │ │ ├── _size.scss │ │ │ │ ├── _text-overflow.scss │ │ │ │ ├── _tab-focus.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _resize.scss │ │ │ │ ├── _text-emphasis.scss │ │ │ │ ├── _progress-bar.scss │ │ │ │ ├── _background-variant.scss │ │ │ │ ├── _reset-filter.scss │ │ │ │ ├── _nav-divider.scss │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _nav-vertical-align.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _border-radius.scss │ │ │ │ ├── _responsive-visibility.scss │ │ │ │ ├── _panels.scss │ │ │ │ ├── _hide-text.scss │ │ │ │ ├── _clearfix.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _table-row.scss │ │ │ │ ├── _image.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _grid-framework.scss │ │ │ │ ├── _forms.scss │ │ │ │ ├── _grid.scss │ │ │ │ └── _gradients.scss │ │ │ │ ├── _wells.scss │ │ │ │ ├── _breadcrumbs.scss │ │ │ │ ├── _responsive-embed.scss │ │ │ │ ├── _media.scss │ │ │ │ ├── _close.scss │ │ │ │ ├── _component-animations.scss │ │ │ │ ├── _utilities.scss │ │ │ │ ├── _thumbnails.scss │ │ │ │ ├── _pager.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _jumbotron.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _badges.scss │ │ │ │ ├── _code.scss │ │ │ │ ├── _grid.scss │ │ │ │ ├── _alerts.scss │ │ │ │ ├── _progress-bars.scss │ │ │ │ ├── _pagination.scss │ │ │ │ ├── _print.scss │ │ │ │ ├── _tooltip.scss │ │ │ │ ├── _scaffolding.scss │ │ │ │ ├── _list-group.scss │ │ │ │ ├── _popovers.scss │ │ │ │ ├── _modals.scss │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _input-groups.scss │ │ │ │ ├── _responsive-utilities.scss │ │ │ │ ├── _dropdowns.scss │ │ │ │ └── _tables.scss │ │ ├── site.css.scss │ │ ├── partials │ │ │ ├── _bootstrap.sass │ │ │ ├── _typography.sass │ │ │ ├── _colors.sass │ │ │ └── _main.sass │ │ └── modules │ │ │ ├── _mixins.sass │ │ │ └── _base.sass │ ├── fonts │ │ ├── algolia-website-iconfont.eot │ │ ├── algolia-website-iconfont.ttf │ │ └── algolia-website-iconfont.woff │ ├── index.html.haml │ ├── partials │ │ ├── common │ │ │ └── _footer.haml │ │ ├── _hero.haml │ │ └── _modal.haml │ ├── javascripts │ │ ├── tags.js │ │ └── site.js │ └── layouts │ │ └── layout.erb ├── .eslintrc.js ├── config.rb └── buildComponents.js ├── .babelrc ├── scripts ├── demo │ ├── serve │ ├── test-watch │ ├── test │ ├── generate │ ├── lint │ ├── minify │ ├── minify.js │ └── generate-css ├── website │ └── serve ├── lint ├── deploy └── build ├── demo ├── public │ ├── favicon.png │ ├── fonts │ │ └── Raleway.ttf │ └── tags.html ├── fonts │ ├── Raleway-Bold.ttf │ └── Raleway-Regular.ttf ├── Guardfile ├── spec │ ├── spec_helper.rb │ └── css_writer_spec.rb ├── webtask │ └── random-order.js └── .rubocop.yml ├── .eslintrc.js ├── .gitignore ├── Gemfile ├── README.md ├── package.json └── Gemfile.lock /website/source/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /website/source/stylesheets/components/_navbar.sass: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/demo/serve: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | cd demo/public 3 | live-server 4 | -------------------------------------------------------------------------------- /scripts/website/serve: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | cd website 4 | middleman 5 | -------------------------------------------------------------------------------- /scripts/demo/test-watch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd "$(dirname "$BASH_SOURCE")"/../../demo 3 | 4 | guard 5 | -------------------------------------------------------------------------------- /demo/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/demo/public/favicon.png -------------------------------------------------------------------------------- /demo/fonts/Raleway-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/demo/fonts/Raleway-Bold.ttf -------------------------------------------------------------------------------- /demo/fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/demo/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /demo/public/fonts/Raleway.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/demo/public/fonts/Raleway.ttf -------------------------------------------------------------------------------- /scripts/demo/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | cd "$(dirname "$BASH_SOURCE")"/../.. 3 | 4 | bundle exec rspec --default-path ./demo/spec 5 | -------------------------------------------------------------------------------- /website/source/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/favicon.png -------------------------------------------------------------------------------- /website/source/images/screencast.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/screencast.gif -------------------------------------------------------------------------------- /scripts/demo/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | 4 | npm run demo-generate-font 5 | npm run demo-generate-css 6 | npm run demo-minify 7 | -------------------------------------------------------------------------------- /scripts/lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -eu 3 | cd "$(dirname "$BASH_SOURCE")"/.. 4 | 5 | eslint ./scripts/*.js 6 | yarn run demo-lint 7 | 8 | -------------------------------------------------------------------------------- /website/source/images/favicon-troll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/favicon-troll.png -------------------------------------------------------------------------------- /website/source/images/quotes/chris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/chris.png -------------------------------------------------------------------------------- /website/source/images/quotes/nicolas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/nicolas.jpg -------------------------------------------------------------------------------- /website/source/images/quotes/sacha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/sacha.png -------------------------------------------------------------------------------- /website/source/images/quotes/vjeux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/vjeux.png -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['algolia'], 3 | rules: { 4 | 'no-console': 0, 5 | 'no-process-exit': 0, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /website/source/images/quotes/smashing.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/smashing.jpg -------------------------------------------------------------------------------- /website/source/images/css-logo-aprilfool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/css-logo-aprilfool.png -------------------------------------------------------------------------------- /website/source/images/quotes/porteneuve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/images/quotes/porteneuve.jpg -------------------------------------------------------------------------------- /scripts/deploy: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -eu 3 | 4 | npm run build 5 | 6 | rm -rf node_modules/gh-pages/.cache 7 | gh-pages --dist gh-pages --branch gh-pages 8 | -------------------------------------------------------------------------------- /website/source/fonts/algolia-website-iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/fonts/algolia-website-iconfont.eot -------------------------------------------------------------------------------- /website/source/fonts/algolia-website-iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/fonts/algolia-website-iconfont.ttf -------------------------------------------------------------------------------- /website/source/fonts/algolia-website-iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/algolia/algoliasearch-client-css/HEAD/website/source/fonts/algolia-website-iconfont.woff -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .sass-cache 3 | Thumbs.db 4 | bower_components 5 | node_modules 6 | npm-debug.log 7 | tmp 8 | *~ 9 | gh-pages 10 | ./website/build 11 | -------------------------------------------------------------------------------- /website/source/stylesheets/components/_footer.sass: -------------------------------------------------------------------------------- 1 | #footer 2 | background: $deep-cove 3 | color: #fff 4 | 5 | @media (max-width: $screen-sm) 6 | text-align: center 7 | 8 | img 9 | margin-top: 2em -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_center-block.scss: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | @mixin center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_opacity.scss: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | @mixin opacity($opacity) { 4 | opacity: $opacity; 5 | // IE8 filter 6 | $opacity-ie: ($opacity * 100); 7 | filter: #{alpha(opacity=$opacity-ie)}; 8 | } 9 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_size.scss: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | @mixin size($width, $height) { 4 | width: $width; 5 | height: $height; 6 | } 7 | 8 | @mixin square($size) { 9 | @include size($size, $size); 10 | } 11 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_text-overflow.scss: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | @mixin text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /demo/Guardfile: -------------------------------------------------------------------------------- 1 | guard :rspec, cmd: 'bundle exec rspec --color --format documentation' do 2 | watch(%r{^spec/.+_spec\.rb$}) 3 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } 4 | watch('spec/spec_helper.rb') { 'spec' } 5 | end 6 | 7 | notification :off 8 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_tab-focus.scss: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | @mixin tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_labels.scss: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | @mixin label-variant($color) { 4 | background-color: $color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken($color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_resize.scss: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | @mixin resizable($direction) { 4 | resize: $direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /scripts/demo/lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Do not commit any focused or excluded tests 4 | if grep --color -r 'demo/spec' -E -e '^( |\t)*(fit|fdescribe|xit|xdescribe)'; then 5 | echo '✘ You have focused and/or skipped tests' 6 | exit 1 7 | fi 8 | 9 | rubocop -F './demo/lib/' './demo/spec' 10 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_text-emphasis.scss: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | // [converter] $parent hack 4 | @mixin text-emphasis-variant($parent, $color) { 5 | #{$parent} { 6 | color: $color; 7 | } 8 | a#{$parent}:hover { 9 | color: darken($color, 10%); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_progress-bar.scss: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | @mixin progress-bar-variant($color) { 4 | background-color: $color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | @include gradient-striped; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /demo/spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'awesome_print' 2 | require 'fileutils' 3 | require_relative '../lib/query_parser.rb' 4 | require_relative '../lib/css_writer.rb' 5 | 6 | RSpec.configure do |config| 7 | config.filter_run(focus: true) 8 | config.fail_fast = true 9 | config.run_all_when_everything_filtered = true 10 | end 11 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_background-variant.scss: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | // [converter] $parent hack 4 | @mixin bg-variant($parent, $color) { 5 | #{$parent} { 6 | background-color: $color; 7 | } 8 | a#{$parent}:hover { 9 | background-color: darken($color, 10%); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_reset-filter.scss: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | @mixin reset-filter() { 7 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 8 | } 9 | -------------------------------------------------------------------------------- /website/source/stylesheets/components/_header.sass: -------------------------------------------------------------------------------- 1 | .algc-mobilemenu img, 2 | .algc-mobilemenu svg 3 | margin: 0.65em 0 4 | 5 | .algc-navigation__brands .algc-navigation__li--community .algolia-community-logo 6 | @media (max-width: $screen-sm) 7 | max-height: 26px !important 8 | margin-left: -10px !important 9 | margin-top: 4px !important -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_nav-divider.scss: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | @mixin nav-divider($color: #e5e5e5) { 6 | height: 1px; 7 | margin: (($line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: $color; 10 | } 11 | -------------------------------------------------------------------------------- /website/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globals: { 3 | "$": true, 4 | "Favico": true, 5 | "communityHeader": true, 6 | "App": true 7 | }, 8 | rules: { 9 | 'prefer-arrow-callback': 0, 10 | 'object-shorthand': 0, 11 | 'no-var': 0, 12 | 'no-console': 0, 13 | 'no-process-exit': 0, 14 | }, 15 | }; 16 | 17 | -------------------------------------------------------------------------------- /website/source/index.html.haml: -------------------------------------------------------------------------------- 1 | --- 2 | title: Algolia CSS API Client 3 | --- 4 | = partial "partials/common/header.html" 5 | = partial "partials/hero" 6 | = partial "partials/main" 7 | = partial "partials/common/footer" 8 | = partial "partials/modal" 9 | 10 | -# = link_to "Read Documentation", "https://middlemanapp.com/basics/templating_language/", target: "_blank" 11 | -------------------------------------------------------------------------------- /demo/public/tags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_alerts.scss: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | @mixin alert-variant($background, $border, $text-color) { 4 | background-color: $background; 5 | border-color: $border; 6 | color: $text-color; 7 | 8 | hr { 9 | border-top-color: darken($border, 5%); 10 | } 11 | .alert-link { 12 | color: darken($text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /scripts/build: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -eu 3 | 4 | # Creating tmp dir to push to gh-pages branch 5 | mkdir -p ./gh-pages 6 | rm -rf ./gh-pages/* 7 | 8 | yarn upgrade algolia-frontend-components 9 | 10 | # Building website 11 | cd ./website 12 | node ./buildComponents.js 13 | middleman build 14 | mv -fn ./build/* ../gh-pages 15 | rm ../gh-pages/images/.keep 16 | 17 | # Copying the demo 18 | cd ../gh-pages 19 | mkdir ./demo 20 | cp -r ../demo/public/* ./demo 21 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_nav-vertical-align.scss: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | @mixin navbar-vertical-align($element-height) { 7 | margin-top: (($navbar-height - $element-height) / 2); 8 | margin-bottom: (($navbar-height - $element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /website/source/stylesheets/components/_cards.sass: -------------------------------------------------------------------------------- 1 | .card 2 | border-radius: 4px 3 | padding: 52px 32px 4 | background: white 5 | transition: box-shadow 0.2s ease 6 | text-align: center 7 | float: left 8 | 9 | a 10 | text-decoration: none 11 | 12 | h3 13 | font-size: 20px 14 | text-transform: uppercase 15 | color: $bunting 16 | transition: opacity 0.2s ease 17 | 18 | figure svg, 19 | figure img 20 | max-width: 90% 21 | 22 | &:hover 23 | box-shadow: 0 0 48px rgba(52,105,231, .15) -------------------------------------------------------------------------------- /demo/webtask/random-order.js: -------------------------------------------------------------------------------- 1 | var _ = require('lodash'); 2 | 3 | module.exports = function(context, req, res) { 4 | res.writeHead(200, { 5 | 'Content-Type': 'text/css' 6 | }); 7 | 8 | var counter = 0; 9 | var max = 147; 10 | var list = []; 11 | _.times(max, function(i) { list.push(i); }); 12 | list = _.shuffle(list); 13 | 14 | var css = []; 15 | _.each(list, function(id, order) { 16 | css.push("#i[value='' i] ~ #h #h" + id + ' { order: ' + order + ' }'); 17 | }); 18 | 19 | res.end(css.join("\n")); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /scripts/demo/minify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Babelify the file first 4 | mkdir -p ./demo/tmp/ 5 | babel ./scripts/demo/minify.js --out-file ./demo/tmp/minify.es5.js 6 | 7 | # Actually minifying it 8 | # We have to increase node maximum memory otherwise it might fail with 9 | # FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of 10 | # memory 11 | node \ 12 | --max-old-space-size=8192 \ 13 | ./demo/tmp/minify.es5.js \ 14 | ./demo/public/css/search.css \ 15 | ./demo/public/css/search.min.css 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # For generating the demo 4 | gem 'awesome_print', '~> 1.6' 5 | gem 'i18n' 6 | group :development do 7 | gem 'guard-rspec', '~> 4.6' 8 | gem 'rspec', '~> 3.0' 9 | gem 'rubocop', '~> 0.51' 10 | end 11 | 12 | # For generating the website 13 | # For faster file watcher updates on Windows: 14 | gem 'wdm', '~> 0.1.0', platforms: %i[mswin mingw] 15 | # Windows does not come with time zone data 16 | gem 'tzinfo-data', platforms: %i[mswin mingw jruby] 17 | # Middleman Gems 18 | gem 'middleman', '~> 4.2' 19 | gem 'middleman-livereload', '~> 3.4' 20 | -------------------------------------------------------------------------------- /website/source/partials/common/_footer.haml: -------------------------------------------------------------------------------- 1 | %footer#footer 2 | .container 3 | .spacer40 4 | .credits 5 | .container.pos-rel 6 | .row 7 | .col-md-4 8 | .copyright 9 | © Algolia - 10 | %a{"data-no-turbolink" => "true", :href => "https://algolia.com/policies/privacy"} Privacy Policy 11 | .col-md-4.text-center 12 | %a{"data-no-turbolink" => "true", :href => "https://algolia.com/"} 13 | %img{:src => "https://www.algolia.com/static_assets/images/flat2/algolia/algolia-logo_badge-598a1fe6.svg", :width => "40"}/ 14 | .spacer40 15 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_pagination.scss: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | @mixin pagination-size($padding-vertical, $padding-horizontal, $font-size, $border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: $padding-vertical $padding-horizontal; 8 | font-size: $font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | @include border-left-radius($border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | @include border-right-radius($border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_border-radius.scss: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | @mixin border-top-radius($radius) { 4 | border-top-right-radius: $radius; 5 | border-top-left-radius: $radius; 6 | } 7 | @mixin border-right-radius($radius) { 8 | border-bottom-right-radius: $radius; 9 | border-top-right-radius: $radius; 10 | } 11 | @mixin border-bottom-radius($radius) { 12 | border-bottom-right-radius: $radius; 13 | border-bottom-left-radius: $radius; 14 | } 15 | @mixin border-left-radius($radius) { 16 | border-bottom-left-radius: $radius; 17 | border-top-left-radius: $radius; 18 | } 19 | -------------------------------------------------------------------------------- /demo/.rubocop.yml: -------------------------------------------------------------------------------- 1 | # Defaults: 2 | # https://github.com/bbatsov/rubocop/blob/master/config/default.yml 3 | Metrics/AbcSize: 4 | Max: 100 5 | 6 | Metrics/ClassLength: 7 | Max: 250 8 | 9 | Metrics/ModuleLength: 10 | Max: 200 11 | 12 | Metrics/MethodLength: 13 | Max: 50 14 | 15 | Metrics/CyclomaticComplexity: 16 | Max: 10 17 | 18 | Metrics/PerceivedComplexity: 19 | Max: 10 20 | 21 | Metrics/LineLength: 22 | Enabled: false 23 | 24 | Style/FileName: 25 | Enabled: false 26 | 27 | Style/MultilineOperationIndentation: 28 | Enabled: false 29 | 30 | Style/GuardClause: 31 | MinBodyLength: 1 32 | 33 | Style/AsciiComments: 34 | Enabled: false 35 | 36 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_responsive-visibility.scss: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | // [converter] $parent hack 6 | @mixin responsive-visibility($parent) { 7 | #{$parent} { 8 | display: block !important; 9 | } 10 | table#{$parent} { display: table; } 11 | tr#{$parent} { display: table-row !important; } 12 | th#{$parent}, 13 | td#{$parent} { display: table-cell !important; } 14 | } 15 | 16 | // [converter] $parent hack 17 | @mixin responsive-invisibility($parent) { 18 | #{$parent} { 19 | display: none !important; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /website/source/images/clients/scala-bce891cf.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/source/stylesheets/components/_message.sass: -------------------------------------------------------------------------------- 1 | .message-holder 2 | width: 100% 3 | position: fixed 4 | top: 56px 5 | z-index: 99 6 | background: #fff 7 | transition: transform 0.2s ease 8 | will-change: transform 9 | box-shadow: 0 16px 32px 0 rgba($bunting, 0.48) 10 | line-height: 50px 11 | 12 | span 13 | display: inline-block 14 | 15 | p 16 | display: inline 17 | font-size: 16px 18 | 19 | 20 | &:not(.visible) 21 | transform: translateY(-80px) 22 | 23 | @media (max-width: $screen-sm) 24 | .container 25 | margin: 0 26 | 27 | p 28 | padding: 0 0.8em 29 | font-size: 18px 30 | 31 | &:not(.visible) 32 | transform: translateY(-110px) 33 | -------------------------------------------------------------------------------- /website/source/images/clients/ruby-00bdd41f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_panels.scss: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | @mixin panel-variant($border, $heading-text-color, $heading-bg-color, $heading-border) { 4 | border-color: $border; 5 | 6 | & > .panel-heading { 7 | color: $heading-text-color; 8 | background-color: $heading-bg-color; 9 | border-color: $heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: $border; 13 | } 14 | .badge { 15 | color: $heading-bg-color; 16 | background-color: $heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: $border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /website/source/stylesheets/site.css.scss: -------------------------------------------------------------------------------- 1 | @import 'modules/base'; 2 | @import 'modules/mixins'; 3 | 4 | @import 'partials/bootstrap'; 5 | @import 'partials/helpers'; 6 | @import 'partials/colors'; 7 | @import 'partials/typography'; 8 | @import 'partials/main'; 9 | 10 | @import 'components/buttons'; 11 | @import 'components/hero'; 12 | @import 'components/free-trial'; 13 | @import 'components/cards'; 14 | @import 'components/quotes'; 15 | @import 'components/icons'; 16 | @import 'components/modal'; 17 | @import 'components/header'; 18 | @import 'components/footer'; 19 | @import 'components/message'; 20 | 21 | @import './../../../node_modules/algolia-frontend-components/components/communityHeader/communityHeader'; 22 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_wells.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: $well-bg; 12 | border: 1px solid $well-border; 13 | border-radius: $border-radius-base; 14 | @include box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: $border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: $border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_hide-text.scss: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | @mixin hide-text() { 11 | font: #{0/0} a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | @mixin text-hide() { 20 | @include hide-text; 21 | } 22 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_breadcrumbs.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: $breadcrumb-padding-vertical $breadcrumb-padding-horizontal; 8 | margin-bottom: $line-height-computed; 9 | list-style: none; 10 | background-color: $breadcrumb-bg; 11 | border-radius: $border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "#{$breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: $breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: $breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_clearfix.scss: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | @mixin clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_responsive-embed.scss: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | 26 | // Modifier class for 16:9 aspect ratio 27 | &.embed-responsive-16by9 { 28 | padding-bottom: 56.25%; 29 | } 30 | 31 | // Modifier class for 4:3 aspect ratio 32 | &.embed-responsive-4by3 { 33 | padding-bottom: 75%; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_list-group.scss: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | @mixin list-group-item-variant($state, $background, $color) { 4 | .list-group-item-#{$state} { 5 | color: $color; 6 | background-color: $background; 7 | 8 | // [converter] extracted a& to a.list-group-item-#{$state} 9 | } 10 | 11 | a.list-group-item-#{$state} { 12 | color: $color; 13 | 14 | .list-group-item-heading { 15 | color: inherit; 16 | } 17 | 18 | &:hover, 19 | &:focus { 20 | color: $color; 21 | background-color: darken($background, 5%); 22 | } 23 | &.active, 24 | &.active:hover, 25 | &.active:focus { 26 | color: #fff; 27 | background-color: $color; 28 | border-color: $color; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /website/source/images/clients/php-53888094.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_table-row.scss: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | @mixin table-row-variant($state, $background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.#{$state}, 10 | > th.#{$state}, 11 | &.#{$state} > td, 12 | &.#{$state} > th { 13 | background-color: $background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.#{$state}:hover, 21 | > th.#{$state}:hover, 22 | &.#{$state}:hover > td, 23 | &:hover > .#{$state}, 24 | &.#{$state}:hover > th { 25 | background-color: darken($background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /website/source/javascripts/tags.js: -------------------------------------------------------------------------------- 1 | // Kissmetrics 2 | var _kmq = _kmq || []; 3 | var _kmk = _kmk || 'cb5a3adb92e8915a37a36ba1a50f2ce4fae4a1b9'; 4 | function _kms(u){ 5 | setTimeout(function(){ 6 | var d = document, f = d.getElementsByTagName('script')[0], 7 | s = d.createElement('script'); 8 | s.type = 'text/javascript'; s.async = true; s.src = u; 9 | f.parentNode.insertBefore(s, f); 10 | }, 1); 11 | } 12 | _kms('//i.kissmetrics.com/i.js'); 13 | _kms('//scripts.kissmetrics.com/' + _kmk + '.2.js'); 14 | 15 | 16 | //Google tag manager 17 | (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 18 | new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 19 | j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 20 | 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 21 | })(window,document,'script','dataLayer','GTM-N8JP8G'); 22 | -------------------------------------------------------------------------------- /website/source/stylesheets/partials/_bootstrap.sass: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "../vendors/bootstrap/variables" 3 | @import "../vendors/bootstrap/mixins" 4 | // Reset and dependencies 5 | @import "../vendors/bootstrap/normalize" 6 | //@import "../vendors/bootstrap/print" 7 | //@import "../vendors/bootstrap/glyphicons" 8 | // Core CSS 9 | @import "../vendors/bootstrap/scaffolding" 10 | @import "../vendors/bootstrap/type" 11 | @import "../vendors/bootstrap/code" 12 | @import "../vendors/bootstrap/grid" 13 | @import "../vendors/bootstrap/tables" 14 | @import "../vendors/bootstrap/forms" 15 | @import "../vendors/bootstrap/buttons" 16 | // Components 17 | @import "../vendors/bootstrap/thumbnails" 18 | @import "../vendors/bootstrap/media" 19 | @import "../vendors/bootstrap/list-group" 20 | // Utility classes 21 | @import "../vendors/bootstrap/utilities" 22 | @import "../vendors/bootstrap/responsive-utilities" 23 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_media.scss: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media-right, 11 | .media > .pull-right { 12 | padding-left: 10px; 13 | } 14 | 15 | .media-left, 16 | .media > .pull-left { 17 | padding-right: 10px; 18 | } 19 | 20 | .media-left, 21 | .media-right, 22 | .media-body { 23 | display: table-cell; 24 | vertical-align: top; 25 | } 26 | 27 | .media-middle { 28 | vertical-align: middle; 29 | } 30 | 31 | .media-bottom { 32 | vertical-align: bottom; 33 | } 34 | 35 | // Reset margins on headings for tighter default spacing 36 | .media-heading { 37 | margin-top: 0; 38 | margin-bottom: 5px; 39 | } 40 | 41 | // Media list variation 42 | // 43 | // Undo default ul/ol styles 44 | .media-list { 45 | padding-left: 0; 46 | list-style: none; 47 | } 48 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_close.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: ($font-size-base * 1.5); 9 | font-weight: $close-font-weight; 10 | line-height: 1; 11 | color: $close-color; 12 | text-shadow: $close-text-shadow; 13 | @include opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: $close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | @include opacity(.5); 21 | } 22 | 23 | // [converter] extracted button& to button.close 24 | } 25 | 26 | // Additional properties for button version 27 | // iOS requires the button element instead of an anchor tag. 28 | // If you want the anchor version, it requires `href="#"`. 29 | button.close { 30 | padding: 0; 31 | cursor: pointer; 32 | background: transparent; 33 | border: 0; 34 | -webkit-appearance: none; 35 | } 36 | -------------------------------------------------------------------------------- /website/source/stylesheets/modules/_mixins.sass: -------------------------------------------------------------------------------- 1 | 2 | @mixin diagonal($rotation, $background, $height, $pos: after) 3 | &:#{$pos} 4 | content: '' 5 | display: block 6 | position: absolute 7 | width: 100% 8 | height: $height 9 | background: #{$background} 10 | transform: skewY($rotation) 11 | z-index: 0 12 | 13 | @media (min-width: $screen-lg) 14 | transform: skewY($rotation/2) 15 | 16 | @content 17 | 18 | 19 | 20 | @mixin anim($name, $p1, $p2, $p3) 21 | @keyframes #{$name} 22 | 0%, 20%, 70%, 100% 23 | transform: #{$p1} 24 | 25 | 10%, 30%, 50% 26 | transform: #{$p2} 27 | 28 | 60% 29 | transform: #{$p3} 30 | 31 | 32 | 33 | @mixin animEllipse($name, $p1, $p2, $p3) 34 | @keyframes #{$name} 35 | 0%, 20%, 80%, 100% 36 | transform: #{$p1} 37 | 38 | 10%, 40%, 50% 39 | transform: #{$p2} 40 | opacity: 0.6 41 | 42 | 60% 43 | transform: #{$p3} 44 | opacity: 0.6 45 | 46 | 47 | -------------------------------------------------------------------------------- /website/source/images/clients/python-dd5a8a8d.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Algolia Search API Client for CSS ><)))°> 2 | 3 | ![Looks legit][1] 4 | ![Not for real][2] 5 | [![Algolia Awesome][3]](https://github.com/algolia/awesome-algolia) 6 | 7 | Thank you for your interest in our CSS API Client. 8 | 9 | This project is not real, but our [2017 April Fools prank][4]. You can read 10 | more about its making [on our blog][5]. 11 | 12 | 13 | We also have [a surprise][6] for you. 14 | 15 | 16 | [1]: https://img.shields.io/badge/Looks%20legit%3F-passing-green.svg 17 | [2]: https://img.shields.io/badge/For%20real%3F-no%20way-red.svg 18 | [3]: https://camo.githubusercontent.com/13c4e50d88df7178ae1882a203ed57b641674f94/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667 19 | [4]: https://blog.algolia.com/js-is-dead-all-hail-css/ 20 | [5]: https://blog.algolia.com/real-demo-fake-css-api-client/ 21 | [6]: https://www.youtube.com/watch?v=dQw4w9WgXcQ 22 | -------------------------------------------------------------------------------- /website/source/images/triangle-background.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/source/partials/_hero.haml: -------------------------------------------------------------------------------- 1 | .message-holder 2 | .container 3 | .row.text-center 4 | %span.text-large 🎉 5 | %p Happy April Fools! It was all a joke. Take a peek behind the curtain to see how it was built. 6 | .hero.pos-rel.color-white.h600.text-center 7 | .spacer120 8 | .container 9 | = inline_svg "project-logo.svg" 10 | .shadow 11 | 12 | .spacer40 13 | 14 | %h1 CSS API Client 15 | %h3 The power of Algolia distilled into a single .css file 16 | .spacer40 17 | %a.btn.btn-static-primary.btn-static-shadow-dark.gradient-purple-revert#cta-demo{:href => "./demo", :title => "Try the live demo"} Try it live! 18 | 19 | %a.btn.btn-static-primary.btn-static-shadow-dark.fill-white.color-royal-blue#cta{:href => "#download", :title => "Download the CSS API Client"} Download v1.4.17 20 | .spacer64 21 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_component-animations.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | @include transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | visibility: hidden; 21 | 22 | &.in { display: block; visibility: visible; } 23 | // [converter] extracted tr&.in to tr.collapse.in 24 | // [converter] extracted tbody&.in to tbody.collapse.in 25 | } 26 | 27 | tr.collapse.in { display: table-row; } 28 | 29 | tbody.collapse.in { display: table-row-group; } 30 | 31 | .collapsing { 32 | position: relative; 33 | height: 0; 34 | overflow: hidden; 35 | @include transition-property(height, visibility); 36 | @include transition-duration(.35s); 37 | @include transition-timing-function(ease); 38 | } 39 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_utilities.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | @include clearfix; 11 | } 12 | .center-block { 13 | @include center-block; 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | @include text-hide; 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_thumbnails.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: $thumbnail-padding; 10 | margin-bottom: $line-height-computed; 11 | line-height: $line-height-base; 12 | background-color: $thumbnail-bg; 13 | border: 1px solid $thumbnail-border; 14 | border-radius: $thumbnail-border-radius; 15 | @include transition(border .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | @include img-responsive; 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // [converter] extracted a&:hover, a&:focus, a&.active to a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active 25 | 26 | // Image captions 27 | .caption { 28 | padding: $thumbnail-caption-padding; 29 | color: $thumbnail-caption-color; 30 | } 31 | } 32 | 33 | // Add a hover state for linked versions only 34 | a.thumbnail:hover, 35 | a.thumbnail:focus, 36 | a.thumbnail.active { 37 | border-color: $link-color; 38 | } 39 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_pager.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: $line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | @include clearfix; 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: $pager-bg; 19 | border: 1px solid $pager-border; 20 | border-radius: $pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: $pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: $pager-disabled-color; 50 | background-color: $pager-bg; 51 | cursor: $cursor-disabled; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /demo/spec/css_writer_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | describe(CSSWriter) do 4 | describe 'highlight' do 5 | it 'should concatenate before and after' do 6 | # Given 7 | input = { 8 | before: 'nic', 9 | after: 'olas' 10 | } 11 | 12 | # When 13 | actual = CSSWriter.highlight(input) 14 | 15 | # Then 16 | expect(actual).to eq 'nicolas' 17 | end 18 | 19 | it 'should replace highlight wth private space unicode' do 20 | # Given 21 | input = { 22 | before: 'nic', 23 | highlight: 'foo', 24 | after: 'olas' 25 | } 26 | 27 | # When 28 | actual = CSSWriter.highlight(input) 29 | 30 | # Then 31 | expect(actual).to eq 'nic\\e666 \\e66f \\e66f olas' 32 | end 33 | 34 | it 'should not highlight spaces' do 35 | # Given 36 | input = { 37 | before: 'kung', 38 | highlight: 'foo', 39 | after: ' panda' 40 | } 41 | 42 | # When 43 | actual = CSSWriter.highlight(input) 44 | 45 | # Then 46 | expect(actual).to eq 'kung\\e666 \\e66f \\e66f panda' 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text"; 6 | @import "mixins/opacity"; 7 | @import "mixins/image"; 8 | @import "mixins/labels"; 9 | @import "mixins/reset-filter"; 10 | @import "mixins/resize"; 11 | @import "mixins/responsive-visibility"; 12 | @import "mixins/size"; 13 | @import "mixins/tab-focus"; 14 | @import "mixins/text-emphasis"; 15 | @import "mixins/text-overflow"; 16 | @import "mixins/vendor-prefixes"; 17 | 18 | // Components 19 | @import "mixins/alerts"; 20 | @import "mixins/buttons"; 21 | @import "mixins/panels"; 22 | @import "mixins/pagination"; 23 | @import "mixins/list-group"; 24 | @import "mixins/nav-divider"; 25 | @import "mixins/forms"; 26 | @import "mixins/progress-bar"; 27 | @import "mixins/table-row"; 28 | 29 | // Skins 30 | @import "mixins/background-variant"; 31 | @import "mixins/border-radius"; 32 | @import "mixins/gradients"; 33 | 34 | // Layout 35 | @import "mixins/clearfix"; 36 | @import "mixins/center-block"; 37 | @import "mixins/nav-vertical-align"; 38 | @import "mixins/grid-framework"; 39 | @import "mixins/grid"; 40 | -------------------------------------------------------------------------------- /website/source/images/clients/javascript-68104683.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_jumbotron.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: $jumbotron-padding ($jumbotron-padding / 2); 8 | margin-bottom: $jumbotron-padding; 9 | color: $jumbotron-color; 10 | background-color: $jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: $jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: ($jumbotron-padding / 2); 18 | font-size: $jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | > hr { 23 | border-top-color: darken($jumbotron-bg, 10%); 24 | } 25 | 26 | .container &, 27 | .container-fluid & { 28 | border-radius: $border-radius-large; // Only round corners at higher resolutions if contained in a container 29 | } 30 | 31 | .container { 32 | max-width: 100%; 33 | } 34 | 35 | @media screen and (min-width: $screen-sm-min) { 36 | padding: ($jumbotron-padding * 1.6) 0; 37 | 38 | .container &, 39 | .container-fluid & { 40 | padding-left: ($jumbotron-padding * 2); 41 | padding-right: ($jumbotron-padding * 2); 42 | } 43 | 44 | h1, 45 | .h1 { 46 | font-size: ($font-size-base * 4.5); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /website/source/images/clients/android-f03624e7.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_image.scss: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | @mixin img-responsive($display: block) { 10 | display: $display; 11 | max-width: 100%; // Part 1: Set a maximum relative to the parent 12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 13 | } 14 | 15 | 16 | // Retina image 17 | // 18 | // Short retina mixin for setting background-image and -size. Note that the 19 | // spelling of `min--moz-device-pixel-ratio` is intentional. 20 | @mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { 21 | background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-1x}"), "#{$file-1x}")); 22 | 23 | @media 24 | only screen and (-webkit-min-device-pixel-ratio: 2), 25 | only screen and ( min--moz-device-pixel-ratio: 2), 26 | only screen and ( -o-min-device-pixel-ratio: 2/1), 27 | only screen and ( min-device-pixel-ratio: 2), 28 | only screen and ( min-resolution: 192dpi), 29 | only screen and ( min-resolution: 2dppx) { 30 | background-image: url(if($bootstrap-sass-asset-helper, twbs-image-path("#{$file-2x}"), "#{$file-2x}")); 31 | background-size: $width-1x $height-1x; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /website/config.rb: -------------------------------------------------------------------------------- 1 | ### 2 | # Page options, layouts, aliases and proxies 3 | ### 4 | 5 | # Per-page layout changes: 6 | # 7 | # With no layout 8 | page '/*.xml', layout: false 9 | page '/*.json', layout: false 10 | page '/*.txt', layout: false 11 | 12 | # With alternative layout 13 | # page "/path/to/file.html", layout: :otherlayout 14 | 15 | # Proxy pages (http://middlemanapp.com/basics/dynamic-pages/) 16 | # proxy "/this-page-has-no-template.html", "/template-file.html", locals: { 17 | # which_fake_page: "Rendering a fake page with a local variable" } 18 | 19 | # General configuration 20 | 21 | # Reload the browser automatically whenever files change 22 | configure :development do 23 | activate :livereload 24 | end 25 | 26 | ### 27 | # Helpers 28 | ### 29 | 30 | 31 | 32 | # Methods defined in the helpers block are available in templates 33 | helpers do 34 | def inline_svg(path, className = '') 35 | dir = 'source/images' 36 | full_path = "#{root}/#{dir}/#{path}" 37 | raise "Could not find SVG file @ #{full_path}" unless File.exist?(full_path) 38 | "#{IO.read(full_path)}".html_safe 39 | end 40 | end 41 | 42 | # Build-specific configuration 43 | configure :build do 44 | activate :relative_assets 45 | # Minify CSS on build 46 | # activate :minify_css 47 | 48 | # Minify Javascript on build 49 | # activate :minify_javascript 50 | end 51 | -------------------------------------------------------------------------------- /website/source/images/clients/csharp-4075daa3.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/source/images/quote.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/mixins/_buttons.scss: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | @mixin button-variant($color, $background, $border) { 7 | color: $color; 8 | background-color: $background; 9 | border-color: $border; 10 | 11 | &:hover, 12 | &:focus, 13 | &.focus, 14 | &:active, 15 | &.active, 16 | .open > &.dropdown-toggle { 17 | color: $color; 18 | background-color: darken($background, 10%); 19 | border-color: darken($border, 12%); 20 | } 21 | &:active, 22 | &.active, 23 | .open > &.dropdown-toggle { 24 | background-image: none; 25 | } 26 | &.disabled, 27 | &[disabled], 28 | fieldset[disabled] & { 29 | &, 30 | &:hover, 31 | &:focus, 32 | &.focus, 33 | &:active, 34 | &.active { 35 | background-color: $background; 36 | border-color: $border; 37 | 38 | &.btn-primary { 39 | color: #fff; 40 | } 41 | } 42 | } 43 | 44 | .badge { 45 | color: $background; 46 | background-color: $color; 47 | } 48 | } 49 | 50 | // Button sizes 51 | @mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) { 52 | padding: $padding-vertical $padding-horizontal; 53 | font-size: $font-size; 54 | line-height: $line-height; 55 | border-radius: $border-radius; 56 | } 57 | -------------------------------------------------------------------------------- /website/source/javascripts/site.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | var modal = $('#modal'); 3 | var cta = $('#cta'); 4 | var ctaMessages = [ 5 | 'Really?', 6 | 'Are you sure?', 7 | 'Ok, one more click...', 8 | ]; 9 | var ctaMessageIndex = 0; 10 | 11 | // Init the Community header 12 | new communityHeader(); 13 | 14 | window.App = { 15 | trollMe: function() { 16 | new Favico().image($('#trollface')[0]); 17 | }, 18 | 19 | showModal: function() { 20 | modal.removeClass('hidden'); 21 | App.trollMe(); 22 | $(document).on('keydown', App.onKeyDownEscape); 23 | }, 24 | closeModal: function() { 25 | modal.addClass('hidden'); 26 | $(document).off('keydown', App.onKeyDownEscape); 27 | }, 28 | onKeyDownEscape: function(event) { 29 | if (event.keyCode !== 27) { 30 | return; 31 | } 32 | App.closeModal(); 33 | }, 34 | onclickCTA: function(event) { 35 | var message = ctaMessages[ctaMessageIndex++]; 36 | event.preventDefault(); 37 | if (!message) { 38 | App.showModal(); 39 | ctaMessageIndex = 0; 40 | cta.text('Download v1.4.17'); 41 | } 42 | cta.text(message); 43 | }, 44 | 45 | displayMessage: function() { 46 | $('.message-holder').addClass('visible'); 47 | }, 48 | }; 49 | 50 | cta.on('click', App.onclickCTA); 51 | $('.modal--close').on('click', App.closeModal); 52 | 53 | setTimeout(App.displayMessage, 2000); 54 | }); 55 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_labels.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: $label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // [converter] extracted a& to a.label 18 | 19 | // Empty labels collapse automatically (not available in IE8) 20 | &:empty { 21 | display: none; 22 | } 23 | 24 | // Quick fix for labels in buttons 25 | .btn & { 26 | position: relative; 27 | top: -1px; 28 | } 29 | } 30 | 31 | // Add hover effects, but only for links 32 | a.label { 33 | &:hover, 34 | &:focus { 35 | color: $label-link-hover-color; 36 | text-decoration: none; 37 | cursor: pointer; 38 | } 39 | } 40 | 41 | // Colors 42 | // Contextual variations (linked labels get darker on :hover) 43 | 44 | .label-default { 45 | @include label-variant($label-default-bg); 46 | } 47 | 48 | .label-primary { 49 | @include label-variant($label-primary-bg); 50 | } 51 | 52 | .label-success { 53 | @include label-variant($label-success-bg); 54 | } 55 | 56 | .label-info { 57 | @include label-variant($label-info-bg); 58 | } 59 | 60 | .label-warning { 61 | @include label-variant($label-warning-bg); 62 | } 63 | 64 | .label-danger { 65 | @include label-variant($label-danger-bg); 66 | } 67 | -------------------------------------------------------------------------------- /website/source/stylesheets/vendors/bootstrap/_badges.scss: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: $font-size-small; 12 | font-weight: $badge-font-weight; 13 | color: $badge-color; 14 | line-height: $badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: $badge-bg; 19 | border-radius: $badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | 36 | // [converter] extracted a& to a.badge 37 | 38 | // Account for badges in navs 39 | .list-group-item.active > &, 40 | .nav-pills > .active > a > & { 41 | color: $badge-active-color; 42 | background-color: $badge-active-bg; 43 | } 44 | .list-group-item > & { 45 | float: right; 46 | } 47 | .list-group-item > & + & { 48 | margin-right: 5px; 49 | } 50 | .nav-pills > li > a > & { 51 | margin-left: 3px; 52 | } 53 | } 54 | 55 | // Hover state, but only for links 56 | a.badge { 57 | &:hover, 58 | &:focus { 59 | color: $badge-link-hover-color; 60 | text-decoration: none; 61 | cursor: pointer; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /website/source/images/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 11 | -------------------------------------------------------------------------------- /website/source/images/clients/java-65dd222f.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /website/buildComponents.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const algoliaComponents = require('algolia-frontend-components'); 3 | 4 | const output = algoliaComponents.communityHeader({ 5 | menu: { 6 | project: { 7 | label: 'Algolia CSS API Client', 8 | url: 'https://www.algolia.com/css', 9 | }, 10 | }, 11 | sideMenu: [ 12 | {name: 'Live demo', url: './demo'}, 13 | {name: 'Blog', url: 'https://blog.algolia.com/js-is-dead-all-hail-css', target: '_blank'}, 14 | {name: 'Community forum', url: 'https://discourse.algolia.com/t/css-api-client-released/895', target: '_blank'}, 15 | {image: '