Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
resumefunnel committed Jun 4, 2016
0 parents commit e95fbe8
Show file tree
Hide file tree
Showing 9 changed files with 685 additions and 0 deletions.
Empty file added .editorconfig
Empty file.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editor files
*.sw[op]

# packages
node_modules
bower_components

# products
embed.js
test/test.js
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Copyright (c) 2016 Resume Funnel. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
99 changes: 99 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Embed for Resume Funnel

Embed allows you to quickly add your company's jobs and job applications hosted on [Resume Funnel](https://www.resumefunnel.com) to your website.


## Install

### Direct download

[Download the latest release.](https://github.com/resumefunnel/embed/releases)

### As a dependency

You can also install Embed using your preferred package manager:

#### npm

$ npm install resumefunnel-embed --save

#### Bower

$ bower install resumefunnel-embed --save


## Prerequisities

You need an active <a href="https://www.resumefunnel.com">Resume Funnel</a> account with one or more published jobs. For security purposes, you must specify the domain names from which you will use Embed in your account's Settings page.


## Example

Check out [`demo/index.html`](demo/index.html) for a working example.

<html>
<body>
<h1>Apply for this position!</h1>

<!-- Here's an empty element that we will specify later to be used as the job application's container -->
<div id="application-form"></div>

<!-- Load Mustache.js -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.js"></script>

<!-- Load Resume Funnel's Embed code -->
<script src="/some/path/to/embed.js"></script>

<script>
// Initiate Embed with the your account ID and API key
var embed = new ResumeFunnel.Embed(1, "HLikZyDF98JhfTnPIEVmcCJkDex9RY1E");
// Load and render a job application with the job ID (#1) and DOM element
embed.getJob(1, function(job){
job.populate(document.getElementById("application-form"));
});
</script>
</body>
</html>


## Usage

`Embed` initiates the module for your account. `getJobs` fetches all published job posting and `Jobs.populate` renders them. Likewise, `getJob(id)` loads your job application, and `Job.populate` renders the necessary HTML, validates user input, and submits completed applications to your account.

### Options

You can specify additional options (e.g., `template`):

job.populate(document.getElementById("application-form"), {
'template': '<form action="{{form.action}}" method="post">
{{#questions}}
{{label_html}}
{{input_html}}
<div class="hint">{{hint}}</a>
{{/questions}}
<input type="submit" value="Get this job!" />
</form>'
},
});

It's recommended to look at the included templates in the source code before you begin customizing your own.


### Callbacks

You can set the `success` or `error` option callbacks to customize your job application's behavior on a succcessful or failed application submission, respectively.


## Debugging

While implementing and customizing Embed, check your web browser's console for helpful error messages.


## Issues

Please add issues to [this project's GitHub issues](https://github.com/resumefunnel/embed/issues). For security-related inquiries, please contact Resume Funnel support at [support@resumefunnel.com](mailto:support@resumefunnel.com).


## License

BSD 3-clause License
29 changes: 29 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "resumefunnel-embed",
"version": "0.1.0",
"homepage": "https://github.com/resumefunnel/embed",
"authors": [
"Resume Funnel <support@resumefunnel.com>"
],
"description": "Post Resume Funnel jobs and applications onto your own website",
"main": "embed.js",
"keywords": [
"resumefunnel",
"ats"
],
"license": "BSD-3-Clause",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"devDependencies": {
"coffee-script": "~1.10.0",
"mocha": "~2.5.3"
},
"dependencies": {
"mustache.js": "~2.2.1"
}
}
40 changes: 40 additions & 0 deletions demo/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Embed example | Resume Funnel</title>
</head>
<body>
<!-- An empty element to place job list -->
<div id="example-openings">
</div>

<!-- An empty element to place the application -->
<div id="example-application">
</div>

<!-- You can also add Mustache templates directly in your source code for generating the HTML -->
<script id="application-template" type="x-tmpl-mustache">
<h1>Apply for {{ job.title }}</h1>
</script>

<!-- Load dependencies -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.js"></script>
<script type="text/javascript" src="../embed.js"></script>

<!-- Start Embed, load job applications -->
<script type="text/javascript">
var embed = new ResumeFunnel.Embed(1, "HLikZyDF98JhfTnPIEVmcCJkDex9RY1E");

// Retrieve all jobs
embed.getJobs(function(jobs){
jobs.populate(document.getElementById("example-openings"));
});

// Retrieve a single job, with job ID #1
embed.getJob(1, function(job){
job.populate(document.getElementById("example-application"));
});
</script>
</body>
</html>

0 comments on commit e95fbe8

Please sign in to comment.