Permalink
Browse files

Website - update menu and render testimonials and changelogs

  • Loading branch information...
bpocallaghan committed Jul 8, 2017
1 parent 6d15555 commit 102fde3240216e0c85dc04d71a67e180d8c541e8
@@ -3,7 +3,8 @@
namespace App\Http\Controllers\Website;
use App\Http\Requests;
use App\Models\SubscriptionPlan;
use App\Models\Changelog;
use App\Models\Testimonial;
class PagesController extends WebsiteController
{
@@ -28,14 +29,26 @@ public function column4()
}
/**
* Show the pricing page
* Show the changelog page
*
* @return \Illuminate\Http\Response
*/
public function pricing()
public function changelog()
{
$subscriptionPlans = SubscriptionPlan::with('features')->get();
$items = Changelog::orderBy('version', 'DESC')->get();
return $this->view('pricing', compact('subscriptionPlans'));
return $this->view('changelog', compact('items'));
}
/**
* Show the changelog page
*
* @return \Illuminate\Http\Response
*/
public function testimonials()
{
$items = Testimonial::orderBy('list_order')->get();
return $this->view('testimonials', compact('items'));
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers\Website;
use App\Models\SubscriptionPlan;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class PricingController extends WebsiteController
{
public function index()
{
$this->showPageBanner = false;
$subscriptionPlans = SubscriptionPlan::with('features')->get();
return $this->view('pricing', compact('subscriptionPlans'));
}
}
@@ -9,5 +9,16 @@
class WebsiteController extends TitanWebsiteController
{
protected $showPageBanner = true;
/**
* Return / Render the view
* @param $view
* @param array $data
* @return $this
*/
protected function view($view, $data = [])
{
return parent::view($view, $data)->with('showPageBanner', $this->showPageBanner);
}
}
@@ -13,6 +13,8 @@ class Changelog extends TitanCMSModel
protected $guarded = ['id'];
protected $dates = ['date_at'];
/**
* Validation rules for this model
*/
@@ -1,10 +1,12 @@
id,title,description,html_title,html_description,slug,url,icon,is_main,list_main_order,is_footer,list_footer_order,is_hidden,parent_id,url_parent_id,,
1,Home,Html Description,Home,Html Description,/,,,1,1,0,,0,0,0,,
2,About,About,About,About,about,/about,,1,2,0,,0,0,0,,
3,Contact Us,Contact Us,Contact Us,Contact Us,contact-us,/contact-us,,1,3,0,,0,0,0,,
4,Other Pages,Other Pages,Other Pages,Other Pages,pages,/pages,,1,4,0,,0,0,0,,
5,Pricing,Pricing,Pricing,Pricing,pricing,/pages/pricing,,1,5,0,,0,4,4,,
6,1 Column Page,1 Column Page,1 Column Page,1 Column Page,1-column,/pages/1-column,,1,1,0,,0,4,4,,
7,2 Column Page,2 Column Page,2 Column Page,2 Column Page,2-column,/pages/2-column,,1,2,0,,0,4,4,,
8,3 Column Page,3 Column Page,3 Column Page,3 Column Page,3-column,/pages/3-column,,1,3,0,,0,4,4,,
9,4 Column Page,4 Column Page,4 Column Page,4 Column Page,4-column,/pages/4-column,,1,4,0,,0,4,4,,
id,title,description,html_title,html_description,slug,url,icon,is_main,list_main_order,is_footer,list_footer_order,is_hidden,parent_id,url_parent_id
1,Home,Html Description,Home,Html Description,/,,,1,1,0,,0,0,0
2,About,About,About,About,about,/about,,1,2,0,,0,0,0
3,Contact Us,Contact Us,Contact Us,Contact Us,contact-us,/contact-us,,1,3,0,,0,0,0
4,Other Pages,Other Pages,Other Pages,Other Pages,pages,/pages,,1,7,0,,0,0,0
5,Pricing,Pricing,Pricing,Pricing,pricing,/pricing,,1,4,0,,0,0,0
6,1 Column Page,1 Column Page,1 Column Page,1 Column Page,1-column,/pages/1-column,,1,1,0,,0,4,4
7,2 Column Page,2 Column Page,2 Column Page,2 Column Page,2-column,/pages/2-column,,1,2,0,,0,4,4
8,3 Column Page,3 Column Page,3 Column Page,3 Column Page,3-column,/pages/3-column,,1,3,0,,0,4,4
9,4 Column Page,4 Column Page,4 Column Page,4 Column Page,4-column,/pages/4-column,,1,4,0,,0,4,4
10,Changelog,Changelog,Changelog,Changelog,changelog,/changelog,,1,6,0,,0,0,0
11,Testimonials,Testimonials,Testimonials,Testimonials,testimonials,/testimonials,,1,5,0,,0,0,0

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,66 @@
/* Testimonial Carousel */
#testimonial-carousel {
padding: 0 10px 30px 10px;
margin-top: 30px;
}
#testimonial-carousel .carousel-control {
background: none;
color: #CACACA;
font-size: 2.3em;
text-shadow: none;
margin-top: 30px;
}
#testimonial-carousel .carousel-control.left {
left: -60px;
}
#testimonial-carousel .carousel-control.right {
right: -60px;
}
#testimonial-carousel .carousel-indicators {
right: 50%;
top: auto;
bottom: 0px;
margin-right: -19px;
}
#testimonial-carousel .carousel-indicators li {
width: 30px;
height: 30px;
margin: 5px;
cursor: pointer;
border: 2px solid #CCC;
border-radius: 50px;
opacity: 0.4;
overflow: hidden;
transition: all 0.4s;
}
#testimonial-carousel .carousel-indicators .active {
background: #337ab7;
width: 30px;
height: 30px;
border-radius: 100px;
border-color: #f5f5f5;
opacity: 1;
overflow: hidden;
}
#testimonial-carousel .carousel-inner {
min-height: 200px;
}
#testimonial-carousel .item blockquote {
border-left: none;
margin: 0;
}
#testimonial-carousel .item blockquote p:before {
content: "\f10d";
font-family: 'Fontawesome';
float: left;
margin-right: 10px;
}
@@ -102,4 +102,10 @@ footer {
.spinner-content {
color: #3c8dbc;
font-size: 150%;
}
}
.changelog-box hr {
margin-top: 0px;
margin-bottom: 10px;
}
@@ -21,7 +21,7 @@
<thead>
<tr>
<th>Customer</th>
<th class="desktop">Testimonial</th>
<th class="desktop" style="width: 50%">Testimonial</th>
<th>Link</th>
<th>Created</th>
<th>Action</th>
@@ -41,6 +41,12 @@
</button>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right margin-top-10">
<p><i><a target="_blank" href="https://github.com/bpocallaghan/laravel-admin-starter">Read more on Github</a></i></p>
</div>
</div>
</form>
</div>
</div>
@@ -33,7 +33,9 @@
@include('website.partials.header')
@include('website.partials.slider')
@if(isset($showPageBanner) && $showPageBanner == true || !isset($showPageBanner))
@include('website.partials.slider')
@endif
<div class="container">
@include('website.partials.breadcrumb')
@@ -0,0 +1,15 @@
@extends('layouts.website')
@section('content')
<div class="row">
@foreach($items as $item)
<div class="col-md-12">
<div class="changelog-box">
<h3>{{ $item->version }} - {{ $item->date_at->format('D, d M Y') }}</h3>
<hr/>
{!! $item->content !!}
</div>
</div>
@endforeach
</div>
@endsection
@@ -0,0 +1,39 @@
@extends('layouts.website')
@section('content')
<div class="row">
<div class="carousel slide" data-ride="carousel" id="testimonial-carousel">
<!-- Bottom Carousel Indicators -->
<ol class="carousel-indicators">
@foreach($items as $item)
<li data-target="#testimonial-carousel" data-slide-to="{{ $loop->index }}" class="{{ ($loop->first)? 'active':'' }}"></li>
@endforeach
</ol>
<!-- Carousel Slides / Quotes -->
<div class="carousel-inner text-center">
@foreach($items as $item)
<div class="item {{ ($loop->first)? 'active':'' }}">
<blockquote>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<p>{!! $item->description !!}</p>
<small>
{!! $item->customer !!}
@if($item->link)
<a href="{{ $item->link }}">{{ $item->link }}</a>
@endif
</small>
</div>
</div>
</blockquote>
</div>
@endforeach
</div>
<!-- Carousel Buttons Next/Prev -->
<a data-slide="prev" href="#testimonial-carousel" class="left carousel-control"><i class="fa fa-chevron-left"></i></a>
<a data-slide="next" href="#testimonial-carousel" class="right carousel-control"><i class="fa fa-chevron-right"></i></a>
</div>
</div>
@endsection
@@ -26,7 +26,11 @@
Route::get('/pages/2-column', 'PagesController@column2');
Route::get('/pages/3-column', 'PagesController@column3');
Route::get('/pages/4-column', 'PagesController@column4');
Route::get('/pages/pricing', 'PagesController@pricing');
Route::get('/changelog', 'PagesController@changelog');
Route::get('/testimonials', 'PagesController@testimonials');
Route::get('/pricing', 'PricingController@index');
});
/*
@@ -80,13 +84,15 @@ function () {
});
// history
Route::group(['prefix' => 'history', 'namespace' => 'History'], function () {
Route::group(['prefix' => 'latest-activity', 'namespace' => 'History'], function () {
Route::get('/', 'HistoryController@website');
Route::get('/admin', 'HistoryController@admin');
Route::get('/website', 'HistoryController@website');
});
Route::group(['prefix' => 'general'], function () {
Route::resource('tags', 'TagsController');
Route::resource('banners', 'BannersController');
// testimonials
@@ -131,8 +137,10 @@ function () {
Route::resource('subscription-plans/features', 'FeaturesController');
Route::resource('subscription-plans', 'SubscriptionPlansController');
Route::get('subscription-plans/{subscription_plan}/features/order', 'SubscriptionPlansController@showFeaturesOrder');
Route::post('subscription-plans/{subscription_plan}/features/order', 'SubscriptionPlansController@updateFeaturesOrder');
Route::get('subscription-plans/{subscription_plan}/features/order',
'SubscriptionPlansController@showFeaturesOrder');
Route::post('subscription-plans/{subscription_plan}/features/order',
'SubscriptionPlansController@updateFeaturesOrder');
});
// settings / admin
@@ -36,6 +36,7 @@ if (COMPILE == 'website' || COMPILE == 'all') {
pathCSS + 'vendor/bootstrap.css',
pathCSS + 'vendor/font-awesome.css',
pathCSS + 'app/testimonials.css',
pathCSS + 'website.css',
], public + '/css/website.css');

0 comments on commit 102fde3

Please sign in to comment.