Benoit Sida 3 år sedan
incheckning
b7e82b3d93
8 ändrade filer med 4639 tillägg och 0 borttagningar
  1. 243
    0
      .gitignore
  2. 45
    0
      package.json
  3. 15
    0
      src/App.jsx
  4. 2
    0
      src/App.scss
  5. 37
    0
      src/Navbar.jsx
  6. 7
    0
      src/index.js
  7. 44
    0
      webpack.config.js
  8. 4246
    0
      yarn.lock

+ 243
- 0
.gitignore Visa fil

@@ -0,0 +1,243 @@
1
+
2
+# Created by https://www.gitignore.io/api/osx,node,linux,emacs,windows,webstorm,visualstudiocode
3
+
4
+### Emacs ###
5
+# -*- mode: gitignore; -*-
6
+*~
7
+\#*\#
8
+/.emacs.desktop
9
+/.emacs.desktop.lock
10
+*.elc
11
+auto-save-list
12
+tramp
13
+.\#*
14
+
15
+# Org-mode
16
+.org-id-locations
17
+*_archive
18
+
19
+# flymake-mode
20
+*_flymake.*
21
+
22
+# eshell files
23
+/eshell/history
24
+/eshell/lastdir
25
+
26
+# elpa packages
27
+/elpa/
28
+
29
+# reftex files
30
+*.rel
31
+
32
+# AUCTeX auto folder
33
+/auto/
34
+
35
+# cask packages
36
+.cask/
37
+dist/
38
+
39
+# Flycheck
40
+flycheck_*.el
41
+
42
+# server auth directory
43
+/server/
44
+
45
+# projectiles files
46
+.projectile
47
+
48
+# directory configuration
49
+.dir-locals.el
50
+
51
+### Linux ###
52
+
53
+# temporary files which can be created if a process still has a handle open of a deleted file
54
+.fuse_hidden*
55
+
56
+# KDE directory preferences
57
+.directory
58
+
59
+# Linux trash folder which might appear on any partition or disk
60
+.Trash-*
61
+
62
+# .nfs files are created when an open file is removed but is still being accessed
63
+.nfs*
64
+
65
+### Node ###
66
+# Logs
67
+logs
68
+*.log
69
+npm-debug.log*
70
+yarn-debug.log*
71
+yarn-error.log*
72
+
73
+# Runtime data
74
+pids
75
+*.pid
76
+*.seed
77
+*.pid.lock
78
+
79
+# Directory for instrumented libs generated by jscoverage/JSCover
80
+lib-cov
81
+
82
+# Coverage directory used by tools like istanbul
83
+coverage
84
+
85
+# nyc test coverage
86
+.nyc_output
87
+
88
+# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
89
+.grunt
90
+
91
+# Bower dependency directory (https://bower.io/)
92
+bower_components
93
+
94
+# node-waf configuration
95
+.lock-wscript
96
+
97
+# Compiled binary addons (http://nodejs.org/api/addons.html)
98
+build/Release
99
+
100
+# Dependency directories
101
+node_modules/
102
+jspm_packages/
103
+
104
+# Typescript v1 declaration files
105
+typings/
106
+
107
+# Optional npm cache directory
108
+.npm
109
+
110
+# Optional eslint cache
111
+.eslintcache
112
+
113
+# Optional REPL history
114
+.node_repl_history
115
+
116
+# Output of 'npm pack'
117
+*.tgz
118
+
119
+# Yarn Integrity file
120
+.yarn-integrity
121
+
122
+# dotenv environment variables file
123
+.env
124
+
125
+
126
+### OSX ###
127
+*.DS_Store
128
+.AppleDouble
129
+.LSOverride
130
+
131
+# Icon must end with two \r
132
+Icon
133
+
134
+# Thumbnails
135
+._*
136
+
137
+# Files that might appear in the root of a volume
138
+.DocumentRevisions-V100
139
+.fseventsd
140
+.Spotlight-V100
141
+.TemporaryItems
142
+.Trashes
143
+.VolumeIcon.icns
144
+.com.apple.timemachine.donotpresent
145
+
146
+# Directories potentially created on remote AFP share
147
+.AppleDB
148
+.AppleDesktop
149
+Network Trash Folder
150
+Temporary Items
151
+.apdisk
152
+
153
+### VisualStudioCode ###
154
+.vscode/*
155
+!.vscode/settings.json
156
+!.vscode/tasks.json
157
+!.vscode/launch.json
158
+!.vscode/extensions.json
159
+
160
+### WebStorm ###
161
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
162
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
163
+
164
+# User-specific stuff:
165
+.idea/**/workspace.xml
166
+.idea/**/tasks.xml
167
+.idea/dictionaries
168
+
169
+# Sensitive or high-churn files:
170
+.idea/**/dataSources/
171
+.idea/**/dataSources.ids
172
+.idea/**/dataSources.xml
173
+.idea/**/dataSources.local.xml
174
+.idea/**/sqlDataSources.xml
175
+.idea/**/dynamic.xml
176
+.idea/**/uiDesigner.xml
177
+
178
+# Gradle:
179
+.idea/**/gradle.xml
180
+.idea/**/libraries
181
+
182
+# CMake
183
+cmake-build-debug/
184
+
185
+# Mongo Explorer plugin:
186
+.idea/**/mongoSettings.xml
187
+
188
+## File-based project format:
189
+*.iws
190
+
191
+## Plugin-specific files:
192
+
193
+# IntelliJ
194
+/out/
195
+
196
+# mpeltonen/sbt-idea plugin
197
+.idea_modules/
198
+
199
+# JIRA plugin
200
+atlassian-ide-plugin.xml
201
+
202
+# Cursive Clojure plugin
203
+.idea/replstate.xml
204
+
205
+# Crashlytics plugin (for Android Studio and IntelliJ)
206
+com_crashlytics_export_strings.xml
207
+crashlytics.properties
208
+crashlytics-build.properties
209
+fabric.properties
210
+
211
+### WebStorm Patch ###
212
+# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
213
+
214
+# *.iml
215
+# modules.xml
216
+# .idea/misc.xml
217
+# *.ipr
218
+
219
+# Sonarlint plugin
220
+.idea/sonarlint
221
+
222
+### Windows ###
223
+# Windows thumbnail cache files
224
+Thumbs.db
225
+ehthumbs.db
226
+ehthumbs_vista.db
227
+
228
+# Folder config file
229
+Desktop.ini
230
+
231
+# Recycle Bin used on file shares
232
+$RECYCLE.BIN/
233
+
234
+# Windows Installer files
235
+*.cab
236
+*.msi
237
+*.msm
238
+*.msp
239
+
240
+# Windows shortcuts
241
+*.lnk
242
+
243
+# End of https://www.gitignore.io/api/osx,node,linux,emacs,windows,webstorm,visualstudiocode

+ 45
- 0
package.json Visa fil

@@ -0,0 +1,45 @@
1
+{
2
+  "name": "lighthouse",
3
+  "version": "1.0.0",
4
+  "description": "",
5
+  "main": "index.js",
6
+  "scripts": {
7
+    "test": "echo \"Error: no test specified\" && exit 1",
8
+    "start": "webpack-dev-server --progress --colors --hot --config ./webpack.config.js"
9
+  },
10
+  "repository": {
11
+    "type": "git",
12
+    "url": "ssh://git@git.coldiary.eu:10022/coldiary/Lighthouse.git"
13
+  },
14
+  "author": "coldiary",
15
+  "license": "ISC",
16
+  "devDependencies": {
17
+    "babel-core": "^6.24.1",
18
+    "babel-loader": "^7.0.0",
19
+    "babel-preset-env": "^1.4.0",
20
+    "babel-preset-react": "^6.24.1",
21
+    "css-loader": "^0.28.1",
22
+    "extract-text-webpack-plugin": "^2.1.0",
23
+    "file-loader": "^0.11.1",
24
+    "html-webpack-plugin": "^2.28.0",
25
+    "node-sass": "^4.5.2",
26
+    "react-hot-loader": "^1.3.1",
27
+    "sass-loader": "^6.0.5",
28
+    "style-loader": "^0.17.0",
29
+    "webpack": "^2.5.1",
30
+    "webpack-dev-server": "^2.4.5"
31
+  },
32
+  "dependencies": {
33
+    "@blueprintjs/core": "^1.16.0",
34
+    "react": "^15.5.4",
35
+    "react-addons-css-transition-group": "^15.5.2",
36
+    "react-dom": "^15.5.4",
37
+    "resetcss": "^1.0.3"
38
+  },
39
+  "babel": {
40
+    "presets": [
41
+      "env",
42
+      "react"
43
+    ]
44
+  }
45
+}

+ 15
- 0
src/App.jsx Visa fil

@@ -0,0 +1,15 @@
1
+import React from 'react'
2
+import './App.scss'
3
+
4
+import Navbar from './Navbar'
5
+
6
+const App = () =>
7
+    <div>
8
+        <header>
9
+            <Navbar/>
10
+        </header>
11
+        <main></main>
12
+        <footer></footer>
13
+    </div>
14
+
15
+export default App

+ 2
- 0
src/App.scss Visa fil

@@ -0,0 +1,2 @@
1
+@import "~resetcss/reset.min.css";
2
+@import "~@blueprintjs/core/dist/blueprint.css";

+ 37
- 0
src/Navbar.jsx Visa fil

@@ -0,0 +1,37 @@
1
+import React from 'react'
2
+import { Menu, MenuItem, MenuDivider } from "@blueprintjs/core";
3
+import { Popover, PopoverInteractionKind, Position } from '@blueprintjs/core';
4
+
5
+const userMenu = 
6
+    <Menu>
7
+        <MenuItem iconName="user" text="Profile" />
8
+        <MenuItem text="Settings..." iconName="cog" />
9
+        <MenuDivider />
10
+        <MenuItem text="Log out" iconName="power" />
11
+    </Menu>
12
+
13
+const Navbar = () => 
14
+    <div>
15
+        <nav className="pt-navbar pt-dark">
16
+            <div className="pt-navbar-group pt-align-left">
17
+                <div className="pt-navbar-heading">Lighthouse</div>
18
+                <button className="pt-button pt-minimal pt-icon-home">Home</button>
19
+                <button className="pt-button pt-minimal pt-icon-document">Files</button>
20
+            </div>
21
+            <div className="pt-navbar-group pt-align-right">
22
+                <input className="pt-input" placeholder="Search files..." type="text" />
23
+                <span className="pt-navbar-divider"></span>
24
+                <Popover content={<div>No notifications</div>} position={Position.BOTTOM_RIGHT}
25
+                        popoverClassName="pt-popover-content-sizing"
26
+                        interactionKind={PopoverInteractionKind.HOVER}>
27
+                    <button className="pt-button pt-minimal pt-icon-notifications"></button>
28
+                </Popover>
29
+                <Popover content={userMenu} position={Position.BOTTOM_RIGHT}
30
+                        interactionKind={PopoverInteractionKind.CLICK}>
31
+                    <button className="pt-button pt-minimal pt-icon-user"></button>
32
+                </Popover>
33
+            </div>
34
+        </nav>
35
+    </div>
36
+
37
+export default Navbar

+ 7
- 0
src/index.js Visa fil

@@ -0,0 +1,7 @@
1
+import React from 'react'
2
+import ReactDOM from 'react-dom'
3
+import App from './App'
4
+
5
+ReactDOM.render(<App />, document.getElementById('root'));
6
+
7
+module.hot.accept();

+ 44
- 0
webpack.config.js Visa fil

@@ -0,0 +1,44 @@
1
+var ExtractTextPlugin = require('extract-text-webpack-plugin');
2
+
3
+module.exports = {
4
+    entry: [
5
+        'webpack-dev-server/client?http://localhost:8080',
6
+        'webpack/hot/only-dev-server',
7
+        './src/index.js',
8
+    ],
9
+    output: {
10
+        path: __dirname + '/dist',
11
+        publicPath: '/',
12
+        filename: 'bundle.js'
13
+    },
14
+    module: {
15
+        loaders: [
16
+            {
17
+                test: /\.jsx?$/,
18
+                exclude: /node_modules/,
19
+                loader: 'react-hot-loader!babel-loader'
20
+            },
21
+            {
22
+                test: /\.s?css$/,
23
+                loader: ExtractTextPlugin.extract({
24
+                    fallback: 'style-loader',
25
+                    use: ['sass-loader', 'css-loader']
26
+                })
27
+            },
28
+            {
29
+                test: /\.(eot|svg|ttf|woff|woff2)$/,
30
+                loader: 'file-loader?name=fonts/[name].[ext]'
31
+            }
32
+        ]
33
+    },
34
+    resolve: {
35
+        extensions: ['*', '.js', '.jsx']
36
+    },
37
+    plugins: [
38
+        new ExtractTextPlugin({ filename: 'style.css', allChunks: true })
39
+    ],
40
+    devServer: {
41
+        contentBase: './dist',
42
+        hot: true
43
+    },
44
+};

+ 4246
- 0
yarn.lock
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil