diff --git a/Gemfile b/Gemfile deleted file mode 100644 index ae4e0259..00000000 --- a/Gemfile +++ /dev/null @@ -1,16 +0,0 @@ -source 'https://rubygems.org' - -ruby '2.1.1' - -gem 'sinatra', '~> 1.4.3' -gem 'sinatra-contrib', '~> 1.4.1' -gem 'kss', '~> 0.5.0' -gem 'thin', '~> 1.6.0' - -gem 'scss-lint', '0.15.0' - -group :development do - gem "pry" - gem "pry-nav" -end - diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 59368bfd..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,66 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - backports (3.4.0) - coderay (1.1.0) - colorize (0.5.8) - daemons (1.1.9) - eventmachine (1.0.3) - ffi (1.9.3) - kss (0.5.0) - listen (1.1.6) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - rb-kqueue (>= 0.2) - method_source (0.8.2) - multi_json (1.8.2) - pry (0.9.12.4) - coderay (~> 1.0) - method_source (~> 0.8) - slop (~> 3.4) - pry-nav (0.2.3) - pry (~> 0.9.10) - rack (1.5.2) - rack-protection (1.5.1) - rack - rack-test (0.6.2) - rack (>= 1.0) - rb-fsevent (0.9.4) - rb-inotify (0.9.3) - ffi (>= 0.5.0) - rb-kqueue (0.2.0) - ffi (>= 0.5.0) - sass (3.3.0.rc.1) - listen (~> 1.1.0) - scss-lint (0.15.0) - colorize (= 0.5.8) - sass (= 3.3.0.rc.1) - sinatra (1.4.4) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (~> 1.3, >= 1.3.4) - sinatra-contrib (1.4.2) - backports (>= 2.0) - multi_json - rack-protection - rack-test - sinatra (~> 1.4.0) - tilt (~> 1.3) - slop (3.4.7) - thin (1.6.1) - daemons (>= 1.0.9) - eventmachine (>= 1.0.0) - rack (>= 1.0.0) - tilt (1.4.1) - -PLATFORMS - ruby - -DEPENDENCIES - kss (~> 0.5.0) - pry - pry-nav - scss-lint (= 0.15.0) - sinatra (~> 1.4.3) - sinatra-contrib (~> 1.4.1) - thin (~> 1.6.0) diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 701483b4..00000000 --- a/Gruntfile.js +++ /dev/null @@ -1,17 +0,0 @@ -/* jshint node:true */ -"use strict"; - -module.exports = function(grunt) { - // Load tasks from `/tasks` - grunt.loadTasks('tasks'); - - // Load plugin configuration from `tasks/options`. - require('load-grunt-config')(grunt, { - configPath: require('path').join(process.cwd(), 'tasks/options'), - init: true, - config: { - pkg: grunt.file.readJSON("package.json") - } - }); -}; - diff --git a/Procfile b/Procfile deleted file mode 100644 index 3e0040e1..00000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: bundle exec thin -R config.ru start -p $PORT -e $RACK_ENV diff --git a/app.rb b/app.rb deleted file mode 100644 index 26925467..00000000 --- a/app.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'sinatra' -require 'sinatra/content_for' -require 'kss' - -set :public_folder, Proc.new { File.join(root, "dist") } - -get '/' do - @styleguide = Kss::Parser.new('scss/') - erb :styleguide -end - -get '/example/*.html' do - send_file "views/examples/#{params[:splat].first}.html" -end - -get '/example/*' do - render_layout -end - -helpers do - # Layout Handling (parse path and serve proper layout) - def render_layout - splat = params[:splat][0] - render :erb, :"examples/#{splat}", layout: :drupal_layout - end - - # Generates a styleguide block. A little bit evil with @_out_buf, but - # if you're using something like Rails, you can write a much cleaner helper - # very easily. - def styleguide_block(section, &block) - @section = @styleguide.section(section) - @example_html = capture{ block.call } - @escaped_html = ERB::Util.html_escape @example_html - @_out_buf << erb(:_styleguide_block) - end - - def styleguide_block_without_preview(section, &block) - @section = @styleguide.section(section) - @example_html = capture{ block.call } - @escaped_html = ERB::Util.html_escape @example_html - @_out_buf << erb(:_styleguide_block_without_preview) - end - - def styleguide_block_without_modifiers(section, &block) - @section = @styleguide.section(section) - @example_html = capture{ block.call } - @escaped_html = ERB::Util.html_escape @example_html - @_out_buf << erb(:_styleguide_block_without_modifiers) - end - - def styleguide_block_custom_example(section) - @section = @styleguide.section(section) - @_out_buf << erb(:_styleguide_block_custom_example) - end - - # Captures the result of a block within an erb template without spitting it - # to the output buffer. - def capture(&block) - out, @_out_buf = @_out_buf, "" - yield - @_out_buf - ensure - @_out_buf = out - end -end - diff --git a/assets/fonts/icomoon/icomoon.eot b/assets/fonts/icomoon/icomoon.eot old mode 100755 new mode 100644 diff --git a/assets/fonts/icomoon/icomoon.svg b/assets/fonts/icomoon/icomoon.svg old mode 100755 new mode 100644 diff --git a/assets/fonts/icomoon/icomoon.ttf b/assets/fonts/icomoon/icomoon.ttf old mode 100755 new mode 100644 diff --git a/assets/fonts/icomoon/icomoon.woff b/assets/fonts/icomoon/icomoon.woff old mode 100755 new mode 100644 diff --git a/config.ru b/config.ru deleted file mode 100644 index 785bf5cf..00000000 --- a/config.ru +++ /dev/null @@ -1,2 +0,0 @@ -require './app' -run Sinatra::Application \ No newline at end of file diff --git a/ie.css b/ie.css new file mode 100644 index 00000000..c43db441 --- /dev/null +++ b/ie.css @@ -0,0 +1 @@ +form.search input[type=search]{color:#444;padding-top:8px;padding-bottom:6px;background:#999 url(images/search.png) no-repeat 12px 6px}form.search input[type=search]:hover{background-position:12px -21px}form.search input[type=search]:focus{background-position:12px 6px}.timeline li:before{display:none} \ No newline at end of file diff --git a/js/README.md b/js/README.md deleted file mode 100644 index 7dc67cb9..00000000 --- a/js/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# JavaScript Code Guidelines -We have some code guidelines to make sure that everyone can work on the same project without the codebase becoming a mess. We also use [JSHint](http://www.jshint.com/) to keep our JavaScript neat and tidy. It runs as a Grunt task and will warn you of some common code style issues. - - -#### General Syntax - - Use soft-tabs with a two space indent. - - Place an empty newline at the end of the file. - - Use `===` and `!==`. Never use `==` and `!=`. - - Use double-quotes (ex: `"string"`) rather than single-quotes (ex: `'bad string'`). - -#### Naming - - Use `camelCase` when naming objects, functions, and instances. - - Use `PascalCase` when naming constructors or classes. - - Use a leading underscore `_` when naming private properties, for example: `var _privateProperty = 0;` - - Prefix jQuery object variables with a $. For example, `var $sidebar = $(".sidebar");`. - - When saving a reference to `this` use `_this`. - - Always name your functions. This is helpful for stack traces. Ex: `var log = function log(msg) { };` - -#### Objects, Arrays, & Variables - - Use the literal syntax for object creation (ex: `var item = {};`) - - Use the literal syntax for array creation (ex: `var items = [];`) - - Always use var to declare variables. Not doing so will result in global variables, and global variables are bad. If defining a global variable for namespacing, explicitly attach it to the `window` object to make your intent clear. - - Assign variables at the top of their scope. This helps avoid issues with variable declaration and assignment hoisting related issues. - -#### Commenting - - Use `//` for both single line comments and multi-line comments. (In rare cases with regular expressions, `/* */` can be terminated early.) - - Use `// FIXME: ` to annotate problems. - - Use `// TODO: ` to annotate solutions to problems. - -#### Modules - - The file should be named with `camelCase` and match the name of the single export. - - Always declare `"use strict";` at the top of the module. - - See `_exampleModule.js` for a working example. diff --git a/js/ValidationFunctions.js b/js/ValidationFunctions.js deleted file mode 100644 index 82091dd4..00000000 --- a/js/ValidationFunctions.js +++ /dev/null @@ -1,38 +0,0 @@ -// -// -// Some basic validation functions for use with `validation.js`. -// Validations can be added later by attaching to the -// `NEUE.Validation.Functions` object and referencing the function -// by name in the `data-validate` attribute. -// -// Validations give a JSON response to the `done()` callback -// when they've finished validating with a boolean `success` -// and a plain-text `message` value. (Alternatively, a -// `suggestion` value can be passed which will prompt -// the user "Did you mean {suggestion}?". -// -// - -var NEUE = NEUE || {}; -NEUE.Validation = NEUE.Validation || {}; -NEUE.Validation.Functions = NEUE.Validation.Functions || {}; - -(function() { - "use strict"; - - NEUE.Validation.Functions.match = function(string, secondString, done) { - if(string === secondString && string !== "") { - return done({ - success: true, - message: "Looks good!" - }); - } else { - return done({ - success: false, - message: "That doesn't match." - }); - } - }; - - -})(); diff --git a/js/carousel.js b/js/carousel.js deleted file mode 100644 index a7e0b8e8..00000000 --- a/js/carousel.js +++ /dev/null @@ -1,71 +0,0 @@ -// -// -// **Image Carousel** Adds simple "previous/next" functionality -// to slide deck-style image galleries with the following markup: -// -// ```html -// -// ``` -// - -var NEUE = NEUE || {}; - -(function($) { - "use strict"; - - // Show first image - $("#slide0").addClass("visible"); - - // Make carousel stateful - var counter = 0; - - // Cache carousel buttons - var $buttons = $("#prev, #next"); - - // Decrement counter - function decrementCounter() { - // If first slide is shown, restart loop - // Else, show previous slide - counter === 0 ? counter = 2 : counter--; - } - - // Increment counter - function incrementCounter() { - // If last slide is shown, restart loop - // Else, show next slide - counter === 2 ? counter = 0 : counter++; - } - - // Toggle slide visibility - function showCurrentSlide( direction ) { - // Remove "visibile" class from the current slide - $("#slide" + counter).removeClass("visible"); - - // Increment or decrement slide position based on user"s request - direction === "prev" ? decrementCounter() : incrementCounter(); - - // Assign "visible" class to the requested slide - $("#slide" + counter).addClass("visible"); - } - - // Bind click event to carousel buttons - $buttons.click(function() { - showCurrentSlide( $(this).attr("id") ); - }); - -})(jQuery); diff --git a/js/flexbox-fix.js b/js/flexbox-fix.js deleted file mode 100644 index e3e6c22e..00000000 --- a/js/flexbox-fix.js +++ /dev/null @@ -1,15 +0,0 @@ -// -// -// **Tests for IE flexbox support, and if so apply a fix.** -// -// For more information: -// http://thatemil.com/blog/2013/11/03/sticky-footers-flexbox-and-ie10/ -// -// - -(function() { - "use strict"; - - Modernizr.addTest("flexbox-ie10", Modernizr.testAllProps("flexAlign", "end", true)); - -})(); diff --git a/js/jump-scroll.js b/js/jump-scroll.js deleted file mode 100644 index e684664a..00000000 --- a/js/jump-scroll.js +++ /dev/null @@ -1,24 +0,0 @@ -// -// -// **Applies a smooth-scroll animation on links with the `.js-jump-scroll` class.** -// -// - -(function($) { - "use strict"; - - $(document).ready(function() { - $(".js-jump-scroll").on("click", function(e) { - e.preventDefault(); - - var href = $(this).attr("href"); - - // Animate scroll position to the target of the link: - $("html,body").animate({scrollTop: $(e.target.hash).offset().top}, "slow", function() { - // Finally, set the correct hash in the address bar. - window.location.hash = href; - }); - }); - }); - -})(jQuery); diff --git a/js/menu.js b/js/menu.js deleted file mode 100644 index 63d2558a..00000000 --- a/js/menu.js +++ /dev/null @@ -1,26 +0,0 @@ -// -// -// **Initializes site-wide menu chrome functionality.** -// -// - -(function($) { - "use strict"; - - $(document).ready(function() { - // Toggle dropdown menu navigation on mobile: - $(".js-toggle-mobile-menu").on("click", function() { - $(".chrome--nav").toggleClass("is-visible"); - }); - - // Hide footer on mobile until clicked - $(".footer--wrapper .col").addClass("is-collapsed"); - $(".js-footer-col h4").on("click", function() { - if( window.matchMedia("screen and (max-width: 768px)").matches ) { - $(this).closest(".col").toggleClass("is-collapsed"); - } - }); - - }); - -})(jQuery); diff --git a/js/modal.js b/js/modal.js deleted file mode 100644 index 0f3d5cfd..00000000 --- a/js/modal.js +++ /dev/null @@ -1,109 +0,0 @@ -// -// -// **Show/hide modals.** Link should have `.js-modal-link` class, and -// it's `href` should point to the hash of the modal. By convention, the -// modal ID should be prefixed with `modal--` like so: -// -// -// -// - -var NEUE = NEUE || {}; - -(function($) { - "use strict"; - - var modalIsOpen = false; - var $modal, $modalContent; - - $(document).ready(function() { - // Trigger modal on click: - $("body").on("click", ".js-modal-link", function(e) { - e.preventDefault(); - - var href; - if( $(this).data("cached-modal") ) { - href = $(this).data("cached-modal"); - } else if ( e.target.hash.charAt(0) === "#" ) { - // We find the modal based on the ID in the link"s `href`. For example, - // `Click me` would open ``. - href = $(e.target.hash); - } else { - // @TODO: We should handle AJAX loading things in. - } - - // If Google Analytics is set up, we fire an event to track that a - // modal has been opened. - if(typeof(_gaq) !== 'undefined' || _gaq !== null) { - _gaq.push(["_trackEvent", "Modal", "Open", href, null, true]); - } - - if( !modalIsOpen ) { - // create modal in DOM - $modal = $(""); - $modalContent = $(""); - $modal.append($modalContent); - $modalContent.html( $(href).html() ); - - // set up overlay and show modal - $("body").addClass("modal-open"); - $("body").append($modal); - $modal.addClass("fade-in"); - $modalContent.addClass("fade-in-up"); - $modalContent.addClass( $(href).attr("class") ); - $modal.show(); - - modalIsOpen = true; - - // **This fixes an issue with `position:fixed` and the virtual keyboard - // on Mobile Safari.** Since this is a browser bug, we're forced to use - // browser-detection here, and should look into removing this as soon - // as this is fixed in the future. Yes, it is gross. - if( /iPhone|iPad|iPod/i.test(window.navigator.userAgent) ) { - setTimeout(function () { - $modal.css({ "position": "absolute", "overflow": "visible", "height": $(document).height() + "px" }); - $modalContent.css({ "margin-top": $(document).scrollTop() + "px" }); - }, 0); - } - } else { - // modal is already open, so just replace current content - $modalContent.html( $(href).html() ); - } - - // We'll set up form validation markup for anything in the modal (since it isn't in the DOM on load) - // @TODO: Should be providing an event that other modules can hook into (so the Validation Module would take care of this). - NEUE.Validation.prepareFormLabels($modalContent); - - // Close modal when "x" is clicked: - $modal.on("click", ".js-close-modal", function(e) { - e.preventDefault(); - - // If Google Analytics is set up, we fire an event to track that a - // modal has been closed. - if(typeof(_gaq) !== 'undefined' || _gaq !== null) { - _gaq.push(["_trackEvent", "Modal", "Close", href, null, true]); - } - - if(Modernizr.cssanimations) { - $modalContent.addClass("fade-out-down"); - $modal.addClass("fade-out"); - - $("body").removeClass("modal-open"); - - $modal.one("webkitAnimationEnd oanimationend msAnimationEnd animationend", function() { - $modal.remove(); - modalIsOpen = false; - }); - } else { - $("body").removeClass("modal-open"); - $modal.remove(); - } - - }); - }); - - }); - -})(jQuery); diff --git a/js/scroll-indicator.js b/js/scroll-indicator.js deleted file mode 100644 index ef5ae10a..00000000 --- a/js/scroll-indicator.js +++ /dev/null @@ -1,65 +0,0 @@ -// -// -// **Indicates current section in nav on scroll.** Applies an `.is-active` -// class when the specified `href` reaches the top of the viewport. -// -// Triggered by a `.js-scroll-indicator` on a link. -// -// - -(function($) { - "use strict"; - - var links = []; - - // Prepare all `.js-scroll-indicator` links on the page. - function preparePage() { - links = []; - - $(".js-scroll-indicator").each(function(index, link) { - prepareIndicator(link); - }); - } - - // Registers links and their targets with scroll handler - function prepareIndicator(link) { - // Calculate the element's offset from the top of the page while anchored - var linkTarget = $(link).attr("href"); - var linkTargetOffset = $(linkTarget).offset().top; - - // Create the data structure that we'll store this stuff in - var linkObj = { - $el: $(link), - targetOffset: linkTargetOffset - }; - - // Add jQuery object and offset value to links array - links.push(linkObj); - - // Now that we're ready, let's calculate how stickies should be displayed - updateScrollIndicators(); - } - - // Scroll handler: highlights the furthest link the user has passed - function updateScrollIndicators() { - $.each(links, function(index, link) { - // In reverse order (moving up the nav from the bottom), check whether - // we've scrolled past the link's target. If so, set active and stop. - var windowOffset = $(window).scrollTop() + link.$el.height(); - if (windowOffset > link.targetOffset) { - $(".js-scroll-indicator").removeClass("is-active"); - link.$el.addClass("is-active"); - return; - } - }); - } - - // Attach our functions to their respective events. - $(document).ready(function() { - preparePage(); - - $(window).on("scroll", updateScrollIndicators); - $(window).on("resize", preparePage); - }); - -})(jQuery); diff --git a/js/sticky.js b/js/sticky.js deleted file mode 100644 index c2bd23f7..00000000 --- a/js/sticky.js +++ /dev/null @@ -1,70 +0,0 @@ -// -// -// **Pins an element to the top of the screen on scroll.** -// Requires pinned element to have `.js-sticky` class, and have -// a ".is-stuck" modifier class in its CSS (which allows -// customized sticky behavior based on media queries). Example: -// -// .sidebar { -// &.is-stuck { -// position: fixed; -// top: 0; -// } -// } -// -// - -(function($) { - "use strict"; - - var divs = []; - - // Prepare all `.js-sticky` divs on the page. - function preparePage() { - divs = []; - - $(".js-sticky").each(function(index, div) { - prepareSticky(div); - }); - } - - // Prepare markup and register divs with scroll handler - function prepareSticky(div) { - // Calculate the element's offset from the top of the page while anchored - var divOffset = $(div).offset().top; - - // Create the data structure that we'll store this stuff in - var divObj = { - $el: $(div), - offset: divOffset - }; - - // Add jQuery object and offset value to divs array - divs.push(divObj); - - // Now that we're ready, let's calculate how stickies should be displayed - scrollSticky(); - } - - // Scroll handler: pins/unpins divs on scroll event - function scrollSticky() { - $.each(divs, function(index, div) { - // Compare the distance to the top of the page with the distance scrolled. - // For each div: if we've scrolled past it's offset, pin it to top. - if ($(window).scrollTop() > div.offset) { - div.$el.addClass("is-stuck"); - } else { - div.$el.removeClass("is-stuck"); - } - }); - } - - // Attach our functions to their respective events. - $(document).ready(function() { - preparePage(); - - $(window).on("scroll", scrollSticky); - $(window).on("resize", preparePage); - }); - -})(jQuery); diff --git a/js/system-messages.js b/js/system-messages.js deleted file mode 100644 index 0e25d7ab..00000000 --- a/js/system-messages.js +++ /dev/null @@ -1,37 +0,0 @@ -// -// -// **System Messages.** Will create a close ("X") button -// for users with JavaScript enabled that uses the following -// syntax to hook into this function: -// -//
Alert! You win.
> -// -// This will produce the following markup after the script executes: -// -//
Alert! You win. -// x -//
> -// -// - -var NEUE = NEUE || {}; - -(function($) { - "use strict"; - - $(document).ready(function() { - - var message = "div.messages"; - var messageClose = "×"; - - // Create message close button - $(message).append(messageClose); - - // Close message when "x" is clicked: - $(".js-close-message").on("click", function(e) { - e.preventDefault(); - - $(this).parent(message).slideUp(); - }); - }); -})(jQuery); diff --git a/js/validation.js b/js/validation.js deleted file mode 100644 index 2bd324d6..00000000 --- a/js/validation.js +++ /dev/null @@ -1,211 +0,0 @@ -// -// -// **Client-side form validation logic.** Form element is validated based -// on `data-validate` attribute, and validation output is placed in -// corresponding