mirror of
https://github.com/supanadit/todo.git
synced 2024-12-04 16:46:20 +00:00
Keyboard shortcut feeling
This commit is contained in:
parent
35d8715ab4
commit
e5dd77e1d7
0
.editorconfig
Normal file → Executable file
0
.editorconfig
Normal file → Executable file
0
.env.example
Normal file → Executable file
0
.env.example
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
0
.gitattributes
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
0
.styleci.yml
Normal file → Executable file
0
.styleci.yml
Normal file → Executable file
@ -1,3 +1,11 @@
|
|||||||
# Todo App
|
# Todo App
|
||||||
|
|
||||||
Simple Todo Application
|
Simple Todo Application
|
||||||
|
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
- `composer install`
|
||||||
|
- create `.env` file
|
||||||
|
- `php artisan key:generate`
|
||||||
|
- `php artisan migrate`
|
||||||
|
- `php artisan db:seed`
|
||||||
|
0
app/Http/Controllers/TodoController.php
Normal file → Executable file
0
app/Http/Controllers/TodoController.php
Normal file → Executable file
0
app/Http/Middleware/WebAuthenticate.php
Normal file → Executable file
0
app/Http/Middleware/WebAuthenticate.php
Normal file → Executable file
0
public/vector/avatar.svg
Normal file → Executable file
0
public/vector/avatar.svg
Normal file → Executable file
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
0
public/vendor/sweetalert/sweetalert.min.js
vendored
Normal file → Executable file
0
public/vendor/sweetalert/sweetalert.min.js
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.css
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.css
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.js.map
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.js.map
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.min.css
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.min.css
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.min.js
vendored
Normal file → Executable file
0
public/vendor/toastr/toastr.min.js
vendored
Normal file → Executable file
79
resources/views/home.blade.php
Normal file → Executable file
79
resources/views/home.blade.php
Normal file → Executable file
@ -9,27 +9,82 @@
|
|||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('top-button')
|
@section('top-button')
|
||||||
<button class="btn btn-info btn-sm">
|
<button class="btn btn-info btn-sm" data-toggle="modal" data-target="#modal-default">
|
||||||
Create Directory
|
Create Todo
|
||||||
</button>
|
</button>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@section('css')
|
||||||
|
<style>
|
||||||
|
.widget-user {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<input type="text" class="form-control" placeholder="Search"/>
|
<input type="text" class="form-control" placeholder="Search" id="search-todo"/>
|
||||||
<br/>
|
<br/>
|
||||||
<!-- /.box -->
|
<!-- /.box -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||||
<div class="info-box">
|
<div class="box box-widget widget-user">
|
||||||
<span class="info-box-icon bg-green"><i class="fa fa-flag-o"></i></span>
|
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||||
|
<div class="widget-user-header bg-aqua-active">
|
||||||
<div class="info-box-content">
|
<h3 class="widget-user-username">Alexander Pierce</h3>
|
||||||
<span class="info-box-text">Bookmarks</span>
|
<h5 class="widget-user-desc">Founder & CEO</h5>
|
||||||
<span class="info-box-number">410</span>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box-content -->
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.info-box -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" id="modal-default">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span></button>
|
||||||
|
<h4 class="modal-title">Default Modal</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<p>One fine body…</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button>
|
||||||
|
<button type="button" class="btn btn-primary">Save changes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-content -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal-dialog -->
|
||||||
|
</div>
|
||||||
|
<!-- /.modal -->
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('js')
|
||||||
|
<script type="application/javascript">
|
||||||
|
$(document).bind('keydown', function (e) {
|
||||||
|
// CTRL + S
|
||||||
|
if (e.ctrlKey && e.which === 83) {
|
||||||
|
toastr.error("Prevented");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CTRL + F
|
||||||
|
if (e.ctrlKey && e.which === 70) {
|
||||||
|
$("#search-todo").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// CTRL + N
|
||||||
|
if (e.shiftKey && e.which === 78) {
|
||||||
|
$("#modal-default").modal('show');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
22
resources/views/layout/admin.blade.php
Normal file → Executable file
22
resources/views/layout/admin.blade.php
Normal file → Executable file
@ -52,9 +52,27 @@
|
|||||||
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li><a href="/home"><i class="fa fa-home"></i> Home</a></li>
|
<li><a href="/home"><i class="fa fa-home"></i> Home</a></li>
|
||||||
<li><a href="#" id="logout-button"><i class="fa fa-sign-out"></i> Sign Out</a></li>
|
<li><a href="#" class="logout-button visible-xs"><i class="fa fa-sign-out"></i> Sign
|
||||||
|
Out</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="navbar-custom-menu">
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<!-- User Account Menu -->
|
||||||
|
<li class="dropdown user user-menu hidden-xs">
|
||||||
|
<!-- Menu Toggle Button -->
|
||||||
|
<a href="#" class="dropdown-toggle logout-button">
|
||||||
|
<!-- The user image in the navbar-->
|
||||||
|
<img src="{{asset('vector/avatar.svg')}}" class="user-image" alt="User Image">
|
||||||
|
<!-- hidden-xs hides the username on small devices so only the image appears. -->
|
||||||
|
<span>{{ Session::get('name') }}</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!-- /.navbar-custom-menu -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.container-fluid -->
|
<!-- /.container-fluid -->
|
||||||
</nav>
|
</nav>
|
||||||
@ -115,7 +133,7 @@
|
|||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#logout-button").on('click', function () {
|
$(".logout-button").on('click', function () {
|
||||||
swal({
|
swal({
|
||||||
title: "Do you want to sign out ?",
|
title: "Do you want to sign out ?",
|
||||||
buttons: ["No", "Yes"],
|
buttons: ["No", "Yes"],
|
||||||
|
Loading…
Reference in New Issue
Block a user