Skip to content

Commit

Permalink
updated configs', added integrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorfman committed Sep 16, 2015
1 parent 3e4c2e9 commit 125fde2
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 12 deletions.
15 changes: 8 additions & 7 deletions app.js
Expand Up @@ -83,13 +83,14 @@ app.locals.tweets = tweets;

// routes
var routes = require('./routes');
app.get('/fontawesome/', routes.fontawesome);
app.get('/bootswatch/', routes.bootswatch);
app.get('/bootlint/', routes.bootlint);
app.get('/alpha/', routes.alpha);
app.get('/legacy/', routes.legacy);
app.get('/showcase/', routes.showcase);
app.get('/', routes.index);
app.get('/fontawesome/', routes.fontawesome);
app.get('/bootswatch/', routes.bootswatch);
app.get('/bootlint/', routes.bootlint);
app.get('/alpha/', routes.alpha);
app.get('/legacy/', routes.legacy);
app.get('/showcase/', routes.showcase);
app.get('/integrations/', routes.integrations);
app.get('/', routes.index);

var data; // only regenerated on restart
app.get('/data/bootstrapcdn.json', function (req, res) {
Expand Down
23 changes: 22 additions & 1 deletion config/_config.yml
Expand Up @@ -3,7 +3,7 @@ theme: 14
authors:
- Joshua Mervine
- Justin Dorfman
description: Bootstrap CDN
description: BootstrapCDN
favicon: /favicon.ico
google_analytics:
account_id: UA-32253110-1
Expand Down Expand Up @@ -291,3 +291,24 @@ showcase:
img: /images/showcase/monster.png
lib: "Font Awesome 4.2.0"
url: 'http://www.monster.com/'
integrations:
- name: 'Bootstrap 3 Snippets'
img: /images/integrations/atom-bootstrap3.png
plat: "Atom"
url: 'https://atom.io/packages/atom-bootstrap3'
- name: 'Bootstrap 3'
img: /images/integrations/drupal-bootstrap3.png
plat: "Drupal"
url: 'https://www.drupal.org/project/bootstrap'
- name: 'BootstrapCDN WP'
img: /images/integrations/bootstrapcdn-wp.png
plat: "WordPress"
url: 'https://wordpress.org/plugins/bootstrapcdn/'
- name: 'Bootstrap NBM'
img: /images/integrations/bootstrap-nbm.png
plat: "NetBeans"
url: 'http://davidsalter.com/2014/05/bootstrap-cdn-plugin-for-netbeans-release-1-1-0.html'
- name: 'Light Bootstrap Dashboard'
img: /images/integrations/light-bootstrap-dashboard.png
plat: "WebPlatform"
url: 'http://www.creative-tim.com/product/light-bootstrap-dashboard'
4 changes: 4 additions & 0 deletions make.js
Expand Up @@ -56,6 +56,10 @@ var FOREVER = path.join(__dirname, 'node_modules/.bin/forever');
target.stop = function() {
assertExec(FOREVER + ' stop app.js');
};
target.restart = function() {
assertExec(FOREVER + ' stop app.js');
assertExec(FOREVER + ' --plain start app.js')
}

//
// make travis
Expand Down
Binary file added public/images/integrations/atom-bootstrap3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/integrations/bootstrap-nbm.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/integrations/bootstrapcdn-wp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/integrations/drupal-bootstrap3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 19 additions & 2 deletions routes/index.js
@@ -1,6 +1,6 @@
'use strict';

var TITLE = 'Bootstrap CDN by MaxCDN';
var TITLE = 'BootstrapCDN by MaxCDN';
function index(req, res) {
res.render('index', { title: TITLE, theme: req.query.theme });
}
Expand Down Expand Up @@ -41,14 +41,31 @@ function showcase(req, res) {
res.render('showcase', { title: TITLE, theme: req.query.theme, col1: col1, col2: col2 })
}

function integrations(req, res) {
var integrations = req.config.integrations;
var col1 = [];
var col2 = [];

for (var i = 0; i < integrations.length; i++) {
if (i % 2 === 0) {
col1.push(integrations[i]);
} else {
col2.push(integrations[i]);
}
}

res.render('integrations', { title: TITLE, theme: req.query.theme, col1: col1, col2: col2 })
}

module.exports = {
index: index,
fontawesome: fontawesome,
bootswatch: bootswatch,
bootlint: bootlint,
alpha: alpha,
legacy: legacy,
showcase: showcase
showcase: showcase,
integrations: integrations
};

// vim: ft=javascript sw=4 sts=4 et:
3 changes: 2 additions & 1 deletion views/_partials/header.jade
Expand Up @@ -7,7 +7,7 @@
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand(href="/" + themeQs) Bootstrap CDN
a.navbar-brand(href="/" + themeQs) BootstrapCDN
.navbar-collapse.collapse
ul.nav.navbar-nav
li: a(href="/fontawesome/" + themeQs): i.fa.fa-flag
Expand All @@ -16,6 +16,7 @@
li: a(href="/bootlint/" + themeQs) Bootlint
li: a(href="/legacy/" + themeQs) Legacy
li: a(href="/showcase/" + themeQs) Showcase
li: a(href="/integrations/" + themeQs) Integrations

ul.nav.navbar-nav.navbar-right.visible-md.visible-lg
li: a(href="/alpha/" + themeQs) Bootstrap4
Expand Down
7 changes: 7 additions & 0 deletions views/_partials/integrations.jade
@@ -0,0 +1,7 @@
hr
br
a(href=item.url, target="_blank"): img.img-responsive.thumbnail(src=item.img, style="margin: 0 auto")
h3: a(href=item.url, target="_blank")=item.name
| Platform:
span=item.plat
br
2 changes: 1 addition & 1 deletion views/_partials/jumbotron.jade
@@ -1,6 +1,6 @@
.jumbotron
div.container.text-center
h1 Bootstrap CDN
h1 BootstrapCDN
p
| The recommended
a(href="https://www.maxcdn.com/", target="_blank") CDN
Expand Down
16 changes: 16 additions & 0 deletions views/integrations.jade
@@ -0,0 +1,16 @@
extends layout

block content
h2 Integrations
.row
.col-md-6.text-center
- each item in col1
include _partials/integrations.jade

.col-md-6.text-center
- each item in col2
include _partials/integrations.jade
.row
.col-md-12.text-center
a.btn.btn-primary.btn(href="https://github.com/MaxCDN/bootstrap-cdn/issues" target="_blank") Submit an Integration
//- vim: ft=jade sw=4 sts=4 et:

0 comments on commit 125fde2

Please sign in to comment.