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

bucket list, prod by m.v.novikov88 #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
"env",
"react"
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread",
"babel-plugin-styled-components"
]
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/
public/dist/
.idea/
package-lock.json
.travis.yml
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Novikov Maxim Vladimirovich ([email protected])
41 changes: 41 additions & 0 deletions grunt/svg_sprite.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = function (grunt, options) {
var path = require('path');
return {
'common': {
expand: true,
cwd: './webApp/images/sprites/common',
src: ['*.svg'],
dest: './webApp/generated/svg_images/common',
options: {
shape: {
id: {
generator: function(file_path){
return path.basename(file_path, path.extname(file_path))
}
},
dimension: {
maxWidth: 52,
maxHeight: 52
},
spacing: {
padding: 4
},
},
mode: {
view: {
dest: './',
common: 'common',
bust: false,
sprite: 'common.svg',
render: {
scss: {
template: './grunt/template/scss.svg.sprite.template.handlebars',
dest: './../../../../src/sass/generated/sprites/_common.scss'
}
}
},
}
}
}
}
};
40 changes: 40 additions & 0 deletions grunt/template/scss.svg.sprite.template.handlebars
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
${{commonName}} : (
'width' : {{spriteWidth}}px,
'height' : {{spriteHeight}}px,
'image' : './../../webApp/generated/svg_images/{{commonName}}/{{{sprite}}}',
{{#shapes}}
'{{base}}' : (
'offset_x' : {{position.relative.x}}%,
'offset_y' : {{position.relative.y}}%,
'width' : {{width.outer}}px,
'height' : {{height.outer}}px
){{^last}},{{/last}}
{{/shapes}}
);


@mixin background-size($background-size) {
-webkit-background-size: $background-size;
-moz-background-size: $background-size;
-o-background-size: $background-size;
background-size: $background-size;
}

@mixin {{commonName}}-icon($name, $sprite : ${{commonName}}){
$icon : map-get($sprite, $name);
$image-width : map-get($icon, 'width');
$image-height : map-get($icon, 'height');

&:before {
content: "";
display: block;
width: 100%;
height:0;
background-image: url(map-get($sprite, 'image'));
background-position: map-get($icon, 'offset_x') map-get($icon, 'offset_y');
padding-bottom: percentage($image-height/$image-width);
@include background-size(percentage(map-get($sprite, 'width')/$image-width) percentage(map-get($sprite, 'height')/$image-height));
background-repeat:no-repeat;
}

}
12 changes: 12 additions & 0 deletions gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = function (grunt) {

var options = {
"loadGruntTasks": {
"config": require("./package.json")
}
};


require("load-grunt-config")(grunt);
require("time-grunt")(grunt);
};
14 changes: 14 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bucket List</title>
<link rel="icon" type="image/png" href="./webApp/favicon.png" />
<link rel="stylesheet" type="text/css" href="./public/dist/app.css"/>
</head>
<body>
<div id="app"></div>
<script src="./public/dist/app.bundle.js"></script>
</body>
</html>
64 changes: 64 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"name": "BucketList",
"version": "1.0.0",
"main": "app.js",
"license": "MIT",
"scripts": {
"build:dev": "webpack",
"build:prod": "webpack -p --env production",
"dev-server": "webpack-dev-server"
},
"dependencies": {
"axios": "^0.18.0",
"history": "^4.7.2",
"next": "^7.0.2",
"prop-types": "^15.6.2",
"qs": "^6.6.0",
"react": "16.7.0-alpha.2",
"react-dom": "16.7.0-alpha.2",
"react-intersection-observer": "^6.4.1",
"react-media": "^1.9.2",
"react-redux": "^6.0.0",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-sticky": "^6.0.3",
"react-toastify": "^4.5.2",
"redux": "^4.0.1",
"redux-react-hook": "^3.0.2",
"redux-thunk": "^2.3.0",
"styled-components": "^4.1.3",
"uuid": "^3.3.2",
"validator": "^10.11.0"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-plugin-styled-components": "^1.10.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"clean-webpack-plugin": "^0.1.19",
"cross-env": "^5.2.0",
"css-loader": "^1.0.0",
"exports-loader": "^0.7.0",
"file-loader": "^2.0.0",
"grunt": "^1.0.3",
"grunt-browser-sync": "^2.2.0",
"grunt-svg-sprite": "^1.4.0",
"load-grunt-config": "^0.19.2",
"mini-css-extract-plugin": "^0.4.3",
"node-sass": "^4.9.3",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"styled-theming": "^2.2.0",
"time-grunt": "^1.4.0",
"walk": "^2.3.14",
"webpack": "^4.19.0",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.9"
}
}
14 changes: 14 additions & 0 deletions src/js/actions/activities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


export const setHistoryActivities = (activities) => ({
type: "SET_HISTORY_ACTIVITIES",
activities
}),
setNewActivity = (activity) => ({
type: "SET_NEW_ACTIVITY",
activity
}),
removeActivity = (activityId) => ({
type: "REMOVE_ACTIVITY",
activityId
});
8 changes: 8 additions & 0 deletions src/js/actions/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export const setMediaSize = (mediaSize) => ({
type: "SET_MEDIA_SIZE",
mediaSize
}),
setMenuState = (menuIsOpen) => ({
type: "SET_HEADER_MENU_STATE",
menuIsOpen
});
12 changes: 12 additions & 0 deletions src/js/actions/toast.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const showToastMsg = (text, msgType) => {
return{
type: "SHOW_TOAST_MSG",
text,
msgType,
}
},
resetToastMsg = () => {
return{
type: "RESET_TOAST_MSG"
}
};
16 changes: 16 additions & 0 deletions src/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import './../sass/styles.scss';

import React from 'react';
import ReactDOM from 'react-dom';
import { StoreContext } from 'redux-react-hook';
import AppRouter from './routers/AppRouter';
import configureStore from './store/configureStore';

const store = configureStore();
const jsx = (
<StoreContext.Provider value={store}>
<AppRouter />
</StoreContext.Provider>
);

ReactDOM.render(jsx, document.getElementById('app'));
Loading