Repository: chrisdiana/simplestore
Branch: master
Commit: ec7c14138ce7
Files: 13
Total size: 38.4 KB
Directory structure:
gitextract_sfvr6rzj/
├── .gitignore
├── Gruntfile.js
├── LICENSE.md
├── README.md
├── bower.json
├── css/
│ └── simpleStore.css
├── index.html
├── js/
│ ├── config.js
│ └── simpleStore.js
├── package.json
├── plugins/
│ └── google-sheets/
│ ├── DemoSpreadsheet.xlsx
│ └── google-sheets.js
└── products.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
node_modules/*
bower_components/*
release/*
release.zip
.idea/
dev/*
================================================
FILE: Gruntfile.js
================================================
module.exports = function(grunt) {
/*
* To build a release run 'grunt'
* index.html has to be manually copied to 'release/' because of
* reference differences (import.min.css, jquery)
*/
var minBanner = '/* <%= pkg.name %> | Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %> (<%= pkg.homepage %>) | <%= pkg.license %> license | v<%= pkg.version %> */';
var largeBanner = '/*' + '\n' +
'* <%= pkg.name %> v<%= pkg.version %>' + '\n' +
'* Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>' + '\n' +
'* <%= pkg.homepage %>' + '\n' +
'* Free to use under the MIT license.' + '\n' +
'* http://www.opensource.org/licenses/mit-license.php' + '\n' +
'*/' + '\n';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: minBanner + '\n'
},
build: {
files: {
'js/simpleStore.min.js': 'js/simpleStore.js'
}
}
},
cssmin: {
target: {
files: {
'css/simpleStore.min.css': 'css/simpleStore.css'
}
}
},
file_append: {
default_options: {
files: [
{prepend: minBanner + '\n', input: 'css/simpleStore.min.css'}
]
}
},
copy: {
main: {
files: [
{src: 'css/simpleStore.min.css', dest: 'release/css/simpleStore.min.css'},
{src: 'js/simpleStore.min.js', dest: 'release/js/simpleStore.min.js'},
{src: 'js/simpleCart.min.js', dest: 'release/js/simpleCart.min.js'},
{src: 'js/config.js', dest: 'release/js/config.js'},
{src: 'products.json', dest: 'release/products.json'},
{src: 'images/favicon.png', dest: 'release/images/favicon.png'}
]
},
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-file-append');
grunt.registerTask('default', ['uglify', 'cssmin', 'file_append', 'copy']);
};
================================================
FILE: LICENSE.md
================================================
The MIT License (MIT)
Copyright (c) 2015 Chris Diana
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.
================================================
FILE: README.md
================================================
**UPDATES COMING SOON! [Get notified](http://eepurl.com/dHBK11)**
[Sign up](http://eepurl.com/gntUvf) to get updates on new features and releases
# simpleStore
[simpleStore](http://chrisdiana.github.io/simplestore) is a clean, responsive
storefront boilerplate with no database you can setup in minutes. simpleStore is built on
[simpleCart.js](http://simplecartjs.org) and [Skeleton](http://getskeleton.com)
CSS Framework for a lightweight, fast, simple to use, and completely
customizable experience.



---
# Features
* No Databases, all client-side (just simple HTML, CSS & Javascript)
* Lightweight & Fast
* Tax Rate Calculations
* Unlimited product attributes
* Shipping
* Multiple Currencies
* Payment Gateways (Paypal, Google Checkout, Amazon Payments)
* For more features check out [simpleCart.js](http://simplecartjs.org)
# Plugins
* Google Sheets (Control products from a Google Sheet instead of JSON file)
# Demo
You can see a working demo [here](http://chrisdiana.github.io/simplestore/demo/)
# Installation
Install with Bower
```
bower install
```
or manually install using the latest [release](https://github.com/chrisdiana/simplestore/releases/latest)
# Setup
1.Make sure simpleStore is on a web server (any type will do as long as it can serve static web pages).
2.Configure your payment options in `js/config.js`.
```
checkout: {
type: "PayPal" ,
email: "you@yours.com"
},
```
3.Edit the `js/config.js` to your liking.
4.Add additional products in the `products.json` file.
# Using Plugins
To use a plugin, add a reference just before your `config.js` file
```
```
## HTML Version
If you are looking for something more basic, check out the [HTML version on this
branch](https://github.com/chrisdiana/simplestore/tree/simplestore-html).
The HTML version uses plain HTML to build the store instead of a JSON
file.
Add additional products using the `
` tags.
## Credit where credit is due
For further documentation on expanding/tweaking simpleStore, check out the
framework/plugin pages.
* [Skeleton](http://getskeleton.com)
* [simpleCart.js](http://simplecartjs.org)
* [Normalize.css](http://necolas.github.io/normalize.css)
* [FontAwesome](http://fortawesome.github.io/Font-Awesome)
* [jQuery](https://jquery.com/)
### A note about JavaScript shopping carts
ALL JavaScript shopping carts are NOT fullproof. Because simpleStore is fully
client-side, some users may attempt to alter prices before checkout.
SimpleStore does the best it can to minimize this
kind of activity. Make sure to monitor your sales. Just like in real life, if someone
walks into your store and changes the price tag, you will certainly not honor
those changes.
# Contributing
All forms of contribution are welcome: bug reports, bug fixes, pull requests and simple suggestions.
If you do wish to contribute, please follow the [Airbnb Javascript Style Guide](https://github.com/airbnb/javascript) Thanks!
## List of contributors
You can find the list of contributors [here](https://github.com/chrisdiana/simplestore/graphs/contributors).
================================================
FILE: bower.json
================================================
{
"name": "simpleStore",
"description": "A clean, responsive storefront boilerplate with no database or backend.",
"version": "1.1.1",
"homepage": "http://cdmedia.github.io/simplestore",
"repository": {
"type": "git",
"url": "https://github.com/cdmedia/simplestore"
},
"main": "index.html",
"license": "MIT",
"dependencies": {
"jquery": "latest",
"skeleton": "~2.0.4",
"fontawesome": "latest"
}
}
================================================
FILE: css/simpleStore.css
================================================
/*
* simplestore
* Copyright 2015 Chris Diana
* https://github.com/cdmedia/simplestore
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
select {
display: block;
float: left;
margin-right: 10px;
}
a.hover {
text-decoration: none;
}
/* Main Layout */
.simpleStore {
margin-top: 20px;
}
.brand {
display: block;
float: left;
text-decoration: none;
color: #000;
}
.brand:hover {
color: #777;
}
.brand img {
max-height: 50px;
}
/* simpleCart */
.simpleCart_shelfItem {
border: 1px solid #EFEFEF;
padding: 25px 18px 10px 18px;
margin: 15px 0;
}
.simpleCart_items {
display: table;
border-collapse: collapse;
width: 100%;
min-height: 20px;
margin-bottom: 50px;
}
.simpleCart_items div:first-child {
width: 100%
}
.simpleCart_decrement, .simpleCart_increment {
font-size: 18px;
line-height: 5px;
text-decoration: none;
}
.simpleCart_shelfItem label {
display: block;
float: left;
line-height: 40px;
margin-right: 10px;
}
.item_thumb, .detail_thumb {
height: 150px;
display: block;
margin: 0 auto;
padding-bottom: 10px;
}
.item_Quantity {
display: inline-block;
width: 50px;
}
.item_price {
font-weight: 700;
font-size: 20px;
line-height: 22px;
}
.item_description {
margin-top: 1rem;
margin-bottom: 1.5rem;
}
.headerRow {
display: table-row;
font-weight: 700;
border-bottom: 1px solid #E1E1E1;
}
.headerRow div {
display: table-cell;
padding: 10px;
}
.itemRow.odd {
background: #FAFAFA;
}
.itemRow {
display: table-row;
border-bottom: 1px solid #E1E1E1;
}
.itemRow:last-child {
border-bottom: 0 solid #fff;
}
.itemRow div {
display: table-cell;
padding: 10px;
}
.itemRow .item-quantity {
text-align: center;
}
/* Cart */
.cart_info {
position: absolute;
bottom: 0px;
right: 0px;
margin: 22px;
text-align: right;
}
.cart_info div {
display: inline;
}
.cart_info_item {
display: block !important;
}
.cart_total {
font-size: 20px;
}
/* Views */
.simpleStore_getDetail_container {
display: block;
float: left;
width: 50%;
padding: 5px 0px;
}
.simpleStore_detailView {
margin: 15px 0px;
border: 1px solid #EFEFEF;
position: relative;
}
.simpleStore_detailView.simpleCart_shelfItem {
padding: 26px 18px 8px 18px;
}
.simpleStore_detailView .item_add {
margin: 0px;
margin-bottom: 0px;
}
.simpleStore_detailView .item_name {
margin-bottom: 1rem;
}
.simpleStore_detailView .item_price {
display: block;
margin-bottom: 1.5rem;
}
.simpleStore_cart_container {
display: none;
}
.simpleStore_cart {
position: relative;
border: 1px solid #EFEFEF;
padding: 22px;
min-height: 230px;
margin: 15px 0px;
}
a.simpleCart_empty {
color: #CDCDCD;
text-decoration: none;
text-transform: uppercase;
font-size: 14px;
}
a.simpleCart_empty:hover {
color: #777;
}
.simpleCart_checkout {
margin: 12px 0px 0px 0px;
}
/* Utility */
.hidden {
display: none;
}
.loader {
display: inline-block;
font-size: 60px;
line-height: 50px;
color: #ddd;
margin: 120px auto;
width: 100%;
height: 50px;
text-align: center;
vertical-align: bottom;
}
a.back {
position: absolute;
top: 10px;
left: 18px;
line-height: 0px;
margin: 0;
padding: 0;
font-size: 34px;
color: #CDCDCD;
text-decoration: none;
}
a.back:hover {
color: #777;
}
a.close {
position: absolute;
top: 18px;
right: 14px;
margin: 0;
line-height: 0px;
padding: 0;
font-size: 32px;
color: #CDCDCD;
text-decoration: none;
font-family: Garamond, "Apple Garamond";
}
a.close:hover {
color: #777;
}
.chevron::before {
border-style: solid;
border-width: 0.1em 0.1em 0 0;
content: '';
display: inline-block;
height: 0.45em;
position: relative;
top: 0.15em;
transform: rotate(-45deg);
vertical-align: top;
width: 0.45em;
left: 0.25em;
transform: rotate(-135deg);
}
.error {
background: #FFE5E5;
padding: 15px;
border-radius: 5px;
position: relative;
margin-bottom: 10px;
}
p.error_text {
margin-bottom: 0rem;
}
.notify {
background: #D9F6FF;
background: rgba(81, 81, 81, 0.8);
color: #fff;
position: fixed;
padding: 14px 0;
text-align: center;
margin: 0 auto;
width: 100%;
font-size: 14px;
top: 0;
right: 0;
top: 0;
z-index: 9999;
}
p.notify_text {
margin-bottom: 0rem;
}
@media (max-width: 920px) {
.simpleStore_getDetail_container {
width: 100%;
}
.simpleCart_shelfItem {
position: relative;
}
.simpleCart_shelfItem .item_name {
font-size: 1.8rem;
}
.simpleStore_getDetail {
position: inherit;
display: block;
width: 100%;
margin: 0px;
margin-bottom: 0px;
}
}
@media (max-width: 620px) {
.simpleStore_detailView .item_thumb {
margin-bottom: 10px;
display: block;
width: 100%;
height: auto;
}
.simpleStore_detailView .item_add {
position: inherit;
display: block;
width: 100%;
}
.cart_info {
position: inherit;
margin: 0px;
padding-top: 15px;
text-align: left;
border-top: 1px solid #E1E1E1;
}
.simpleCart_checkout {
width: 100%;
}
.simpleCart_items {
font-size: 12px;
}
/* Better mobile support for cart */
.item-decrement, .item-increment, .item-total {
display: none !important;
}
}
================================================
FILE: index.html
================================================
simpleStore