├── docs ├── favicon.ico └── index.html ├── config ├── dev.d.ts ├── webpack │ ├── test.js │ ├── dev.js │ ├── prod.js │ └── base.js └── test │ └── karma.js ├── screenshots ├── bs_web_01.png ├── bs_web_02.png └── bs_web_03.png ├── app ├── containers │ ├── index.tsx │ ├── App │ │ ├── style.css │ │ ├── index.test.tsx │ │ └── index.tsx │ ├── About │ │ ├── style.css │ │ ├── index.test.tsx │ │ └── index.tsx │ ├── Home │ │ ├── index.test.tsx │ │ └── index.tsx │ └── Detail │ │ ├── index.tsx │ │ └── index.test.tsx ├── components │ ├── index.tsx │ ├── Loader │ │ ├── index.tsx │ │ ├── style.css │ │ └── index.test.tsx │ ├── Footer │ │ ├── style.css │ │ ├── index.tsx │ │ └── index.test.tsx │ ├── NodeList │ │ ├── index.test.tsx │ │ ├── index.tsx │ │ └── NodeItem │ │ │ ├── index.test.tsx │ │ │ ├── index.tsx │ │ │ └── style.css │ ├── Header │ │ ├── index.tsx │ │ ├── style.css │ │ └── index.test.tsx │ ├── RouteList │ │ ├── index.test.tsx │ │ ├── index.tsx │ │ └── RouteItem │ │ │ ├── index.test.tsx │ │ │ ├── style.css │ │ │ └── index.tsx │ ├── PageTitle │ │ ├── style.css │ │ ├── index.tsx │ │ └── index.test.tsx │ └── Timer │ │ └── index.tsx ├── models │ ├── nodes.ts │ └── routes.ts ├── redux │ ├── reducers.ts │ ├── store.ts │ └── modules │ │ ├── nodes │ │ ├── index.ts │ │ └── index.test.ts │ │ └── routes │ │ ├── index.ts │ │ └── index.test.ts ├── routes │ └── index.tsx ├── helpers │ ├── Test │ │ └── index.ts │ └── Utils │ │ └── index.ts └── index.tsx ├── .editorconfig ├── .gitignore ├── .travis.yml ├── tsconfig.json ├── server.js ├── LICENSE ├── typings.json ├── tslint.json ├── package.json └── readme.md /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altaywtf/bilgi-shuttle-web/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /config/dev.d.ts: -------------------------------------------------------------------------------- 1 | interface ObjectConstructor { 2 | assign(target: any, ...sources: any[]): any; 3 | } 4 | -------------------------------------------------------------------------------- /screenshots/bs_web_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altaywtf/bilgi-shuttle-web/HEAD/screenshots/bs_web_01.png -------------------------------------------------------------------------------- /screenshots/bs_web_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altaywtf/bilgi-shuttle-web/HEAD/screenshots/bs_web_02.png -------------------------------------------------------------------------------- /screenshots/bs_web_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/altaywtf/bilgi-shuttle-web/HEAD/screenshots/bs_web_03.png -------------------------------------------------------------------------------- /app/containers/index.tsx: -------------------------------------------------------------------------------- 1 | import App from './App'; 2 | import Home from './Home'; 3 | import Detail from './Detail'; 4 | import About from './About'; 5 | 6 | export { App, Home, Detail, About }; 7 | -------------------------------------------------------------------------------- /config/webpack/test.js: -------------------------------------------------------------------------------- 1 | require('es6-promise').polyfill(); 2 | require('whatwg-fetch'); 3 | 4 | var context = require.context('../../app', true, /.test\.tsx?$/); 5 | context.keys().forEach(context); 6 | -------------------------------------------------------------------------------- /app/components/index.tsx: -------------------------------------------------------------------------------- 1 | export { Header } from './Header'; 2 | export { PageTitle } from './PageTitle'; 3 | export { NodeList } from './NodeList'; 4 | export { RouteList } from './RouteList'; 5 | export { Timer } from './Timer'; 6 | export { Footer } from './Footer'; 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | 5 | indent_style = space 6 | indent_size = 2 7 | 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X - DS_Store 2 | .DS_Store 3 | 4 | # Typings Lib 5 | typings 6 | 7 | # Bundles 8 | public/* 9 | !public/index.html 10 | !public/favicon.ico 11 | 12 | 13 | # Logs 14 | logs 15 | *.log 16 | 17 | # Dependency directory 18 | node_modules 19 | 20 | # Coverage Directory and Coveralls Configuration 21 | coverage 22 | -------------------------------------------------------------------------------- /app/models/nodes.ts: -------------------------------------------------------------------------------- 1 | export interface Nodes { 2 | isFetching: boolean; 3 | data?: NodeDetail[]; 4 | error?: any; 5 | } 6 | 7 | export interface NodeAction { 8 | type?: string; 9 | payload?: NodeDetail[]; 10 | error?: any; 11 | } 12 | 13 | export interface NodeDetail { 14 | id: number; 15 | name: string; 16 | image: string; 17 | } 18 | -------------------------------------------------------------------------------- /app/components/Loader/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Grid } from 'react-bootstrap'; 3 | const s = require('./style.css'); 4 | 5 | class Loader extends React.Component { 6 | render() { 7 | return ( 8 | 9 |
10 |
11 | ); 12 | } 13 | } 14 | 15 | export { Loader } 16 | -------------------------------------------------------------------------------- /app/components/Loader/style.css: -------------------------------------------------------------------------------- 1 | .Spinner { 2 | height: 80px; 3 | width: 80px; 4 | animation: rotate 0.8s infinite linear; 5 | border: 6px solid #D32F2F; 6 | border-right-color: transparent; 7 | border-radius: 50%; 8 | margin: 40px auto; 9 | } 10 | 11 | @keyframes rotate { 12 | 0% { transform: rotate(0deg); } 13 | 100% { transform: rotate(360deg); } 14 | } 15 | -------------------------------------------------------------------------------- /app/containers/App/style.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: 'Source Sans Pro', sans-serif; 3 | font-weight: 400; 4 | -webkit-font-smoothing: antialiased; 5 | -webkit-text-size-adjust: 100%; 6 | 7 | text-align: center; 8 | background: #F0F0F0; 9 | 10 | & a { 11 | text-decoration: none; 12 | text-transform: none; 13 | } 14 | } 15 | 16 | .Content { 17 | min-height: 84vh; 18 | } 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "5" 4 | env: 5 | - NODE_ENV=ci 6 | cache: 7 | directories: 8 | - screenshots 9 | install: 10 | - npm install 11 | before_script: 12 | - "export DISPLAY=:99.0" 13 | - "sh -e /etc/init.d/xvfb start" 14 | script: 15 | - npm run build 16 | - npm test 17 | after_success: 18 | - "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" 19 | -------------------------------------------------------------------------------- /app/redux/reducers.ts: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import { routerReducer } from 'react-router-redux'; 3 | import { nodesReducer } from './modules/nodes'; 4 | import { routesReducer } from './modules/routes'; 5 | 6 | const rootReducer: Redux.Reducer = combineReducers({ 7 | routing: routerReducer, 8 | nodes: nodesReducer, 9 | routes: routesReducer 10 | }); 11 | 12 | export { rootReducer } 13 | -------------------------------------------------------------------------------- /app/containers/About/style.css: -------------------------------------------------------------------------------- 1 | .About { 2 | box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); 3 | border-radius: 1px; 4 | height: auto; 5 | background: white; 6 | text-align: center; 7 | margin: 20px auto; 8 | padding: 10px 25px; 9 | font-size: 16px; 10 | line-height: 1.6; 11 | 12 | & a { 13 | color: #D32F2F; 14 | &:hover { 15 | color: #962020; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/components/Footer/style.css: -------------------------------------------------------------------------------- 1 | .Footer { 2 | display: flex; 3 | align-items: center; 4 | justify-content: center; 5 | position: relative; 6 | bottom: 0; 7 | left: 0; 8 | width: 100%; 9 | height: auto; 10 | background: #151515; 11 | color: #F0F0F0; 12 | 13 | & h4 { 14 | font-size: 1.6rem; 15 | margin: auto; 16 | padding: 20px 0; 17 | } 18 | 19 | & a { 20 | color: white; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/components/Footer/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Link } from 'react-router'; 3 | 4 | const s = require('./style.css'); 5 | 6 | class Footer extends React.Component { 7 | render() { 8 | return ( 9 |
10 | 11 |

About

12 | 13 |
14 | ); 15 | } 16 | } 17 | 18 | export { Footer } 19 | -------------------------------------------------------------------------------- /app/components/NodeList/index.test.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import { expect } from 'chai'; 4 | import { NodeList } from './'; 5 | 6 | /** Case 1 */ 7 | describe('NodeList Component, Loading State', () => { 8 | const component = mount(); 9 | 10 | it('renders Loader component', () => { 11 | expect(component.find('Loader')).to.exist; 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /app/components/Header/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Link } from 'react-router'; 3 | 4 | const s = require('./style.css'); 5 | 6 | class Header extends React.Component { 7 | render() { 8 | return ( 9 |
10 | 11 |

Bilgi Shuttle

12 | 13 |
14 | ); 15 | } 16 | } 17 | 18 | export { Header } 19 | -------------------------------------------------------------------------------- /app/components/RouteList/index.test.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import { expect } from 'chai'; 4 | import { RouteList } from './'; 5 | 6 | /** Case 1 */ 7 | describe('RouteList Component, Loading State', () => { 8 | const component = mount(); 9 | 10 | it('renders Loader component', () => { 11 | expect(component.find('Loader')).to.exist; 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /app/components/Header/style.css: -------------------------------------------------------------------------------- 1 | .Header { 2 | background: #D32F2F; 3 | 4 | & a { 5 | color: white; 6 | &:hover, &:active, &:focus { 7 | color: white; 8 | } 9 | } 10 | 11 | & h1 { 12 | font-weight: 600; 13 | font-size: 3rem; 14 | margin: 0 auto; 15 | padding: 30px 0; 16 | color: white; 17 | } 18 | 19 | @media (max-width: 767px) { 20 | & h1 { 21 | padding: 20px 0; 22 | font-size: 2.2rem; 23 | } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /app/components/Footer/index.test.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { mount } from 'enzyme'; 3 | import { expect } from 'chai'; 4 | import { Footer } from './'; 5 | 6 | /** Data */ 7 | const s = require('./style.css'); 8 | 9 | /** Case 1 */ 10 | describe('Footer Component', () => { 11 | const component = mount(