Skip to content

Commit 1b76a69

Browse files
committed
Added first rough version
1 parent 6237207 commit 1b76a69

15 files changed

+2557
-0
lines changed

LICENSE

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
Basscss | https://github.com/basscss/basscss/blob/master/LICENSE.md
3+
----------------------------------------------------------------------------
4+
5+
# The MIT License (MIT)
6+
7+
Copyright © Nicolas Gallagher and Jonathan Neal
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy of
10+
this software and associated documentation files (the "Software"), to deal in
11+
the Software without restriction, including without limitation the rights to
12+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
13+
of the Software, and to permit persons to whom the Software is furnished to do
14+
so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.
26+
27+
Normalize.css | https://github.com/necolas/normalize.css/blob/master/LICENSE.md
28+
----------------------------------------------------------------------------
29+
# The MIT License (MIT)
30+
Copyright (c) 2013 – 2016 Brent Jackson
31+
32+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
33+
34+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
35+
36+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37+
38+
39+
AMP Start | https://github.com/ampproject/ampstart/blob/master/LICENSE
40+
----------------------------------------------------------------------------
41+
Copyright 2017 The AMP Start Authors. All Rights Reserved.
42+
43+
Licensed under the Apache License, Version 2.0 (the "License");
44+
you may not use this file except in compliance with the License.
45+
You may obtain a copy of the License at
46+
47+
http://www.apache.org/licenses/LICENSE-2.0
48+
49+
Unless required by applicable law or agreed to in writing, software
50+
distributed under the License is distributed on an "AS-IS" BASIS,
51+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52+
See the License for the specific language governing permissions and
53+
limitations under the License.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Transit Techies Homepage
22

33
Work-in-progress homepage for the Transit Techies meetup group and all things related to it!
4+
5+
Based on the simple blog AMP template.

_config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Site settings
2+
title: Transit Techies NYC
3+
email:
4+
description: > # this means to ignore newlines until "baseurl:"
5+
Transit Techies NYC
6+
baseurl: "" # the subpath of your site, e.g. /blog/
7+
url: "https://transittechies.nyc" # the base hostname & protocol for your site
8+
github_username: transittechies
9+
10+
# Build settings
11+
markdown: kramdown
12+
highlighter: rouge

_includes/body-footer.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Start Footer -->
2+
<footer class="ampstart-footer flex flex-column items-center px3 ">
3+
<nav class="ampstart-footer-nav">
4+
<ul class="list-reset flex flex-wrap mb3">
5+
<li class="px1"><a class="text-decoration-none ampstart-label" href="https://www.meetup.com/Transit-Techies-NYC/discussions/" target="_blank">Contact</a></li>
6+
</ul>
7+
</nav>
8+
<small>
9+
© Transit Techies NYC
10+
</small>
11+
</footer>

_includes/body-navbar.html

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<!-- Start Navbar -->
2+
<header class="ampstart-headerbar fixed flex justify-start items-center top-0 left-0 right-0 pl2 pr2">
3+
<div role="button" on="tap:header-sidebar.toggle" tabindex="0" class="ampstart-navbar-trigger md-hide lg-hide pr2"></div>
4+
<span class="page-title"><a href="/">Transit Techies NYC</a></span>
5+
<nav class="ampstart-headerbar-nav ampstart-nav xs-hide sm-hide">
6+
<ul class="list-reset center m0 p0 flex justify-center nowrap">
7+
</li>
8+
<li class="ampstart-nav-item ">
9+
<a href="#" class="text-decoration-none block">About</a>
10+
</li>
11+
12+
<li class="ampstart-nav-item ">
13+
<a href="#" class="text-decoration-none block">Speakers</a>
14+
</li>
15+
16+
<li class="ampstart-nav-item ">
17+
<a href="#" class="text-decoration-none block">Contact</a>
18+
</li>
19+
20+
<li class="ampstart-nav-item ampstart-nav-dropdown relative">
21+
<amp-accordion layout="container" disable-session-states="" class="ampstart-dropdown absolute top-0 left-0 right-0 bottom-0">
22+
<section>
23+
<header>Additional Resources</header>
24+
<ul class="ampstart-dropdown-items list-reset m0 p0">
25+
<li class="ampstart-dropdown-item"><a href="#" class="text-decoration-none">GitHub Repo</a></li>
26+
<li class="ampstart-dropdown-item"><a href="#" class="text-decoration-none">D.C. Meetup</a></li>
27+
</ul>
28+
</section>
29+
</amp-accordion>
30+
</li>
31+
32+
</ul>
33+
</nav>
34+
</header>
35+
36+
<!-- Start Sidebar -->
37+
<amp-sidebar id="header-sidebar" class="ampstart-sidebar px3 md-hide lg-hide" layout="nodisplay">
38+
<div class="flex justify-start items-center ampstart-sidebar-header">
39+
<div role="button" on="tap:header-sidebar.toggle" tabindex="0" class="ampstart-navbar-trigger items-start"></div>
40+
</div>
41+
<nav class="ampstart-sidebar-nav ampstart-nav">
42+
<ul class="list-reset m0 p0 ampstart-label">
43+
</li>
44+
<li class="ampstart-nav-item"><a href="#">About</a></li>
45+
<li class="ampstart-nav-item"><a href="#">Speakers</a></li>
46+
<li class="ampstart-nav-item"><a href="#">Contact</a></li>
47+
<li class="ampstart-nav-item ampstart-nav-dropdown relative">
48+
49+
<amp-accordion layout="container" disable-session-states="" class="ampstart-dropdown">
50+
<section>
51+
<header>Additional Resources</header>
52+
<ul class="ampstart-dropdown-items list-reset m0 p0">
53+
<li class="ampstart-dropdown-item"><a href="#" class="text-decoration-none">GitHub Repo</a></li>
54+
<li class="ampstart-dropdown-item"><a href="#" class="text-decoration-none">D.C. Meetup</a></li>
55+
</ul>
56+
</section>
57+
</amp-accordion>
58+
</li>
59+
60+
</ul>
61+
</nav>
62+
63+
<ul class="ampstart-social-follow list-reset flex justify-around items-center flex-wrap m0 mb4">
64+
<li class="mr2">
65+
<a href="#" class="inline-block"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="22.2" viewbox="0 0 53 49"><title>Twitter</title><path d="M45 6.9c-1.6 1-3.3 1.6-5.2 2-1.5-1.6-3.6-2.6-5.9-2.6-4.5 0-8.2 3.7-8.2 8.3 0 .6.1 1.3.2 1.9-6.8-.4-12.8-3.7-16.8-8.7C8.4 9 8 10.5 8 12c0 2.8 1.4 5.4 3.6 6.9-1.3-.1-2.6-.5-3.7-1.1v.1c0 4 2.8 7.4 6.6 8.1-.7.2-1.5.3-2.2.3-.5 0-1 0-1.5-.1 1 3.3 4 5.7 7.6 5.7-2.8 2.2-6.3 3.6-10.2 3.6-.6 0-1.3-.1-1.9-.1 3.6 2.3 7.9 3.7 12.5 3.7 15.1 0 23.3-12.6 23.3-23.6 0-.3 0-.7-.1-1 1.6-1.2 3-2.7 4.1-4.3-1.4.6-3 1.1-4.7 1.3 1.7-1 3-2.7 3.6-4.6" class="ampstart-icon ampstart-icon-twitter"></path></svg></a>
66+
</li>
67+
<li class="mr2">
68+
<a href="#" class="inline-block"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="23.6" viewbox="0 0 56 55"><title>Facebook</title><path d="M47.5 43c0 1.2-.9 2.1-2.1 2.1h-10V30h5.1l.8-5.9h-5.9v-3.7c0-1.7.5-2.9 3-2.9h3.1v-5.3c-.6 0-2.4-.2-4.6-.2-4.5 0-7.5 2.7-7.5 7.8v4.3h-5.1V30h5.1v15.1H10.7c-1.2 0-2.2-.9-2.2-2.1V8.3c0-1.2 1-2.2 2.2-2.2h34.7c1.2 0 2.1 1 2.1 2.2V43" class="ampstart-icon ampstart-icon-fb"></path></svg></a>
69+
</li>
70+
<li class="mr2">
71+
<a href="#" class="inline-block"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewbox="0 0 54 54"><title>instagram</title><path d="M27.2 6.1c-5.1 0-5.8 0-7.8.1s-3.4.4-4.6.9c-1.2.5-2.3 1.1-3.3 2.2-1.1 1-1.7 2.1-2.2 3.3-.5 1.2-.8 2.6-.9 4.6-.1 2-.1 2.7-.1 7.8s0 5.8.1 7.8.4 3.4.9 4.6c.5 1.2 1.1 2.3 2.2 3.3 1 1.1 2.1 1.7 3.3 2.2 1.2.5 2.6.8 4.6.9 2 .1 2.7.1 7.8.1s5.8 0 7.8-.1 3.4-.4 4.6-.9c1.2-.5 2.3-1.1 3.3-2.2 1.1-1 1.7-2.1 2.2-3.3.5-1.2.8-2.6.9-4.6.1-2 .1-2.7.1-7.8s0-5.8-.1-7.8-.4-3.4-.9-4.6c-.5-1.2-1.1-2.3-2.2-3.3-1-1.1-2.1-1.7-3.3-2.2-1.2-.5-2.6-.8-4.6-.9-2-.1-2.7-.1-7.8-.1zm0 3.4c5 0 5.6 0 7.6.1 1.9.1 2.9.4 3.5.7.9.3 1.6.7 2.2 1.4.7.6 1.1 1.3 1.4 2.2.3.6.6 1.6.7 3.5.1 2 .1 2.6.1 7.6s0 5.6-.1 7.6c-.1 1.9-.4 2.9-.7 3.5-.3.9-.7 1.6-1.4 2.2-.7.7-1.3 1.1-2.2 1.4-.6.3-1.7.6-3.5.7-2 .1-2.6.1-7.6.1-5.1 0-5.7 0-7.7-.1-1.8-.1-2.9-.4-3.5-.7-.9-.3-1.5-.7-2.2-1.4-.7-.7-1.1-1.3-1.4-2.2-.3-.6-.6-1.7-.7-3.5 0-2-.1-2.6-.1-7.6 0-5.1.1-5.7.1-7.7.1-1.8.4-2.8.7-3.5.3-.9.7-1.5 1.4-2.2.7-.6 1.3-1.1 2.2-1.4.6-.3 1.6-.6 3.5-.7h7.7zm0 5.8c-5.4 0-9.7 4.3-9.7 9.7 0 5.4 4.3 9.7 9.7 9.7 5.4 0 9.7-4.3 9.7-9.7 0-5.4-4.3-9.7-9.7-9.7zm0 16c-3.5 0-6.3-2.8-6.3-6.3s2.8-6.3 6.3-6.3 6.3 2.8 6.3 6.3-2.8 6.3-6.3 6.3zm12.4-16.4c0 1.3-1.1 2.3-2.3 2.3-1.3 0-2.3-1-2.3-2.3 0-1.2 1-2.3 2.3-2.3 1.2 0 2.3 1.1 2.3 2.3z" class="ampstart-icon ampstart-icon-instagram"></path></svg></a>
72+
</li>
73+
</ul>
74+
75+
76+
</amp-sidebar>
77+
<!-- End Sidebar -->
78+
<!-- End Navbar -->

_includes/head-scripts.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script async src="https://cdn.ampproject.org/v0.js"></script>
2+
<style amp-boilerplate="">body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style>
3+
<noscript>
4+
<style amp-boilerplate="">body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style>
5+
</noscript>
6+
<script custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js" async=""></script>
7+
<script custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js" async=""></script>
8+
<script custom-element="amp-accordion" src="https://cdn.ampproject.org/v0/amp-accordion-0.1.js" async=""></script>
9+
<!-- Import the `amp-list` component ... -->
10+
<script async custom-element="amp-list" src="https://cdn.ampproject.org/v0/amp-list-0.1.js"></script>
11+
<!-- ... and the `amp-mustache` component in the header -->
12+
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>

_includes/head-styles.html

Lines changed: 113 additions & 0 deletions
Large diffs are not rendered by default.

_layouts/default.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!doctype html>
2+
<!---
3+
Copyright 2018 Transit Techies
4+
Based on the AMP Start template by The AMP Start Authors
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS-IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
-->
15+
<html >
16+
<head>
17+
<meta charset="utf-8">
18+
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
19+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
20+
{% include head-scripts.html %}
21+
22+
<link rel="canonical" href="{{ site.url }}{{ page.url | replace:'index.html',''}}">
23+
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
24+
25+
{% include head-styles.html %}
26+
</head>
27+
<body>
28+
{% include body-navbar.html %}
29+
30+
{{ content }}
31+
{% include body-footer.html %}
32+
</body>
33+
</html>

codefunction.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
const https = require('https');
2+
/**
3+
* Responds to any HTTP request with the appropriate events
4+
*
5+
* @param {!express:Request} req HTTP request context.
6+
* @param {!express:Response} res HTTP response context.
7+
*/
8+
exports.getEvents = (req, res) => {
9+
let errorMessage = {error: 'Error retrieving data from meetup'};
10+
let resultList = [];
11+
res.set('Content-Type', 'application/json');
12+
13+
if (req.method === 'OPTIONS') {
14+
res.set('Access-Control-Allow-Methods', 'GET');
15+
res.set('Access-Control-Allow-Headers', 'Content-Type');
16+
res.set('Access-Control-Max-Age', '3600');
17+
} else {
18+
res.set('Access-Control-Allow-Origin', '*');
19+
}
20+
21+
let meetupUrl = ''; // Set as empty for now
22+
23+
if (req.query.status === 'past') {
24+
meetupUrl = '<URL_GOES_HERE>';
25+
} else if (req.query.status === 'upcoming') {
26+
meetupUrl = '<URL_GOES_HERE>';
27+
} else { // Get both past and upcoming
28+
meetupUrl = '<URL_GOES_HERE>';
29+
}
30+
31+
https.get(meetupUrl, (resp) => {
32+
let data = '';
33+
34+
resp.on('data', (chunk) => {
35+
data += chunk;
36+
});
37+
38+
resp.on('end', () => {
39+
parsedData = JSON.parse(data);
40+
for (i = 0; i < parsedData.length; i++) {
41+
var eventInstance = {
42+
name: parsedData[i].name,
43+
status: parsedData[i].status,
44+
link: parsedData[i].link,
45+
local_date: parsedData[i].local_date,
46+
local_time: parsedData[i].local_time,
47+
venue_name: parsedData[i].venue.name,
48+
venue_address_1: parsedData[i].venue.address_1,
49+
venue_city: parsedData[i].venue.city
50+
};
51+
52+
resultList.push(eventInstance);
53+
}
54+
55+
var finalResult = {items: resultList};
56+
res.status(200).send(JSON.stringify(finalResult));
57+
58+
});
59+
60+
}).on("error", (err) => {
61+
console.log("Error: " + err.message);
62+
res.status(500).send(JSON.stringify(errorMessage));
63+
});
64+
};

0 commit comments

Comments
 (0)