├── .gitattributes
├── src
├── img
│ ├── logo.png
│ ├── base-logo.png
│ ├── update-logo.png
│ ├── verb-logo.png
│ ├── assemble-logo.png
│ └── generate-logo.png
├── templates
│ ├── pages
│ │ └── index.hbs
│ ├── partials
│ │ ├── related-project.hbs
│ │ ├── online-users.hbs
│ │ ├── header.hbs
│ │ ├── related.hbs
│ │ ├── invite-form.hbs
│ │ └── footer.hbs
│ └── layouts
│ │ └── default.hbs
├── data
│ ├── questions.json
│ └── site.json
├── less
│ ├── variables.less
│ ├── mixins.less
│ └── site.less
└── js
│ └── site.js
├── lib
├── helpers
│ └── json.js
└── utils.js
├── .editorconfig
├── .gitignore
├── README.md
├── LICENSE
├── package.json
├── .github
└── contributing.md
├── .eslintrc.json
└── assemblefile.js
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/src/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/logo.png
--------------------------------------------------------------------------------
/src/templates/pages/index.hbs:
--------------------------------------------------------------------------------
1 | {{> header }}
2 | {{> related }}
3 | {{> footer }}
4 |
--------------------------------------------------------------------------------
/src/img/base-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/base-logo.png
--------------------------------------------------------------------------------
/src/img/update-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/update-logo.png
--------------------------------------------------------------------------------
/src/img/verb-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/verb-logo.png
--------------------------------------------------------------------------------
/src/img/assemble-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/assemble-logo.png
--------------------------------------------------------------------------------
/src/img/generate-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/assemble/slack/master/src/img/generate-logo.png
--------------------------------------------------------------------------------
/lib/helpers/json.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | module.exports = function(obj) {
4 | return JSON.stringify(obj);
5 | };
6 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | indent_style = space
5 | end_of_line = lf
6 | charset = utf-8
7 | indent_size = 2
8 | trim_trailing_whitespace = true
9 | insert_final_newline = true
10 |
11 | [{**/{actual,fixtures,expected,templates}/**,*.md}]
12 | trim_trailing_whitespace = false
13 | insert_final_newline = false
--------------------------------------------------------------------------------
/src/templates/partials/related-project.hbs:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # always ignore files
2 | *.DS_Store
3 | *.sublime-*
4 |
5 | # test related, or directories generated by tests
6 | test/actual
7 | actual
8 | coverage
9 | .nyc*
10 |
11 | # npm
12 | node_modules
13 | npm-debug.log
14 |
15 | # yarn
16 | yarn.lock
17 | yarn-error.log
18 |
19 | # misc
20 | _gh_pages
21 | _draft
22 | _drafts
23 | bower_components
24 | vendor
25 | temp
26 | tmp
27 | TODO.md
28 |
--------------------------------------------------------------------------------
/src/templates/partials/online-users.hbs:
--------------------------------------------------------------------------------
1 | {{#if @root.site.services.users}}
2 |
7 |
14 | {{/if}}
15 |
--------------------------------------------------------------------------------
/src/data/questions.json:
--------------------------------------------------------------------------------
1 | {
2 | "invite": {
3 | "name": "What would you like to name the invite webtask?",
4 | "team": "What's the slack team name you'd like to use?",
5 | "token": "What's the slack authentication token you'd like to use?"
6 | },
7 | "users": {
8 | "name": "What would you like to name the slack users badge webtask?",
9 | "team": "What's the slack team name you'd like to use?",
10 | "token": "What's the slack authentication token you'd like to use?"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/templates/partials/header.hbs:
--------------------------------------------------------------------------------
1 |
2 |
18 |
--------------------------------------------------------------------------------
/src/templates/partials/related.hbs:
--------------------------------------------------------------------------------
1 | {{#if @root.site.related}}
2 |
3 |
17 | {{/if}}
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # slack [](https://npmjs.org/package/slack) [](https://travis-ci.org/assemble/slack)
2 |
3 | > Slack landing page to provide an invitation form for the assemble slack community.
4 |
5 | ## Installation
6 |
7 | ```sh
8 | $ npm install --save slack
9 | ```
10 |
11 | ## Usage
12 |
13 | ```js
14 | var slack = require('slack');
15 | slack();
16 | ```
17 |
18 | ## License
19 |
20 | MIT © [Brian Woodward](https://github.com/doowb)
21 |
--------------------------------------------------------------------------------
/src/less/variables.less:
--------------------------------------------------------------------------------
1 | // Variables
2 |
3 | // Gray and Brand Colors for use across theme
4 | @theme-assemble: #0094c1;
5 | @theme-base: #e05f1e;
6 | @theme-generate: #00bf8d;
7 | @theme-update: #d63629;
8 | @theme-verb: #e8b118;
9 |
10 | @theme-primary: @theme-assemble;
11 | @theme-success: @theme-generate;
12 |
13 | @gray-base: #000;
14 | @gray-darker: lighten(@gray-base, 13.5%); // #222
15 | @gray-dark: lighten(@gray-base, 20%); // #333
16 | @gray: lighten(@gray-base, 33.5%); // #555
17 | @gray-light: lighten(@gray-base, 46.7%); // #777
18 | @gray-lighter: lighten(@gray-base, 93.5%); // #eee
19 |
--------------------------------------------------------------------------------
/src/templates/partials/invite-form.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
To recieve an invitation, please provide your email address
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Join
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/less/mixins.less:
--------------------------------------------------------------------------------
1 | .button-variant(@color; @background; @border) {
2 | color: @color;
3 | background-color: @background;
4 | border-color: @border;
5 |
6 | &:hover,
7 | &:focus,
8 | &:active,
9 | &.active,
10 | .open .dropdown-toggle& {
11 | color: @color;
12 | background-color: darken(@background, 10%);
13 | border-color: darken(@border, 12%);
14 | }
15 | &:active,
16 | &.active,
17 | .open .dropdown-toggle& {
18 | background-image: none;
19 | }
20 | &.disabled,
21 | &[disabled],
22 | fieldset[disabled] & {
23 | &,
24 | &:hover,
25 | &:focus,
26 | &:active,
27 | &.active {
28 | background-color: @background;
29 | border-color: @border;
30 | }
31 | }
32 |
33 | .badge {
34 | color: @background;
35 | background-color: @color;
36 | }
37 | }
38 |
39 | .transition-all() {
40 | -webkit-transition: all 0.5s;
41 | -moz-transition: all 0.5s;
42 | transition: all 0.5s;
43 | }
44 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016-2017, Brian Woodward
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/src/data/site.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Assemble Slack Community",
3 | "team": "assemblejs",
4 | "twitter": "assemblejs",
5 | "github": "assemble",
6 | "related": [
7 | {
8 | "name": "assemble",
9 | "img": "img/assemble-logo.png",
10 | "url": "https://github.com/assemble/assemble"
11 | },
12 | {
13 | "name": "base",
14 | "img": "img/base-logo.png",
15 | "url": "https://github.com/node-base/base"
16 | },
17 | {
18 | "name": "generate",
19 | "img": "img/generate-logo.png",
20 | "url": "https://github.com/generate/generate"
21 | },
22 | {
23 | "name": "update",
24 | "img": "img/update-logo.png",
25 | "url": "https://github.com/update/update"
26 | },
27 | {
28 | "name": "verb",
29 | "img": "img/verb-logo.png",
30 | "url": "https://github.com/verbose/verb"
31 | }
32 | ],
33 | "services": {
34 | "invite": "https://wt-brian_woodward-gmail_com-0.sandbox.auth0-extend.com/assemble-slack-invite?webtask_no_cache=1",
35 | "users": "https://wt-brian_woodward-gmail_com-0.sandbox.auth0-extend.com/assemble-slack-users?webtask_no_cache=1"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "slack",
3 | "private": true,
4 | "description": "Slack landing page to provide an invitation form for the assemble slack community.",
5 | "version": "0.1.0",
6 | "homepage": "https://github.com/assemble/slack",
7 | "author": "Brian Woodward (https://github.com/doowb)",
8 | "repository": "assemble/slack",
9 | "bugs": {
10 | "url": "https://github.com/assemble/slack/issues"
11 | },
12 | "license": "MIT",
13 | "files": [
14 | "assemblefile.js",
15 | "lib"
16 | ],
17 | "main": "assemblefile.js",
18 | "engines": {
19 | "node": ">=0.10.0"
20 | },
21 | "scripts": {
22 | "test": "mocha"
23 | },
24 | "devDependencies": {
25 | "base-questions": "^0.7.4",
26 | "base-watch": "^0.1.3",
27 | "bootstrap": "^3.3.7",
28 | "browser-sync": "^2.14.3",
29 | "cross-spawn": "^4.0.0",
30 | "delete": "^0.3.2",
31 | "font-awesome": "^4.6.3",
32 | "gulp-extname": "^0.2.2",
33 | "gulp-gh-pages": "^0.5.4",
34 | "gulp-less": "^3.1.0",
35 | "jquery": "^3.1.0",
36 | "lazy-cache": "^2.0.1",
37 | "memoize-path": "^0.1.2",
38 | "read-file": "^0.2.0",
39 | "slack-invite-webtask": "^0.1.0",
40 | "slack-users-webtask": "^0.1.1",
41 | "write-json": "^0.2.2"
42 | },
43 | "keywords": [
44 | "assemble",
45 | "generate",
46 | "generate-slack",
47 | "gh",
48 | "gh-pages",
49 | "github",
50 | "github-pages",
51 | "invite",
52 | "pages",
53 | "slack",
54 | "slack-invite",
55 | "slack-users",
56 | "users"
57 | ]
58 | }
59 |
--------------------------------------------------------------------------------
/src/templates/partials/footer.hbs:
--------------------------------------------------------------------------------
1 |
2 |
44 |
--------------------------------------------------------------------------------
/src/js/site.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | "use strict"; // Start of use strict
3 |
4 | // jQuery for page scrolling feature - requires jQuery Easing plugin
5 | $('.page-scroll a').bind('click', function(event) {
6 | var $anchor = $(this);
7 | $('html, body').stop().animate({
8 | scrollTop: ($($anchor.attr('href')).offset().top - 50)
9 | }, 1250, 'easeInOutExpo');
10 | event.preventDefault();
11 | });
12 |
13 | // Highlight the top nav as scrolling occurs
14 | $('body').scrollspy({
15 | target: '.navbar-fixed-top',
16 | offset: 51
17 | });
18 |
19 | // Closes the Responsive Menu on Menu Item Click
20 | $('.navbar-collapse ul li a').click(function(){
21 | $('.navbar-toggle:visible').click();
22 | });
23 |
24 | // Offset for Main Navigation
25 | $('#mainNav').affix({
26 | offset: {
27 | top: 100
28 | }
29 | });
30 |
31 | $('#submit').on('click', function(e) {
32 | e.preventDefault();
33 | $.post({
34 | dataType: 'json',
35 | url: site.services.invite,
36 | data: {email: $('#email').val()}
37 | })
38 | .done(function(result) {
39 | if (result && result.ok === false) {
40 | showError(result);
41 | return;
42 | }
43 | showSuccess(result);
44 | }).fail(function(err) {
45 | showError(err);
46 | });
47 | });
48 |
49 | function showError(result) {
50 | $('#success').hide();
51 | $('#success').html('');
52 |
53 | var msg = '';
54 | switch (result.error) {
55 | case 'already_in_team':
56 | msg = 'You\'ve already joined this team. Login here. ';
57 | break;
58 | case 'already_invited':
59 | msg = 'You\ve already been invited to this team. Check your email for the invitation.';
60 | break;
61 | default:
62 | msg = result.error;
63 | }
64 |
65 | $('#error').html(msg);
66 | $('#error').show();
67 | }
68 |
69 | function showSuccess(result) {
70 | $('#error').hide();
71 | $('#error').html('');
72 | $('#invite').hide();
73 |
74 | $('#success').html('The invitation has been sent! Please check your email to login.');
75 | $('#success').show();
76 | }
77 |
78 | })(jQuery); // End of use strict
79 |
--------------------------------------------------------------------------------
/lib/utils.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var utils = require('lazy-cache')(require);
4 | var fn = require;
5 | require = utils;
6 |
7 | /**
8 | * Lazily required module dependencies
9 | */
10 |
11 | require('base-questions', 'questions');
12 | require('base-watch', 'watch');
13 | require('browser-sync');
14 | require('cross-spawn', 'spawn');
15 | require('delete', 'del');
16 | require('gulp-extname', 'extname');
17 | require('gulp-gh-pages', 'ghPages');
18 | require('gulp-less', 'less');
19 | require('memoize-path', 'memo');
20 | require('read-file', 'read');
21 | require('write-json', 'writeJSON');
22 |
23 | require = fn;
24 |
25 | utils.readJSON = function(fp, cb) {
26 | utils.read(fp, function(err, content) {
27 | if (err) return cb(err);
28 | try {
29 | cb(null, JSON.parse(content));
30 | return;
31 | } catch (err) {
32 | cb(err);
33 | }
34 | });
35 | };
36 |
37 | utils.create = function(app, wt, params, options, cb) {
38 | var fp = options.datafile;
39 | var args = [
40 | 'create',
41 | 'node_modules/slack-' + wt + '-webtask/dist/main.js',
42 | '--name', options.name,
43 | '--secret', 'SLACK_TEAM=' + options.team,
44 | '--secret', 'SLACK_TOKEN=' + options.token
45 | ];
46 | Object.keys(params).forEach(function(key) {
47 | var val = params[key];
48 | args.push('--param');
49 | args.push(key + '=' + val);
50 | });
51 |
52 | var buffer = '';
53 | var error = '';
54 | var child = utils.spawn('wt', args);
55 | child.stdout.on('data', function(data) {
56 | buffer += data;
57 | });
58 |
59 | child.stderr.on('data', function(data) {
60 | error += data;
61 | });
62 |
63 | child.once('close', function(code) {
64 | if (code) {
65 | return cb(new Error(error));
66 | }
67 | console.log('"' + options.name + '" webtask created.');
68 |
69 | var lines = buffer.split('\n\n').map(function(str) {
70 | return str.trim();
71 | });
72 | var url = lines[lines.length - 1];
73 |
74 | console.log('Setting "site.services.' + wt + '" to "' + url + '"');
75 | app.data(['site', 'services', wt].join('.'), url);
76 |
77 | utils.readJSON(fp, function(err, data) {
78 | if (err) return cb(err);
79 | data.services[wt] = url;
80 | utils.writeJSON(fp, data, cb);
81 | });
82 | });
83 | };
84 |
85 | /**
86 | * Expose `utils` modules
87 | */
88 |
89 | module.exports = utils;
90 |
--------------------------------------------------------------------------------
/.github/contributing.md:
--------------------------------------------------------------------------------
1 | # Contributing to slack
2 |
3 | First and foremost, thank you! We appreciate that you want to contribute to slack, your time is valuable, and your contributions mean a lot to us.
4 |
5 | **What does "contributing" mean?**
6 |
7 | Creating an issue is the simplest form of contributing to a project. But there are many ways to contribute, including the following:
8 |
9 | - Updating or correcting documentation
10 | - Feature requests
11 | - Bug reports
12 |
13 | If you'd like to learn more about contributing in general, the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing) has a lot of useful information.
14 |
15 | **Showing support for slack**
16 |
17 | Please keep in mind that open source software is built by people like you, who spend their free time creating things the rest the community can use.
18 |
19 | Don't have time to contribute? No worries, here are some other ways to show your support for slack:
20 |
21 | - star the [project](https://github.com/assemble/slack)
22 | - tweet your support for slack
23 |
24 | ## Issues
25 |
26 | ### Before creating an issue
27 |
28 | Please try to determine if the issue is caused by an underlying library, and if so, create the issue there. Sometimes this is difficult to know. We only ask that you attempt to give a reasonable attempt to find out. Oftentimes the readme will have advice about where to go to create issues.
29 |
30 | Try to follow these guidelines
31 |
32 | - **Investigate the issue**:
33 | - **Check the readme** - oftentimes you will find notes about creating issues, and where to go depending on the type of issue.
34 | - Create the issue in the appropriate repository.
35 |
36 | ### Creating an issue
37 |
38 | Please be as descriptive as possible when creating an issue. Give us the information we need to successfully answer your question or address your issue by answering the following in your issue:
39 |
40 | - **version**: please note the version of slack are you using
41 | - **extensions, plugins, helpers, etc** (if applicable): please list any extensions you're using
42 | - **error messages**: please paste any error messages into the issue, or a [gist](https://gist.github.com/)
43 |
44 | ## Above and beyond
45 |
46 | Here are some tips for creating idiomatic issues. Taking just a little bit extra time will make your issue easier to read, easier to resolve, more likely to be found by others who have the same or similar issue in the future.
47 |
48 | - read the [Guide to Idiomatic Contributing](https://github.com/jonschlinkert/idiomatic-contributing)
49 | - take some time to learn basic markdown. This [markdown cheatsheet](https://gist.github.com/jonschlinkert/5854601) is super helpful, as is the GitHub guide to [basic markdown](https://help.github.com/articles/markdown-basics/).
50 | - Learn about [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/). And if you want to really go above and beyond, read [mastering markdown](https://guides.github.com/features/mastering-markdown/).
51 | - use backticks to wrap code. This ensures that code will retain its format, making it much more readable to others
52 | - use syntax highlighting by adding the correct language name after the first "code fence"
53 |
54 |
55 | [node-glob]: https://github.com/isaacs/node-glob
56 | [micromatch]: https://github.com/jonschlinkert/micromatch
57 | [so]: http://stackoverflow.com/questions/tagged/slack
--------------------------------------------------------------------------------
/src/templates/layouts/default.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{site.title}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
44 |
45 |
46 |
56 |
57 |
58 |
59 |
60 |
61 | {% body %}
62 |
63 |
64 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
83 |
84 |
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "ecmaFeatures": {
3 | "modules": true,
4 | "experimentalObjectRestSpread": true
5 | },
6 |
7 | "env": {
8 | "browser": false,
9 | "es6": true,
10 | "node": true,
11 | "mocha": true
12 | },
13 |
14 | "globals": {
15 | "document": false,
16 | "navigator": false,
17 | "window": false
18 | },
19 |
20 | "rules": {
21 | "accessor-pairs": 2,
22 | "arrow-spacing": [2, { "before": true, "after": true }],
23 | "block-spacing": [2, "always"],
24 | "brace-style": [2, "1tbs", { "allowSingleLine": true }],
25 | "comma-dangle": [2, "never"],
26 | "comma-spacing": [2, { "before": false, "after": true }],
27 | "comma-style": [2, "last"],
28 | "constructor-super": 2,
29 | "curly": [2, "multi-line"],
30 | "dot-location": [2, "property"],
31 | "eol-last": 2,
32 | "eqeqeq": [2, "allow-null"],
33 | "generator-star-spacing": [2, { "before": true, "after": true }],
34 | "handle-callback-err": [2, "^(err|error)$" ],
35 | "indent": [2, 2, { "SwitchCase": 1 }],
36 | "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
37 | "keyword-spacing": [2, { "before": true, "after": true }],
38 | "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
39 | "new-parens": 2,
40 | "no-array-constructor": 2,
41 | "no-caller": 2,
42 | "no-class-assign": 2,
43 | "no-cond-assign": 2,
44 | "no-const-assign": 2,
45 | "no-control-regex": 2,
46 | "no-debugger": 2,
47 | "no-delete-var": 2,
48 | "no-dupe-args": 2,
49 | "no-dupe-class-members": 2,
50 | "no-dupe-keys": 2,
51 | "no-duplicate-case": 2,
52 | "no-empty-character-class": 2,
53 | "no-eval": 2,
54 | "no-ex-assign": 2,
55 | "no-extend-native": 2,
56 | "no-extra-bind": 2,
57 | "no-extra-boolean-cast": 2,
58 | "no-extra-parens": [2, "functions"],
59 | "no-fallthrough": 2,
60 | "no-floating-decimal": 2,
61 | "no-func-assign": 2,
62 | "no-implied-eval": 2,
63 | "no-inner-declarations": [2, "functions"],
64 | "no-invalid-regexp": 2,
65 | "no-irregular-whitespace": 2,
66 | "no-iterator": 2,
67 | "no-label-var": 2,
68 | "no-labels": 2,
69 | "no-lone-blocks": 2,
70 | "no-mixed-spaces-and-tabs": 2,
71 | "no-multi-spaces": 2,
72 | "no-multi-str": 2,
73 | "no-multiple-empty-lines": [2, { "max": 1 }],
74 | "no-native-reassign": 0,
75 | "no-negated-in-lhs": 2,
76 | "no-new": 2,
77 | "no-new-func": 2,
78 | "no-new-object": 2,
79 | "no-new-require": 2,
80 | "no-new-wrappers": 2,
81 | "no-obj-calls": 2,
82 | "no-octal": 2,
83 | "no-octal-escape": 2,
84 | "no-proto": 0,
85 | "no-redeclare": 2,
86 | "no-regex-spaces": 2,
87 | "no-return-assign": 2,
88 | "no-self-compare": 2,
89 | "no-sequences": 2,
90 | "no-shadow-restricted-names": 2,
91 | "no-spaced-func": 2,
92 | "no-sparse-arrays": 2,
93 | "no-this-before-super": 2,
94 | "no-throw-literal": 2,
95 | "no-trailing-spaces": 0,
96 | "no-undef": 2,
97 | "no-undef-init": 2,
98 | "no-unexpected-multiline": 2,
99 | "no-unneeded-ternary": [2, { "defaultAssignment": false }],
100 | "no-unreachable": 2,
101 | "no-unused-vars": [2, { "vars": "all", "args": "none" }],
102 | "no-useless-call": 0,
103 | "no-with": 2,
104 | "one-var": [0, { "initialized": "never" }],
105 | "operator-linebreak": [0, "after", { "overrides": { "?": "before", ":": "before" } }],
106 | "padded-blocks": [0, "never"],
107 | "quotes": [2, "single", "avoid-escape"],
108 | "radix": 2,
109 | "semi": [2, "always"],
110 | "semi-spacing": [2, { "before": false, "after": true }],
111 | "space-before-blocks": [2, "always"],
112 | "space-before-function-paren": [2, "never"],
113 | "space-in-parens": [2, "never"],
114 | "space-infix-ops": 2,
115 | "space-unary-ops": [2, { "words": true, "nonwords": false }],
116 | "spaced-comment": [0, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
117 | "use-isnan": 2,
118 | "valid-typeof": 2,
119 | "wrap-iife": [2, "any"],
120 | "yoda": [2, "never"]
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/assemblefile.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | var utils = require('./lib/utils');
4 |
5 | module.exports = function(app) {
6 | var browserSync = utils.browserSync.create();
7 |
8 | app.use(utils.questions());
9 | app.use(utils.watch());
10 | app.option('layout', 'default');
11 | app.helper('json', require('./lib/helpers/json'));
12 |
13 | var cwd = utils.memo(process.cwd())
14 | var paths = {
15 | src: cwd('src'),
16 | dest: cwd('_gh_pages')
17 | };
18 |
19 | paths.data = paths.src('data');
20 | paths.templates = paths.src('templates');
21 |
22 | app.task('default', ['clean', 'copy', 'less', 'build']);
23 | app.task('dev', app.series('default', app.parallel(['serve', 'watch'])));
24 |
25 | app.task('data', function(cb) {
26 | app.data(paths.data('*.json').path);
27 | cb();
28 | });
29 |
30 | app.task('load', ['data'], function(cb) {
31 | app.layouts(paths.templates('layouts/*.hbs').path);
32 | app.partials(paths.templates('partials/*.hbs').path);
33 | app.pages(paths.templates('pages/*.hbs').path);
34 | cb();
35 | });
36 |
37 | app.task('build', ['load', 'warn'], function() {
38 | return app.toStream('pages')
39 | .pipe(app.renderFile())
40 | .pipe(utils.extname())
41 | .pipe(app.dest(paths.dest()))
42 | .pipe(browserSync.stream());
43 | });
44 |
45 | app.task('copy', ['copy-*']);
46 | app.task('copy-img', function() {
47 | return app.copy('**/*', paths.dest('img').path, {cwd: paths.src('img').path})
48 | .pipe(browserSync.stream());
49 | });
50 |
51 | app.task('copy-js', function() {
52 | return app.copy('**/*', paths.dest('js').path, {cwd: paths.src('js').path})
53 | .pipe(browserSync.stream());
54 | });
55 |
56 | app.task('copy-bootstrap', function() {
57 | return app.copy([
58 | 'node_modules/bootstrap/dist/**/*',
59 | '!**/npm.js',
60 | '!**/bootstrap-theme.*',
61 | '!**/*.map'
62 | ],
63 | paths.dest('vendor/bootstrap').path);
64 | });
65 |
66 | app.task('copy-jquery', function() {
67 | return app.copy([
68 | 'node_modules/jquery/dist/jquery.js',
69 | 'node_modules/jquery/dist/jquery.min.js'
70 | ],
71 | paths.dest('vendor/jquery').path);
72 | });
73 |
74 | app.task('copy-font-awesome', function() {
75 | return app.copy([
76 | 'node_modules/font-awesome/**',
77 | '!node_modules/font-awesome/**/*.map',
78 | '!node_modules/font-awesome/.npmignore',
79 | '!node_modules/font-awesome/*.txt',
80 | '!node_modules/font-awesome/*.md',
81 | '!node_modules/font-awesome/*.json'
82 | ],
83 | paths.dest('vendor/font-awesome').path);
84 | });
85 |
86 | app.task('clean', function(cb) {
87 | utils.del(paths.dest(), cb);
88 | });
89 |
90 | app.task('cleanPublish', function(cb) {
91 | utils.del('./.publish', {force: true}, cb);
92 | });
93 |
94 | app.task('less', function() {
95 | return app.src('site.less', {cwd: paths.src('less').path})
96 | .pipe(utils.less())
97 | .pipe(app.dest(paths.dest('css')))
98 | .pipe(browserSync.stream());
99 | });
100 |
101 | app.task('push', function() {
102 | return app.src(paths.dest('**/*').path)
103 | .pipe(utils.ghPages());
104 | });
105 |
106 | app.task('deploy', app.series(['push', 'cleanPublish']));
107 |
108 | app.task('serve', function(cb) {
109 | browserSync.init({
110 | port: 8080,
111 | startPath: 'index.html',
112 | server: {
113 | baseDir: paths.dest()
114 | }
115 | }, cb);
116 | });
117 |
118 | app.task('watch', function() {
119 | app.watch([paths.src('**/*').path], ['default']);
120 | });
121 |
122 | app.task('warn', function(cb) {
123 | if (typeof app.get('cache.data.site.services.invite') === 'undefined') {
124 | console.log();
125 | console.log('[WARNING]:', 'Run `$ assemble webtask-invite` to create the slack invitation service and add the service url to the site data.');
126 | console.log();
127 | }
128 |
129 | if (typeof app.get('cache.data.site.services.users') === 'undefined') {
130 | console.log();
131 | console.log('[WARNING]:', 'Run `$ assemble webtask-users` to create the slack user badge service and add the service url to the site data.');
132 | console.log();
133 | }
134 | cb();
135 | });
136 |
137 | app.task('webtasks', ['webtask-*']);
138 |
139 | app.task('webtask-invite', ['data'], function(cb) {
140 | taskCreate('Creating slack invite webtask:', app.cache.data.questions.invite, createInvite)(cb);
141 | });
142 |
143 | app.task('webtask-users', ['data'], function(cb) {
144 | taskCreate('Creating slack users webtask:', app.cache.data.questions.users, createUsers)(cb);
145 | });
146 |
147 | function taskCreate(msg, questions, fn) {
148 | return function(cb) {
149 | console.log();
150 | console.log(msg);
151 | console.log();
152 | var keys = Object.keys(questions);
153 | keys.forEach(function(key) {
154 | app.question(key, questions[key]);
155 | });
156 |
157 | app.ask(keys, {save: false}, function(err, answers) {
158 | if(err) return cb(err);
159 | console.log();
160 | answers.datafile = paths.data('site.json').path;
161 | fn(answers, cb);
162 | });
163 | };
164 | }
165 |
166 | function createInvite(options, cb) {
167 | utils.create(app, 'invite', {}, options, cb);
168 | }
169 |
170 | function createUsers(options, cb) {
171 | utils.create(app, 'users', {}, options, cb);
172 | }
173 | };
174 |
175 |
--------------------------------------------------------------------------------
/src/less/site.less:
--------------------------------------------------------------------------------
1 | @import "variables.less";
2 | @import "mixins.less";
3 |
4 | body {
5 | font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
6 | overflow-x: hidden;
7 | }
8 |
9 | p {
10 | font-size: 20px;
11 | }
12 |
13 | p.small {
14 | font-size: 16px;
15 | }
16 |
17 | a,
18 | a:hover,
19 | a:focus,
20 | a:active,
21 | a.active {
22 | color: @theme-success;
23 | outline: none;
24 | }
25 |
26 | h1, h2, h3, h4, h5, h6 {
27 | font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
28 | text-transform: uppercase;
29 | font-weight: 700;
30 | }
31 |
32 | hr.star-light,
33 | hr.star-primary {
34 | padding: 0;
35 | border: none;
36 | border-top: solid 5px;
37 | text-align: center;
38 | max-width: 250px;
39 | margin: 25px auto 30px;
40 | }
41 |
42 | hr.star-light:after,
43 | hr.star-primary:after {
44 | content: "\f005";
45 | font-family: FontAwesome;
46 | display: inline-block;
47 | position: relative;
48 | top: -0.8em;
49 | font-size: 2em;
50 | padding: 0 0.25em;
51 | }
52 |
53 | hr.star-light {
54 | border-color: white;
55 | }
56 |
57 | hr.star-light:after {
58 | background-color: @theme-success;
59 | color: white;
60 | }
61 |
62 | hr.star-primary {
63 | border-color: @theme-primary;
64 | }
65 |
66 | hr.star-primary:after {
67 | background-color: white;
68 | color: @theme-primary;
69 | }
70 |
71 | .img-centered {
72 | margin: 0 auto;
73 | }
74 |
75 | header {
76 | text-align: center;
77 | background: @theme-success;
78 | color: white;
79 | .container {
80 | padding-top: 100px;
81 | padding-bottom: 50px;
82 | }
83 | img {
84 | display: block;
85 | margin: 0 auto 20px;
86 | width: 25%;
87 | height: 25%;
88 | }
89 | .intro-text {
90 | .name {
91 | display: block;
92 | font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
93 | text-transform: uppercase;
94 | font-weight: 700;
95 | font-size: 2em;
96 | }
97 | .skills {
98 | font-size: 1.25em;
99 | font-weight: 300;
100 | }
101 | }
102 | }
103 |
104 | @media(min-width:768px) {
105 | header {
106 | .container {
107 | padding-top: 200px;
108 | padding-bottom: 100px;
109 | }
110 | .intro-text {
111 | .name {
112 | font-size: 4.75em;
113 | }
114 | .skills {
115 | font-size: 1.75em;
116 | }
117 | }
118 | }
119 | }
120 |
121 | .navbar-custom {
122 | background: @theme-primary;
123 | font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
124 | text-transform: uppercase;
125 | font-weight: 700;
126 | border: none;
127 | a:focus {
128 | outline: none;
129 | }
130 | .navbar-brand {
131 | color: white;
132 | &:hover,
133 | &:focus,
134 | &:active,
135 | &.active {
136 | color: white;
137 | }
138 | }
139 | .navbar-nav {
140 | letter-spacing: 1px;
141 | li {
142 | a {
143 | color: white;
144 | &:hover {
145 | color: @theme-success;
146 | outline: none;
147 | }
148 | &:focus,
149 | &:active {
150 | color: white;
151 | }
152 | }
153 | &.active {
154 | a {
155 | color: white;
156 | background: @theme-success;
157 | &:hover,
158 | &:focus,
159 | &:active {
160 | color: white;
161 | background: @theme-success;
162 | }
163 | }
164 | }
165 | }
166 | }
167 | .navbar-toggle {
168 | color: white;
169 | text-transform: uppercase;
170 | font-size: 10px;
171 | border-color: white;
172 | &:hover,
173 | &:focus {
174 | background-color: @theme-success;
175 | color: white;
176 | border-color: @theme-success;
177 | }
178 | }
179 | }
180 |
181 | @media(min-width:768px) {
182 | .navbar-custom {
183 | padding: 25px 0;
184 | -webkit-transition: padding 0.3s;
185 | -moz-transition: padding 0.3s;
186 | transition: padding 0.3s;
187 | .navbar-brand {
188 | font-size: 2em;
189 | -webkit-transition: all 0.3s;
190 | -moz-transition: all 0.3s;
191 | transition: all 0.3s;
192 | }
193 | }
194 | .navbar-custom.affix {
195 | padding: 10px 0;
196 | .navbar-brand {
197 | font-size: 1.5em;
198 | }
199 | }
200 | }
201 |
202 | section {
203 | padding: 100px 0;
204 | h2 {
205 | margin: 0;
206 | font-size: 3em;
207 | }
208 | }
209 |
210 | section.success {
211 | background: @theme-success;
212 | color: white;
213 | }
214 |
215 | @media(max-width:767px) {
216 | section {
217 | padding: 75px 0;
218 | }
219 | section.first {
220 | padding-top: 75px;
221 | }
222 | }
223 |
224 | #related {
225 | .related-item {
226 | margin: 0 0 15px;
227 | right: 0;
228 | .related-link {
229 | display: block;
230 | position: relative;
231 | max-width: 400px;
232 | margin: 0 auto;
233 | .caption {
234 | background: fade(@theme-success, 90%);
235 | position: absolute;
236 | width: 100%;
237 | height: 100%;
238 | opacity: 0;
239 | transition: all ease 0.5s;
240 | -webkit-transition: all ease 0.5s;
241 | -moz-transition: all ease 0.5s;
242 | &:hover {
243 | opacity: 1;
244 | }
245 | .caption-content {
246 | position: absolute;
247 | width: 100%;
248 | height: 20px;
249 | font-size: 20px;
250 | text-align: center;
251 | top: 50%;
252 | margin-top: -12px;
253 | color: white;
254 | i {
255 | margin-top: -12px;
256 | }
257 | h3,
258 | h4 {
259 | margin: 0;
260 | }
261 | }
262 | }
263 | }
264 | }
265 | * {
266 | z-index: 2;
267 | }
268 | }
269 |
270 | @media(min-width:767px) {
271 | #related {
272 | .related-item {
273 | margin: 0 0 30px;
274 | }
275 | }
276 | }
277 |
278 | footer {
279 | color: white;
280 | h3 {
281 | margin-bottom: 30px;
282 | }
283 | .footer-above {
284 | padding-top: 50px;
285 | background-color: @theme-primary;
286 | }
287 | .footer-col {
288 | margin-bottom: 50px;
289 | }
290 | .footer-below {
291 | padding: 25px 0;
292 | background-color: darken(@theme-primary, 5%);
293 | }
294 | }
295 |
296 | // Buttons
297 |
298 | .btn-outline {
299 | color: white;
300 | font-size: 20px;
301 | border: solid 2px white;
302 | background: transparent;
303 | transition: all 0.3s ease-in-out;
304 | margin-top: 15px;
305 | &:hover,
306 | &:focus,
307 | &:active,
308 | &.active {
309 | color: @theme-success;
310 | background: white;
311 | border: solid 2px white;
312 | }
313 | }
314 |
315 | .btn-primary {
316 | .button-variant(white; @theme-primary; @theme-primary);
317 | font-weight: 700;
318 | }
319 |
320 | .btn-success {
321 | .button-variant(white; @theme-success; @theme-success);
322 | font-weight: 700;
323 | }
324 |
325 | .btn-social {
326 | display: inline-block;
327 | height: 50px;
328 | width: 50px;
329 | border: 2px solid white;
330 | border-radius: 100%;
331 | text-align: center;
332 | font-size: 20px;
333 | line-height: 45px;
334 | }
335 |
336 | .btn:focus,
337 | .btn:active,
338 | .btn.active {
339 | outline: none;
340 | }
341 |
342 | .scroll-top {
343 | position: fixed;
344 | right: 2%;
345 | bottom: 2%;
346 | width: 50px;
347 | height: 50px;
348 | z-index: 1049;
349 | .btn {
350 | font-size: 20px;
351 | width: 50px;
352 | height: 50px;
353 | border-radius: 100%;
354 | line-height: 28px;
355 | &:focus {
356 | outline: none;
357 | }
358 | }
359 | }
360 |
--------------------------------------------------------------------------------