mirror of
https://github.com/supanadit/short-url.git
synced 2025-01-31 12:59:00 +00:00
Beautify code
This commit is contained in:
parent
bc6e86d717
commit
f5318a6942
@ -100,7 +100,7 @@ class UrlShortenerController extends Controller
|
||||
$url = $urlAddress->url_destination;
|
||||
if ($httpPath == substr($url, 0, strlen($httpPath))) {
|
||||
$hasHttpOrHttps = true;
|
||||
} else if ($httpsPath == substr($url, 0, strlen($httpsPath))) {
|
||||
} elseif ($httpsPath == substr($url, 0, strlen($httpsPath))) {
|
||||
$hasHttpOrHttps = true;
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ class UrlShortenerController extends Controller
|
||||
$url = $urlAddress->url_destination;
|
||||
if ($httpPath == substr($url, 0, strlen($httpPath))) {
|
||||
$hasHttpOrHttps = true;
|
||||
} else if ($httpsPath == substr($url, 0, strlen($httpsPath))) {
|
||||
} elseif ($httpsPath == substr($url, 0, strlen($httpsPath))) {
|
||||
$hasHttpOrHttps = true;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}"/>
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Short URL</title>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}"/>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}" />
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
@ -30,52 +31,49 @@
|
||||
|
||||
<!-- Google Font -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
</head>
|
||||
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="/"><b>Short</b> URL</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Expired</p>
|
||||
<p>
|
||||
I am sorry, the link is expired, so please just back to the homepage, or if you own the link just regenerate
|
||||
the link, but if you get the link from somebody just ask to the person who share this link.
|
||||
</p>
|
||||
<div class="input-group">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
placeholder="Generated URL"
|
||||
id="generated-url-field"
|
||||
value="{{$url}}"
|
||||
readonly>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-flat"
|
||||
data-clipboard-target="#generated-url-field">
|
||||
<i class="fa fa-clipboard"></i>
|
||||
</button>
|
||||
</span>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="/"><b>Short</b> URL</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Expired</p>
|
||||
<p>
|
||||
I am sorry, the link is expired, so please just back to the homepage, or if you own the link just
|
||||
regenerate
|
||||
the link, but if you get the link from somebody just ask to the person who share this link.
|
||||
</p>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Generated URL" id="generated-url-field"
|
||||
value="{{$url}}" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-flat" data-clipboard-target="#generated-url-field">
|
||||
<i class="fa fa-clipboard"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
<!-- /.login-box -->
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- Clipboard -->
|
||||
<script src="{{asset('vendor/clipboard.js/dist/clipboard.min.js')}}"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- Clipboard -->
|
||||
<script src="{{asset('vendor/clipboard.js/dist/clipboard.min.js')}}"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
clipboard.on('success', function (e) {
|
||||
toastr.success("URL Copied");
|
||||
e.clearSelection();
|
||||
@ -84,6 +82,7 @@
|
||||
clipboard.on('error', function (e) {
|
||||
toastr.failed("Cannot Copy URL");
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,82 +1,75 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
Welcome
|
||||
Welcome
|
||||
@endsection
|
||||
|
||||
@section('subtitle')
|
||||
The Simple URL Shortener
|
||||
The Simple URL Shortener
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<form action="/" id="shorten-url-form">
|
||||
<input type="text" class="form-control" placeholder="Enter your URL" id="shorten-url-form-field-url"/>
|
||||
<br/>
|
||||
<div class="form-group">
|
||||
<label>Expired Date</label>
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<form action="/" id="shorten-url-form">
|
||||
<input type="text" class="form-control" placeholder="Enter your URL" id="shorten-url-form-field-url" />
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<label>Expired Date</label>
|
||||
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<input type="checkbox" id="shorten-url-form-field-expiration-date-checkbox"/>
|
||||
</div>
|
||||
<input type="text"
|
||||
class="form-control pull-right"
|
||||
id="shorten-url-form-field-expiration-date"
|
||||
placeholder="Set expired date" readonly>
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<input type="checkbox" id="shorten-url-form-field-expiration-date-checkbox" />
|
||||
</div>
|
||||
<!-- /.input group -->
|
||||
<input type="text" class="form-control pull-right" id="shorten-url-form-field-expiration-date"
|
||||
placeholder="Set expired date" readonly>
|
||||
</div>
|
||||
<!-- /input-group -->
|
||||
<div class="form-group">
|
||||
<label>Password Protection</label>
|
||||
<!-- /.input group -->
|
||||
</div>
|
||||
<!-- /input-group -->
|
||||
<div class="form-group">
|
||||
<label>Password Protection</label>
|
||||
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<input type="checkbox" id="shorten-url-form-field-password-checkbox"/>
|
||||
</div>
|
||||
<input type="password"
|
||||
class="form-control pull-right"
|
||||
placeholder="Insert password"
|
||||
id="shorten-url-form-field-password">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<input type="checkbox" id="shorten-url-form-field-password-checkbox" />
|
||||
</div>
|
||||
<!-- /.input group -->
|
||||
<input type="password" class="form-control pull-right" placeholder="Insert password"
|
||||
id="shorten-url-form-field-password">
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-4">
|
||||
<button type="submit" class="btn btn-info btn-flat btn-block">
|
||||
<span>Shorten URL</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-10 col-sm-8">
|
||||
<br class="visible-xs"/>
|
||||
<div class="input-group" id="shorten-url-form-field-url-generated-group" style="display: none;">
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
placeholder="Generated URL"
|
||||
id="shorten-url-form-field-url-generated"
|
||||
readonly>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-flat"
|
||||
data-clipboard-target="#shorten-url-form-field-url-generated">
|
||||
<i class="fa fa-clipboard"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<!-- /.input group -->
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-2 col-sm-4">
|
||||
<button type="submit" class="btn btn-info btn-flat btn-block">
|
||||
<span>Shorten URL</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-md-10 col-sm-8">
|
||||
<br class="visible-xs" />
|
||||
<div class="input-group" id="shorten-url-form-field-url-generated-group" style="display: none;">
|
||||
<input type="text" class="form-control" placeholder="Generated URL"
|
||||
id="shorten-url-form-field-url-generated" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-danger btn-flat"
|
||||
data-clipboard-target="#shorten-url-form-field-url-generated">
|
||||
<i class="fa fa-clipboard"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
|
||||
$('#shorten-url-form-field-expiration-date').datepicker({
|
||||
autoclose: true,
|
||||
@ -129,5 +122,5 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -1,10 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Short URL</title>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}"/>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}" />
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
@ -21,8 +22,7 @@
|
||||
<link rel="stylesheet" href="{{asset('vendor/toastr/toastr.min.css')}}">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="{{asset('dist/css/AdminLTE.min.css')}}">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="{{asset('dist/css/skins/_all-skins.min.css')}}">
|
||||
|
||||
<style type="text/css">
|
||||
@ -40,31 +40,30 @@
|
||||
|
||||
<!-- Google Font -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
|
||||
@yield('css')
|
||||
</head>
|
||||
<!-- ADD THE CLASS layout-top-nav TO REMOVE THE SIDEBAR. -->
|
||||
<body class="hold-transition skin-blue layout-top-nav">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<nav class="navbar navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a href="/" class="navbar-brand"><b>Short</b> URL</a>
|
||||
<button type="button"
|
||||
class="navbar-toggle collapsed"
|
||||
data-toggle="collapse"
|
||||
data-target="#navbar-collapse">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
@if(Session::get('user') != null)
|
||||
<body class="hold-transition skin-blue layout-top-nav">
|
||||
<div class="wrapper">
|
||||
<header class="main-header">
|
||||
<nav class="navbar navbar-static-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a href="/" class="navbar-brand"><b>Short</b> URL</a>
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||
data-target="#navbar-collapse">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
@if(Session::get('user') != null)
|
||||
<li>
|
||||
<a href="/list">
|
||||
My URL Shortener
|
||||
@ -75,12 +74,12 @@
|
||||
Change Password
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
@if(Session::get('user') == null)
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
@if(Session::get('user') == null)
|
||||
<li>
|
||||
<a href="#" data-toggle="modal" data-target="#sign-in-modal">
|
||||
<span>Sign In</span>
|
||||
@ -91,56 +90,56 @@
|
||||
<span>Register</span>
|
||||
</a>
|
||||
</li>
|
||||
@else
|
||||
@else
|
||||
<li>
|
||||
<a href="#" class="logout-button">
|
||||
<span>Sign Out</span>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Full Width Column -->
|
||||
<div class="content-wrapper">
|
||||
<div class="container">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
@yield('title')
|
||||
<small>@yield('subtitle')</small>
|
||||
<div class="pull-right">
|
||||
@yield('top-button')
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</h1>
|
||||
</section>
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Full Width Column -->
|
||||
<div class="content-wrapper">
|
||||
<div class="container">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
@yield('title')
|
||||
<small>@yield('subtitle')</small>
|
||||
<div class="pull-right">
|
||||
@yield('top-button')
|
||||
</div>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
@yield('content')
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="container">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 1.0.2
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
@yield('content')
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
Copyright © @php echo date('Y'); @endphp <b>Short</b> URL. All rights reserved.
|
||||
<!-- /.container -->
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</footer>
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
@if(Session::get('user') == null)
|
||||
<footer class="main-footer">
|
||||
<div class="container">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 1.0.2
|
||||
</div>
|
||||
Copyright © @php echo date('Y'); @endphp <b>Short</b> URL. All rights reserved.
|
||||
</div>
|
||||
<!-- /.container -->
|
||||
</footer>
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
|
||||
@if(Session::get('user') == null)
|
||||
{{-- Forgot Password Modal --}}
|
||||
<div class="modal fade" id="forgot-password-modal">
|
||||
<div class="modal-dialog">
|
||||
@ -153,7 +152,7 @@
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="email" class="form-control" placeholder="Insert your email"
|
||||
id="forgot-password-modal-form-field-email">
|
||||
id="forgot-password-modal-form-field-email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -182,18 +181,18 @@
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="email" class="form-control" placeholder="Insert your email"
|
||||
id="sign-in-modal-form-field-email">
|
||||
id="sign-in-modal-form-field-email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<input type="password" class="form-control" placeholder="Insert your new password"
|
||||
id="sign-in-modal-form-field-password">
|
||||
id="sign-in-modal-form-field-password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">Cancel</button>
|
||||
<button type="button" class="btn btn-danger pull-left"
|
||||
id="sign-in-modal-button-forgot-password">Forgot Password
|
||||
id="sign-in-modal-button-forgot-password">Forgot Password
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-spinner fa-spin" id="sign-in-modal-save-loading-indicator"></i>
|
||||
@ -219,22 +218,22 @@
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<input type="text" class="form-control" placeholder="Insert your name"
|
||||
id="register-modal-form-field-name">
|
||||
id="register-modal-form-field-name">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Email</label>
|
||||
<input type="email" class="form-control" placeholder="Insert your email"
|
||||
id="register-modal-form-field-email">
|
||||
id="register-modal-form-field-email">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<input type="password" class="form-control" placeholder="Insert your new password"
|
||||
id="register-modal-form-field-password">
|
||||
id="register-modal-form-field-password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Confirm Password</label>
|
||||
<input type="password" class="form-control" placeholder="Please confirm new password"
|
||||
id="register-modal-form-password-confirm">
|
||||
id="register-modal-form-password-confirm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -250,7 +249,7 @@
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@else
|
||||
@else
|
||||
{{-- Change Password Modal --}}
|
||||
<div class="modal fade" id="change-password-modal">
|
||||
<div class="modal-dialog">
|
||||
@ -263,12 +262,12 @@
|
||||
<div class="form-group">
|
||||
<label>New Password</label>
|
||||
<input type="password" class="form-control" placeholder="Insert your new password"
|
||||
id="change-password-modal-form-field-password">
|
||||
id="change-password-modal-form-field-password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Confirm Password</label>
|
||||
<input type="password" class="form-control" placeholder="Please confirm new password"
|
||||
id="change-password-modal-form-field-password-confirm">
|
||||
id="change-password-modal-form-field-password-confirm">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -284,33 +283,33 @@
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{asset('vendor/jquery-slimscroll/jquery.slimscroll.min.js')}}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{asset('vendor/fastclick/lib/fastclick.js')}}"></script>
|
||||
<!-- Sweet Alert -->
|
||||
<script src="{{asset('vendor/sweetalert/sweetalert.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- Bootstrap Datepicker -->
|
||||
<script src="{{asset('vendor/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<!-- iCheck 1.0.1 -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
<!-- Clipboard -->
|
||||
<script src="{{asset('vendor/clipboard.js/dist/clipboard.min.js')}}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{asset('dist/js/adminlte.min.js')}}"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="{{asset('dist/js/demo.js')}}"></script>
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- SlimScroll -->
|
||||
<script src="{{asset('vendor/jquery-slimscroll/jquery.slimscroll.min.js')}}"></script>
|
||||
<!-- FastClick -->
|
||||
<script src="{{asset('vendor/fastclick/lib/fastclick.js')}}"></script>
|
||||
<!-- Sweet Alert -->
|
||||
<script src="{{asset('vendor/sweetalert/sweetalert.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- Bootstrap Datepicker -->
|
||||
<script src="{{asset('vendor/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js')}}"></script>
|
||||
<!-- iCheck 1.0.1 -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
<!-- Clipboard -->
|
||||
<script src="{{asset('vendor/clipboard.js/dist/clipboard.min.js')}}"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="{{asset('dist/js/adminlte.min.js')}}"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="{{asset('dist/js/demo.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
$(document).ready(function () {
|
||||
<script type="application/javascript">
|
||||
$(document).ready(function () {
|
||||
@if(Session::get('user') == null)
|
||||
$("#forgot-password-modal-save-loading-indicator").hide();
|
||||
$("#sign-in-modal-save-loading-indicator").hide();
|
||||
@ -478,9 +477,10 @@
|
||||
});
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@yield('js')
|
||||
@yield('js')
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,24 +1,24 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@section('title')
|
||||
My URL Shortener
|
||||
My URL Shortener
|
||||
@endsection
|
||||
|
||||
@section('subtitle')
|
||||
List all of your own URL Shortener
|
||||
List all of your own URL Shortener
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"></h3>
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"></h3>
|
||||
|
||||
<div class="box-tools"></div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body" style="overflow-x: auto;">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<div class="box-tools"></div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body" style="overflow-x: auto;">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:10px;text-align: center;">No</th>
|
||||
<th>Destination</th>
|
||||
@ -28,30 +28,30 @@
|
||||
<th>Protection</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="table-url-address-body">
|
||||
</thead>
|
||||
<tbody id="table-url-address-body">
|
||||
<tr>
|
||||
<td colspan="6" style="text-align:center;color:#777;">
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
Page <span id="current-page">1</span>,
|
||||
Showing <span id="range-start-data">0</span> to <span id="range-end-data">0</span>
|
||||
of <span id="total-entries">0</span> entries
|
||||
<ul class="pagination pagination-sm no-margin pull-right" id="pagination-button"></ul>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer">
|
||||
Page <span id="current-page">1</span>,
|
||||
Showing <span id="range-start-data">0</span> to <span id="range-end-data">0</span>
|
||||
of <span id="total-entries">0</span> entries
|
||||
<ul class="pagination pagination-sm no-margin pull-right" id="pagination-button"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
@endsection
|
||||
|
||||
@section('js')
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
<script type="application/javascript">
|
||||
const clipboard = new ClipboardJS('.btn');
|
||||
|
||||
let page = 1;
|
||||
let canPageNext = false;
|
||||
@ -186,5 +186,5 @@
|
||||
// Initialize
|
||||
loadURLAddress();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}"/>
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>Short URL</title>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}"/>
|
||||
<link rel="shortcut icon" href="{{asset('favicon.png')}}" />
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
@ -30,48 +31,49 @@
|
||||
|
||||
<!-- Google Font -->
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
|
||||
</head>
|
||||
|
||||
<body class="hold-transition login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="/"><b>Short</b> URL</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Protected URL</p>
|
||||
<div class="login-box">
|
||||
<div class="login-logo">
|
||||
<a href="/"><b>Short</b> URL</a>
|
||||
</div>
|
||||
<!-- /.login-logo -->
|
||||
<div class="login-box-body">
|
||||
<p class="login-box-msg">Protected URL</p>
|
||||
|
||||
<form action="/" method="post" id="protection-form">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" class="form-control" placeholder="Password" id="password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-8"></div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">
|
||||
Open Link
|
||||
</button>
|
||||
<form action="/" method="post" id="protection-form">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" class="form-control" placeholder="Password" id="password">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
<div class="row">
|
||||
<div class="col-xs-8"></div>
|
||||
<!-- /.col -->
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" class="btn btn-primary btn-block btn-flat">
|
||||
Open Link
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
</div>
|
||||
<!-- /.login-box -->
|
||||
<!-- /.login-box -->
|
||||
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
<!-- jQuery 3 -->
|
||||
<script src="{{asset('vendor/jquery/dist/jquery.min.js')}}"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="{{asset('vendor/bootstrap/dist/js/bootstrap.min.js')}}"></script>
|
||||
<!-- Toastr -->
|
||||
<script src="{{asset('vendor/toastr/toastr.min.js')}}"></script>
|
||||
<!-- iCheck -->
|
||||
<script src="{{asset('plugin/iCheck/icheck.min.js')}}"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#protection-form").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
$.ajax({
|
||||
@ -96,6 +98,7 @@
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div>
|
||||
Hi, {{ $name }}<br/>
|
||||
This is your new password : {{ $password }}<br/>
|
||||
Hi, {{ $name }}<br />
|
||||
This is your new password : {{ $password }}<br />
|
||||
<p>You can change it after login back</p>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user