├── .DS_Store
├── .env.example
├── .env.travis
├── .gitattributes
├── .gitignore
├── .travis.yml
├── .vscode
└── settings.json
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Dashboard.png
├── LICENSE
├── README.md
├── ThingClass.png
├── _config.yml
├── app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Auth
│ │ │ ├── ForgotPasswordController.php
│ │ │ ├── LoginController.php
│ │ │ ├── RegisterController.php
│ │ │ └── ResetPasswordController.php
│ │ ├── Controller.php
│ │ ├── Room
│ │ │ └── RoomController.php
│ │ ├── Rules
│ │ │ └── AutomationController.php
│ │ ├── Thing
│ │ │ └── ThingController.php
│ │ └── Views
│ │ │ └── HomeController.php
│ ├── Kernel.php
│ └── Middleware
│ │ ├── EncryptCookies.php
│ │ ├── RedirectIfAuthenticated.php
│ │ ├── TrimStrings.php
│ │ ├── TrustProxies.php
│ │ └── VerifyCsrfToken.php
├── Models
│ ├── PasswordReset.php
│ ├── Room.php
│ ├── Rule.php
│ ├── Thing.php
│ └── User.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Rule
│ └── RuleParser.php
├── Things
│ ├── Light
│ │ └── Light.php
│ ├── Speaker
│ │ └── Speaker.php
│ ├── Switcher
│ │ └── Switcher.php
│ └── Thing.php
└── User.php
├── artisan
├── bootstrap
├── app.php
└── cache
│ └── .gitignore
├── composer.json
├── composerBAK.lock
├── config
├── app.php
├── auth.php
├── broadcasting.php
├── cache.php
├── database.php
├── filesystems.php
├── light-bootstrap-dashboard.php
├── mail.php
├── models.php
├── modules.php
├── queue.php
├── services.php
├── session.php
└── view.php
├── database
├── .DS_Store
├── .gitignore
├── factories
│ └── UserFactory.php
├── migrations
│ ├── 2018_02_03_000001_create_users_table.php
│ ├── 2018_02_03_000002_create_password_resets_table.php
│ ├── 2018_02_03_000003_create_rooms_table.php
│ ├── 2018_02_03_000004_create_things_table.php
│ └── 2018_02_06_175846_create_rules_table.php
└── seeds
│ └── DatabaseSeeder.php
├── package-lock.json
├── package.json
├── phpunit.xml
├── public
├── .DS_Store
├── .htaccess
├── css
│ ├── app.css
│ ├── auth.css
│ ├── light-bootstrap-dashboard.css
│ └── things.css
├── favicon.ico
├── fonts
│ └── vendor
│ │ ├── bootstrap-sass
│ │ └── bootstrap
│ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ ├── glyphicons-halflings-regular.svg
│ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ ├── glyphicons-halflings-regular.woff
│ │ │ └── glyphicons-halflings-regular.woff2
│ │ ├── font-awesome
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ │ └── pixeden-stroke-7-icon
│ │ └── pe-icon-7-stroke
│ │ ├── Pe-icon-7-stroke.eot
│ │ ├── Pe-icon-7-stroke.svg
│ │ ├── Pe-icon-7-stroke.ttf
│ │ └── Pe-icon-7-stroke.woff
├── images
│ ├── .DS_Store
│ ├── ThingTypes
│ │ ├── .DS_Store
│ │ ├── Light_ON.png
│ │ ├── Speaker_OFF.png
│ │ ├── Speaker_ON.png
│ │ ├── Switcher_OFF.png
│ │ └── Switcher_ON.png
│ ├── mask.png
│ ├── sidebar-1.jpg
│ ├── sidebar-2.jpg
│ ├── sidebar-3.jpg
│ ├── sidebar-4.jpg
│ └── sidebar-5.jpg
├── index.php
├── js
│ ├── app.js
│ ├── auth.js
│ ├── jquery.js
│ ├── light-bootstrap-dashboard.js
│ ├── manifest.js
│ ├── thing.js
│ └── vendor.js
├── mix-manifest.json
├── pubic
│ └── js
│ │ ├── jquery.js
│ │ └── manifest.js
├── robots.txt
└── web.config
├── resources
├── assets
│ ├── img
│ │ ├── mask.png
│ │ ├── sidebar-1.jpg
│ │ ├── sidebar-2.jpg
│ │ ├── sidebar-3.jpg
│ │ ├── sidebar-4.jpg
│ │ └── sidebar-5.jpg
│ ├── js
│ │ ├── app.js
│ │ ├── auth.js
│ │ ├── bootstrap.js
│ │ ├── components
│ │ │ └── Example.vue
│ │ └── light-bootstrap-dashboard.js
│ └── sass
│ │ ├── _variables.scss
│ │ ├── app.scss
│ │ ├── auth.scss
│ │ ├── lbd
│ │ ├── _alerts.scss
│ │ ├── _buttons.scss
│ │ ├── _cards.scss
│ │ ├── _chartist.scss
│ │ ├── _checkbox-radio-switch.scss
│ │ ├── _dropdown.scss
│ │ ├── _footers.scss
│ │ ├── _inputs.scss
│ │ ├── _misc.scss
│ │ ├── _mixins.scss
│ │ ├── _navbars.scss
│ │ ├── _responsive.scss
│ │ ├── _sidebar-and-main-panel.scss
│ │ ├── _tables.scss
│ │ ├── _typography.scss
│ │ ├── _variables.scss
│ │ └── mixins
│ │ │ ├── _buttons.scss
│ │ │ ├── _cards.scss
│ │ │ ├── _chartist.scss
│ │ │ ├── _icons.scss
│ │ │ ├── _inputs.scss
│ │ │ ├── _labels.scss
│ │ │ ├── _morphing-buttons.scss
│ │ │ ├── _navbars.scss
│ │ │ ├── _social-buttons.scss
│ │ │ ├── _tabs.scss
│ │ │ ├── _transparency.scss
│ │ │ └── _vendor-prefixes.scss
│ │ └── light-bootstrap-dashboard.scss
├── lang
│ └── en
│ │ ├── auth.php
│ │ ├── pagination.php
│ │ ├── passwords.php
│ │ └── validation.php
└── views
│ ├── auth
│ ├── login.blade.php
│ ├── passwords
│ │ ├── email.blade.php
│ │ └── reset.blade.php
│ └── register.blade.php
│ ├── editRoom.blade.php
│ ├── errors
│ ├── 403.blade.php
│ └── 404.blade.php
│ ├── home.blade.php
│ ├── layouts
│ └── app.blade.php
│ ├── rules
│ └── rules.blade.php
│ └── vendor
│ └── light-bootstrap-dashboard
│ └── layouts
│ ├── auth.blade.php
│ ├── main-panel
│ ├── footer
│ │ └── main.blade.php
│ └── main.blade.php
│ ├── main.blade.php
│ └── sidebar
│ ├── main.blade.php
│ └── sidebar-wrapper
│ └── main.blade.php
├── routes
├── api.php
├── channels.php
├── console.php
└── web.php
├── server.php
├── storage
├── app
│ ├── .gitignore
│ └── public
│ │ └── .gitignore
├── framework
│ ├── .gitignore
│ ├── cache
│ │ └── .gitignore
│ ├── sessions
│ │ └── .gitignore
│ ├── testing
│ │ └── .gitignore
│ └── views
│ │ └── .gitignore
└── logs
│ └── .gitignore
├── tests
├── CreatesApplication.php
├── Feature
│ └── ExampleTest.php
├── TestCase.php
└── Unit
│ └── ExampleTest.php
└── webpack.mix.js
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/.DS_Store
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Homify
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_URL=http://localhost
5 |
6 | DB_CONNECTION=mysql
7 | DB_HOST=127.0.0.1
8 | DB_PORT=3306
9 | DB_DATABASE=homify
10 | DB_USERNAME=root
11 | DB_PASSWORD=root
12 |
13 | MAIL_DRIVER=smtp
14 | MAIL_HOST=smtp.mailtrap.io
15 | MAIL_PORT=2525
16 | MAIL_USERNAME=mh@haugmarkus.de
17 | MAIL_PASSWORD=null
18 | MAIL_ENCRYPTION=null
19 |
--------------------------------------------------------------------------------
/.env.travis:
--------------------------------------------------------------------------------
1 | APP_ENV=testing
2 | APP_KEY=SomeRandomString
3 |
4 | DB_TEST_DATABASE=homestead_test
5 | DB_TEST_USERNAME=root
6 | DB_TEST_PASSWORD=
7 |
8 | CACHE_DRIVER=array
9 | SESSION_DRIVER=array
10 | QUEUE_DRIVER=sync
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * linguist-vendored
2 | *.php linguist-vendored=false
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | /Modules
7 | /.idea
8 | /.vagrant
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 | .env
14 | composer.lock
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 |
3 | php:
4 | - "7.1"
5 |
6 | before_script:
7 | - cp .env.travis .env
8 | - mysql -e 'create database homestead_test;'
9 | - composer install --no-interaction
10 | - composer update
11 | - php artisan key:generate
12 |
13 | services:
14 | - mysql
15 |
16 | script:
17 | - vendor/bin/phpunit
18 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "iostream": "cpp",
4 | "iosfwd": "cpp",
5 | "ostream": "cpp"
6 | }
7 | }
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at markus@haugmarkus.de. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/Dashboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/Dashboard.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Markus Haug
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ThingClass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/ThingClass.png
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-cayman
--------------------------------------------------------------------------------
/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')
28 | // ->hourly();
29 | }
30 |
31 | /**
32 | * Register the commands for the application.
33 | *
34 | * @return void
35 | */
36 | protected function commands()
37 | {
38 | $this->load(__DIR__.'/Commands');
39 |
40 | require base_path('routes/console.php');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/LoginController.php:
--------------------------------------------------------------------------------
1 | middleware('guest')->except('logout');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/RegisterController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
40 | }
41 |
42 | /**
43 | * Get a validator for an incoming registration request.
44 | *
45 | * @param array $data
46 | * @return \Illuminate\Contracts\Validation\Validator
47 | */
48 | protected function validator(array $data)
49 | {
50 | return Validator::make($data, [
51 | 'name' => 'required|string|max:255',
52 | 'email' => 'required|string|email|max:255|unique:users',
53 | 'password' => 'required|string|min:6|confirmed',
54 | ]);
55 | }
56 |
57 | /**
58 | * Create a new user instance after a valid registration.
59 | *
60 | * @param array $data
61 | * @return \App\User
62 | */
63 | protected function create(array $data)
64 | {
65 | return User::create([
66 | 'name' => $data['name'],
67 | 'email' => $data['email'],
68 | 'password' => bcrypt($data['password']),
69 | ]);
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Auth/ResetPasswordController.php:
--------------------------------------------------------------------------------
1 | middleware('guest');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Controller.php:
--------------------------------------------------------------------------------
1 | all(), [
31 | 'roomname' => 'required|unique:rooms,room|max:191'
32 | ])->validate();
33 |
34 | $data = [
35 | "roomname" => $request->roomname
36 | ];
37 |
38 | $room = new Room;
39 | $room->room = $data['roomname'];
40 | $room->save();
41 | return back();
42 | }
43 |
44 |
45 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Rules/AutomationController.php:
--------------------------------------------------------------------------------
1 | first();
23 | $things = Thing::where('room_id', $defaultRoom->id)->get();
24 |
25 | if (count($defaultRoom) != 1) {
26 | return "Default room is missing!";
27 | }
28 |
29 | $rules = Rule::all();
30 |
31 | $data = array(
32 | 'rooms' => $rooms,
33 | 'currentRoom' => $defaultRoom,
34 | 'defaultRoom' => $defaultRoom,
35 | 'things' => $things,
36 | 'rules' => $rules
37 | );
38 |
39 | return \View::make('rules.rules')->with($data);
40 | }
41 |
42 | /**
43 | * create
44 | *
45 | * @param Request $request
46 | * @return void
47 | */
48 | public function create(Request $request)
49 | {
50 | $validator = \Validator::make($request->all(), [
51 | 'thingname' => 'required|exists:things,thing',
52 | 'json' => 'required|json'
53 | ])->validate();
54 |
55 | // Decode json-input to array
56 | $json = json_decode($request->json);
57 |
58 | // Check if $json->rule is unique
59 | $counter = count(Rule::where('ruleName', $json->rule)->get());
60 | if ($counter > 0) {
61 | return back()->with([ "error" => "ups"]);
62 | }
63 |
64 | if (isset($json->rule)) {
65 | // Create Rule
66 | $rule = new Rule();
67 | $rule->ruleName = $json->rule;
68 | $rule->thingListener = $request->thingname;
69 | $rule->jsonRule = $request->json;
70 | $rule->save();
71 |
72 | return back();
73 | }
74 | return;
75 | }
76 |
77 | /**
78 | * generateEventListeners
79 | *
80 | * Looks up every rule for time and date event triggers
81 | * and generate cron-jobs
82 | *
83 | * @return void
84 | */
85 | public function generateEventListeners()
86 | {
87 | // Collect all Rules
88 | $rules = Rule::all();
89 |
90 | // Create ruleParser
91 | $ruleParser = new RuleParser();
92 | $ruleParser->generateJobs($rules);
93 |
94 |
95 | return back();
96 | }
97 | }
98 |
--------------------------------------------------------------------------------
/app/Http/Controllers/Thing/ThingController.php:
--------------------------------------------------------------------------------
1 | input = $input;
47 | }
48 |
49 | $channel = strtolower($channel);
50 |
51 | // Get all the metadata of the thing to be controlled.
52 | $this->meta = Thing::where('thing', $thingName)->first();
53 |
54 | // If no thing was found, an error message is issued.
55 | if (empty($this->meta)) {
56 | return 'Thing "' . $thingName . '" not found';
57 | }
58 |
59 | // Concatenate the module's namespace with its binder.
60 | $classString = 'Modules\\' . $this->meta->binding . '\\Thing\\' . $this->meta->binding;
61 |
62 | // Catch Error Messages from Thing Constructor
63 | try {
64 | // Instantiate the class.
65 | $this->thing = new $classString($this->meta);
66 | } catch (\Exception $ex) {
67 | return $ex->getMessage();
68 | }
69 |
70 | // Send Input
71 | $this->thing->setInput($this->input);
72 |
73 | // Call the Channel/Method of class if the channel exists.
74 | if ($this->thing->hasChannel($this->thing, $channel) === true) {
75 |
76 | // Certain Modules create .env variables. For such cases, we repeat the channel execution 2 times
77 | $msg = NULL;
78 | $retries = 2;
79 | for ($try = 0; $try < $retries; $try++) {
80 | try {
81 | $this->thing->$channel();
82 | } catch (\Exception $ex) {
83 | $msg = $ex->getMessage();
84 | sleep(1);
85 | continue;
86 | }
87 | if ($try == $retries) {
88 | return $msg;
89 | }
90 | break;
91 | }
92 |
93 | if(!is_null($this->thing->getStatus())){
94 | Thing::where('thing', $thingName)
95 | ->update(['state' => $this->thing->getStatus()]);
96 | }
97 | $lv_thing = Thing::where('thing', $thingName)->first();
98 | $this->thing->setStatus($lv_thing->state);
99 |
100 | // handling the rules
101 | $ruleParser = new \App\Rule\RuleParser($thingName, $channel);
102 | $ruleParser->executeRules();
103 | return $this->thing->getStatus();
104 | }
105 | return 'Channel "' . $channel . '" not defined';
106 | }
107 |
108 | /**
109 | * create
110 | *
111 | * @param Request $request
112 | * @return void
113 | */
114 | public function create(Request $request)
115 | {
116 | $validator = \Validator::make($request->all(), [
117 | 'thingname' => 'required|unique:things,thing|max:191',
118 | 'binding' => 'required',
119 | 'room' => 'exists:rooms,id',
120 | 'json' => 'json'
121 | ])->validate();
122 |
123 | $data = [
124 | "thingname" => $request->thingname,
125 | "binding" => $request->binding,
126 | "room" => $request->room,
127 | "json" => $request->json
128 | ];
129 |
130 | if (\Module::find($data['binding'])) {
131 | $classString = 'Modules\\' . $data['binding']. '\\Thing\\Create' . $data['binding'];
132 | // Instantiate the class.
133 | $creator = new $classString($data);
134 | $creator->create();
135 | return back();
136 | }
137 | }
138 |
139 | /**
140 | * update
141 | *
142 | * @param Request $request
143 | * @return void
144 | */
145 | public function update(Request $request)
146 | {
147 | if (is_null($request->json)) {
148 | $validator = \Validator::make($request->all(), [
149 | 'thingID' => 'required|exists:things,id',
150 | // 'thingname' => 'required|unique:things,thing|max:191',
151 | 'binding' => 'required',
152 | 'room' => 'exists:rooms,id'
153 | ])->validate();
154 | } else {
155 | $validator = \Validator::make($request->all(), [
156 | 'thingID' => 'required|exists:things,id',
157 | // 'thingname' => 'required|unique:things,thing|max:191',
158 | 'binding' => 'required',
159 | 'room' => 'exists:rooms,id',
160 | 'json' => 'sometimes|json'
161 | ])->validate();
162 | }
163 |
164 | $data = [
165 | "thingID" => $request->thingID,
166 | "thingname" => $request->thingname,
167 | "binding" => $request->binding,
168 | "room" => $request->room,
169 | "json" => json_decode($request->json, true)
170 | ];
171 |
172 |
173 | if (\Module::find($data['binding'])) {
174 | $classString = 'Modules\\' . $data['binding']. '\\Thing\\Update' . $data['binding'];
175 | // Instantiate the class.
176 | $updater = new $classString($data);
177 | $updater->update();
178 | return back();
179 | }
180 | }
181 | }
--------------------------------------------------------------------------------
/app/Http/Controllers/Views/HomeController.php:
--------------------------------------------------------------------------------
1 | middleware('auth');
20 | }
21 |
22 | /**
23 | * Show the application dashboard.
24 | *
25 | * @return \Illuminate\Http\Response
26 | */
27 | public function index()
28 | {
29 | $rooms = Room::all();
30 | $defaultRoom = Room::where('roomName', 'default_room')
31 | ->first();
32 | $things = Thing::where('room_id',$defaultRoom->id)->get();
33 |
34 | if( $defaultRoom === null ){
35 | return "Default room is missing!";
36 | }
37 |
38 | $data = array(
39 | 'rooms' => $rooms,
40 | 'currentRoom' => $defaultRoom,
41 | 'defaultRoom' => $defaultRoom,
42 | 'things' => $things
43 | );
44 |
45 | return \View::make('home')->with($data);
46 | }
47 |
48 |
49 | public function room($roomName){
50 | $rooms = Room::all();
51 |
52 | $defaultRoom = Room::where('roomName', 'default_room')
53 | ->first();
54 |
55 | $currentRoom = Room::where('room', $roomName)->first();
56 |
57 | if( count($defaultRoom) != 1){
58 | return "Default room is missing!";
59 | } else if( count($currentRoom) != 1 ){
60 | return "Room ". $roomName . " not found!";
61 | }
62 | $things = Thing::where('room_id',$currentRoom->id)->get();
63 |
64 |
65 | $data = array(
66 | 'rooms' => $rooms,
67 | 'currentRoom' => $currentRoom,
68 | 'defaultRoom' => $defaultRoom,
69 | 'things' => $things
70 | );
71 |
72 | return \View::make('home')->with($data);
73 | }
74 |
75 | public function editRoom($roomName){
76 |
77 | $rooms = Room::all();
78 |
79 | $defaultRoom = Room::where('roomName', 'default_room')
80 | ->first();
81 |
82 | $currentRoom = Room::where('room', $roomName)->first();
83 |
84 | if( count($defaultRoom) != 1){
85 | return "Default room is missing!";
86 | } else if( count($currentRoom) != 1 ){
87 | return "Room ". $roomName . " not found!";
88 | }
89 | $things = Thing::where('room_id',$currentRoom->id)->get();
90 |
91 | $data = array(
92 | 'rooms' => $rooms,
93 | 'currentRoom' => $currentRoom,
94 | 'defaultRoom' => $defaultRoom,
95 | 'things' => $things
96 | );
97 |
98 | return \View::make('editRoom')->with($data);
99 |
100 | }
101 |
102 | }
103 |
--------------------------------------------------------------------------------
/app/Http/Kernel.php:
--------------------------------------------------------------------------------
1 | [
31 | \App\Http\Middleware\EncryptCookies::class,
32 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
33 | \Illuminate\Session\Middleware\StartSession::class,
34 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
35 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36 | \App\Http\Middleware\VerifyCsrfToken::class,
37 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 | ],
39 |
40 | 'api' => [
41 | 'throttle:60,1',
42 | 'bindings',
43 | ],
44 | ];
45 |
46 | /**
47 | * The application's route middleware.
48 | *
49 | * These middleware may be assigned to groups or used individually.
50 | *
51 | * @var array
52 | */
53 | protected $routeMiddleware = [
54 | 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
55 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
56 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
57 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
58 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
59 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
60 | ];
61 | }
62 |
--------------------------------------------------------------------------------
/app/Http/Middleware/EncryptCookies.php:
--------------------------------------------------------------------------------
1 | check()) {
21 | return redirect('/home');
22 | }
23 |
24 | return $next($request);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | 'FORWARDED',
24 | Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25 | Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26 | Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27 | Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28 | ];
29 | }
30 |
--------------------------------------------------------------------------------
/app/Http/Middleware/VerifyCsrfToken.php:
--------------------------------------------------------------------------------
1 | hasMany(\App\Models\Thing::class);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/Models/Rule.php:
--------------------------------------------------------------------------------
1 | 'int'
37 | ];
38 |
39 | protected $hidden = [
40 | 'password'
41 | ];
42 |
43 | protected $fillable = [
44 | 'thing',
45 | 'thingType',
46 | 'binding',
47 | 'password',
48 | 'default_on',
49 | 'default_off',
50 | 'protocol',
51 | 'ip',
52 | 'state',
53 | 'room_id'
54 | ];
55 |
56 | public function room()
57 | {
58 | return $this->belongsTo(\App\Models\Room::class);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/app/Models/User.php:
--------------------------------------------------------------------------------
1 | app->environment() == 'local') {
28 | $this->app->register(\Reliese\Coders\CodersServiceProvider::class);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/Providers/AuthServiceProvider.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
17 | 'App\Listeners\EventListener',
18 | ],
19 | ];
20 |
21 | /**
22 | * Register any events for your application.
23 | *
24 | * @return void
25 | */
26 | public function boot()
27 | {
28 | parent::boot();
29 |
30 | //
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
39 |
40 | $this->mapWebRoutes();
41 |
42 | //
43 | }
44 |
45 | /**
46 | * Define the "web" routes for the application.
47 | *
48 | * These routes all receive session state, CSRF protection, etc.
49 | *
50 | * @return void
51 | */
52 | protected function mapWebRoutes()
53 | {
54 | Route::middleware('web')
55 | ->namespace($this->namespace)
56 | ->group(base_path('routes/web.php'));
57 | }
58 |
59 | /**
60 | * Define the "api" routes for the application.
61 | *
62 | * These routes are typically stateless.
63 | *
64 | * @return void
65 | */
66 | protected function mapApiRoutes()
67 | {
68 | Route::prefix('api')
69 | ->middleware('api')
70 | ->namespace($this->namespace)
71 | ->group(base_path('routes/api.php'));
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/app/Rule/RuleParser.php:
--------------------------------------------------------------------------------
1 | listener = $thing;
41 | $this->event = $channel;
42 | }
43 | }
44 |
45 | /**
46 | * executeRules
47 | * Execute all rules for the triggered thing.
48 | */
49 | public function executeRules()
50 | {
51 | // Retrieve rules for the current thing
52 | $rules = Rule::where('thingListener', $this->listener)->get();
53 | foreach ($rules as $rule) {
54 | if (true === $this->validateJson($rule->jsonRule)) {
55 | $this->jsonRule = json_decode($rule->jsonRule);
56 | $this->parseJson();
57 | }
58 | }
59 |
60 | return;
61 | }
62 |
63 | /**
64 | * validateJson
65 | * Check if $json is json-formatted.
66 | *
67 | * @param mixed $json
68 | */
69 | private function validateJson($json)
70 | {
71 | $isJson = json_decode($json);
72 |
73 | if ($isJson instanceof \stdClass) {
74 | return true;
75 | }
76 |
77 | return false;
78 | }
79 |
80 | /**
81 | * parseJson
82 | * Parse JSON and execute then-block if condition evaluates as true.
83 | */
84 | private function parseJson($generateJob = 0)
85 | {
86 | // Grab RuleName from json
87 | $ruleName = $this->jsonRule->rule;
88 |
89 | // Grab all if & then conditions
90 | $ifConditions = get_object_vars($this->jsonRule->if);
91 | $thenConditions = get_object_vars($this->jsonRule->then);
92 |
93 |
94 | /* echo '
';
95 | print_r($this->jsonRule);
96 | echo '
'; exit;*/
97 |
98 | /*
99 | Allowed if rules:
100 | - time: "09:00:00"
101 | - thing: {name: xy, channel: xy}
102 | */
103 |
104 | // Parse each ifCondition
105 | foreach ($ifConditions as $type => $value) {
106 | // Semantic analysis for the conditions
107 | switch ($type) {
108 | case 'time':
109 | // time handler
110 | // this event is handled by the generateEventListener
111 | $time = $this->jsonRule->if->time;
112 | $TaskList = $this->parseThenCondition($thenConditions,1);
113 | //print($time);
114 | // print_r($thenConditions);
115 | foreach($TaskList as $task => $value){
116 | // print("Trigger " . $value["channel"] . " for " . $value["thing"] . " at " . $time);
117 | }
118 | // print("Trigger " . $TaskList[0]["channel"] . " for " . $TaskList[0]["thing"] . " at " . $time);
119 |
120 | break;
121 | case 'thing':
122 | if($generateJob == 0) { break; } // if generator == 1, only time jobs are processed
123 | // thing handler
124 | if (!empty($this->jsonRule->if->thing->name)) {
125 | if ($this->event == $this->jsonRule->if->thing->channel) {
126 | // Parse then condition for the thing-block if condition is true
127 | $this->parseThenCondition($thenConditions);
128 | break;
129 | }
130 | }
131 | break;
132 | }
133 | }
134 | }
135 |
136 | private function parseThenCondition($thenConditions, $generateJob = 0)
137 | {
138 | $taskList = array();
139 |
140 | // Parse each thenCondition
141 | foreach ($thenConditions as $type => $value) {
142 | // Semantic analysis for the conditions
143 | switch ($type) {
144 | case 'thing':
145 | // thing handler
146 | if (!empty($this->jsonRule->then->thing->name)) {
147 | $thing = $this->jsonRule->then->thing->name;
148 | $channel = $this->jsonRule->then->thing->channel;
149 |
150 | if($generateJob == 0) {
151 | $controller = new ThingController();
152 | $controller->touch($thing, $channel);
153 | break;
154 | }
155 | $newTask = [
156 | "thing" => $thing,
157 | "channel" => $channel
158 | ];
159 | array_push($taskList, $newTask);
160 | break;
161 | }
162 | }
163 | break;
164 | }
165 | return $taskList;
166 | }
167 |
168 | /**
169 | * generateJobs
170 | *
171 | * @param mixed $rules
172 | * @return void
173 | */
174 | public function generateJobs($rules){
175 |
176 | foreach ($rules as $rule) {
177 | if (true === $this->validateJson($rule->jsonRule)) {
178 | $this->jsonRule = json_decode($rule->jsonRule);
179 | $this->parseJson(1);
180 | }
181 | }
182 | }
183 | }
--------------------------------------------------------------------------------
/app/Things/Light/Light.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/Things/Switcher/Switcher.php:
--------------------------------------------------------------------------------
1 |
25 |
--------------------------------------------------------------------------------
/app/Things/Thing.php:
--------------------------------------------------------------------------------
1 | getMethods(\ReflectionMethod::IS_PUBLIC); // Retrieve all public methods
55 | $channels = array(); // Define array
56 |
57 | if(sizeof($methods) > 0){ // If > 0 channels have been found
58 | for($i = 0; $i < sizeof($methods); ++$i){
59 | if ($methods[$i]->name != 'getChannels' && $methods[$i]->name != '__construct') {
60 | // so we actually removed the helper functions
61 | $channels[$i]['name'] = $methods[$i]->name;
62 | }
63 | }
64 | }
65 | return $channels;
66 | }
67 |
68 |
69 | /**
70 | * hasChannel
71 | * Check if an Thing has the requested channel
72 | *
73 | * @param mixed $classObject
74 | * @param mixed $channel
75 | * @return void
76 | */
77 | public function hasChannel($classObject, $channel)
78 | {
79 | $channels = $this->getChannels($classObject);
80 |
81 | foreach($channels as $c){
82 | if (strtolower($c['name']) == $channel) {
83 | return true;
84 | }
85 | }
86 |
87 | return false;
88 | }
89 |
90 |
91 | /**
92 | * getStatus
93 | *
94 | * @return void
95 | */
96 | public function getStatus()
97 | {
98 | if($this->status == 'ON'){
99 | return 1;
100 | } elseif ($this->status == 'OFF'){
101 | return 0;
102 | }
103 | return $this->status;
104 |
105 | }
106 |
107 | /**
108 | * setStatus
109 | *
110 | * @param mixed $lv_status
111 | * @return void
112 | */
113 | public function setStatus($lv_status)
114 | {
115 | $this->status = $lv_status;
116 | }
117 |
118 | /**
119 | * @param $lv_input
120 | */
121 | public function setInput($lv_input)
122 | {
123 | $this->input = $lv_input;
124 | }
125 |
126 | /**
127 | * @return $input
128 | */
129 | public function getInput(){
130 | return $this->input;
131 | }
132 |
133 | }
--------------------------------------------------------------------------------
/app/User.php:
--------------------------------------------------------------------------------
1 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "markushaug/homify",
3 | "description": "Modular home automation system",
4 | "keywords": ["smarthome", "laravel", "php", "homify", "homebridge", "alexa", "homekit", "modular", "alexa-support"],
5 | "license": "MIT",
6 | "type": "project",
7 | "require": {
8 | "php": ">=7.0.0",
9 | "atnic/laravel-light-bootstrap-dashboard": "^0.2.1",
10 | "fideloper/proxy": "~3.3",
11 | "laravel/framework": "5.5.*",
12 | "laravel/tinker": "~1.0",
13 | "markushaug/homify-module-installer": "1.0",
14 | "nwidart/laravel-modules": "^2.6",
15 | "sqmk/phue": "^1.7"
16 | },
17 | "require-dev": {
18 | "filp/whoops": "~2.0",
19 | "fzaninotto/faker": "~1.4",
20 | "mockery/mockery": "0.9.*",
21 | "phpunit/phpunit": "~6.0",
22 | "reliese/laravel": "^0.0.13"
23 | },
24 | "autoload": {
25 | "classmap": [
26 | "database/seeds",
27 | "database/factories"
28 | ],
29 | "psr-4": {
30 | "App\\": "app/",
31 | "Modules\\": "Modules/"
32 | }
33 | },
34 | "autoload-dev": {
35 | "psr-4": {
36 | "Tests\\": "tests/"
37 | }
38 | },
39 | "extra": {
40 | "laravel": {
41 | "dont-discover": [
42 | ]
43 | }
44 | },
45 | "scripts": {
46 | "post-root-package-install": [
47 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
48 | ],
49 | "post-create-project-cmd": [
50 | "@php artisan key:generate"
51 | ],
52 | "post-autoload-dump": [
53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
54 | "@php artisan package:discover"
55 | ]
56 | },
57 | "config": {
58 | "minimum-stability": "~0.1*",
59 | "preferred-install": "dist",
60 | "sort-packages": true,
61 | "optimize-autoloader": true
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | ],
48 | ],
49 |
50 | /*
51 | |--------------------------------------------------------------------------
52 | | User Providers
53 | |--------------------------------------------------------------------------
54 | |
55 | | All authentication drivers have a user provider. This defines how the
56 | | users are actually retrieved out of your database or other storage
57 | | mechanisms used by this application to persist your user's data.
58 | |
59 | | If you have multiple user tables or models you may configure multiple
60 | | sources which represent each model / table. These sources may then
61 | | be assigned to any extra authentication guards you have defined.
62 | |
63 | | Supported: "database", "eloquent"
64 | |
65 | */
66 |
67 | 'providers' => [
68 | 'users' => [
69 | 'driver' => 'eloquent',
70 | 'model' => App\User::class,
71 | ],
72 |
73 | // 'users' => [
74 | // 'driver' => 'database',
75 | // 'table' => 'users',
76 | // ],
77 | ],
78 |
79 | /*
80 | |--------------------------------------------------------------------------
81 | | Resetting Passwords
82 | |--------------------------------------------------------------------------
83 | |
84 | | You may specify multiple password reset configurations if you have more
85 | | than one user table or model in the application and you want to have
86 | | separate password reset settings based on the specific user types.
87 | |
88 | | The expire time is the number of minutes that the reset token should be
89 | | considered valid. This security feature keeps tokens short-lived so
90 | | they have less time to be guessed. You may change this as needed.
91 | |
92 | */
93 |
94 | 'passwords' => [
95 | 'users' => [
96 | 'provider' => 'users',
97 | 'table' => 'password_resets',
98 | 'expire' => 60,
99 | ],
100 | ],
101 |
102 | ];
103 |
--------------------------------------------------------------------------------
/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | //
40 | ],
41 | ],
42 |
43 | 'redis' => [
44 | 'driver' => 'redis',
45 | 'connection' => 'default',
46 | ],
47 |
48 | 'log' => [
49 | 'driver' => 'log',
50 | ],
51 |
52 | 'null' => [
53 | 'driver' => 'null',
54 | ],
55 |
56 | ],
57 |
58 | ];
59 |
--------------------------------------------------------------------------------
/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Cache Stores
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the cache "stores" for your application as
26 | | well as their drivers. You may even define multiple stores for the
27 | | same cache driver to group types of items stored in your caches.
28 | |
29 | */
30 |
31 | 'stores' => [
32 |
33 | 'apc' => [
34 | 'driver' => 'apc',
35 | ],
36 |
37 | 'array' => [
38 | 'driver' => 'array',
39 | ],
40 |
41 | 'database' => [
42 | 'driver' => 'database',
43 | 'table' => 'cache',
44 | 'connection' => null,
45 | ],
46 |
47 | 'file' => [
48 | 'driver' => 'file',
49 | 'path' => storage_path('framework/cache/data'),
50 | ],
51 |
52 | 'memcached' => [
53 | 'driver' => 'memcached',
54 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
55 | 'sasl' => [
56 | env('MEMCACHED_USERNAME'),
57 | env('MEMCACHED_PASSWORD'),
58 | ],
59 | 'options' => [
60 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
61 | ],
62 | 'servers' => [
63 | [
64 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
65 | 'port' => env('MEMCACHED_PORT', 11211),
66 | 'weight' => 100,
67 | ],
68 | ],
69 | ],
70 |
71 | 'redis' => [
72 | 'driver' => 'redis',
73 | 'connection' => 'default',
74 | ],
75 |
76 | ],
77 |
78 | /*
79 | |--------------------------------------------------------------------------
80 | | Cache Key Prefix
81 | |--------------------------------------------------------------------------
82 | |
83 | | When utilizing a RAM based store such as APC or Memcached, there might
84 | | be other applications utilizing the same cache. So, we'll specify a
85 | | value to get prefixed to all our keys so we can avoid collisions.
86 | |
87 | */
88 |
89 | 'prefix' => 'laravel',
90 |
91 | ];
92 |
--------------------------------------------------------------------------------
/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Database Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here are each of the database connections setup for your application.
24 | | Of course, examples of configuring each database platform that is
25 | | supported by Laravel is shown below to make development simple.
26 | |
27 | |
28 | | All database work in Laravel is done through the PHP PDO facilities
29 | | so make sure you have the driver for your particular database of
30 | | choice installed on your machine before you begin development.
31 | |
32 | */
33 |
34 | 'connections' => [
35 |
36 | 'sqlite' => [
37 | 'driver' => 'sqlite',
38 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
39 | 'prefix' => '',
40 | ],
41 |
42 | 'mysql' => [
43 | 'driver' => 'mysql',
44 | 'host' => env('DB_HOST', '127.0.0.1'),
45 | 'port' => env('DB_PORT', '3306'),
46 | 'database' => env('DB_DATABASE', 'forge'),
47 | 'username' => env('DB_USERNAME', 'forge'),
48 | 'password' => env('DB_PASSWORD', ''),
49 | 'unix_socket' => env('DB_SOCKET', ''),
50 | 'charset' => 'utf8mb4',
51 | 'collation' => 'utf8mb4_unicode_ci',
52 | 'prefix' => '',
53 | 'strict' => true,
54 | 'engine' => null,
55 | ],
56 |
57 | 'pgsql' => [
58 | 'driver' => 'pgsql',
59 | 'host' => env('DB_HOST', '127.0.0.1'),
60 | 'port' => env('DB_PORT', '5432'),
61 | 'database' => env('DB_DATABASE', 'forge'),
62 | 'username' => env('DB_USERNAME', 'forge'),
63 | 'password' => env('DB_PASSWORD', ''),
64 | 'charset' => 'utf8',
65 | 'prefix' => '',
66 | 'schema' => 'public',
67 | 'sslmode' => 'prefer',
68 | ],
69 |
70 | 'sqlsrv' => [
71 | 'driver' => 'sqlsrv',
72 | 'host' => env('DB_HOST', 'localhost'),
73 | 'port' => env('DB_PORT', '1433'),
74 | 'database' => env('DB_DATABASE', 'forge'),
75 | 'username' => env('DB_USERNAME', 'forge'),
76 | 'password' => env('DB_PASSWORD', ''),
77 | 'charset' => 'utf8',
78 | 'prefix' => '',
79 | ],
80 |
81 | ],
82 |
83 | /*
84 | |--------------------------------------------------------------------------
85 | | Migration Repository Table
86 | |--------------------------------------------------------------------------
87 | |
88 | | This table keeps track of all the migrations that have already run for
89 | | your application. Using this information, we can determine which of
90 | | the migrations on disk haven't actually been run in the database.
91 | |
92 | */
93 |
94 | 'migrations' => 'migrations',
95 |
96 | /*
97 | |--------------------------------------------------------------------------
98 | | Redis Databases
99 | |--------------------------------------------------------------------------
100 | |
101 | | Redis is an open source, fast, and advanced key-value store that also
102 | | provides a richer set of commands than a typical key-value systems
103 | | such as APC or Memcached. Laravel makes it easy to dig right in.
104 | |
105 | */
106 |
107 | 'redis' => [
108 |
109 | 'client' => 'predis',
110 |
111 | 'default' => [
112 | 'host' => env('REDIS_HOST', '127.0.0.1'),
113 | 'password' => env('REDIS_PASSWORD', null),
114 | 'port' => env('REDIS_PORT', 6379),
115 | 'database' => 0,
116 | ],
117 |
118 | ],
119 |
120 | ];
121 |
--------------------------------------------------------------------------------
/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "s3", "rackspace"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_KEY'),
61 | 'secret' => env('AWS_SECRET'),
62 | 'region' => env('AWS_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | ],
65 |
66 | ],
67 |
68 | ];
69 |
--------------------------------------------------------------------------------
/config/light-bootstrap-dashboard.php:
--------------------------------------------------------------------------------
1 | 'purple',
7 |
8 | 'sidebar-image' => 'images/sidebar-5.jpg',
9 |
10 | ];
11 |
--------------------------------------------------------------------------------
/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_DRIVER', 'smtp'),
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | SMTP Host Address
24 | |--------------------------------------------------------------------------
25 | |
26 | | Here you may provide the host address of the SMTP server used by your
27 | | applications. A default option is provided that is compatible with
28 | | the Mailgun mail service which will provide reliable deliveries.
29 | |
30 | */
31 |
32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
33 |
34 | /*
35 | |--------------------------------------------------------------------------
36 | | SMTP Host Port
37 | |--------------------------------------------------------------------------
38 | |
39 | | This is the SMTP port used by your application to deliver e-mails to
40 | | users of the application. Like the host we have set this value to
41 | | stay compatible with the Mailgun e-mail application by default.
42 | |
43 | */
44 |
45 | 'port' => env('MAIL_PORT', 587),
46 |
47 | /*
48 | |--------------------------------------------------------------------------
49 | | Global "From" Address
50 | |--------------------------------------------------------------------------
51 | |
52 | | You may wish for all e-mails sent by your application to be sent from
53 | | the same address. Here, you may specify a name and address that is
54 | | used globally for all e-mails that are sent by your application.
55 | |
56 | */
57 |
58 | 'from' => [
59 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
60 | 'name' => env('MAIL_FROM_NAME', 'Example'),
61 | ],
62 |
63 | /*
64 | |--------------------------------------------------------------------------
65 | | E-Mail Encryption Protocol
66 | |--------------------------------------------------------------------------
67 | |
68 | | Here you may specify the encryption protocol that should be used when
69 | | the application send e-mail messages. A sensible default using the
70 | | transport layer security protocol should provide great security.
71 | |
72 | */
73 |
74 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
75 |
76 | /*
77 | |--------------------------------------------------------------------------
78 | | SMTP Server Username
79 | |--------------------------------------------------------------------------
80 | |
81 | | If your SMTP server requires a username for authentication, you should
82 | | set it here. This will get used to authenticate with your server on
83 | | connection. You may also set the "password" value below this one.
84 | |
85 | */
86 |
87 | 'username' => env('MAIL_USERNAME'),
88 |
89 | 'password' => env('MAIL_PASSWORD'),
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Sendmail System Path
94 | |--------------------------------------------------------------------------
95 | |
96 | | When using the "sendmail" driver to send e-mails, we will need to know
97 | | the path to where Sendmail lives on this server. A default path has
98 | | been provided here, which will work well on most of your systems.
99 | |
100 | */
101 |
102 | 'sendmail' => '/usr/sbin/sendmail -bs',
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Markdown Mail Settings
107 | |--------------------------------------------------------------------------
108 | |
109 | | If you are using Markdown based email rendering, you may configure your
110 | | theme and component paths here, allowing you to customize the design
111 | | of the emails. Or, you may simply stick with the Laravel defaults!
112 | |
113 | */
114 |
115 | 'markdown' => [
116 | 'theme' => 'default',
117 |
118 | 'paths' => [
119 | resource_path('views/vendor/mail'),
120 | ],
121 | ],
122 |
123 | ];
124 |
--------------------------------------------------------------------------------
/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_DRIVER', 'sync'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Queue Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may configure the connection information for each server that
26 | | is used by your application. A default configuration has been added
27 | | for each back-end shipped with Laravel. You are free to add more.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | ],
50 |
51 | 'sqs' => [
52 | 'driver' => 'sqs',
53 | 'key' => 'your-public-key',
54 | 'secret' => 'your-secret-key',
55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
56 | 'queue' => 'your-queue-name',
57 | 'region' => 'us-east-1',
58 | ],
59 |
60 | 'redis' => [
61 | 'driver' => 'redis',
62 | 'connection' => 'default',
63 | 'queue' => 'default',
64 | 'retry_after' => 90,
65 | ],
66 |
67 | ],
68 |
69 | /*
70 | |--------------------------------------------------------------------------
71 | | Failed Queue Jobs
72 | |--------------------------------------------------------------------------
73 | |
74 | | These options configure the behavior of failed queue job logging so you
75 | | can control which database and table are used to store the jobs that
76 | | have failed. You may change them to any database / table you wish.
77 | |
78 | */
79 |
80 | 'failed' => [
81 | 'database' => env('DB_CONNECTION', 'mysql'),
82 | 'table' => 'failed_jobs',
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | ],
21 |
22 | 'ses' => [
23 | 'key' => env('SES_KEY'),
24 | 'secret' => env('SES_SECRET'),
25 | 'region' => 'us-east-1',
26 | ],
27 |
28 | 'sparkpost' => [
29 | 'secret' => env('SPARKPOST_SECRET'),
30 | ],
31 |
32 | 'stripe' => [
33 | 'model' => App\User::class,
34 | 'key' => env('STRIPE_KEY'),
35 | 'secret' => env('STRIPE_SECRET'),
36 | ],
37 |
38 | ];
39 |
--------------------------------------------------------------------------------
/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => realpath(storage_path('framework/views')),
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/database/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/database/.DS_Store
--------------------------------------------------------------------------------
/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 |
--------------------------------------------------------------------------------
/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(App\User::class, function (Faker $faker) {
17 | static $password;
18 |
19 | return [
20 | 'name' => $faker->name,
21 | 'email' => $faker->unique()->safeEmail,
22 | 'password' => $password ?: $password = bcrypt('secret'),
23 | 'remember_token' => str_random(10),
24 | ];
25 | });
26 |
--------------------------------------------------------------------------------
/database/migrations/2018_02_03_000001_create_users_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
16 | $table->string('name');
17 | $table->string('email')->unique();
18 | $table->string('password');
19 | $table->rememberToken();
20 | $table->timestamps();
21 | });
22 | }
23 | /**
24 | * Reverse the migrations.
25 | *
26 | * @return void
27 | */
28 | public function down()
29 | {
30 | Schema::dropIfExists('users');
31 | }
32 | }
--------------------------------------------------------------------------------
/database/migrations/2018_02_03_000002_create_password_resets_table.php:
--------------------------------------------------------------------------------
1 | string('email')->index();
17 | $table->string('token');
18 | $table->timestamp('created_at')->nullable();
19 | });
20 | }
21 | /**
22 | * Reverse the migrations.
23 | *
24 | * @return void
25 | */
26 | public function down()
27 | {
28 | Schema::dropIfExists('password_resets');
29 | }
30 | }
--------------------------------------------------------------------------------
/database/migrations/2018_02_03_000003_create_rooms_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('room',191);
19 | $table->string('roomName',191)->unique();
20 | $table->string('description');
21 | $table->timestamps();
22 | });
23 | }
24 |
25 | /**
26 | * Reverse the migrations.
27 | *
28 | * @return void
29 | */
30 | public function down()
31 | {
32 | Schema::dropIfExists('rooms');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/database/migrations/2018_02_03_000004_create_things_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
18 | $table->string('thing');
19 | $table->string('thingType');
20 | $table->string('binding');
21 | $table->string('password')->nullable();
22 | $table->string('default_on');
23 | $table->string('default_off');
24 | $table->string('protocol');
25 | $table->string('ip')->nullable();
26 | $table->string('state');
27 | $table->integer('room_id')->unsigned();
28 | $table->timestamps();
29 |
30 | $table->foreign('room_id')->references('id')->on('rooms');
31 | });
32 | }
33 |
34 | /**
35 | * Reverse the migrations.
36 | *
37 | * @return void
38 | */
39 | public function down()
40 | {
41 | Schema::dropIfExists('users');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/database/migrations/2018_02_06_175846_create_rules_table.php:
--------------------------------------------------------------------------------
1 | increments('id');
19 | $table->string('ruleName')->unique();
20 | $table->string('thingListener');
21 | $table->longtext('jsonRule');
22 | $table->timestamps();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('rules');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | insert([
16 | 'room' => 'Default Room',
17 | 'roomName' => 'default_room',
18 | 'description' => 'Homify`s default room',
19 | ]);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "animate.css": "^3.5.2",
14 | "axios": "^0.18.1",
15 | "bootstrap-notify": "^3.1.3",
16 | "bootstrap-sass": "^3.3.7",
17 | "bootstrap-select": "^1.12.4",
18 | "bootstrap-switch": "^3.3.4",
19 | "chartist": "^0.11.0",
20 | "cross-env": "^5.0.1",
21 | "flatui-radiocheck": "^0.1.2",
22 | "font-awesome": "^4.7.0",
23 | "jquery": "^3.1.1",
24 | "laravel-mix": "^1.0",
25 | "lodash": "^4.17.4",
26 | "pixeden-stroke-7-icon": "^1.2.3",
27 | "vue": "^2.1.10"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 | ./tests/Feature
14 |
15 |
16 |
17 | ./tests/Unit
18 |
19 |
20 |
21 |
22 | ./app
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/public/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/.DS_Store
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 |
3 | Options -MultiViews
4 |
5 |
6 | RewriteEngine On
7 |
8 | # Redirect Trailing Slashes If Not A Folder...
9 | RewriteCond %{REQUEST_FILENAME} !-d
10 | RewriteCond %{REQUEST_URI} (.+)/$
11 | RewriteRule ^ %1 [L,R=301]
12 |
13 | # Handle Front Controller...
14 | RewriteCond %{REQUEST_FILENAME} !-d
15 | RewriteCond %{REQUEST_FILENAME} !-f
16 | RewriteRule ^ index.php [L]
17 |
18 | # Handle Authorization Header
19 | RewriteCond %{HTTP:Authorization} .
20 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
21 |
22 |
--------------------------------------------------------------------------------
/public/css/auth.css:
--------------------------------------------------------------------------------
1 | .auth-card {
2 | margin-top: 15%;
3 | }
4 |
5 | .btn {
6 | border-width: 0px;
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/public/css/things.css:
--------------------------------------------------------------------------------
1 | /* http://meyerweb.com/eric/tools/css/reset/
2 | v2.0 | 20110126
3 | License: none (public domain)
4 | */
5 |
6 | html, div, span, applet, object, iframe,
7 | h1, h2, h4, h5, h6, p, blockquote, pre,
8 | a, abbr, acronym, address, big, cite, code,
9 | del, dfn, em, img, ins, kbd, q, s, samp,
10 | small, strike, strong, sub, sup, tt, var,
11 | b, u, i, center,
12 | dl, dt, dd, ol, ul, li,
13 | fieldset, form, label, legend,
14 | table, caption, tbody, tfoot, thead, tr, th, td,
15 | article, aside, canvas, details, embed,
16 | figure, figcaption, footer, header, hgroup,
17 | menu, nav, output, ruby, section, summary,
18 | time, mark, audio, video {
19 | margin: 0;
20 | padding: 0;
21 | border: 0;
22 | font-size: 100%;
23 | font: inherit;
24 | vertical-align: baseline;
25 | }
26 | /* HTML5 display-role reset for older browsers */
27 | article, aside, details, figcaption, figure,
28 | footer, header, hgroup, menu, nav, section {
29 | display: block;
30 | }
31 | body {
32 | line-height: 1;
33 | }
34 | ol, ul {
35 | list-style: none;
36 | }
37 | blockquote, q {
38 | quotes: none;
39 | }
40 | blockquote:before, blockquote:after,
41 | q:before, q:after {
42 | content: '';
43 | content: none;
44 | }
45 | table {
46 | border-collapse: collapse;
47 | border-spacing: 0;
48 | }
49 |
50 |
51 | html {
52 | height: 100%;
53 | }
54 |
55 | body {
56 | height: 100%;
57 | }
58 |
59 | body #AppArea {
60 | font-size: 16px;
61 | line-height: 20px;
62 | font-family: Roboto, Arial, sans-serif;
63 | bottom: 10%;
64 | position: absolute;
65 | left: 0;
66 | right: 0;
67 | top: 10%;
68 | }
69 | body #AppArea, body #AppArea * {
70 | box-sizing: border-box;
71 | }
72 | body #AppArea .fa {
73 | line-height: 0;
74 | font-size: 0;
75 | }
76 | body #AppArea .fa:before {
77 | font-size: 18px;
78 | line-height: 20px;
79 | }
80 | body #AppArea #ListArea {
81 | height: 100%;
82 | padding: 100px 100px;
83 | display: flex;
84 | flex-wrap: wrap;
85 | justify-content: center;
86 | align-items: center;
87 | align-content: center;
88 | }
89 | body #AppArea #ListArea:after {
90 | content: '';
91 | display: block;
92 | clear: both;
93 | }
94 | body #AppArea #ListArea > li {
95 | width: 200px;
96 | height: auto;
97 | position: relative;
98 | background-color: #FFFFFF;
99 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
100 | border-radius: 2px;
101 | margin: 35px;
102 | /*
103 | &:before{
104 | content: '';
105 | display: block;
106 | position: absolute;
107 | height: 100%;
108 | width: 100%;
109 | background: fixed center center / cover url(https://source.unsplash.com/category/nature/);
110 | filter: blur(10px);
111 | z-index: -1;
112 | }
113 | */
114 | }
115 | body #AppArea #ListArea > li[data-status="1"] .Bar .Status {
116 | background-color: #e74c3c;
117 | }
118 | body #AppArea #ListArea > li[data-status="0"] .Bar .Status {
119 | background-color: #2ecc71;
120 | }
121 | body #AppArea #ListArea > li .Text {
122 | margin: 20px;
123 | }
124 | body #AppArea #ListArea > li .Text h3 {
125 | font-size: 18px;
126 | font-weight: 300;
127 | text-transform: uppercase;
128 | text-align: center;
129 | }
130 | body #AppArea #ListArea > li .Image {
131 | max-width: 40%;
132 | margin: 20px auto;
133 | }
134 | body #AppArea #ListArea > li .Image img {
135 | width: 100%;
136 | }
137 | body #AppArea #ListArea > li .Bar {
138 | border-top: 1px solid rgba(160, 160, 160, 0.2);
139 | padding: 10px 20px;
140 | }
141 | body #AppArea #ListArea > li .Bar:after {
142 | content: '';
143 | display: block;
144 | clear: both;
145 | }
146 | body #AppArea #ListArea > li .Bar .Status {
147 | float: left;
148 | width: 20px;
149 | height: 20px;
150 | border-radius: 100%;
151 | margin: 5px 0;
152 | background-color: #34495e;
153 | cursor: pointer;
154 | }
155 | body #AppArea #ListArea > li .Bar .Buttons {
156 | float: right;
157 | }
158 | body #AppArea #ListArea > li .Bar .Buttons > li {
159 | float: left;
160 | line-height: 30px;
161 | height: 30px;
162 | }
163 | body #AppArea #ListArea > li .Bar .Buttons > li a, body #AppArea #ListArea > li .Bar .Buttons > li button {
164 | cursor: pointer;
165 | }
166 | body #AppArea #ListArea > li .Bar .Buttons > li .fa:before {
167 | line-height: 30px;
168 | font-size: 24px;
169 | }
170 | body #AppArea #ListArea > li .Bar .Buttons > li.AddError a {
171 | transition: all .3s;
172 | }
173 | body #AppArea #ListArea > li .Bar .Buttons > li.AddError a:hover {
174 | color: #e74c3c;
175 | }
176 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/favicon.ico
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/bootstrap-sass/bootstrap/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/public/fonts/vendor/font-awesome/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/font-awesome/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/public/fonts/vendor/font-awesome/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/font-awesome/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/public/fonts/vendor/font-awesome/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/font-awesome/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/public/fonts/vendor/font-awesome/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/font-awesome/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.eot
--------------------------------------------------------------------------------
/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.ttf
--------------------------------------------------------------------------------
/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/fonts/vendor/pixeden-stroke-7-icon/pe-icon-7-stroke/Pe-icon-7-stroke.woff
--------------------------------------------------------------------------------
/public/images/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/.DS_Store
--------------------------------------------------------------------------------
/public/images/ThingTypes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/.DS_Store
--------------------------------------------------------------------------------
/public/images/ThingTypes/Light_ON.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/Light_ON.png
--------------------------------------------------------------------------------
/public/images/ThingTypes/Speaker_OFF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/Speaker_OFF.png
--------------------------------------------------------------------------------
/public/images/ThingTypes/Speaker_ON.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/Speaker_ON.png
--------------------------------------------------------------------------------
/public/images/ThingTypes/Switcher_OFF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/Switcher_OFF.png
--------------------------------------------------------------------------------
/public/images/ThingTypes/Switcher_ON.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/ThingTypes/Switcher_ON.png
--------------------------------------------------------------------------------
/public/images/mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/mask.png
--------------------------------------------------------------------------------
/public/images/sidebar-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/sidebar-1.jpg
--------------------------------------------------------------------------------
/public/images/sidebar-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/sidebar-2.jpg
--------------------------------------------------------------------------------
/public/images/sidebar-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/sidebar-3.jpg
--------------------------------------------------------------------------------
/public/images/sidebar-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/sidebar-4.jpg
--------------------------------------------------------------------------------
/public/images/sidebar-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/public/images/sidebar-5.jpg
--------------------------------------------------------------------------------
/public/index.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | define('LARAVEL_START', microtime(true));
11 |
12 | /*
13 | |--------------------------------------------------------------------------
14 | | Register The Auto Loader
15 | |--------------------------------------------------------------------------
16 | |
17 | | Composer provides a convenient, automatically generated class loader for
18 | | our application. We just need to utilize it! We'll simply require it
19 | | into the script here so that we don't have to worry about manual
20 | | loading any of our classes later on. It feels great to relax.
21 | |
22 | */
23 |
24 | require __DIR__.'/../vendor/autoload.php';
25 |
26 | /*
27 | |--------------------------------------------------------------------------
28 | | Turn On The Lights
29 | |--------------------------------------------------------------------------
30 | |
31 | | We need to illuminate PHP development, so let us turn on the lights.
32 | | This bootstraps the framework and gets it ready for use, then it
33 | | will load up this application so that we can run it and send
34 | | the responses back to the browser and delight our users.
35 | |
36 | */
37 |
38 | $app = require_once __DIR__.'/../bootstrap/app.php';
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Run The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once we have the application, we can handle the incoming request
46 | | through the kernel, and send the associated response back to
47 | | the client's browser allowing them to enjoy the creative
48 | | and wonderful application we have prepared for them.
49 | |
50 | */
51 |
52 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
53 |
54 | $response = $kernel->handle(
55 | $request = Illuminate\Http\Request::capture()
56 | );
57 |
58 | $response->send();
59 |
60 | $kernel->terminate($request, $response);
61 |
--------------------------------------------------------------------------------
/public/js/manifest.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // install a JSONP callback for chunk loading
3 | /******/ var parentJsonpFunction = window["webpackJsonp"];
4 | /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5 | /******/ // add "moreModules" to the modules object,
6 | /******/ // then flag all "chunkIds" as loaded and fire callback
7 | /******/ var moduleId, chunkId, i = 0, resolves = [], result;
8 | /******/ for(;i < chunkIds.length; i++) {
9 | /******/ chunkId = chunkIds[i];
10 | /******/ if(installedChunks[chunkId]) {
11 | /******/ resolves.push(installedChunks[chunkId][0]);
12 | /******/ }
13 | /******/ installedChunks[chunkId] = 0;
14 | /******/ }
15 | /******/ for(moduleId in moreModules) {
16 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17 | /******/ modules[moduleId] = moreModules[moduleId];
18 | /******/ }
19 | /******/ }
20 | /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21 | /******/ while(resolves.length) {
22 | /******/ resolves.shift()();
23 | /******/ }
24 | /******/ if(executeModules) {
25 | /******/ for(i=0; i < executeModules.length; i++) {
26 | /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
27 | /******/ }
28 | /******/ }
29 | /******/ return result;
30 | /******/ };
31 | /******/
32 | /******/ // The module cache
33 | /******/ var installedModules = {};
34 | /******/
35 | /******/ // objects to store loaded and loading chunks
36 | /******/ var installedChunks = {
37 | /******/ 4: 0
38 | /******/ };
39 | /******/
40 | /******/ // The require function
41 | /******/ function __webpack_require__(moduleId) {
42 | /******/
43 | /******/ // Check if module is in cache
44 | /******/ if(installedModules[moduleId]) {
45 | /******/ return installedModules[moduleId].exports;
46 | /******/ }
47 | /******/ // Create a new module (and put it into the cache)
48 | /******/ var module = installedModules[moduleId] = {
49 | /******/ i: moduleId,
50 | /******/ l: false,
51 | /******/ exports: {}
52 | /******/ };
53 | /******/
54 | /******/ // Execute the module function
55 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
56 | /******/
57 | /******/ // Flag the module as loaded
58 | /******/ module.l = true;
59 | /******/
60 | /******/ // Return the exports of the module
61 | /******/ return module.exports;
62 | /******/ }
63 | /******/
64 | /******/ // This file contains only the entry chunk.
65 | /******/ // The chunk loading function for additional chunks
66 | /******/ __webpack_require__.e = function requireEnsure(chunkId) {
67 | /******/ var installedChunkData = installedChunks[chunkId];
68 | /******/ if(installedChunkData === 0) {
69 | /******/ return new Promise(function(resolve) { resolve(); });
70 | /******/ }
71 | /******/
72 | /******/ // a Promise means "currently loading".
73 | /******/ if(installedChunkData) {
74 | /******/ return installedChunkData[2];
75 | /******/ }
76 | /******/
77 | /******/ // setup Promise in chunk cache
78 | /******/ var promise = new Promise(function(resolve, reject) {
79 | /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
80 | /******/ });
81 | /******/ installedChunkData[2] = promise;
82 | /******/
83 | /******/ // start chunk loading
84 | /******/ var head = document.getElementsByTagName('head')[0];
85 | /******/ var script = document.createElement('script');
86 | /******/ script.type = 'text/javascript';
87 | /******/ script.charset = 'utf-8';
88 | /******/ script.async = true;
89 | /******/ script.timeout = 120000;
90 | /******/
91 | /******/ if (__webpack_require__.nc) {
92 | /******/ script.setAttribute("nonce", __webpack_require__.nc);
93 | /******/ }
94 | /******/ script.src = __webpack_require__.p + "" + ({"0":"/js/vendor","1":"/js/app","2":"/js/auth","3":"/js/light-bootstrap-dashboard"}[chunkId]||chunkId) + ".js";
95 | /******/ var timeout = setTimeout(onScriptComplete, 120000);
96 | /******/ script.onerror = script.onload = onScriptComplete;
97 | /******/ function onScriptComplete() {
98 | /******/ // avoid mem leaks in IE.
99 | /******/ script.onerror = script.onload = null;
100 | /******/ clearTimeout(timeout);
101 | /******/ var chunk = installedChunks[chunkId];
102 | /******/ if(chunk !== 0) {
103 | /******/ if(chunk) {
104 | /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
105 | /******/ }
106 | /******/ installedChunks[chunkId] = undefined;
107 | /******/ }
108 | /******/ };
109 | /******/ head.appendChild(script);
110 | /******/
111 | /******/ return promise;
112 | /******/ };
113 | /******/
114 | /******/ // expose the modules object (__webpack_modules__)
115 | /******/ __webpack_require__.m = modules;
116 | /******/
117 | /******/ // expose the module cache
118 | /******/ __webpack_require__.c = installedModules;
119 | /******/
120 | /******/ // define getter function for harmony exports
121 | /******/ __webpack_require__.d = function(exports, name, getter) {
122 | /******/ if(!__webpack_require__.o(exports, name)) {
123 | /******/ Object.defineProperty(exports, name, {
124 | /******/ configurable: false,
125 | /******/ enumerable: true,
126 | /******/ get: getter
127 | /******/ });
128 | /******/ }
129 | /******/ };
130 | /******/
131 | /******/ // getDefaultExport function for compatibility with non-harmony modules
132 | /******/ __webpack_require__.n = function(module) {
133 | /******/ var getter = module && module.__esModule ?
134 | /******/ function getDefault() { return module['default']; } :
135 | /******/ function getModuleExports() { return module; };
136 | /******/ __webpack_require__.d(getter, 'a', getter);
137 | /******/ return getter;
138 | /******/ };
139 | /******/
140 | /******/ // Object.prototype.hasOwnProperty.call
141 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
142 | /******/
143 | /******/ // __webpack_public_path__
144 | /******/ __webpack_require__.p = "";
145 | /******/
146 | /******/ // on error function for async loading
147 | /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
148 | /******/ })
149 | /************************************************************************/
150 | /******/ ([]);
--------------------------------------------------------------------------------
/public/js/thing.js:
--------------------------------------------------------------------------------
1 | /** BEGIN: Config **/
2 | function getCsrf(){
3 | return $('meta[name="csrfToken"]').attr('content');
4 | }
5 | /* END: Config **/
6 |
7 | function toggle(thing){
8 | var newState;
9 | newState = thing.state;
10 |
11 | if(newState == '0'){
12 | newState = 'ON';
13 | } else {
14 | newState = 'OFF';
15 | }
16 | console.log(newState);
17 | // post
18 | $.ajax({
19 | method: "GET",
20 | url: "/thing/" + thing.thing + "/" + newState,
21 | data: {
22 | "_token": getCsrf(),
23 | },
24 | success: function(data){
25 | window.location.reload();
26 | console.log(data);
27 | },
28 | error: function(data){
29 | console.log(data);
30 | }
31 | });
32 |
33 | }
34 |
35 | function toggleEditModal(thing){
36 | console.log(thing);
37 | $('#editModal').modal('show');
38 | $('input[name="thingID"]').val(thing.id);
39 | $('input[name="json"]').val(thing.json);
40 | $('input[name="thingname"]').val(thing.thing);
41 | $('input[name="room"]').val(thing.roomid);
42 | $('input[name="binding"]').val(thing.binding);
43 | }
--------------------------------------------------------------------------------
/public/mix-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "/js/vendor.js": "/js/vendor.js?id=fe48fe9ccf60cf02a92a",
3 | "/js/app.js": "/js/app.js?id=b7da9be6d699fe6fc7bb",
4 | "/css/app.css": "/css/app.css?id=b9cb5c393f3dcc0fb457",
5 | "/css/auth.css": "/css/auth.css?id=acef1ae71718e1ab2cc8",
6 | "/css/light-bootstrap-dashboard.css": "/css/light-bootstrap-dashboard.css?id=4d395df90e78901c2ee8",
7 | "/js/auth.js": "/js/auth.js?id=b16d89163466209f4c5f",
8 | "/js/light-bootstrap-dashboard.js": "/js/light-bootstrap-dashboard.js?id=af17ba874647500b94cd",
9 | "/js/manifest.js": "/js/manifest.js?id=4a44f56b1d734f55fa6a",
10 | "/images/sidebar-1.jpg": "/images/sidebar-1.jpg?id=0570b28a99b11a0e30c6",
11 | "/images/sidebar-2.jpg": "/images/sidebar-2.jpg?id=5e90222afa729428b3fd",
12 | "/images/sidebar-3.jpg": "/images/sidebar-3.jpg?id=118a647cfb431cdd3553",
13 | "/images/sidebar-4.jpg": "/images/sidebar-4.jpg?id=dde1c2bd33c1ce038320",
14 | "/images/sidebar-5.jpg": "/images/sidebar-5.jpg?id=97e5bace6f3e7a0b2ae9"
15 | }
--------------------------------------------------------------------------------
/public/pubic/js/manifest.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // install a JSONP callback for chunk loading
3 | /******/ var parentJsonpFunction = window["webpackJsonp"];
4 | /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
5 | /******/ // add "moreModules" to the modules object,
6 | /******/ // then flag all "chunkIds" as loaded and fire callback
7 | /******/ var moduleId, chunkId, i = 0, resolves = [], result;
8 | /******/ for(;i < chunkIds.length; i++) {
9 | /******/ chunkId = chunkIds[i];
10 | /******/ if(installedChunks[chunkId]) {
11 | /******/ resolves.push(installedChunks[chunkId][0]);
12 | /******/ }
13 | /******/ installedChunks[chunkId] = 0;
14 | /******/ }
15 | /******/ for(moduleId in moreModules) {
16 | /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
17 | /******/ modules[moduleId] = moreModules[moduleId];
18 | /******/ }
19 | /******/ }
20 | /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
21 | /******/ while(resolves.length) {
22 | /******/ resolves.shift()();
23 | /******/ }
24 | /******/ if(executeModules) {
25 | /******/ for(i=0; i < executeModules.length; i++) {
26 | /******/ result = __webpack_require__(__webpack_require__.s = executeModules[i]);
27 | /******/ }
28 | /******/ }
29 | /******/ return result;
30 | /******/ };
31 | /******/
32 | /******/ // The module cache
33 | /******/ var installedModules = {};
34 | /******/
35 | /******/ // objects to store loaded and loading chunks
36 | /******/ var installedChunks = {
37 | /******/ 6: 0
38 | /******/ };
39 | /******/
40 | /******/ // The require function
41 | /******/ function __webpack_require__(moduleId) {
42 | /******/
43 | /******/ // Check if module is in cache
44 | /******/ if(installedModules[moduleId]) {
45 | /******/ return installedModules[moduleId].exports;
46 | /******/ }
47 | /******/ // Create a new module (and put it into the cache)
48 | /******/ var module = installedModules[moduleId] = {
49 | /******/ i: moduleId,
50 | /******/ l: false,
51 | /******/ exports: {}
52 | /******/ };
53 | /******/
54 | /******/ // Execute the module function
55 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
56 | /******/
57 | /******/ // Flag the module as loaded
58 | /******/ module.l = true;
59 | /******/
60 | /******/ // Return the exports of the module
61 | /******/ return module.exports;
62 | /******/ }
63 | /******/
64 | /******/ // This file contains only the entry chunk.
65 | /******/ // The chunk loading function for additional chunks
66 | /******/ __webpack_require__.e = function requireEnsure(chunkId) {
67 | /******/ var installedChunkData = installedChunks[chunkId];
68 | /******/ if(installedChunkData === 0) {
69 | /******/ return new Promise(function(resolve) { resolve(); });
70 | /******/ }
71 | /******/
72 | /******/ // a Promise means "currently loading".
73 | /******/ if(installedChunkData) {
74 | /******/ return installedChunkData[2];
75 | /******/ }
76 | /******/
77 | /******/ // setup Promise in chunk cache
78 | /******/ var promise = new Promise(function(resolve, reject) {
79 | /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
80 | /******/ });
81 | /******/ installedChunkData[2] = promise;
82 | /******/
83 | /******/ // start chunk loading
84 | /******/ var head = document.getElementsByTagName('head')[0];
85 | /******/ var script = document.createElement('script');
86 | /******/ script.type = 'text/javascript';
87 | /******/ script.charset = 'utf-8';
88 | /******/ script.async = true;
89 | /******/ script.timeout = 120000;
90 | /******/
91 | /******/ if (__webpack_require__.nc) {
92 | /******/ script.setAttribute("nonce", __webpack_require__.nc);
93 | /******/ }
94 | /******/ script.src = __webpack_require__.p + "" + ({"0":"/js/vendor","1":"/js/app","2":"/js/auth","3":"/js/light-bootstrap-dashboard","4":"/pubic/js/jquery","5":"/js/thing"}[chunkId]||chunkId) + ".js";
95 | /******/ var timeout = setTimeout(onScriptComplete, 120000);
96 | /******/ script.onerror = script.onload = onScriptComplete;
97 | /******/ function onScriptComplete() {
98 | /******/ // avoid mem leaks in IE.
99 | /******/ script.onerror = script.onload = null;
100 | /******/ clearTimeout(timeout);
101 | /******/ var chunk = installedChunks[chunkId];
102 | /******/ if(chunk !== 0) {
103 | /******/ if(chunk) {
104 | /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
105 | /******/ }
106 | /******/ installedChunks[chunkId] = undefined;
107 | /******/ }
108 | /******/ };
109 | /******/ head.appendChild(script);
110 | /******/
111 | /******/ return promise;
112 | /******/ };
113 | /******/
114 | /******/ // expose the modules object (__webpack_modules__)
115 | /******/ __webpack_require__.m = modules;
116 | /******/
117 | /******/ // expose the module cache
118 | /******/ __webpack_require__.c = installedModules;
119 | /******/
120 | /******/ // define getter function for harmony exports
121 | /******/ __webpack_require__.d = function(exports, name, getter) {
122 | /******/ if(!__webpack_require__.o(exports, name)) {
123 | /******/ Object.defineProperty(exports, name, {
124 | /******/ configurable: false,
125 | /******/ enumerable: true,
126 | /******/ get: getter
127 | /******/ });
128 | /******/ }
129 | /******/ };
130 | /******/
131 | /******/ // getDefaultExport function for compatibility with non-harmony modules
132 | /******/ __webpack_require__.n = function(module) {
133 | /******/ var getter = module && module.__esModule ?
134 | /******/ function getDefault() { return module['default']; } :
135 | /******/ function getModuleExports() { return module; };
136 | /******/ __webpack_require__.d(getter, 'a', getter);
137 | /******/ return getter;
138 | /******/ };
139 | /******/
140 | /******/ // Object.prototype.hasOwnProperty.call
141 | /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
142 | /******/
143 | /******/ // __webpack_public_path__
144 | /******/ __webpack_require__.p = "";
145 | /******/
146 | /******/ // on error function for async loading
147 | /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
148 | /******/ })
149 | /************************************************************************/
150 | /******/ ([]);
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/public/web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/resources/assets/img/mask.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/mask.png
--------------------------------------------------------------------------------
/resources/assets/img/sidebar-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/sidebar-1.jpg
--------------------------------------------------------------------------------
/resources/assets/img/sidebar-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/sidebar-2.jpg
--------------------------------------------------------------------------------
/resources/assets/img/sidebar-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/sidebar-3.jpg
--------------------------------------------------------------------------------
/resources/assets/img/sidebar-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/sidebar-4.jpg
--------------------------------------------------------------------------------
/resources/assets/img/sidebar-5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/markushaug/homify/4886aa256b3db96e9b5e802d4e294326e8f92ff0/resources/assets/img/sidebar-5.jpg
--------------------------------------------------------------------------------
/resources/assets/js/app.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * First we will load all of this project's JavaScript dependencies which
4 | * includes Vue and other libraries. It is a great starting point when
5 | * building robust, powerful web applications using Vue and Laravel.
6 | */
7 |
8 | require('./bootstrap');
9 |
10 | window.Vue = require('vue');
11 |
12 | /**
13 | * Next, we will create a fresh Vue application instance and attach it to
14 | * the page. Then, you may begin adding components to this application
15 | * or customize the JavaScript scaffolding to fit your unique needs.
16 | */
17 |
18 | Vue.component('example', require('./components/Example.vue'));
19 |
20 | const app = new Vue({
21 | el: '#app'
22 | });
23 |
--------------------------------------------------------------------------------
/resources/assets/js/auth.js:
--------------------------------------------------------------------------------
1 |
2 | require('./light-bootstrap-dashboard');
3 |
--------------------------------------------------------------------------------
/resources/assets/js/bootstrap.js:
--------------------------------------------------------------------------------
1 |
2 | window._ = require('lodash');
3 |
4 | /**
5 | * We'll load jQuery and the Bootstrap jQuery plugin which provides support
6 | * for JavaScript based Bootstrap features such as modals and tabs. This
7 | * code may be modified to fit the specific needs of your application.
8 | */
9 |
10 | try {
11 | window.$ = window.jQuery = require('jquery');
12 |
13 | require('bootstrap-sass');
14 | } catch (e) {}
15 |
16 | /**
17 | * We'll load the axios HTTP library which allows us to easily issue requests
18 | * to our Laravel back-end. This library automatically handles sending the
19 | * CSRF token as a header based on the value of the "XSRF" token cookie.
20 | */
21 |
22 | window.axios = require('axios');
23 |
24 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
25 |
26 | /**
27 | * Next we will register the CSRF Token as a common header with Axios so that
28 | * all outgoing HTTP requests automatically have it attached. This is just
29 | * a simple convenience so we don't have to attach every token manually.
30 | */
31 |
32 | let token = document.head.querySelector('meta[name="csrf-token"]');
33 |
34 | if (token) {
35 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
36 | } else {
37 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
38 | }
39 |
40 | /**
41 | * Echo exposes an expressive API for subscribing to channels and listening
42 | * for events that are broadcast by Laravel. Echo and event broadcasting
43 | * allows your team to easily build robust real-time web applications.
44 | */
45 |
46 | // import Echo from 'laravel-echo'
47 |
48 | // window.Pusher = require('pusher-js');
49 |
50 | // window.Echo = new Echo({
51 | // broadcaster: 'pusher',
52 | // key: 'your-pusher-key'
53 | // });
54 |
--------------------------------------------------------------------------------
/resources/assets/js/components/Example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Example Component
7 |
8 |
9 | I'm an example component!
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
24 |
--------------------------------------------------------------------------------
/resources/assets/sass/_variables.scss:
--------------------------------------------------------------------------------
1 |
2 | // Body
3 | $body-bg: #f5f8fa;
4 |
5 | // Borders
6 | $laravel-border-color: darken($body-bg, 10%);
7 | $list-group-border: $laravel-border-color;
8 | $navbar-default-border: $laravel-border-color;
9 | $panel-default-border: $laravel-border-color;
10 | $panel-inner-border: $laravel-border-color;
11 |
12 | // Brands
13 | $brand-primary: #3097D1;
14 | $brand-info: #8eb4cb;
15 | $brand-success: #2ab27b;
16 | $brand-warning: #cbb956;
17 | $brand-danger: #bf5329;
18 |
19 | // Typography
20 | $icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
21 | $font-family-sans-serif: "Raleway", sans-serif;
22 | $font-size-base: 14px;
23 | $line-height-base: 1.6;
24 | $text-color: #636b6f;
25 |
26 | // Navbar
27 | $navbar-default-bg: #fff;
28 |
29 | // Buttons
30 | $btn-default-color: $text-color;
31 |
32 | // Inputs
33 | $input-border: lighten($text-color, 40%);
34 | $input-border-focus: lighten($brand-primary, 25%);
35 | $input-color-placeholder: lighten($text-color, 30%);
36 |
37 | // Panels
38 | $panel-default-heading-bg: #fff;
39 |
40 | $sidebar-color: blue;
--------------------------------------------------------------------------------
/resources/assets/sass/app.scss:
--------------------------------------------------------------------------------
1 |
2 | // Fonts
3 | @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
4 |
5 | // Variables
6 | @import "variables";
7 |
8 | // Bootstrap
9 | @import "~bootstrap-sass/assets/stylesheets/bootstrap";
10 |
--------------------------------------------------------------------------------
/resources/assets/sass/auth.scss:
--------------------------------------------------------------------------------
1 | .auth-card {
2 | margin-top: 15%;
3 | }
4 |
5 | .btn {
6 | border-width: 0px;
7 | }
8 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_alerts.scss:
--------------------------------------------------------------------------------
1 | .alert{
2 | border: 0;
3 | border-radius: 0;
4 | color: #FFFFFF;
5 | padding: 10px 15px;
6 | font-size: 14px;
7 |
8 | .container &{
9 | border-radius: 4px;
10 |
11 | }
12 | .navbar &{
13 | border-radius: 0;
14 | left: 0;
15 | position: absolute;
16 | right: 0;
17 | top: 85px;
18 | width: 100%;
19 | z-index: 3;
20 | }
21 | .navbar:not(.navbar-transparent) &{
22 | top: 70px;
23 | }
24 |
25 | span[data-notify="icon"]{
26 | font-size: 30px;
27 | display: block;
28 | left: 15px;
29 | position: absolute;
30 | top: 50%;
31 | margin-top: -15px;
32 | }
33 |
34 | button.close{
35 | position: absolute;
36 | right: 10px;
37 | top: 50%;
38 | margin-top: -13px;
39 | z-index: 1033;
40 | background-color: #FFFFFF;
41 | display: block;
42 | border-radius: 50%;
43 | opacity: .4;
44 | line-height: 11px;
45 | width: 25px;
46 | height: 25px;
47 | outline: 0 !important;
48 | text-align: center;
49 | padding: 3px;
50 | font-weight: 300;
51 |
52 | &:hover{
53 | opacity: .55;
54 | }
55 | }
56 |
57 | .close ~ span{
58 | display: block;
59 | max-width: 89%;
60 | }
61 |
62 | &[data-notify="container"]{
63 | padding: 10px 10px 10px 20px;
64 | border-radius: $border-radius-base;
65 | }
66 |
67 | &.alert-with-icon{
68 | padding-left: 65px;
69 | }
70 | }
71 | .alert-info{
72 | background-color: $azure-navbar;
73 | }
74 | .alert-success {
75 | background-color: $green-navbar;
76 | }
77 | .alert-warning {
78 | background-color: $orange-navbar;
79 | }
80 | .alert-danger {
81 | background-color: $red-navbar;
82 | }
83 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_buttons.scss:
--------------------------------------------------------------------------------
1 | .btn{
2 | border-width: $border-thick;
3 | background-color: $transparent-bg;
4 | font-weight: $font-weight-normal;
5 |
6 | @include opacity(.8);
7 | padding: $padding-base-vertical $padding-base-horizontal;
8 |
9 | @include btn-styles($default-color, $default-states-color);
10 |
11 | &:hover,
12 | &:focus{
13 | @include opacity(1);
14 | outline: 0 !important;
15 | }
16 | &:active,
17 | &.active,
18 | .open > &.dropdown-toggle {
19 | @include box-shadow(none);
20 | outline: 0 !important;
21 | }
22 |
23 | &.btn-icon{
24 | padding: $padding-base-vertical;
25 | }
26 |
27 | }
28 |
29 | // Apply the mixin to the buttons
30 | //.btn-default { @include btn-styles($default-color, $default-states-color); }
31 | .btn-primary { @include btn-styles($primary-color, $primary-states-color); }
32 | .btn-success { @include btn-styles($success-color, $success-states-color); }
33 | .btn-info { @include btn-styles($info-color, $info-states-color); }
34 | .btn-warning { @include btn-styles($warning-color, $warning-states-color); }
35 | .btn-danger { @include btn-styles($danger-color, $danger-states-color); }
36 | .btn-neutral {
37 | @include btn-styles($white-color, $white-color);
38 |
39 | &:active,
40 | &.active,
41 | .open > &.dropdown-toggle{
42 | background-color: $white-color;
43 | color: $default-color;
44 | }
45 |
46 | &.btn-fill,
47 | &.btn-fill:hover,
48 | &.btn-fill:focus{
49 | color: $default-color;
50 | }
51 |
52 | &.btn-simple:active,
53 | &.btn-simple.active{
54 | background-color: transparent;
55 | }
56 | }
57 |
58 | .btn{
59 | &:disabled,
60 | &[disabled],
61 | &.disabled{
62 | @include opacity(.5);
63 | }
64 | }
65 | .btn-round{
66 | border-width: $border-thin;
67 | border-radius: $btn-round-radius !important;
68 | padding: $padding-round-vertical $padding-round-horizontal;
69 |
70 | &.btn-icon{
71 | padding: $padding-round-vertical;
72 | }
73 | }
74 | .btn-simple{
75 | border: $none;
76 | font-size: $font-size-medium;
77 | padding: $padding-base-vertical $padding-base-horizontal;
78 |
79 | &.btn-icon{
80 | padding: $padding-base-vertical;
81 | }
82 | }
83 | .btn-lg{
84 | @include btn-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $border-radius-large);
85 | font-weight: $font-weight-normal;
86 | }
87 | .btn-sm{
88 | @include btn-size($padding-small-vertical, $padding-small-horizontal, $font-size-small, $border-radius-small);
89 | }
90 | .btn-xs {
91 | @include btn-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $border-radius-small);
92 | }
93 | .btn-wd {
94 | min-width: 140px;
95 | }
96 |
97 | .btn-group.select{
98 | width: 100%;
99 | }
100 | .btn-group.select .btn{
101 | text-align: left;
102 | }
103 | .btn-group.select .caret{
104 | position: absolute;
105 | top: 50%;
106 | margin-top: -1px;
107 | right: 8px;
108 | }
109 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_cards.scss:
--------------------------------------------------------------------------------
1 | .card{
2 | border-radius: $border-radius-base;
3 | box-shadow: 0 1px 2px rgba(0,0,0,.05),0 0 0 1px rgba(63,63,68,.1);
4 | background-color: #FFFFFF;
5 | margin-bottom: 30px;
6 |
7 | .image{
8 | width: 100%;
9 | overflow: hidden;
10 | height: 260px;
11 | border-radius: $border-radius-base $border-radius-base 0 0;
12 | position: relative;
13 | -webkit-transform-style: preserve-3d;
14 | -moz-transform-style: preserve-3d;
15 | transform-style: preserve-3d;
16 |
17 | img {
18 | width: 100%;
19 | }
20 | }
21 | .filter{
22 | position: absolute;
23 | z-index: 2;
24 | background-color: rgba(0,0,0,.68);
25 | top: 0;
26 | left: 0;
27 | width: 100%;
28 | height: 100%;
29 | text-align: center;
30 |
31 | @include opacity(0);
32 |
33 | .btn{
34 | @include vertical-align();
35 | }
36 | }
37 | &:hover .filter{
38 | @include opacity(1);
39 | }
40 | .btn-hover{
41 | @include opacity(0);
42 | }
43 | &:hover .btn-hover{
44 | @include opacity(1);
45 | }
46 | .content{
47 | padding: 15px 15px 10px 15px;
48 | }
49 | .header{
50 | padding: 15px 15px 0;
51 | }
52 | .category,
53 | label{
54 | font-size: $font-size-base;
55 | font-weight: $font-weight-normal;
56 | color: $dark-gray;
57 | margin-bottom: 0px;
58 |
59 | i{
60 | font-size: $font-paragraph;
61 | }
62 | }
63 |
64 | label{
65 | font-size: $font-size-small;
66 | margin-bottom: 5px;
67 | text-transform: uppercase;
68 | }
69 |
70 | .title{
71 | margin: $none;
72 | color: $black-color;
73 | font-weight: $font-weight-light;
74 | }
75 | .avatar{
76 | width: 30px;
77 | height: 30px;
78 | overflow: hidden;
79 | border-radius: 50%;
80 | margin-right: 5px;
81 | }
82 | .description{
83 | font-size: $font-size-base;
84 | color: #333;
85 | }
86 | .footer{
87 | padding: 0;
88 | background-color: $transparent-bg;
89 | line-height: 30px;
90 |
91 | .legend{
92 | padding: 5px 0;
93 | }
94 |
95 | hr{
96 | margin-top: 5px;
97 | margin-bottom: 5px;
98 | }
99 | }
100 | .stats{
101 | color: #a9a9a9;
102 | }
103 | .footer div{
104 | display: inline-block;
105 | }
106 |
107 | .author{
108 | font-size: $font-size-small;
109 | font-weight: $font-weight-bold;
110 | text-transform: uppercase;
111 | }
112 | .author i{
113 | font-size: $font-size-base;
114 | }
115 | h6{
116 | font-size: $font-size-small;
117 | margin: 0;
118 | }
119 | &.card-separator:after{
120 | height: 100%;
121 | right: -15px;
122 | top: 0;
123 | width: 1px;
124 | background-color: $medium-gray;
125 | content: "";
126 | position: absolute;
127 | }
128 |
129 | .ct-chart{
130 | margin: 30px 0 30px;
131 | height: 245px;
132 | }
133 |
134 | .table{
135 | tbody td:first-child,
136 | thead th:first-child{
137 | padding-left: 15px;
138 | }
139 |
140 | tbody td:last-child,
141 | thead th:last-child{
142 | padding-right: 15px;
143 | }
144 | }
145 |
146 | .alert{
147 | border-radius: $border-radius-base;
148 | position: relative;
149 |
150 | &.alert-with-icon{
151 | padding-left: 65px;
152 | }
153 | }
154 | }
155 | .card-user{
156 | .image{
157 | height: 110px;
158 | }
159 | .image-plain{
160 | height: 0;
161 | margin-top: 110px;
162 | }
163 | .author{
164 | text-align: center;
165 | text-transform: none;
166 | margin-top: -70px;
167 | }
168 | .avatar{
169 | width: 124px;
170 | height: 124px;
171 | border: 5px solid #FFFFFF;
172 | position: relative;
173 | margin-bottom: 15px;
174 |
175 | &.border-gray{
176 | border-color: #EEEEEE;
177 | }
178 | }
179 | .title{
180 | line-height: 24px;
181 | }
182 | .content{
183 | min-height: 240px;
184 | }
185 | }
186 |
187 | .card-user,
188 | .card-price{
189 | .footer{
190 | padding: 5px 15px 10px;
191 | }
192 | hr{
193 | margin: 5px 15px;
194 | }
195 | }
196 | .card-plain{
197 | background-color: transparent;
198 | box-shadow: none;
199 | border-radius: 0;
200 |
201 | .image{
202 | border-radius: 4px;
203 | }
204 | }
205 |
206 |
207 |
208 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_checkbox-radio-switch.scss:
--------------------------------------------------------------------------------
1 | /* Checkbox and radio */
2 | .checkbox,
3 | .radio {
4 | margin-bottom: 12px;
5 | padding-left: 32px;
6 | position: relative;
7 | -webkit-transition: color 0.25s linear;
8 | transition: color 0.25s linear;
9 | font-size: 14px;
10 | font-weight: normal;
11 | line-height: 1.5;
12 | color: #333333;
13 | }
14 | .checkbox input,
15 | .radio input {
16 | outline: none !important;
17 | display: none;
18 | }
19 | .checkbox .icons,
20 | .radio .icons {
21 | color: $medium-gray;
22 | display: block;
23 | height: 20px;
24 | left: 0;
25 | position: absolute;
26 | top: 0;
27 | width: 20px;
28 | text-align: center;
29 | line-height: 21px;
30 | font-size: 20px;
31 | cursor: pointer;
32 | -webkit-transition: color 0.2s linear;
33 | transition: color 0.2s linear;
34 | }
35 |
36 |
37 | .checkbox .icons .first-icon,
38 | .radio .icons .first-icon,
39 | .checkbox .icons .second-icon,
40 | .radio .icons .second-icon {
41 | display: inline-table;
42 | position: absolute;
43 | left: 0;
44 | top: 0;
45 | background-color: transparent;
46 | margin: 0;
47 | @include opacity(1);
48 | }
49 | .checkbox .icons .second-icon,
50 | .radio .icons .second-icon {
51 | @include opacity(0);
52 | }
53 | .checkbox:hover,
54 | .radio:hover {
55 | -webkit-transition: color 0.2s linear;
56 | transition: color 0.2s linear;
57 | }
58 | .checkbox:hover .first-icon,
59 | .radio:hover .first-icon {
60 | @include opacity(0);
61 | }
62 | .checkbox:hover .second-icon,
63 | .radio:hover .second-icon {
64 | @include opacity (1);
65 | }
66 | .checkbox.checked,
67 | .radio.checked {
68 | color: $info-color;
69 | }
70 | .checkbox.checked .first-icon,
71 | .radio.checked .first-icon {
72 | opacity: 0;
73 | filter: alpha(opacity=0);
74 | }
75 | .checkbox.checked .second-icon,
76 | .radio.checked .second-icon {
77 | opacity: 1;
78 | filter: alpha(opacity=100);
79 | color: $info-color;
80 | -webkit-transition: color 0.2s linear;
81 | transition: color 0.2s linear;
82 | }
83 | .checkbox.disabled,
84 | .radio.disabled {
85 | cursor: default;
86 | color: $medium-gray !important;
87 | }
88 | .checkbox.disabled .icons,
89 | .radio.disabled .icons {
90 | color: $medium-gray !important;
91 | }
92 | .checkbox.disabled .first-icon,
93 | .radio.disabled .first-icon {
94 | opacity: 1;
95 | filter: alpha(opacity=100);
96 | }
97 | .checkbox.disabled .second-icon,
98 | .radio.disabled .second-icon {
99 | opacity: 0;
100 | filter: alpha(opacity=0);
101 | }
102 | .checkbox.disabled.checked .icons,
103 | .radio.disabled.checked .icons {
104 | color: $medium-gray;
105 | }
106 | .checkbox.disabled.checked .first-icon,
107 | .radio.disabled.checked .first-icon {
108 | opacity: 0;
109 | filter: alpha(opacity=0);
110 | }
111 | .checkbox.disabled.checked .second-icon,
112 | .radio.disabled.checked .second-icon {
113 | opacity: 1;
114 | filter: alpha(opacity=100);
115 | color: #D9D9D9;
116 | }
117 |
118 |
119 |
120 | /* ============================================================
121 | * bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
122 | * http://www.larentis.eu/switch/
123 | * ============================================================
124 | * Licensed under the Apache License, Version 2.0
125 | * http://www.apache.org/licenses/LICENSE-2.0
126 | * ============================================================ */
127 | .has-switch {
128 | border-radius: 30px;
129 | cursor: pointer;
130 | display: inline-block;
131 | line-height: 1.72222;
132 | overflow: hidden;
133 | position: relative;
134 | text-align: left;
135 | width: 60px;
136 |
137 | -webkit-user-select: none;
138 | -moz-user-select: none;
139 | -ms-user-select: none;
140 | -o-user-select: none;
141 | user-select: none;
142 |
143 | /* this code is for fixing safari bug with hidden overflow for border-radius */
144 | -webkit-mask: url('../../img/mask.png') 0 0 no-repeat;
145 | -webkit-mask-size: 60px 24px;
146 | mask: url('../../img/mask.png') 0 0 no-repeat;
147 | }
148 | .has-switch.deactivate {
149 | opacity: 0.5;
150 | filter: alpha(opacity=50);
151 | cursor: default !important;
152 | }
153 | .has-switch.deactivate label,
154 | .has-switch.deactivate span {
155 | cursor: default !important;
156 | }
157 | .has-switch > div {
158 | position: relative;
159 | top: 0;
160 | width: 100px;
161 | }
162 | .has-switch > div.switch-animate {
163 | -webkit-transition: left 0.25s ease-out;
164 | transition: left 0.25s ease-out;
165 | }
166 | .has-switch > div.switch-off {
167 | left: -35px;
168 | }
169 |
170 | .has-switch > div.switch-on {
171 | left: 0;
172 | }
173 | .has-switch > div label {
174 | background-color: #FFFFFF;
175 | @include icon-gradient (rgba(255,255,255,1), rgba(241,241,242,1));
176 |
177 | box-shadow: 0 1px 1px #FFFFFF inset, 0 1px 1px rgba(0, 0, 0, 0.25);
178 | cursor: pointer;
179 | }
180 | .has-switch input[type=checkbox] {
181 | display: none;
182 | }
183 | .has-switch span {
184 | /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset; */
185 | cursor: pointer;
186 | float: left;
187 | font-size: 11px;
188 | font-weight: 400;
189 | height: 24px;
190 | line-height: 15px;
191 | margin: 0;
192 | padding-bottom: 6px;
193 | padding-top: 5px;
194 | position: relative;
195 | text-align: center;
196 | text-indent: -10px;
197 | width: 50%;
198 | z-index: 1;
199 | -webkit-transition: 0.25s ease-out;
200 | transition: 0.25s ease-out;
201 | }
202 | .has-switch span.switch-left {
203 | background-color: $info-color;
204 | border-left: 1px solid rgba(0, 0, 0, 0);
205 | border-radius: 30px 0 0 30px;
206 | color: #FFFFFF;
207 | }
208 | .has-switch .switch-off span.switch-left{
209 | background-color: $medium-gray;
210 | }
211 | .has-switch span.switch-right {
212 | border-radius: 0 30px 30px 0;
213 | background-color: $info-color;
214 | color: #ffffff;
215 | text-indent: 1px;
216 | }
217 | .has-switch .switch-off span.switch-right{
218 | background-color: $medium-gray;
219 | }
220 |
221 | .has-switch label {
222 | border-radius: 12px;
223 | float: left;
224 | height: 22px;
225 | margin: 1px -13px;
226 | padding: 0;
227 | position: relative;
228 | transition: all 0.25s ease-out 0s;
229 | vertical-align: middle;
230 | width: 22px;
231 | z-index: 100;
232 | -webkit-transition: 0.25s ease-out;
233 | transition: 0.25s ease-out;
234 | }
235 | .has-switch .switch-on .fa-check:before{
236 | margin-left: 10px;
237 | }
238 | .has-switch:hover .switch-on label{
239 | margin: 1px -17px;
240 | width: 26px;
241 | }
242 | .has-switch:hover .switch-off label{
243 | margin: 1px -13px;
244 | width: 26px;
245 | }
246 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_dropdown.scss:
--------------------------------------------------------------------------------
1 | .dropdown-menu{
2 | visibility: hidden;
3 | margin: 0;
4 | padding: 0;
5 | border-radius: $border-radius-extreme;
6 | display: block;
7 | z-index: 9000;
8 | position: absolute;
9 |
10 | @include opacity(0);
11 | @include box-shadow($dropdown-shadow);
12 |
13 | .open &{
14 | @include opacity(1);
15 | visibility: visible;
16 | }
17 | .select &{
18 | border-radius: $border-radius-bottom;
19 | @include box-shadow(none);
20 | @include transform-origin($select-coordinates);
21 | @include transform-scale(1);
22 | @include transition($fast-transition-time, $transition-linear);
23 | margin-top: -20px;
24 | }
25 | .select.open &{
26 | margin-top: -1px;
27 | }
28 |
29 | > li > a {
30 | padding: $padding-base-vertical $padding-base-horizontal;
31 | color: #333333;
32 |
33 | img{
34 | margin-top: -3px;
35 | }
36 | }
37 | > li > a:focus{
38 | outline: 0 !important;
39 | }
40 |
41 | .btn-group.select &{
42 | min-width: 100%;
43 | }
44 |
45 | > li:first-child > a{
46 | border-top-left-radius: $border-radius-extreme;
47 | border-top-right-radius: $border-radius-extreme;
48 | }
49 |
50 | > li:last-child > a{
51 | border-bottom-left-radius: $border-radius-extreme;
52 | border-bottom-right-radius: $border-radius-extreme;
53 | }
54 |
55 | .select & > li:first-child > a{
56 | border-radius: 0;
57 | border-bottom: 0 none;
58 | }
59 |
60 | > li > a:hover,
61 | > li > a:focus {
62 | background-color: $smoke-bg;
63 | color: #333333;
64 | opacity: 1;
65 | text-decoration: none;
66 | }
67 |
68 | &.dropdown-blue > li > a:hover,
69 | &.dropdown-blue > li > a:focus{
70 | background-color: $light-blue;
71 | }
72 | &.dropdown-azure > li > a:hover,
73 | &.dropdown-azure > li > a:focus{
74 | background-color: $light-azure;
75 | }
76 | &.ct-green > li > a:hover,
77 | &.ct-green > li > a:focus{
78 | background-color: $light-green;
79 | }
80 | &.dropdown-orange > li > a:hover,
81 | &.dropdown-orange > li > a:focus{
82 | background-color: $light-orange;
83 | }
84 | &.dropdown-red > li > a:hover,
85 | &.dropdown-red > li > a:focus{
86 | background-color: $light-red;
87 | }
88 |
89 | }
90 |
91 | .dropdown-with-icons{
92 | > li > a{
93 | padding-left: 0px;
94 | line-height: 28px;
95 | }
96 | i{
97 | text-align: center;
98 | line-height: 28px;
99 | float: left;
100 |
101 | &[class^="pe-"]{
102 | font-size: 24px;
103 | width: 46px;
104 | }
105 | &[class^="fa"]{
106 | font-size: 14px;
107 | width: 38px;
108 | }
109 | }
110 | }
111 |
112 | //fix bug for the select items in btn-group
113 | .btn-group.select{
114 | overflow: hidden;
115 | }
116 | .btn-group.select.open{
117 | overflow: visible;
118 | }
119 |
120 |
121 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_footers.scss:
--------------------------------------------------------------------------------
1 | .footer{
2 | background-color: $white-color;
3 | line-height: $line-height;
4 |
5 | nav > ul{
6 | list-style: none;
7 | margin: 0;
8 | padding: 0;
9 | font-weight: normal;
10 |
11 | a:not(.btn){
12 | color: $dark-gray;
13 | display: block;
14 | margin-bottom: 3px;
15 | &:hover,
16 | &:focus{
17 | color: $default-states-color;
18 | }
19 | }
20 | }
21 | .social-area{
22 | padding: 15px 0;
23 | h5{
24 | padding-bottom: 15px;
25 | }
26 | }
27 | .social-area > a:not(.btn){
28 | color: $dark-gray;
29 | display: inline-block;
30 | vertical-align: top;
31 | padding: $padding-social-a;
32 | font-size: $font-size-large-navbar;
33 | font-weight: normal;
34 | line-height: $line-height;
35 | text-align: center;
36 | &:hover,
37 | &:focus{
38 | color: $default-states-color;
39 | }
40 | }
41 | .copyright{
42 | color: $default-states-color;
43 | padding: 10px 15px;
44 | margin: 10px 3px;
45 | line-height: 20px;
46 | font-size: $font-size-base;
47 | }
48 | hr{
49 | border-color: $medium-gray;
50 | }
51 | .title{
52 | color: $default-states-color;
53 | }
54 | }
55 |
56 | .footer-default{
57 | background-color: $smoke-bg;
58 | }
59 |
60 | .footer:not(.footer-big){
61 | nav > ul{
62 | font-size: $font-size-base;
63 | li{
64 | margin-left: 20px;
65 | float: left;
66 | }
67 | a{
68 | padding: 10px 0px;
69 | margin: 10px 10px 10px 0px;
70 | }
71 | }
72 | }
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_inputs.scss:
--------------------------------------------------------------------------------
1 | .form-control::-moz-placeholder{
2 | @include placeholder($medium-gray,1);
3 | }
4 | .form-control:-moz-placeholder{
5 | @include placeholder($medium-gray,1);
6 | }
7 | .form-control::-webkit-input-placeholder{
8 | @include placeholder($medium-gray,1);
9 | }
10 | .form-control:-ms-input-placeholder{
11 | @include placeholder($medium-gray,1);
12 | }
13 |
14 | .form-control {
15 | background-color: $white-bg;
16 | border: 1px solid $light-gray;
17 | border-radius: $border-radius-base;
18 | color: #565656;
19 | @include input-size($padding-base-vertical, $padding-base-horizontal - 4, $height-base);
20 | @include box-shadow(none);
21 |
22 | &:focus{
23 | background-color: $white-bg;
24 | border: 1px solid $medium-dark-gray;
25 | @include box-shadow(none);
26 | outline: 0 !important;
27 | color: #333333;
28 | }
29 |
30 | .has-success &,
31 | .has-error &,
32 | .has-success &:focus,
33 | .has-error &:focus{
34 | border-color: $light-gray;
35 | @include box-shadow(none);
36 | }
37 |
38 | .has-success &{
39 | color: $success-color;
40 | }
41 | .has-success &:focus{
42 | border-color: $success-color;
43 | }
44 | .has-error &{
45 | color: $danger-color;
46 | }
47 | .has-error &:focus{
48 | border-color: $danger-color;
49 | }
50 |
51 | & + .form-control-feedback{
52 | border-radius: $border-radius-large;
53 | font-size: $font-size-base;
54 | margin-top: -7px;
55 | position: absolute;
56 | right: 10px;
57 | top: 50%;
58 | vertical-align: middle;
59 | }
60 |
61 | .open &{
62 | border-radius: $border-radius-base $border-radius-base 0 0;
63 | border-bottom-color: transparent;
64 | }
65 | }
66 |
67 | .input-lg{
68 | height: 55px;
69 | padding: $padding-large-vertical $padding-large-horizontal;
70 | }
71 |
72 | .has-error{
73 | .form-control-feedback{
74 | color: $danger-color;
75 | }
76 | }
77 | .has-success{
78 | .form-control-feedback{
79 | color: $success-color
80 | }
81 | }
82 |
83 |
84 | .input-group-addon {
85 | background-color: $white-color;
86 | border: 1px solid $light-gray;
87 | border-radius: $border-radius-base;
88 |
89 | .has-success &,
90 | .has-error &{
91 | background-color: $white-color;
92 | border: 1px solid $light-gray;
93 | }
94 | .has-error .form-control:focus + &{
95 | border-color: $danger-color;
96 | color: $danger-color;
97 | }
98 | .has-success .form-control:focus + &{
99 | border-color: $success-color;
100 | color: $success-color;
101 | }
102 | .form-control:focus + &,
103 | .form-control:focus ~ &{
104 | background-color: $white-color;
105 | border-color: $dark-gray;
106 | }
107 | }
108 |
109 | .input-group .form-control:first-child,
110 | .input-group-addon:first-child,
111 | .input-group-btn:first-child > .dropdown-toggle,
112 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) {
113 | border-right: 0 none;
114 | }
115 | .input-group .form-control:last-child,
116 | .input-group-addon:last-child,
117 | .input-group-btn:last-child > .dropdown-toggle,
118 | .input-group-btn:first-child > .btn:not(:first-child) {
119 | border-left: 0 none;
120 | }
121 | .form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
122 | background-color: $smoke-bg;
123 | color: $default-color;
124 | cursor: not-allowed;
125 | }
126 |
127 | .input-group-btn .btn{
128 | border-width: $border-thin;
129 | padding: $padding-round-vertical $padding-base-horizontal;
130 | }
131 | .input-group-btn .btn-default:not(.btn-fill){
132 | border-color: $medium-gray;
133 | }
134 |
135 | .input-group-btn:last-child > .btn{
136 | margin-left: 0;
137 | }
138 |
139 | .input-group-focus .input-group-addon{
140 | border-color: $dark-gray;
141 | }
142 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_misc.scss:
--------------------------------------------------------------------------------
1 | /* General overwrite */
2 | body,
3 | .wrapper{
4 | min-height: 100vh;
5 | position: relative;
6 | }
7 | a{
8 | color: $info-color;
9 |
10 | &:hover, &:focus{
11 | color: $info-states-color;
12 | text-decoration: none;
13 | }
14 | }
15 |
16 | a:focus, a:active,
17 | button::-moz-focus-inner,
18 | input::-moz-focus-inner,
19 | input[type="reset"]::-moz-focus-inner,
20 | input[type="button"]::-moz-focus-inner,
21 | input[type="submit"]::-moz-focus-inner,
22 | select::-moz-focus-inner,
23 | input[type="file"] > input[type="button"]::-moz-focus-inner{
24 | outline:0;
25 | }
26 | .ui-slider-handle:focus,
27 | .navbar-toggle,
28 | input:focus {
29 | outline : 0 !important;
30 | }
31 |
32 | /* Animations */
33 | .form-control,
34 | .input-group-addon,
35 | .tagsinput,
36 | .navbar,
37 | .navbar .alert{
38 | @include transition($general-transition-time, $transition-linear);
39 | }
40 |
41 | .sidebar .nav a,
42 | .table > tbody > tr .td-actions .btn{
43 | @include transition($fast-transition-time, $transition-ease-in);
44 | }
45 |
46 | .btn{
47 | @include transition($ultra-fast-transition-time, $transition-ease-in);
48 | }
49 | .fa{
50 | width: 18px;
51 | text-align: center;
52 | }
53 | .margin-top{
54 | margin-top: 50px;
55 | }
56 |
57 | .wrapper{
58 | position: relative;
59 | top: 0;
60 | height: 100vh;
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_mixins.scss:
--------------------------------------------------------------------------------
1 | //Utilities
2 |
3 | @import "mixins/transparency";
4 | @import "mixins/vendor-prefixes";
5 |
6 |
7 | //Components
8 |
9 | @import "mixins/buttons";
10 | @import "mixins/inputs";
11 | @import "mixins/labels";
12 | @import "mixins/tabs";
13 |
14 | @import "mixins/navbars";
15 | @import "mixins/icons";
16 | @import "mixins/social-buttons";
17 |
18 | @import "mixins/morphing-buttons";
19 |
20 | @import "mixins/cards";
21 |
22 | @import "mixins/chartist";
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_tables.scss:
--------------------------------------------------------------------------------
1 | .table{
2 |
3 | .radio,
4 | .checkbox{
5 | position: relative;
6 | height: 20px;
7 | display: block;
8 | width: 20px;
9 | padding: 0px 0px;
10 | margin: 0px 5px;
11 | text-align: center;
12 |
13 | .icons{
14 | left: 5px;
15 | }
16 | }
17 | > thead > tr > th,
18 | > tbody > tr > th,
19 | > tfoot > tr > th,
20 | > thead > tr > td,
21 | > tbody > tr > td,
22 | > tfoot > tr > td{
23 | padding: 12px 8px;
24 | vertical-align: middle;
25 | }
26 |
27 | > thead > tr > th{
28 | border-bottom-width: 1px;
29 | font-size: $font-size-small;
30 | text-transform: uppercase;
31 | color: $dark-gray;
32 | font-weight: $font-weight-normal;
33 | padding-bottom: 5px;
34 | }
35 |
36 | .td-actions .btn{
37 | @include opacity(0.36);
38 |
39 | &.btn-xs{
40 | padding-left: 3px;
41 | padding-right: 3px;
42 | }
43 | }
44 | .td-actions{
45 | min-width: 90px;
46 | }
47 |
48 | > tbody > tr{
49 | position: relative;
50 |
51 | &:hover{
52 | .td-actions .btn{
53 | @include opacity(1);
54 | }
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/_typography.scss:
--------------------------------------------------------------------------------
1 | /* Font Smoothing */
2 | body,
3 | h1, .h1,
4 | h2, .h2,
5 | h3, .h3,
6 | h4, .h4,
7 | h5, .h5,
8 | h6, .h6,
9 | p,
10 | .navbar,
11 | .brand,
12 | .btn-simple,
13 | .alert,
14 | a,
15 | .td-name,
16 | td,
17 | button.close{
18 | -moz-osx-font-smoothing: grayscale;
19 | -webkit-font-smoothing: antialiased;
20 | font-family: "Roboto","Helvetica Neue",Arial,sans-serif;
21 | font-weight: $font-weight-normal;
22 | }
23 |
24 | h1, .h1, h2, .h2, h3, .h3, h4, .h4{
25 | font-weight: $font-weight-light;
26 | margin: $margin-large-vertical 0 $margin-base-vertical;
27 | }
28 |
29 | h1, .h1 {
30 | font-size: $font-size-h1;
31 | }
32 | h2, .h2{
33 | font-size: $font-size-h2;
34 | }
35 | h3, .h3{
36 | font-size: $font-size-h3;
37 | margin: 20px 0 10px;
38 | }
39 | h4, .h4{
40 | font-size: $font-size-h4;
41 | line-height: 30px;
42 | }
43 | h5, .h5 {
44 | font-size: $font-size-h5;
45 | margin-bottom: 15px;
46 | }
47 | h6, .h6{
48 | font-size: $font-size-h6;
49 | font-weight: $font-weight-bold;
50 | text-transform: uppercase;
51 | }
52 | p{
53 | font-size: $font-paragraph;
54 | line-height: $line-height-general;
55 | }
56 |
57 | h1 small, h2 small, h3 small, h4 small, h5 small, h6 small, .h1 small, .h2 small, .h3 small, .h4 small, .h5 small, .h6 small, h1 .small, h2 .small, h3 .small, h4 .small, h5 .small, h6 .small, .h1 .small, .h2 .small, .h3 .small, .h4 .small, .h5 .small, .h6 .small {
58 | color: $dark-gray;
59 | font-weight: $font-weight-light;
60 | line-height: $line-height-general;
61 | }
62 |
63 | h1 small, h2 small, h3 small, h1 .small, h2 .small, h3 .small {
64 | font-size: 60%;
65 | }
66 |
67 | h1 .subtitle{
68 | display: block;
69 | margin: 0 0 $margin-large-vertical;
70 | }
71 |
72 | .text-muted{
73 | color: #9A9A9A;
74 | }
75 | .text-primary, .text-primary:hover{
76 | color: #1D62F0 !important;
77 | }
78 | .text-info, .text-info:hover{
79 | color: $info-color !important;
80 | }
81 | .text-success, .text-success:hover{
82 | color: $success-color !important;
83 | }
84 | .text-warning, .text-warning:hover{
85 | color: $warning-color !important;
86 | }
87 | .text-danger, .text-danger:hover{
88 | color: $danger-color !important;
89 | }
90 |
91 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_buttons.scss:
--------------------------------------------------------------------------------
1 | // Mixin for generating new styles
2 | @mixin btn-styles($btn-color, $btn-states-color) {
3 | border-color: $btn-color;
4 | color: $btn-color;
5 |
6 | &:hover,
7 | &:focus,
8 | &:active,
9 | &.active,
10 | .open > &.dropdown-toggle {
11 | background-color: $transparent-bg;
12 | color: $btn-states-color;
13 | border-color: $btn-states-color;
14 | }
15 |
16 | &.disabled,
17 | &:disabled,
18 | &[disabled],
19 | fieldset[disabled] & {
20 | &,
21 | &:hover,
22 | &:focus,
23 | &.focus,
24 | &:active,
25 | &.active {
26 | background-color: $transparent-bg;
27 | border-color: $btn-color;
28 | }
29 | }
30 |
31 |
32 | &.btn-fill {
33 | color: $white-color;
34 | background-color: $btn-color;
35 | @include opacity(1);
36 |
37 | &:hover,
38 | &:focus,
39 | &:active,
40 | &.active,
41 | .open > &.dropdown-toggle{
42 | background-color: $btn-states-color;
43 | color: $white-color;
44 | }
45 |
46 | .caret{
47 | border-top-color: $white-color;
48 | }
49 | }
50 |
51 | .caret{
52 | border-top-color: $btn-color;
53 | }
54 | }
55 |
56 |
57 | @mixin btn-size($padding-vertical, $padding-horizontal, $font-size, $border){
58 | font-size: $font-size;
59 | border-radius: $border;
60 | padding: $padding-vertical $padding-horizontal;
61 |
62 | &.btn-round{
63 | padding: $padding-vertical + 1 $padding-horizontal;
64 | }
65 |
66 | &.btn-simple{
67 | padding: $padding-vertical + 2 $padding-horizontal;
68 | }
69 |
70 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_cards.scss:
--------------------------------------------------------------------------------
1 | @mixin filter($color){
2 | @if $color == #FFFFFF{
3 | background-color: rgba($color,.91);
4 | } @else {
5 | background-color: rgba($color,.69);
6 | }
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_chartist.scss:
--------------------------------------------------------------------------------
1 | // Scales for responsive SVG containers
2 | $ct-scales: ((1), (15/16), (8/9), (5/6), (4/5), (3/4), (2/3), (5/8), (1/1.618), (3/5), (9/16), (8/15), (1/2), (2/5), (3/8), (1/3), (1/4)) !default;
3 | $ct-scales-names: (ct-square, ct-minor-second, ct-major-second, ct-minor-third, ct-major-third, ct-perfect-fourth, ct-perfect-fifth, ct-minor-sixth, ct-golden-section, ct-major-sixth, ct-minor-seventh, ct-major-seventh, ct-octave, ct-major-tenth, ct-major-eleventh, ct-major-twelfth, ct-double-octave) !default;
4 |
5 | // Class names to be used when generating CSS
6 | $ct-class-chart: ct-chart !default;
7 | $ct-class-chart-line: ct-chart-line !default;
8 | $ct-class-chart-bar: ct-chart-bar !default;
9 | $ct-class-horizontal-bars: ct-horizontal-bars !default;
10 | $ct-class-chart-pie: ct-chart-pie !default;
11 | $ct-class-chart-donut: ct-chart-donut !default;
12 | $ct-class-label: ct-label !default;
13 | $ct-class-series: ct-series !default;
14 | $ct-class-line: ct-line !default;
15 | $ct-class-point: ct-point !default;
16 | $ct-class-area: ct-area !default;
17 | $ct-class-bar: ct-bar !default;
18 | $ct-class-slice-pie: ct-slice-pie !default;
19 | $ct-class-slice-donut: ct-slice-donut !default;
20 | $ct-class-grid: ct-grid !default;
21 | $ct-class-vertical: ct-vertical !default;
22 | $ct-class-horizontal: ct-horizontal !default;
23 | $ct-class-start: ct-start !default;
24 | $ct-class-end: ct-end !default;
25 |
26 | // Container ratio
27 | $ct-container-ratio: (1/1.618) !default;
28 |
29 | // Text styles for labels
30 | $ct-text-color: rgba(0, 0, 0, 0.4) !default;
31 | $ct-text-size: 1.3rem !default;
32 | $ct-text-align: flex-start !default;
33 | $ct-text-justify: flex-start !default;
34 | $ct-text-line-height: 1;
35 |
36 | // Grid styles
37 | $ct-grid-color: rgba(0, 0, 0, 0.2) !default;
38 | $ct-grid-dasharray: 2px !default;
39 | $ct-grid-width: 1px !default;
40 |
41 | // Line chart properties
42 | $ct-line-width: 3px !default;
43 | $ct-line-dasharray: false !default;
44 | $ct-point-size: 8px !default;
45 | // Line chart point, can be either round or square
46 | $ct-point-shape: round !default;
47 | // Area fill transparency between 0 and 1
48 | $ct-area-opacity: 0.8 !default;
49 |
50 | // Bar chart bar width
51 | $ct-bar-width: 10px !default;
52 |
53 | // Donut width (If donut width is to big it can cause issues where the shape gets distorted)
54 | $ct-donut-width: 60px !default;
55 |
56 | // If set to true it will include the default classes and generate CSS output. If you're planning to use the mixins you
57 | // should set this property to false
58 | $ct-include-classes: true !default;
59 |
60 | // If this is set to true the CSS will contain colored series. You can extend or change the color with the
61 | // properties below
62 | $ct-include-colored-series: $ct-include-classes !default;
63 |
64 | // If set to true this will include all responsive container variations using the scales defined at the top of the script
65 | $ct-include-alternative-responsive-containers: $ct-include-classes !default;
66 |
67 | // Series names and colors. This can be extended or customized as desired. Just add more series and colors.
68 | $ct-series-names: (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) !default;
69 | $ct-series-colors: (
70 | $new-blue,
71 | $new-red,
72 | $new-orange,
73 | $new-purple,
74 | $new-green,
75 | $new-dark-blue,
76 | $new-black,
77 | $social-google,
78 | $social-tumblr,
79 | $social-youtube,
80 | $social-twitter,
81 | $social-pinterest,
82 | $social-behance,
83 | #6188e2,
84 | #a748ca
85 | ) !default;
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_icons.scss:
--------------------------------------------------------------------------------
1 | @mixin icon-background ($icon-url){
2 | background-image : url($icon-url);
3 |
4 | }
5 |
6 | @mixin icon-shape ($size, $padding, $border-radius) {
7 | height: $size;
8 | width: $size;
9 | padding: $padding;
10 | border-radius: $border-radius;
11 | display: inline-table;
12 |
13 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_inputs.scss:
--------------------------------------------------------------------------------
1 | @mixin input-size($padding-vertical, $padding-horizontal, $height){
2 | padding: $padding-vertical $padding-horizontal;
3 | height: $height;
4 | }
5 |
6 | @mixin placeholder($color, $opacity){
7 | color: $color;
8 | @include opacity(1);
9 | }
10 |
11 | @mixin light-form(){
12 | border-radius: 0;
13 | border:0;
14 | padding: 0;
15 | background-color: transparent;
16 |
17 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_labels.scss:
--------------------------------------------------------------------------------
1 | @mixin label-style(){
2 | padding: $padding-label-vertical $padding-label-horizontal;
3 | border: 1px solid $default-color;
4 | border-radius: $border-radius-small;
5 | color: $default-color;
6 | font-weight: $font-weight-semi;
7 | font-size: $font-size-small;
8 | text-transform: uppercase;
9 | display: inline-block;
10 | vertical-align: middle;
11 | }
12 |
13 | @mixin label-color($color){
14 | border-color: $color;
15 | color: $color;
16 | }
17 | @mixin label-color-fill($color){
18 | border-color: $color;
19 | color: $white-color;
20 | background-color: $color;
21 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_morphing-buttons.scss:
--------------------------------------------------------------------------------
1 | $prefixes: ('', '-moz-', '-webkit-', '-ms-') !default;
2 |
3 | @mixin circle-animation(){
4 | @for $i from 0 to length($prefixes) {
5 | @include circle-animation-details(nth($prefixes, $i + 1));
6 | }
7 | }
8 |
9 | @mixin circle-animation-details($name){
10 | #{$name}animation-name: spin;
11 | #{$name}animation-duration: 1250ms;
12 | #{$name}animation-iteration-count: infinite;
13 | #{$name}animation-timing-function: linear;
14 |
15 | }
16 | @keyframes spin {
17 | from { transform:rotate(0deg); }
18 | to { transform:rotate(360deg); }
19 | }
20 |
21 | @-webkit-keyframes spin {
22 | from { -webkit-transform: rotate(0deg); }
23 | to { -webkit-transform: rotate(360deg); }
24 | }
25 |
26 | @-moz-keyframes spin {
27 | from { -moz-transform: rotate(0deg); }
28 | to { -moz-transform: rotate(360deg); }
29 | }
30 |
31 | @-ms-keyframes spin {
32 | from { -ms-transform: rotate(0deg); }
33 | to { -ms-transform: rotate(360deg); }
34 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_navbars.scss:
--------------------------------------------------------------------------------
1 | @mixin navbar-color($color){
2 | background-color: $color;
3 | }
4 |
5 | @mixin center-item(){
6 | left: 0;
7 | right: 0;
8 | margin-right: auto;
9 | margin-left: auto;
10 | position: absolute;
11 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_social-buttons.scss:
--------------------------------------------------------------------------------
1 | @mixin social-buttons-color ($color){
2 |
3 | border-color: $color;
4 | color: $color;
5 |
6 | &:hover,
7 | &:focus,
8 | &:active,
9 | &.active,
10 | .open > &.dropdown-toggle {
11 | background-color: $transparent-bg;
12 | color: $color;
13 | border-color: $color;
14 | opacity: 1;
15 | }
16 |
17 | &:disabled,
18 | &[disabled],
19 | &.disabled {
20 | background-color: $transparent-bg;
21 | border-color: $color;
22 | }
23 |
24 | &.btn-fill {
25 | color: $white-color;
26 | background-color: $color;
27 | opacity: 0.9;
28 |
29 | &:hover,
30 | &:focus,
31 | &:active,
32 | &.active,
33 | .open > &.dropdown-toggle{
34 | background-color: $color;
35 | color: $white-color;
36 | opacity: 1;
37 | }
38 |
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_tabs.scss:
--------------------------------------------------------------------------------
1 | @mixin pill-style($color){
2 | border: 1px solid $color;
3 | color: $color;
4 | }
--------------------------------------------------------------------------------
/resources/assets/sass/lbd/mixins/_transparency.scss:
--------------------------------------------------------------------------------
1 | // Opacity
2 |
3 | @mixin opacity($opacity) {
4 | opacity: $opacity;
5 | // IE8 filter
6 | $opacity-ie: ($opacity * 100);
7 | filter: #{alpha(opacity=$opacity-ie)};
8 | }
9 |
10 | @mixin black-filter($opacity){
11 | top: 0;
12 | left: 0;
13 | height: 100%;
14 | width: 100%;
15 | position: absolute;
16 | background-color: rgba(17,17,17,$opacity);
17 | display: block;
18 | content: "";
19 | z-index: 1;
20 | }
--------------------------------------------------------------------------------
/resources/assets/sass/light-bootstrap-dashboard.scss:
--------------------------------------------------------------------------------
1 |
2 | // Fonts
3 | @import url("http://fonts.googleapis.com/css?family=Roboto:400,700,300");
4 |
5 | // Bootstrap
6 | @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
7 |
8 | // Bootstrap Select
9 | @import "node_modules/bootstrap-select/sass/bootstrap-select";
10 |
11 | // Bootstrap Switch
12 | @import "node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch";
13 |
14 | // Chartist
15 | // @import "node_modules/chartist/dist/scss/chartist";
16 |
17 | // Animate CSS
18 | @import "node_modules/animate.css/animate";
19 |
20 | // Font Awesome
21 | @import "node_modules/font-awesome/scss/font-awesome";
22 |
23 | // Pixeden Stroke 7 Icon
24 | @import "node_modules/pixeden-stroke-7-icon/pe-icon-7-stroke/scss/pe-icon-7-stroke";
25 |
26 | /*!
27 |
28 | =========================================================
29 | * Light Bootstrap Dashboard - v1.3.1.0
30 | =========================================================
31 |
32 | * Product Page: http://www.creative-tim.com/product/light-bootstrap-dashboard
33 | * Copyright 2017 Creative Tim (http://www.creative-tim.com)
34 | * Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard/blob/master/LICENSE.md)
35 |
36 | =========================================================
37 |
38 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
39 |
40 | */
41 |
42 | @import "lbd/variables";
43 | @import "lbd/mixins";
44 |
45 | @import "lbd/typography";
46 |
47 | // Core CSS
48 | @import "lbd/misc";
49 | @import "lbd/sidebar-and-main-panel";
50 | @import "lbd/buttons";
51 | @import "lbd/inputs";
52 |
53 | @import "lbd/alerts";
54 | @import "lbd/tables";
55 |
56 | @import "lbd/checkbox-radio-switch";
57 | @import "lbd/navbars";
58 | @import "lbd/footers";
59 |
60 | // Fancy Stuff
61 | @import "lbd/dropdown";
62 | @import "lbd/cards";
63 | @import "lbd/chartist";
64 | @import "lbd/responsive";
65 |
66 | .alert[data-notify="container"] {
67 | [data-notify="dismiss"] {
68 | top: 50% !important;
69 | margin-top: -13px !important;
70 | }
71 | }
72 |
73 | div[data-notify="container"]:not(.alert-with-icon) {
74 | span[data-notify="icon"] ~ span[data-notify="message"] {
75 | margin-left: 45px;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/resources/lang/en/auth.php:
--------------------------------------------------------------------------------
1 | 'These credentials do not match our records.',
17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/pagination.php:
--------------------------------------------------------------------------------
1 | '« Previous',
17 | 'next' => 'Next »',
18 |
19 | ];
20 |
--------------------------------------------------------------------------------
/resources/lang/en/passwords.php:
--------------------------------------------------------------------------------
1 | 'Passwords must be at least six characters and match the confirmation.',
17 | 'reset' => 'Your password has been reset!',
18 | 'sent' => 'We have e-mailed your password reset link!',
19 | 'token' => 'This password reset token is invalid.',
20 | 'user' => "We can't find a user with that e-mail address.",
21 |
22 | ];
23 |
--------------------------------------------------------------------------------
/resources/views/auth/login.blade.php:
--------------------------------------------------------------------------------
1 | @extends('light-bootstrap-dashboard::layouts.auth')
2 |
3 | @section('content')
4 |
46 | @endsection
47 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/email.blade.php:
--------------------------------------------------------------------------------
1 | @extends('light-bootstrap-dashboard::layouts.auth')
2 |
3 | @section('content')
4 |
28 | @endsection
29 |
--------------------------------------------------------------------------------
/resources/views/auth/passwords/reset.blade.php:
--------------------------------------------------------------------------------
1 | @extends('light-bootstrap-dashboard::layouts.auth')
2 |
3 | @section('content')
4 |
44 | @endsection
45 |
--------------------------------------------------------------------------------
/resources/views/auth/register.blade.php:
--------------------------------------------------------------------------------
1 | @extends('light-bootstrap-dashboard::layouts.auth')
2 |
3 | @section('content')
4 |
51 | @endsection
52 |
--------------------------------------------------------------------------------
/resources/views/editRoom.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app') @section('content-title', $currentRoom->room ) @section('content')
2 |
3 |
4 |
5 |
34 | @endsection
--------------------------------------------------------------------------------
/resources/views/errors/403.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content-title')
4 | 403 Forbidden
5 | @endsection
6 |
7 | @section('content')
8 |
9 |
10 |
11 |
14 | @if($exception->getMessage())
15 |
16 | {{ $exception->getPrevious() ? $exception->getPrevious()->getMessage() : $exception->getMessage() }}
17 |
18 | @endif
19 |
20 |
21 |
22 | @endsection
23 |
--------------------------------------------------------------------------------
/resources/views/errors/404.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app')
2 |
3 | @section('content-title')
4 | 404 Not Found
5 | @endsection
6 |
7 | @section('content')
8 |
9 |
10 |
11 |
14 | @if($exception->getMessage())
15 |
16 | {{ $exception->getPrevious() ? $exception->getPrevious()->getMessage() : $exception->getMessage() }}
17 |
18 | @endif
19 |
20 |
21 |
22 | @endsection
23 |
--------------------------------------------------------------------------------
/resources/views/home.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app') @section('content-title', $currentRoom->room )
2 | @section('content')
3 |
4 |
29 | @endsection
--------------------------------------------------------------------------------
/resources/views/layouts/app.blade.php:
--------------------------------------------------------------------------------
1 | @extends('light-bootstrap-dashboard::layouts.main')
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/resources/views/rules/rules.blade.php:
--------------------------------------------------------------------------------
1 | @extends('layouts.app') @section('content-title', 'Automation' )
2 | @section('content')
3 |
4 |
5 |
6 |
44 |
45 |
46 |
47 |
48 |
49 | Rule Name |
50 | Thing Listeneer |
51 | Rule |
52 |
53 |
54 | @foreach($rules as $rule)
55 |
56 | {{ $rule->ruleName }} |
57 | {{ $rule->thingListener }} |
58 | {{ substr($rule->jsonRule, 0, 20).'...' }} |
59 |
60 | @endforeach
61 |
62 |
63 |
64 |
65 |
66 |
67 | @endsection
--------------------------------------------------------------------------------
/resources/views/vendor/light-bootstrap-dashboard/layouts/auth.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | @yield('title', config('app.name', 'Light Bootstrap Dashboard'))
11 |
12 |
13 |
14 |
15 |
16 | @section('styles')
17 |
18 |
19 | @show
20 | @stack('head')
21 |
22 |
23 |
24 | @yield('content')
25 |
26 |
27 | @section('scripts')
28 |
29 |
30 |
31 | @show
32 | @stack('body')
33 |
34 |
35 |
--------------------------------------------------------------------------------
/resources/views/vendor/light-bootstrap-dashboard/layouts/main-panel/footer/main.blade.php:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/resources/views/vendor/light-bootstrap-dashboard/layouts/main-panel/main.blade.php:
--------------------------------------------------------------------------------
1 |
2 |
89 |
90 |
91 |
92 | @yield('content')
93 |
94 |
95 |
96 | @include('light-bootstrap-dashboard::layouts.main-panel.footer.main')
97 |
98 |
99 |
--------------------------------------------------------------------------------
/resources/views/vendor/light-bootstrap-dashboard/layouts/sidebar/main.blade.php:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/resources/views/vendor/light-bootstrap-dashboard/layouts/sidebar/sidebar-wrapper/main.blade.php:
--------------------------------------------------------------------------------
1 |
31 |
32 |
40 |
--------------------------------------------------------------------------------
/routes/api.php:
--------------------------------------------------------------------------------
1 | get('/user', function (Request $request) {
17 | return $request->user();
18 | });
19 |
--------------------------------------------------------------------------------
/routes/channels.php:
--------------------------------------------------------------------------------
1 | id === (int) $id;
16 | });
17 |
--------------------------------------------------------------------------------
/routes/console.php:
--------------------------------------------------------------------------------
1 | comment(Inspiring::quote());
18 | })->describe('Display an inspiring quote');
19 |
--------------------------------------------------------------------------------
/routes/web.php:
--------------------------------------------------------------------------------
1 | name('home');
28 | Route::get('/room/{roomName?}', 'Views\HomeController@room')->name('room');
29 | Route::get('/room/{roomName?}/edit', 'Views\HomeController@editRoom')->name('editroom');
30 |
31 | // Room Controller
32 | Route::post('/room/create','Room\RoomController@create')->name('createRoom');
33 |
34 | // Thing Controller
35 | Route::get('/thing/{thingID}/{channel}/{input?}', 'Thing\ThingController@touch');
36 | Route::post('/thing/create', 'Thing\ThingController@create');
37 | Route::post('/thing/update', 'Thing\ThingController@update');
38 | Route::post('/thing/delete', 'Thing\ThingController@delete');
39 |
40 | // Rule Controller
41 | Route::get('/automation', 'Rules\AutomationController@index')->name('automation');
42 | Route::post('/automation/create', 'Rules\AutomationController@create');
43 | Route::post('/automation/generate', 'Rules\AutomationController@generateEventListeners');
44 |
--------------------------------------------------------------------------------
/server.php:
--------------------------------------------------------------------------------
1 |
8 | */
9 |
10 | $uri = urldecode(
11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
12 | );
13 |
14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the
15 | // built-in PHP web server. This provides a convenient way to test a Laravel
16 | // application without having installed a "real" web server software here.
17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
18 | return false;
19 | }
20 |
21 | require_once __DIR__.'/public/index.php';
22 |
--------------------------------------------------------------------------------
/storage/app/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !public/
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/storage/app/public/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/.gitignore:
--------------------------------------------------------------------------------
1 | config.php
2 | routes.php
3 | schedule-*
4 | compiled.php
5 | services.json
6 | events.scanned.php
7 | routes.scanned.php
8 | down
9 |
--------------------------------------------------------------------------------
/storage/framework/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/sessions/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/testing/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/framework/views/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/storage/logs/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/tests/CreatesApplication.php:
--------------------------------------------------------------------------------
1 | make(Kernel::class)->bootstrap();
19 |
20 | return $app;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/Feature/ExampleTest.php:
--------------------------------------------------------------------------------
1 | get('/');
21 |
22 | //$response->assertStatus(200);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/TestCase.php:
--------------------------------------------------------------------------------
1 | assertTrue(true);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/webpack.mix.js:
--------------------------------------------------------------------------------
1 | let mix = require('laravel-mix');
2 |
3 | /*
4 | |--------------------------------------------------------------------------
5 | | Mix Asset Management
6 | |--------------------------------------------------------------------------
7 | |
8 | | Mix provides a clean, fluent API for defining some Webpack build steps
9 | | for your Laravel application. By default, we are compiling the Sass
10 | | file for the application as well as bundling up all the JS files.
11 | |
12 | */
13 |
14 | mix.js('resources/assets/js/app.js', 'public/js')
15 | .sass('resources/assets/sass/app.scss', 'public/css');
16 |
17 | mix.copy('resources/assets/img/sidebar-*.jpg', 'public/images');
18 | mix.js('resources/assets/js/auth.js', 'public/js')
19 | .sass('resources/assets/sass/auth.scss', 'public/css');
20 | mix.js('resources/assets/js/light-bootstrap-dashboard.js', 'public/js')
21 | .sass('resources/assets/sass/light-bootstrap-dashboard.scss', 'public/css');
22 | mix.extract([
23 | 'lodash', 'chartist', 'jquery',
24 | 'bootstrap-notify', 'bootstrap-select', 'bootstrap-switch',
25 | 'vue', 'axios'
26 | ], 'public/js/vendor.js');
27 | mix.version();
28 |
--------------------------------------------------------------------------------