Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign/update webpack config #104

Open
wants to merge 11 commits into
base: tailwind-redesign
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
css/main.css
js/bundle.js
css/main.css*
js/bundle.js*
_site
_includes/main.css*
.jekyll-metadata
.sass-cache
feed.xml
Expand Down
25 changes: 25 additions & 0 deletions .pa11yci
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"defaults": {
"timeout": 6000
},
"urls": [
{
"url": "http://localhost:4000"
}, {
"url": "http://localhost:4000/about/",
"hideElements": "footer, header"
}, {
"url": "http://localhost:4000/events/",
"hideElements": "footer, header",
"actions": [
"wait for element .nh-o-eventCard to be added"
]
}, {
"url": "http://localhost:4000/mentors/",
"hideElements": "footer, header"
}, {
"url": "http://localhost:4000/contact/",
"hideElements": "footer, header"
}
]
}
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ deploy:
target-branch: master
on:
branch: develop
sudo: required
addons:
chrome: stable
env:
matrix:
- secure: scnCVl5pnUWaElabNoU7ej8OQxbd3bx+hwlx6NHiZWCPUweCEHA7eKBf+uJyfdnrLugttP7x0lwADU/FuS49bonr5gtyIR8/K8q7a7g0cF8rYFGcP7WaFUJqZdZ9zN81QeznEcURxOhNG6dThEzxassq8695Jhc+qchUyqLnv2x9z+kj2OKTrA+Mn9VH0ySKZQbe1ubSXwzfugLbocHlithGmjrXXwC8zmDGx5BuSG1B37mReX2l4zfV9SuTGUxfstAvbpked6x3DjVL3yB+oh8/rG8gaCWTC+7ECP9ev3nE0EURKI0YRWS+DNte898WiJ2rvslq6poYbSvOAyu/uQz/Mr8CtuHI4GWXzqh146ElXLV1UvY40ebqNFu1zU3zZ+hZxBMjglbl9jotOEJ9IK09XjMnEjW45Au8FwE08JKdRLvr3hrKyrmkYUJNPZUvog7SNvs36NnP3lH9zuEBQ47+pme9HjQZQvkjcvoxZhx7XPMd/RsCSq3d5ooT7ZMiapAN4XjWro065FD5/z+JjjHst3wcCes11U1wO9kZJ0kkO9c7TMyD7HYHXZpknSj0bn3YH/8QlX5G7DVLLfLxgw240X4BrHoiUybecdh49SzFrrgen4Fb6yXMgyjuhIuRqy6ErnIBIPPQupmoaUfdRevA/Xr1SmjQYpRzVPlI5E4=
7 changes: 7 additions & 0 deletions 404/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: page
title: 404
permalink: /404.html
---

Please wait as an elite team of dogs playing Tetris pause their games to redirect you.
6 changes: 2 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
plugins: [jekyll-paginate]

# Site settings
title: newhaven.io
email: [email protected]
title: NewHaven.IO
description: > # this means to ignore newlines until "baseurl:"
newhaven.io is a group of talented and passionate individuals living, working and creating in the New Haven area.
NewHaven.IO is a group of talented and passionate programmers living, working and creating in the New Haven area.
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://newhaven.io" # the base hostname & protocol for your site
permalink: /blog/:title/
Expand All @@ -29,4 +28,3 @@ markdown: kramdown

# Google services
google_analytics: UA-42537303-1

23 changes: 23 additions & 0 deletions _data/mentors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
- name: Fake Name 1
company: Fake Company 1
focus: Back-end Development
languages: CSS, JavaScript, Ruby, Rust
description: Deserunt quis enim dolore cupidatat laboris elit cupidatat cillum minim pariatur fugiat nisi dolore. Incididunt minim adipisicing Lorem tempor cupidatat laborum ut proident tempor veniam excepteur.

- name: Fake Name 2
company: Fake Company 2
focus: Back-end Development
languages: CSS, JavaScript, Ruby, Rust
description: Deserunt quis enim dolore cupidatat laboris elit cupidatat cillum minim pariatur fugiat nisi dolore. Incididunt minim adipisicing Lorem tempor cupidatat laborum ut proident tempor veniam excepteur.

- name: Fake Name 3
company: Fake Company 3
focus: Back-end Development
languages: CSS, JavaScript, Ruby, Rust
description: Deserunt quis enim dolore cupidatat laboris elit cupidatat cillum minim pariatur fugiat nisi dolore. Incididunt minim adipisicing Lorem tempor cupidatat laborum ut proident tempor veniam excepteur.

- name: Fake Name 4
company: Fake Company 4
focus: Back-end Development
languages: CSS, JavaScript, Ruby, Rust
description: Deserunt quis enim dolore cupidatat laboris elit cupidatat cillum minim pariatur fugiat nisi dolore. Incididunt minim adipisicing Lorem tempor cupidatat laborum ut proident tempor veniam excepteur.
10 changes: 5 additions & 5 deletions _data/menu.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
- name: About
link: '/about/'

- name: Blog
link: '/blog/'
- name: Events
link: '/events/'

- name: Developers
link: '/developers'
- name: Mentors
link: '/mentors/'

- name: Contact
link: 'http://groups.google.com/forum/?fromgroups#!forum/newhavenio'
link: '/contact/'
49 changes: 21 additions & 28 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
<footer class="site-footer">
<footer class="mt-auto bg-teal-darker text-grey-lighter shadow-lg">
<div class="nh-o-maxWidth flex flex-col md:flex-row">
<p class="md:w-2/3 pb-4 text-teal-lighter leading-normal">
{{ site.description }}
</p>

<div class="container-fluid">
<div class="row">

<div class="footer-links col-sm-6 col-md-8">
{% for menu in site.data.menu %}
<a href="{{ menu.link | prepend: site.baseurl }}">
{{ menu.name }}
</a>{% if forloop.last == false %} / {% endif %}
{% endfor %}
</div>

<div class="col-sm-6 col-md-4">
<a href="{{ menu.link | prepend: site.baseurl }}">
<h4 class="footer-heading">
{{ site.title }}
</h4>
</a>
</div>
</div>
<ul class="list-reset md:ml-auto">
{% for menu in site.data.menu %}
{% if page.url == menu.link %}
{% assign link = '#main' %}
{% assign active_classes = 'font-semibold' %}
{% else %}
{% assign link = menu.link | prepend: site.baseurl %}
{% assign active_classes = 'text-sm' %}
{% endif %}
<li>
<a class="inline-block pb-2 text-teal-lighter {{ active_classes }}" href="{{ link }}">
{{ menu.name }}
</a>
</li>
{% endfor %}
</ul>
</div>

<script src="{{ "/js/modernizr.min.js" | prepend: site.baseurl }}"></script>
<script>
// Makes all blog links open in a new tab
$('article.post a').each(function() {
$(this).attr('target', '_blank');
});
</script>
</footer>
21 changes: 13 additions & 8 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">

<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Montserrat|Open+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>

<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.21/webcomponents-lite.min.js"></script>
<script type="text/javascript" src="{{ '/js/bundle.js' | prepend: site.baseurl }}" charset="utf8" ></script>
<script src="{{ "/js/components/meetup-utils.js" | prepend: site.baseurl }}"></script>
<style type="text/css">
{% include main.css %}
</style>

{% if page.meetup_events %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.21/webcomponents-lite.min.js"></script>
<script type="text/javascript" src="{{ '/js/bundle.js' | prepend: site.baseurl }}" charset="utf8" ></script>
<script src="{{ "/js/components/meetup-utils.js" | prepend: site.baseurl }}"></script>
<link rel="import" href="{{ "/js/components/meetup-events.html" | prepend: site.baseurl }}">
<link rel="import" href="{{ "/js/components/meetup-event-card.html" | prepend: site.baseurl }}">
{% endif %}

{% if jekyll.environment == 'production' %}
{% include analytics.html %}
{% include analytics.html %}
{% endif %}

</head>
31 changes: 31 additions & 0 deletions _includes/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{% if page.url == '/' %}
{% assign home_link = '#main' %}
{% else %}
{% assign home_link = '/' | site.baseurl %}
{% endif %}

<header class="border-orange border-t-3 border-b-3 bg-grey-lightest shadow-md" role="banner">
<div class="nh-o-maxWidth py-0 flex items-center justify-between">
<a href="{{ home_link }}" class="inline-flex pr-8">
<img class="w-16" src="/img/logo.svg" alt="NewHaven.IO homepage">
</a>
<nav>
<ul class="list-reset flex flex-wrap items-center justify-end">
{% for menu in site.data.menu %}
{% if page.url == menu.link %}
{% assign link = '#main' %}
{% assign active_classes = 'font-semibold text-base' %}
{% else %}
{% assign link = menu.link | prepend: site.baseurl %}
{% assign active_classes = '' %}
{% endif %}
<li>
<a class="inline-block p-3 md:p-4 {{ active_classes }}" href="{{ link }}">
{{ menu.name }}
</a>
</li>
{% endfor %}
</ul>
</nav>
</div>
</header>
20 changes: 9 additions & 11 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<!DOCTYPE html>
<html>

<html lang="en">
{% include head.html %}

<body>
<body class="min-h-screen flex flex-col mt-auto">
<a aria-label="Skip Link" class="skip-link" href="#main">
Skip to Content
</a>

{% include header.html %}
{% include nav.html %}

<div class="wrapper">
<div class="page-content {% if page.container == true %}container-fluid{% endif %}">
{{ content }}
</div>
</div>
<main id="main" {% if page.container == false %}class="p-4"{% endif %}>
{{ content }}
</main>

{% include footer.html %}

</body>

</html>
6 changes: 6 additions & 0 deletions _layouts/full.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
layout: default
---
<article class="nh-o-maxWidth--full native-text">
{{ content }}
</article>
25 changes: 9 additions & 16 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
---
layout: default
---

<div class="wrapper">
<div class="page-content container-fluid">
<div class="panel panel-default">

<div class="panel-header">
<h1 class="page-title">{{ page.title }}</h1>
</div>

<div class="panel-body">
{{ content }}
</div>

</div>
</div>
</div>
<header class="pt-4">
<h1 class="nh-o-maxWidth {% if page.fullWidth %}nh-o-maxWidth--full{% endif %}">
{{ page.title }}
</h1>
</header>

<article class="nh-o-maxWidth {% if page.fullWidth %}nh-o-maxWidth--full{% endif %} native-text">
{{ content }}
</article>
32 changes: 32 additions & 0 deletions about/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
layout: page
title: About
---

You may be peripherally aware of NewHaven.io but not really understand what the group is or why it exists. In a nutshell, we're a nonprofit organization that serves the local tech community. But what does that actually _mean?_

## Communication and organization in the community

NewHaven.io leverages some well-known tools to achieve its goal of connecting the local tech community. In addition to [our own website](http://newhaven.io/), we make extensive use of [Meetup](http://www.meetup.com/newhavenio/) and [Slack](https://newhavenio-slackin.herokuapp.com/). [Meetup](http://www.meetup.com/newhavenio/) is used to organize and schedule in-person gatherings, while Slack facilitates online communication and collaboration. Many people first discover NewHaven.io through [Meetup](http://www.meetup.com/newhavenio/) by searching locally for events highlighting technologies of interest to them. Slack is a natural extension of the physical meetings, allowing the conversation to continue fluidly and asynchronously long after the lights have been turned off and the doors have closed.

Both our [Meetup](http://www.meetup.com/newhavenio/) and Slack are structured to allow for tech- or topic-specific engagement. Anyone from novice to expert can self-select areas that interest them and dive in as shallow or as deep as they choose. This includes proposing meetings where one can either present to a group as an expert or convene a learning session as a novice. We encourage both equally!

### Code of Conduct

All members of NewHaven.io are expected to abide by our code of coduct found [here.](https://github.com/newhavenio/code-of-conduct/blob/master/README.md)

## Aggregation of local interest groups

Technology is a funny thing. More importantly, humans are funny creatures. We obsess over bright shiny things and then when we lose interest in them we move on to the next one. One could easily argue that along with continuous improvement, it is the inherently ephemeral nature of our collective interest in different technologies that drives the cycle of obsolescence and change.

As geeks self-organize around their preferred technologies, related interest groups coalesce, grow, stagnate and die. These social constructs change as the technologies change. What stays the same is the underlying bedrock of people in the tech community. This foundation layer remains constant even if the elements which comprise it are constantly rearranging themselves into new configurations. It may slowly expand or contract as people move into and out of the local area, but it is reasonably stable. The people that make up this foundation are who NewHaven.io serves, and we're in it for the long haul.

## Partnerships in the community

Local companies and educational institutions recognize the importance of NewHaven.io in maintaining and growing a thriving tech community. A healthy tech community makes New Haven more attractive to prospective students and IT professionals, which has a positive impact beyond the realm of technology. Sponsorship of NewHaven.io is one way organizations can contribute to our efforts toward achieving these outcomes. We're also interested in cross-promotional opportunities in the community.

We regularly collaborate on events with local organizations such as [ProductCamp Connecticut](http://www.pcampct.org/), [A100](http://indie-soft.com/a100/), [Independent Software](http://indie-soft.com/), [Yale University](http://yale.edu), [The Grove](http://grovenewhaven.com/), [Continuity](http://continuity.net), [Digital Surgeons](https://www.digitalsurgeons.com/), [SeeClickFix](http://seeclickfix.com), and [Core Informatics](http://www.coreinformatics.com/). Often times the value that NewHaven.io brings to these collaborations is our "human infrastructure," other times it's the subject matter expertise of our members. Our nonprofit financial apparatus can also be leveraged for management of larger-scale community events such as conferences. We're even exploring some exciting new event frontiers such as the blending of tech and fitness.

## How will _you_ get involved?

We welcome everyone into NewHaven.io with open arms. Keeping this engine running requires sustained effort, so we're always on the lookout for help. There are numerous opportunities for contributing based on your own personal talents and areas of interest, so [pop into our `#organizing` Slack channel](https://newhavenio-slackin.herokuapp.com/) and introduce yourself today!
16 changes: 16 additions & 0 deletions build-utils/loadPresets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const webpackMerge = require("webpack-merge");

const applyPresets = (env = {
presets: []
}) => {
const presets = env.presets || [];
/** @type {string[]} */
const mergedPresets = [].concat(...[presets]);
const mergedConfigs = mergedPresets.map(presetName =>
require(`./presets/webpack.${presetName}`)(env)
);

return webpackMerge({}, ...mergedConfigs);
};

module.exports = applyPresets;
6 changes: 6 additions & 0 deletions build-utils/presets/webpack.analyze.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const WebpackBundleAnalyzer = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin;

module.exports = () => ({
plugins: [new WebpackBundleAnalyzer()]
});
4 changes: 4 additions & 0 deletions build-utils/presets/webpack.compress.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const CompressionWebpackPlugin = require("compression-webpack-plugin");
module.exports = () => ({
plugins: [new CompressionWebpackPlugin()]
});
3 changes: 3 additions & 0 deletions build-utils/webpack.development.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = () => ({
devtool: "source-map"
})
1 change: 1 addition & 0 deletions build-utils/webpack.production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = () => ({})
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e
function main {
clean
build_site
a11y_test
}

function clean {
Expand All @@ -18,4 +19,10 @@ function build_site {
bundle exec jekyll build
}

function a11y_test {
echo "testing accessibility"
jekyll serve & sleep 10
yarn test-pa11y
}

main
12 changes: 12 additions & 0 deletions contact/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: page
title: Contact
---

Nulla nisi magna reprehenderit cillum sint do. Irure do aliquip reprehenderit ullamco duis esse aliquip. Elit pariatur anim dolor aute velit nisi cillum qui nisi esse et enim non ullamco. Qui sint dolor nisi minim amet deserunt consequat. Consequat dolore consequat incididunt ad sunt enim dolore sint proident aliquip mollit sit non magna. Labore nulla fugiat ex ipsum non. Eu eu minim proident ut incididunt veniam anim ut.

Cupidatat enim ad deserunt sit incididunt non reprehenderit nostrud exercitation. Ullamco cupidatat incididunt dolore sint ad deserunt veniam dolore Lorem laboris Lorem. In Lorem excepteur esse dolore pariatur adipisicing laboris nostrud aute amet do. Consequat tempor fugiat culpa laboris. Aliqua eu aute incididunt dolore ea. Laborum nisi reprehenderit excepteur labore tempor in sint commodo occaecat consequat. Ex dolore culpa incididunt ullamco commodo id dolore adipisicing dolore.

Qui excepteur ad laborum amet ex culpa quis. Id occaecat consequat nisi aute nisi. Magna cillum consequat ex deserunt eiusmod. Proident anim id commodo nisi nostrud cupidatat fugiat.

Laboris nisi commodo non aliqua amet laborum id nulla Lorem quis. Laboris deserunt amet consequat nulla eiusmod commodo cupidatat. Excepteur do cupidatat ea excepteur nostrud. Commodo sunt consectetur in aute laboris ullamco nostrud nisi adipisicing et aute proident.
Loading