Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cartalyst/demo-sentry
Browse files Browse the repository at this point in the history
Signed-off-by: Suhayb El Wardany <[email protected]>

Conflicts:
	app/views/template.blade.php
  • Loading branch information
suwardany committed May 14, 2014
2 parents 8c59b34 + 6afd533 commit 8c4a7c0
Show file tree
Hide file tree
Showing 13 changed files with 746 additions and 114 deletions.
31 changes: 10 additions & 21 deletions app/views/sentry/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,20 @@

@section('body')

<div class="row">

<div class="col-lg-6">

<div class="panel panel-default">
<div class="panel-body">
Login into your account
<p></p>
<a class="btn btn-info" href="{{ URL::to('login') }}">Login</a>
</div>
</div>
<div class="page-header">
<h1>Sentry 3</h1>
<p class="lead">A framework agnostic authorization and authentication package featuring groups, permissions, custom hashing algorithms and additional security features.</p>

</div>
<p>This demo provides you a solid foundation of controllers and views for your next Application.</p>

<div class="col-lg-6">
<p class="lead">
<a href="https://github.com/cartalyst/demo-sentry" class="btn btn-lg btn-default"><i class="fa fa-github"></i> Github</a>
<a href="https://cartalyst.com/manual/sentry" class="btn btn-lg btn-default"><i class="fa fa-file-text-o"></i> Manual</a>
</p>
</div>

<div class="panel panel-default">
<div class="panel-body">
Create a new user
<p></p>
<a class="btn btn-info" href="{{ URL::to('register') }}">Register</a>
</div>
</div>
<div class="row">

</div>

</div>

Expand Down
209 changes: 116 additions & 93 deletions app/views/template.blade.php
Original file line number Diff line number Diff line change
@@ -1,96 +1,119 @@
<!DOCTYPE html>
<html>
<head>
<title>
@section('title')
Sentry 3 Demo
@show
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<style type="text/css">
body {
padding-top: 70px;
}
</style>
</head>
<body>

<div class="container">

<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">

<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ URL::to('/') }}">Sentry 3 Demo</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li{{ Request::is('/') ? ' class="active"' : null }}><a href="{{ URL::to('/') }}">Home</a></li>
@if ( ! Sentry::check())
<li{{ Request::is('login') ? ' class="active"' : null }}><a href="{{ URL::to('login') }}">Login</a></li>
<li{{ Request::is('register') ? ' class="active"' : null }}><a href="{{ URL::to('register') }}">Register</a></li>
@elseif (Sentry::hasAccess('admin'))
<li{{ Request::is('users*') ? ' class="active"' : null }}><a href="{{ URL::to('users') }}">Users</a></li>
<li{{ Request::is('groups*') ? ' class="active"' : null }}><a href="{{ URL::to('groups') }}">Groups</a></li>
@endif
</ul>
@if ($user = Sentry::check())
<ul class="nav navbar-nav pull-right">
<li{{ Request::is('account') ? ' class="active"' : null }}><a href="{{ URL::to('account') }}">Account
@if ( ! Activation::completed($user))
<span class="label label-danger">Inactive</span>
@endif
</a></li>
<li><a href="{{ URL::to('logout') }}">Logout</a></li>
</ul>
@endif
</div>
</div>

</div>

@if ($errors->any())
<div class="alert alert-danger alert-block">
<button type="button" class="close" data-dismiss="alert"><i class="fa fa-minus-square"></i></button>
<strong>Error</strong>
@if ($message = $errors->first(0, ':message'))
{{ $message }}
@else
Please check the form below for errors
@endif
</div>
@endif

@if ($message = Session::get('success'))
<div class="alert alert-success alert-block">
<button type="button" class="close" data-dismiss="alert"><i class="fa fa-minus-square"></i></button>
<strong>Success</strong> {{ $message }}
</div>
@endif


@yield('body')

</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>
</body>
<head>
<title>Sentry 3</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="{{ URL::to('assets/css/bootstrap.min.css') }}" rel="stylesheet" media="screen">
<link href="{{ URL::to('assets/css/font-awesome.min.css') }}" rel="stylesheet" media="screen">
<link href="{{ URL::to('assets/css/demo.css') }}" rel="stylesheet" media="screen">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

</head>
<body>

<div class="flux clearfix">
<div class="flux--1"></div>
<div class="flux--2"></div>
<div class="flux--3"></div>
<div class="flux--4"></div>
<div class="flux--5"></div>
</div>

<div class="container">

<nav class="navbar xnavbar-fixed-top navbar-inverse" role="navigation">

<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ URL::to('/') }}">Sentry 3</a>
</div>

<div class="collapse navbar-collapse navbar-ex1-collapse">

<ul class="nav navbar-nav">
<li{{ Request::is('/') ? ' class="active"' : null }}><a href="{{ URL::to('/') }}">Home</a></li>
@if ( ! Sentry::check())
<li{{ Request::is('login') ? ' class="active"' : null }}><a href="{{ URL::to('login') }}">Login</a></li>
<li{{ Request::is('register') ? ' class="active"' : null }}><a href="{{ URL::to('register') }}">Register</a></li>
@elseif (Sentry::hasAccess('admin'))
<li{{ Request::is('users*') ? ' class="active"' : null }}><a href="{{ URL::to('users') }}">Users</a></li>
<li{{ Request::is('groups*') ? ' class="active"' : null }}><a href="{{ URL::to('groups') }}">Groups</a></li>
@endif
</ul>
@if ($user = Sentry::check())
<ul class="nav navbar-nav pull-right">
<li{{ Request::is('account') ? ' class="active"' : null }}><a href="{{ URL::to('account') }}">Account
@if ( ! Activation::completed($user))
<span class="label label-danger">Inactive</span>
@endif
</a></li>
<li><a href="{{ URL::to('logout') }}">Logout</a></li>
</ul>
@endif

<ul class="nav navbar-nav navbar-right">
<li><a href="https://cartalyst.com/manual/sentry">Manual</a></li>
</ul>

</div>
</nav>

@if ($errors->any())
<div class="alert alert-danger alert-block">
<button type="button" class="close" data-dismiss="alert"><i class="fa fa-minus-square"></i></button>
<strong>Error</strong>
@if ($message = $errors->first(0, ':message'))
{{ $message }}
@else
Please check the form below for errors
@endif
</div>
@endif

@if ($message = Session::get('success'))
<div class="alert alert-success alert-block">
<button type="button" class="close" data-dismiss="alert"><i class="fa fa-minus-square"></i></button>
<strong>Success</strong> {{ $message }}
</div>
@endif


@yield('body')
</div>

<script src="{{ URL::to('/assets/js/jquery.min.js') }}"></script>
<script src="{{ URL::to('/assets/js/bootstrap.min.js') }}"></script>

<script type="text/javascript">
$('.tip').tooltip();
</script>

@yield('scripts')

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26550564-1']);
_gaq.push(['_setDomainName', 'cartalyst.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>

</body>
</html>

7 changes: 7 additions & 0 deletions public/assets/css/bootstrap.min.css

Large diffs are not rendered by default.

90 changes: 90 additions & 0 deletions public/assets/css/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
* Globals
*/

.flux {
position: absolute;
top:0;
left:0;
right:0;
border-bottom:4px solid #2d3337;
}

.flux--1 {
background-color:#0F1C28;
width:10%;
float:left;
height:8px;
}
.flux--2 {
background-color:#136972;
width:30%;
float:left;
height:8px;
}
.flux--3 {
background-color:#67BFA7;
width:44%;
float:left;
height:8px;
}
.flux--4 {
background-color:#F3CF5B;
width:8%;
float:left;
height:8px;
}
.flux--5 {
background-color:#F07444;
width:8%;
float:left;
height:8px;
}

/* Links */
a,
a:focus,
a:hover {
color: #136972;
}

/* Custom default button */
.btn-default,
.btn-default:hover,
.btn-default:focus {
color: #fff;
text-shadow: none; /* Prevent inheritence from `body` */
background-color: #2d3337;
border: 1px solid #fff;
}

/*
* Base structure
*/

html,
body {
height: 100%;
background-color: #fff;
}
body {
color: #2d3337;
text-align: left;
padding-top:32px;
}


/*
* Header
*/
.page-header {
text-align: center;
}



@media (min-width: 992px) {
.lead {
font-size:28px;
}
}
4 changes: 4 additions & 0 deletions public/assets/css/font-awesome.min.css

Large diffs are not rendered by default.

Binary file added public/assets/fonts/FontAwesome.otf
Binary file not shown.
Binary file added public/assets/fonts/fontawesome-webfont.eot
Binary file not shown.
Loading

0 comments on commit 8c4a7c0

Please sign in to comment.