Commit ee1e12b3 by Otniel Turnip

update 23-5-2017

parent f21a7b5f
...@@ -7,7 +7,8 @@ use Illuminate\Database\Eloquent\Model; ...@@ -7,7 +7,8 @@ use Illuminate\Database\Eloquent\Model;
class Angkatan extends Model class Angkatan extends Model
{ {
protected $table = 'angkatan'; protected $table = 'angkatan';
public function angkatan(){ public function mahasiswa()
return $this->hasOne('App\Mahasiswa','angkatan_id'); {
return $this->hasMany('App\Mahasiswa');
} }
} }
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Aspirasi extends Model
{
protected $table = 'aspirasi';
protected $dates = ['deleted_at'];
protected $fillable = ['judul','content','penulis'];
}
...@@ -6,6 +6,11 @@ use Illuminate\Database\Eloquent\Model; ...@@ -6,6 +6,11 @@ use Illuminate\Database\Eloquent\Model;
class Category extends Model class Category extends Model
{ {
protected $table ='categoris'; protected $table = 'categories';
public $timestamps = true;
public function discussions()
{
return $this->hasMany('App\Topic');
}
} }
...@@ -6,5 +6,15 @@ use Illuminate\Database\Eloquent\Model; ...@@ -6,5 +6,15 @@ use Illuminate\Database\Eloquent\Model;
class Comment extends Model class Comment extends Model
{ {
// protected $guarded = [];
//user yang telah memberi komentar
public function author(){
return $this->belongsTo('App\User', 'from_user');
}
//mengembalikan comment
public function post(){
return $this->belongsTo('App\Topic', 'on_post');
}
} }
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
protected $table = 'events';
protected $dates = ['deleted_at'];
protected $fillable = ['start_date','due_date','judul','content','penulis'];
}
...@@ -17,6 +17,6 @@ class AdminController extends Controller ...@@ -17,6 +17,6 @@ class AdminController extends Controller
$this->middleware('rule:Admin'); $this->middleware('rule:Admin');
} }
public function index(){ public function index(){
return view('admin.halamanAdmin'); return view('admin.index');
} }
} }
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use App\User;
use App\Pengumuman;
use Illuminate\Support\Facades\Auth;
class AkademikController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('rule:Divisi Akademik');
}
public function index()
{
$pengumumans = DB::table('pengumumans')->paginate(10);
return view('akademik.index')->with('pengumumans', $pengumumans);
}
public function datapengumuman(){
$this->data['title'] = 'Daftar Pengumuman';
$pengumumans = DB::table('pengumumans')->paginate(10);
return view('akademik.dataPengumuman.index')->with('pengumumans', $pengumumans);
}
public function editpengumuman($id){
$this->data['pengumumans'] = Pengumuman::find($id);
return view('akademik.dataPengumuman.edit',$this->data);
}
public function updatepengumuman(Request $request, $id){
$input = $request->all();
Pengumuman::find($id)->update($input);
return redirect(url('akademik/dataPengumuman'))->with('info','Pengumuman berhasil diubah');
}
public function detail($ids)
{
$this->data['pengumumans'] = Pengumuman::find($ids);
return view('akademik/dataPengumuman/detail',$this->data);
}
public function store(Request $request)
{
$input = $request->all();
Pengumuman::create($input);
return redirect(url('akademik'))->with('info','Pengumuman berhasil ditambahkan');
}
public function create()
{
$this->data['title'] = 'Tambah Pengumuman';
return view('akademik.pengumuman.index',$this->data);
}
public function delete($id){
Pengumuman::find($id)->delete();
return redirect(url('/akademik/dataPengumuman'))->with('info','Pengumuman berhasil dihapus');
}
}
...@@ -6,38 +6,45 @@ use Illuminate\Http\Request; ...@@ -6,38 +6,45 @@ use Illuminate\Http\Request;
use DB; use DB;
use App\User; use App\User;
use App\Pengumuman; use App\Pengumuman;
class PengumumanController extends Controller use Illuminate\Support\Facades\Auth;
class BendaharaController extends Controller
{ {
public function __construct()
{
$this->middleware('auth');
$this->middleware('rule:Bendahara');
}
public function index() public function index()
{ {
$pengumumans = DB::table('pengumumans')->paginate(10); $pengumumans = DB::table('pengumumans')->paginate(10);
return view('sekretaris.index')->with('pengumumans', $pengumumans); return view('bendahara.index')->with('pengumumans', $pengumumans);
} }
public function datapengumuman(){ public function datapengumuman(){
$this->data['title'] = 'Daftar Pengumuman'; $this->data['title'] = 'Daftar Pengumuman';
$pengumumans = DB::table('pengumumans')->paginate(10); $pengumumans = DB::table('pengumumans')->paginate(10);
return view('sekretaris.dataPengumuman.index')->with('pengumumans', $pengumumans); return view('bendahara.dataPengumuman.index')->with('pengumumans', $pengumumans);
} }
public function editpengumuman($id){ public function editpengumuman($id){
$this->data['pengumumans'] = Pengumuman::find($id); $this->data['pengumumans'] = Pengumuman::find($id);
return view('sekretaris.dataPengumuman.edit',$this->data); return view('bendahara.dataPengumuman.edit',$this->data);
} }
public function updatepengumuman(Request $request, $id){ public function updatepengumuman(Request $request, $id){
$input = $request->all(); $input = $request->all();
Pengumuman::find($id)->update($input); Pengumuman::find($id)->update($input);
return redirect(url('sekretaris/dataPengumuman'))->with('info','Pengumuman berhasil diubah'); return redirect(url('bendahara/dataPengumuman'))->with('info','Pengumuman berhasil diubah');
} }
public function detail($ids) public function detail($ids)
{ {
$this->data['pengumumans'] = Pengumuman::find($ids); $this->data['pengumumans'] = Pengumuman::find($ids);
return view('sekretaris/dataPengumuman/detail',$this->data); return view('bendahara/dataPengumuman/detail',$this->data);
} }
public function store(Request $request) public function store(Request $request)
...@@ -45,17 +52,17 @@ class PengumumanController extends Controller ...@@ -45,17 +52,17 @@ class PengumumanController extends Controller
$input = $request->all(); $input = $request->all();
Pengumuman::create($input); Pengumuman::create($input);
return redirect(url('dataPengumuman'))->with('info','Pengumuman berhasil ditambahkan'); return redirect(url('bendahara'))->with('info','Pengumuman berhasil ditambahkan');
} }
public function create() public function create()
{ {
$this->data['title'] = 'Tambah Pengumuman'; $this->data['title'] = 'Tambah Pengumuman';
return view('sekretaris.pengumuman.index',$this->data); return view('bendahara.pengumuman.index',$this->data);
} }
public function delete($id){ public function delete($id){
Pengumuman::find($id)->delete(); Pengumuman::find($id)->delete();
return redirect(url('/sekretaris/dataPengumuman'))->with('info','Pengumuman berhasil dihapus'); return redirect(url('/bendahara/dataPengumuman'))->with('info','Pengumuman berhasil dihapus');
} }
} }
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class CommentController extends Controller
{
//
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Topic;
use App\User;
use App\Comment;
use App\Category;
use Redirect;
use Image;
use Auth;
use App\Post;
use Validator;
class ForumController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('rule:Mahasiswa');
}
public function getForum()
{
$posts = Topic::where('active', 1)->latest()->paginate(5);
//Page heading
$title = 'Post Terbaru';
return view('forum.index')->withPosts($posts)->withTitle($title);
}
public function show($id){
$post = Topic::where('id', $id)->first();
$comment = Comment::where('id', $id)->first();
if(!$post){
return view('errors.404');
}
$comments = $post->comment;
return view('forum.posting.index')->withPost($post)->withComments($comments)->withComment($comment);
}
public function getJob()
{
$posts = Topic::where('category_id', 4)->latest()->paginate(5);
//Page heading
$title = 'Lowongan Magang/Pekerjaan';
return view('forum.category.job')->withPosts($posts)->withTitle($title);
}
public function getLost()
{
$posts = Topic::where('category_id', 1)->latest()->paginate(5);
//Page heading
$title = 'Lost And Found';
return view('forum.category.lost')->withPosts($posts)->withTitle($title);
}
public function getPelajaran()
{
$posts = Topic::where('category_id', 2)->latest()->paginate(5);
//Page heading
$title = 'Pelajaran';
return view('forum.category.pelajaran')->withPosts($posts)->withTitle($title);
}
public function getSayembara()
{
$posts = Topic::where('category_id', 3)->latest()->paginate(5);
//Page heading
$title = 'Info Sayembara';
return view('forum.category.sayembara')->withPosts($posts)->withTitle($title);
}
public function getPost()
{
return view('forum.posting.index');
}
public function store(Request $request){
$posts = Topic::all();
$input['author_id'] = $request->user()->id;
$input['category_id'] = $request->input('category_id');
$input['judul'] = $request->input('judul');
$input['description'] = $request->input('description');
$id = $request->input('id');
Topic::create($input);
return redirect(url('forum'))->with('alert-success','Data Hasbeen Saved!');
}
public function getComment(Request $request)
{
//store data to comments table
$input['from_user'] = $request->user()->id;
$input['on_post'] = $request->input('on_post');
$input['body'] = $request->input('body');
$id = $request->input('id');
Comment::create($input);
return back()->with('alert-success','Data Hasbeen Saved!');
}
public function destroy($id)
{
$post = Topic::where('id', $id)->first();
$post->delete();
return back()->with('alert-success','Data Hasbeen Deleted!');
}
}
...@@ -36,59 +36,119 @@ class LoginController extends Controller ...@@ -36,59 +36,119 @@ class LoginController extends Controller
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>2 'roles_id'=>2
])){ ])){
return redirect ('/'); return redirect ('/pengurus');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'username'=>$request->EmailUsername, 'username'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>2 'roles_id'=>2
])){ ])){
return redirect ('/'); return redirect ('/pengurus');
}elseif(Auth::attempt([
'email'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>3
])){
return redirect('/pengurus');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'username'=>$request->EmailUsername, 'username'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>3 'roles_id'=>3
])){ ])){
return redirect('/'); return redirect('/pengurus');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'email'=>$request->EmailUsername, 'email'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>3 'roles_id'=>4
])){ ])){
return redirect('/'); return redirect('/sekretaris');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'username'=>$request->EmailUsername, 'username'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>4 'roles_id'=>4
])){ ])){
return redirect('/'); return redirect('/sekretaris');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'email'=>$request->EmailUsername, 'email'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>4 'roles_id'=>5
])){ ])){
return redirect('/'); return redirect('/bendahara');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'username'=>$request->EmailUsername, 'username'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>5 'roles_id'=>5
])){ ])){
return redirect('/'); return redirect('/bendahara');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'email'=>$request->EmailUsername, 'email'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>5 'roles_id'=>6
])){ ])){
return redirect('/'); return redirect('/pengurus');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'username'=>$request->EmailUsername, 'username'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>6 'roles_id'=>6
])){ ])){
return redirect('/'); return redirect('/pengurus');
}elseif(Auth::attempt([ }elseif(Auth::attempt([
'email'=>$request->EmailUsername, 'email'=>$request->EmailUsername,
'password'=> $request->password, 'password'=> $request->password,
'roles_id'=>6 'roles_id'=>7
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'username'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>7
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'email'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>8
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'username'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>8
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'email'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>9
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'username'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>9
])){
return redirect('/pengurus');
}elseif(Auth::attempt([
'email'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>10
])){
return redirect('/akademik');
}elseif(Auth::attempt([
'username'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>10
])){
return redirect('/akademik');
}elseif(Auth::attempt([
'email'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>11
])){
return redirect('/');
}elseif(Auth::attempt([
'username'=>$request->EmailUsername,
'password'=> $request->password,
'roles_id'=>11
])){ ])){
return redirect('/'); return redirect('/');
}else{ }else{
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use App\User;
use App\Pengumuman;
use Illuminate\Support\Facades\Auth;
class PengurusController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('rule:Ketua');
}
public function index($username)
{
$pengumumans = DB::table('pengumumans')->paginate(10);
$user = User::where('username',$username)->firstOrFail();
return view('pengurus.index',compact('user'))->with('pengumumans', $pengumumans);
}
public function datapengumuman(){
$this->data['title'] = 'Daftar Pengumuman';
$pengumumans = DB::table('pengumumans')->paginate(10);
return view('pengurus.dataPengumuman.index')->with('pengumumans', $pengumumans);
}
public function editpengumuman($id){
$this->data['pengumumans'] = Pengumuman::find($id);
return view('pengurus.dataPengumuman.edit',$this->data);
}
public function updatepengumuman(Request $request, $id){
$input = $request->all();
Pengumuman::find($id)->update($input);
return redirect(url('pengurus/dataPengumuman'))->with('info','Pengumuman berhasil diubah');
}
public function detail($ids)
{
$this->data['pengumumans'] = Pengumuman::find($ids);
return view('pengurus/dataPengumuman/detail',$this->data);
}
public function store(Request $request)
{
$input = $request->all();
Pengumuman::create($input);
return redirect(url('pengurus'))->with('info','Pengumuman berhasil ditambahkan');
}
public function create()
{
$this->data['title'] = 'Tambah Pengumuman';
return view('pengurus.pengumuman.index',$this->data);
}
public function delete($id){
Pengumuman::find($id)->delete();
return redirect(url('/pengurus/dataPengumuman'))->with('info','Pengumuman berhasil dihapus');
}
}
...@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Input; ...@@ -9,6 +9,7 @@ use Illuminate\Support\Facades\Input;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
use App\User; use App\User;
use App\Mahasiswa;
class RegisterController extends Controller class RegisterController extends Controller
{ {
public function __construct() public function __construct()
...@@ -25,12 +26,12 @@ class RegisterController extends Controller ...@@ -25,12 +26,12 @@ class RegisterController extends Controller
public function postRegister() public function postRegister()
{ {
$user = new User(); $user = new User();
$mahasiswa = new Mahasiswa();
$user->username = Input::get('username'); $user->username = Input::get('username');
$user->email = Input::get('email'); $user->email = Input::get('email');
$user->password = bcrypt(Input::get('password')); $user->password = bcrypt(Input::get('password'));
$user->roles_id =Input::get('roles_id'); $user->roles_id =Input::get('roles_id');
$user->save(); $user->save();
return redirect(url('/'))->with('alert-success','Data Hasbeen Saved!'); return redirect(url('/halamanAdmin'))->with('alert-success','Data Hasbeen Saved!');
} }
} }
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use App\User;
use App\Pengumuman;
use App\Event;
use App\Aspirasi;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
class SekretarisController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('rule:Sekretaris');
}
public function indexEvent(){
$this->data['title'] = 'Daftar Pengumuman';
$events = DB::table('events')->paginate(10);
return view('sekretaris.event.index')->with('events', $events);
}
public function editEvent($id){
$this->data['events'] = Event::find($id);
return view('sekretaris.event.edit',$this->data);
}
public function updateEvent(Request $request, $id){
$input = $request->all();
Event::find($id)->update($input);
return redirect(url('sekretaris/event'))->with('info','Event berhasil diubah');
}
public function detailEvent($ids)
{
$this->data['events'] = Event::find($ids);
return view('sekretaris/event/detailEvent',$this->data);
}
public function createEvent()
{
$this->data['title'] = 'Tambah Event';
return view('sekretaris.event.create',$this->data);
}
public function index()
{
$pengumumans = DB::table('pengumumans')->paginate(10);
return view('sekretaris.index')->with('pengumumans', $pengumumans);
}
public function datapengumuman(){
$this->data['title'] = 'Daftar Pengumuman';
$pengumumans = DB::table('pengumumans')->paginate(10);
return view('sekretaris.dataPengumuman.index')->with('pengumumans', $pengumumans);
}
public function editpengumuman($id){
$this->data['pengumumans'] = Pengumuman::find($id);
return view('sekretaris.dataPengumuman.edit',$this->data);
}
public function updatepengumuman(Request $request, $id){
$input = $request->all();
Pengumuman::find($id)->update($input);
return redirect(url('sekretaris/dataPengumuman'))->with('info','Pengumuman berhasil diubah');
}
public function detail($ids)
{
$this->data['pengumumans'] = Pengumuman::find($ids);
return view('sekretaris/dataPengumuman/detail',$this->data);
}
public function store(Request $request)
{
$input = $request->all();
Pengumuman::create($input);
return redirect(url('sekretaris'))->with('info','Pengumuman berhasil ditambahkan');
}
public function storeEvent()
{
$event = new Event();
$event->start_date = Input::get('start_date');
$event->due_date = Input::get('due_date');
$event->judul = Input::get('judul');
$event->content =Input::get('content');
$event->penulis =Input::get('penulis');
$event->save();
return redirect(url('sekretaris'))->with('info','Event berhasil ditambahkan');
}
public function create()
{
$this->data['title'] = 'Tambah Pengumuman';
return view('sekretaris.pengumuman.index',$this->data);
}
public function delete($id){
Pengumuman::find($id)->delete();
return redirect(url('/sekretaris/dataPengumuman'))->with('info','Pengumuman berhasil dihapus');
}
public function dataAspirasi()
{
$no=1;
$user = Auth::user();
$aspirasi = DB::table('aspirasi')->latest()->paginate(3);
return view('sekretaris.Aspirasi.dataAspirasi')->withAspirasi($aspirasi)->withNo($no);
}
public function showAspirasi($id){
$aspirasi = Aspirasi::where('id', $id)->first();
if(!$aspirasi){
return view('errors.404');
}
$user = Auth::user();
return view('sekretaris.Aspirasi.show')->withAspirasi($aspirasi)->withUser($user);
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Topic;
use App\User;
use App\Category;
use Redirect;
use Image;
use Auth;
class TopicController extends Controller
{
public function store(Request $request){
if($request->hasFile('postPict')){
$postPict = $request->file('postPict');
$filename = time().'.'. $postPict->getClientOriginalExtension();
Image::make($postPict)->save( public_path('/uploads/posts/'.$filename));
$posts = Topic::all();
$posts->images = $filename;
//Validasi
$input['author_id'] = $request->user()->id;
$input['category_id'] = $request->input('category_id');
$input['judul'] = $request->input('judul');
$input['description'] = $request->input('description');
$input['images'] = $filename;
}
else{
$posts = Topic::all();
$input['author_id'] = $request->user()->id;
$input['category_id'] = $request->input('category_id');
$input['judul'] = $request->input('judul');
$input['description'] = $request->input('description');
}
$id = $request->input('id');
Topic::create($input);
return redirect ('/');
}
public function getForum()
{
return view('forum.halamanForum');
}
public function getBahasaPemrograman()
{
return view('forum.bahasaPemrograman');
}
}
...@@ -16,7 +16,7 @@ class UserController extends Controller ...@@ -16,7 +16,7 @@ class UserController extends Controller
public function profile($username){ public function profile($username){
$user = User::where('username',$username)->firstOrFail(); $user = User::where('username',$username)->firstOrFail();
return view('profile', compact('user')); return view('mahasiswa.profile', compact('user'));
} }
public function update_avatar($username,Request $request){ public function update_avatar($username,Request $request){
...@@ -31,7 +31,7 @@ class UserController extends Controller ...@@ -31,7 +31,7 @@ class UserController extends Controller
$user->mahasiswa->save(); $user->mahasiswa->save();
$user = User::where('username',$username)->firstOrFail(); $user = User::where('username',$username)->firstOrFail();
} }
return view ('profile/{username}', compact('user')); return view ('mahasiswa.index');
} }
} }
...@@ -3,16 +3,66 @@ ...@@ -3,16 +3,66 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Event;
use App\Pengumuman;
use DB;
use Illuminate\Support\Facades\Auth;
use App\User;
use App\Aspirasi;
class homeController extends Controller class homeController extends Controller
{ {
public function home() public function home()
{ {
return view ('welcome');
$this->data['title'] = 'Daftar Pengumuman';
$pengumumans = DB::table('pengumumans')->latest()->paginate(3);
$event = DB::table('events')->latest()->paginate(3);
$user = Auth::user();
return view ('mahasiswa.index')->with('pengumumans', $pengumumans)->withUser($user)->withEvent($event);
} }
public function __construct() public function __construct()
{ {
$this->middleware('auth'); $this->middleware('auth');
$this->middleware('rule:Mahasiswa');
}
public function getPengumuman()
{
$no=1;
$user = Auth::user();
$pengumumans = DB::table('pengumumans')->latest()->paginate(10);
return view('mahasiswa.pengumuman',['pengumumans' =>$pengumumans])->withUser($user)->withNo($no);
} }
public function show($id){
$pengumumans = Pengumuman::where('id', $id)->first();
if(!$pengumumans){
return view('errors.404');
}
$user = Auth::user();
return view('mahasiswa.pengumuman.index')->withPengumumans($pengumumans)->withUser($user);
}
public function getProfileBem()
{
$user = Auth::user();
return view('mahasiswa.profilbem')->withUser($user);
}
public function getAsp()
{
$user = Auth::user();
return view('mahasiswa.aspirasi')->withUser($user);
}
public function storeAspirasi(Request $request)
{
$input = $request->all();
Aspirasi::create($input);
return redirect(url('/'))->with('info','Aspirasi berhasil ditambahkan');
}
} }
<?php <?php
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
use Closure; use Closure;
use App\User;
class HakAksesMiddleware class HakAksesMiddleware
{ {
/** /**
...@@ -18,7 +19,9 @@ class HakAksesMiddleware ...@@ -18,7 +19,9 @@ class HakAksesMiddleware
if(auth()->check() && !auth()->user()->punyaRule($ruleName)) if(auth()->check() && !auth()->user()->punyaRule($ruleName))
{ {
return redirect ('/'); $roles_id="";
$roles_id = User::where('roles_id',$roles_id)->firstOrFail();
return redirect ('errors.404');
} }
......
...@@ -8,7 +8,13 @@ class Mahasiswa extends Model ...@@ -8,7 +8,13 @@ class Mahasiswa extends Model
{ {
protected $table = 'mahasiswa'; protected $table = 'mahasiswa';
protected $fillable = ['id','user_id','Name','tanggalLahir','tempatLahir','alamat','angkatan_id','prodi_id','avatar']; protected $fillable = ['id','user_id','Name','tanggalLahir','tempatLahir','alamat','angkatan_id','prodi_id','avatar'];
public function angkatan(){
return $this->belongsTo('App\Angkatan', 'angkatan_id');
}
public function prodi(){ public function prodi(){
return $this->hasOne('App\prodi','prodi_id'); return $this->belongsTo('App\Prodi', 'prodi_id');
} }
} }
...@@ -7,5 +7,8 @@ use Illuminate\Database\Eloquent\Model; ...@@ -7,5 +7,8 @@ use Illuminate\Database\Eloquent\Model;
class Prodi extends Model class Prodi extends Model
{ {
protected $table = 'prodi'; protected $table = 'prodi';
public function mahasiswa()
{
return $this->hasMany('App\Mahasiswa');
}
} }
...@@ -8,13 +8,26 @@ class Topic extends Model ...@@ -8,13 +8,26 @@ class Topic extends Model
{ {
protected $guarded =[]; protected $guarded =[];
public function comments() public function comment()
{ {
return $this->hasMany('AppComments', 'on_post'); return $this->hasMany('App\Comment', 'on_post');
} }
public function author() public function author()
{ {
return $this->belongsTo('App\User', 'author_id'); return $this->belongsTo('App\User', 'author_id');
} }
public function category()
{
return $this->belongsTo('App\Category', 'category_id');
}
public function commentsCount()
{
return $this->comment()
->selectRaw('on_post, count(*)-1 as total')
->groupBy('on_post');
}
} }
...@@ -46,4 +46,8 @@ class User extends Authenticatable ...@@ -46,4 +46,8 @@ class User extends Authenticatable
public function mahasiswa(){ public function mahasiswa(){
return $this->hasOne('App\Mahasiswa','user_id'); return $this->hasOne('App\Mahasiswa','user_id');
} }
public function post(){
return $this->hasMany('App\Topic', 'author_id');
}
} }
...@@ -27,14 +27,13 @@ class CreateTopicTable extends Migration ...@@ -27,14 +27,13 @@ class CreateTopicTable extends Migration
$table->unsignedInteger('category_id')->nullable(); $table->unsignedInteger('category_id')->nullable();
$table->string('judul'); //untuk meta description, idk $table->string('judul'); //untuk meta description, idk
$table->text('description'); //post $table->text('description'); //post
$table->string('slug')->default('topic');
$table->string('images')->default('img.jpg'); $table->string('images')->default('img.jpg');
$table->boolean('active')->default(1); $table->boolean('active')->default(1);
$table->timestamps(); $table->timestamps();
}); });
Schema::table('topics',function (Blueprint $kolom){ Schema::table('topics',function (Blueprint $kolom){
$kolom->foreign('category_id')->references('id')->on('categoris')->onDelete('cascade')->onUpdate('cascade'); $kolom->foreign('category_id')->references('id')->on('categories')->onDelete('cascade')->onUpdate('cascade');
}); });
} }
......
...@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema; ...@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
class CreateCommentsTable extends Migration class CreateCommentTable extends Migration
{ {
/** /**
* Run the migrations. * Run the migrations.
...@@ -35,6 +35,6 @@ class CreateCommentsTable extends Migration ...@@ -35,6 +35,6 @@ class CreateCommentsTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::drop('comments'); Schema::drop('comments');
} }
} }
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEventsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('events', function (Blueprint $table){
$table->increments('id');
$table->string('start_date');
$table->string('due_date');
$table->string('judul');
$table->text('content');
$table->string('penulis');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('events');
}
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAspirasiTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('aspirasi', function (Blueprint $table){
$table->increments('id');
$table->string('judul');
$table->text('content');
$table->string('penulis');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('pengumumans');
}
}
...@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder ...@@ -11,6 +11,6 @@ class DatabaseSeeder extends Seeder
*/ */
public function run() public function run()
{ {
// $this->call(UsersTableSeeder::class);
} }
} }
/* Flickity
------------------------- */
.flickity-enabled {
position: relative;
}
.flickity-enabled:focus { outline: none; }
.flickity-viewport {
overflow: hidden;
position: relative;
cursor: -webkit-grab;
cursor: grab;
}
.flickity-viewport.is-pointer-down {
cursor: -webkit-grabbing;
cursor: grabbing;
}
.flickity-slider {
position: absolute;
width: 100%;
}
/* ---- previous/next buttons ---- */
.flickity-prev-next-button {
position: absolute;
top: 50%;
width: 44px;
height: 44px;
border: none;
border-radius: 50%;
background: white;
background: hsla(0, 0%, 100%, 0.75);
cursor: pointer;
/* vertically center */
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.flickity-prev-next-button.previous { left: 10px; }
.flickity-prev-next-button.next { right: 10px; }
.flickity-prev-next-button:disabled {
opacity: 0.3;
cursor: auto;
}
.flickity-prev-next-button svg {
position: absolute;
left: 20%;
top: 20%;
width: 60%;
height: 60%;
}
.flickity-prev-next-button .arrow {
fill: #333;
}
/* color & size if no SVG - IE8 and Android 2.3 */
.flickity-prev-next-button.no-svg {
color: #333;
font-size: 26px;
}
/* ---- page dots ---- */
.flickity-page-dots {
position: absolute;
width: 100%;
bottom: -25px;
padding: 0;
margin: 0;
list-style: none;
text-align: center;
line-height: 1;
}
.flickity-page-dots .dot {
display: inline-block;
width: 10px;
height: 10px;
margin: 0 8px;
background: #333;
border-radius: 50%;
opacity: 0.25;
cursor: pointer;
}
.flickity-page-dots .dot.is-selected { opacity: 1; }
/*! fancyBox v2.1.5 fancyapps.com | fancyapps.com/fancybox/#license */
.fancybox-wrap,
.fancybox-skin,
.fancybox-outer,
.fancybox-inner,
.fancybox-image,
.fancybox-wrap iframe,
.fancybox-wrap object,
.fancybox-nav,
.fancybox-nav span,
.fancybox-tmp
{
padding: 0;
margin: 0;
border: 0;
outline: none;
vertical-align: top;
}
.fancybox-wrap {
position: absolute;
top: 0;
left: 0;
z-index: 8020;
}
.fancybox-skin {
position: relative;
background: #f9f9f9;
color: #444;
text-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.fancybox-opened {
z-index: 8030;
}
.fancybox-opened .fancybox-skin {
-webkit-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}
.fancybox-outer, .fancybox-inner {
position: relative;
}
.fancybox-inner {
overflow: hidden;
}
.fancybox-type-iframe .fancybox-inner {
-webkit-overflow-scrolling: touch;
}
.fancybox-error {
color: #444;
font: 14px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
margin: 0;
padding: 15px;
white-space: nowrap;
}
.fancybox-image, .fancybox-iframe {
display: block;
width: 100%;
height: 100%;
}
.fancybox-image {
max-width: 100%;
max-height: 100%;
}
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('../img/fancybox_sprite.png');
}
#fancybox-loading {
position: fixed;
top: 50%;
left: 50%;
margin-top: -22px;
margin-left: -22px;
background-position: 0 -108px;
opacity: 0.8;
cursor: pointer;
z-index: 8060;
}
#fancybox-loading div {
width: 44px;
height: 44px;
background: url('../img/fancybox_loading.gif') center center no-repeat;
}
.fancybox-close {
position: absolute;
top: -18px;
right: -18px;
width: 36px;
height: 36px;
cursor: pointer;
z-index: 8040;
}
.fancybox-nav {
position: absolute;
top: 0;
width: 40%;
height: 100%;
cursor: pointer;
text-decoration: none;
background: transparent url('blank.gif'); /* helps IE */
-webkit-tap-highlight-color: rgba(0,0,0,0);
z-index: 8040;
}
.fancybox-prev {
left: 0;
}
.fancybox-next {
right: 0;
}
.fancybox-nav span {
position: absolute;
top: 50%;
width: 36px;
height: 34px;
margin-top: -18px;
cursor: pointer;
z-index: 8040;
visibility: hidden;
}
.fancybox-prev span {
left: 10px;
background-position: 0 -36px;
}
.fancybox-next span {
right: 10px;
background-position: 0 -72px;
}
.fancybox-nav:hover span {
visibility: visible;
}
.fancybox-tmp {
position: absolute;
top: -99999px;
left: -99999px;
visibility: hidden;
max-width: 99999px;
max-height: 99999px;
overflow: visible !important;
}
/* Overlay helper */
.fancybox-lock {
overflow: hidden !important;
width: auto;
}
.fancybox-lock body {
overflow: hidden !important;
}
.fancybox-lock-test {
overflow-y: hidden !important;
}
.fancybox-overlay {
position: absolute;
top: 0;
left: 0;
overflow: hidden;
display: none;
z-index: 8000;
background: url('../img/fancybox_overlay.png');
}
.fancybox-overlay-fixed {
position: fixed;
bottom: 0;
right: 0;
}
.fancybox-lock .fancybox-overlay {
overflow: auto;
overflow-y: scroll;
}
/* Title helper */
.fancybox-title {
visibility: hidden;
font: normal 13px/20px "Helvetica Neue",Helvetica,Arial,sans-serif;
position: relative;
text-shadow: none;
z-index: 8050;
}
.fancybox-opened .fancybox-title {
visibility: visible;
}
.fancybox-title-float-wrap {
position: absolute;
bottom: 0;
right: 50%;
margin-bottom: -35px;
z-index: 8050;
text-align: center;
}
.fancybox-title-float-wrap .child {
display: inline-block;
margin-right: -100%;
padding: 2px 20px;
background: transparent; /* Fallback for web browsers that doesn't support RGBa */
background: rgba(0, 0, 0, 0.8);
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
text-shadow: 0 1px 2px #222;
color: #FFF;
font-weight: bold;
line-height: 24px;
white-space: nowrap;
}
.fancybox-title-outside-wrap {
position: relative;
margin-top: 10px;
color: #fff;
}
.fancybox-title-inside-wrap {
padding-top: 10px;
}
.fancybox-title-over-wrap {
position: absolute;
bottom: 0;
left: 0;
color: #fff;
padding: 10px;
background: #000;
background: rgba(0, 0, 0, .8);
}
/*Retina graphics!*/
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5){
#fancybox-loading, .fancybox-close, .fancybox-prev span, .fancybox-next span {
background-image: url('../img/fancybox_sprite@2x.png');
background-size: 44px 152px; /*The size of the normal image, half the size of the hi-res image*/
}
#fancybox-loading div {
background-image: url('../img/fancybox_loading@2x.gif');
background-size: 24px 24px; /*The size of the normal image, half the size of the hi-res image*/
}
}
\ No newline at end of file
/* Preload images */
body:after {
content: url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);
display: none;
}
.lightboxOverlay {
position: absolute;
top: 0;
left: 0;
z-index: 9999;
background-color: black;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
opacity: 0.8;
display: none;
}
.lightbox {
position: absolute;
left: 0;
width: 100%;
z-index: 10000;
text-align: center;
line-height: 0;
font-weight: normal;
}
.lightbox .lb-image {
display: block;
height: auto;
max-width: inherit;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
-ms-border-radius: 3px;
-o-border-radius: 3px;
border-radius: 3px;
}
.lightbox a img {
border: none;
}
.lb-outerContainer {
position: relative;
background-color: white;
*zoom: 1;
width: 250px;
height: 250px;
margin: 0 auto;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-ms-border-radius: 4px;
-o-border-radius: 4px;
border-radius: 4px;
}
.lb-outerContainer:after {
content: "";
display: table;
clear: both;
}
.lb-container {
padding: 4px;
}
.lb-loader {
position: absolute;
top: 43%;
left: 0;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
.lb-cancel {
display: block;
width: 32px;
height: 32px;
margin: 0 auto;
background: url(../img/loading.gif) no-repeat;
}
.lb-nav {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
.lb-container > .nav {
left: 0;
}
.lb-nav a {
outline: none;
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
}
.lb-prev, .lb-next {
height: 100%;
cursor: pointer;
display: block;
}
.lb-nav a.lb-prev {
width: 34%;
left: 0;
float: left;
background: url(../img/prev.png) left 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
-o-transition: opacity 0.6s;
transition: opacity 0.6s;
}
.lb-nav a.lb-prev:hover {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
.lb-nav a.lb-next {
width: 64%;
right: 0;
float: right;
background: url(../img/next.png) right 48% no-repeat;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
-o-transition: opacity 0.6s;
transition: opacity 0.6s;
}
.lb-nav a.lb-next:hover {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
.lb-dataContainer {
margin: 0 auto;
padding-top: 5px;
*zoom: 1;
width: 100%;
-moz-border-radius-bottomleft: 4px;
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomright: 4px;
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.lb-dataContainer:after {
content: "";
display: table;
clear: both;
}
.lb-data {
padding: 0 4px;
color: #ccc;
}
.lb-data .lb-details {
width: 85%;
float: left;
text-align: left;
line-height: 1.1em;
}
.lb-data .lb-caption {
font-size: 13px;
font-weight: bold;
line-height: 1em;
}
.lb-data .lb-number {
display: block;
clear: left;
padding-bottom: 1em;
font-size: 12px;
color: #999999;
}
.lb-data .lb-close {
display: block;
float: right;
width: 30px;
height: 30px;
background: url(../img/close.png) top right no-repeat;
text-align: right;
outline: none;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
opacity: 0.7;
-webkit-transition: opacity 0.2s;
-moz-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
transition: opacity 0.2s;
}
.lb-data .lb-close:hover {
cursor: pointer;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
}
@media screen and (max-width:1200px){
.device{left:20%;top:-36px;}
footer li{margin-right:10%;}
.feature-content{width:55%;}
}
@media screen and (max-width:991px){
.feature-1,.feature-2{margin-bottom:50px;}
.device{display:none;}
.screenshots ul li{width:50%;}
.screenshots-intro{padding:110px 0 100px 0;}
.feature-content{width:80%;}
.features-slider{height:100%}
}
@media screen and (max-width:680px){
.feature-content{width:60%;}
}
@media screen and (max-width:640px){
.use-btn{display:none;}
footer li{display:block;text-align:left;padding:20px 0;border-bottom:dashed 1px #c7cacc;margin-right:0!important;float:none;}
nav{margin-top:40px;}
.overlay ul{margin-left:0px;}
.overlay ul li a{padding:20px 0;min-width:120px;font-size:12px;}
}
@media screen and (max-width:465px){
.hero h1{font-size:40px;margin:100px 0 45px 0}
.screenshots ul li{width:100%;min-height:100%;float:none;}
section.video i{font-size:30px;}
section.video h1{font-size:15px;font-weight:400;}
section.video{padding:40px;}
.feature-content{width:100%;text-align:center;margin-top:20px;}
.feature-icon{display:block;margin:0 auto;}
blockquote p{width:60%;}
.features-slider {padding: 11% 50px 10% 50px;}
}
\ No newline at end of file
/* ! normalize.css v1.0.0 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/* ==========================================================================
Global Styles
========================================================================== */
.group:after {
content: "";
display: table;
clear: both;
}
a {
-webkit-transition-timing-function: ease-in-out;
transition-timing-function: ease-in-out;
-webkit-transition-duration: 300ms;
transition-duration: 300ms;
-webkit-transition-property: color, border-color, background-color;
transition-property: color, border-color, background-color;
}
.nopadding {
margin: 0 !important;
padding: 0 !important;
}
p {
font-size: 14px;
line-height: 25px;
}
a {
color: #73d0da
}
a:hover, a:focus {
color: #73d0da;
text-decoration: none;
}
.texture-overlay {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-image: url(../img/grid.png);
}
/* ==========================================================================
Buttons
========================================================================== */
.use-btn {
display: inline-block;
margin: 0 10px 10px 0;
padding: 20px 50px;
border-radius: 3px;
background-color: #fff;
color: #4b98a9;
font-size: 16px;
}
.use-btn:hover, .use-btn:focus {
background-color: #73d0da;
color: #fff;
text-decoration: none;
}
.learn-btn, .download-btn {
display: inline-block;
padding: 18px 46px;
border: 2px solid #fff;
border-radius: 3px;
color: #fff;
font-size: 16px;
}
.learn-btn:hover, .download-btn:hover, .learn-btn:focus, .download-btn:focus {
border-color: #73d0da;
color: #73d0da;
text-decoration: none;
}
.read-more-btn {
display: inline-block;
color: #323a45;
text-transform: uppercase;
font-weight: 400;
}
.read-more-btn i, .download-btn i {
margin-left: 5px
}
.showcase .download-btn {
margin-top: 50px
}
.download .download-btn {
margin-top: 25px
}
/* ==========================================================================
Hero
========================================================================== */
.hero {
position: relative;
padding: 60px 0 60px 0;
min-height: 800px;
background: rgb(40, 70, 102) url('../img/del.jpg') no-repeat center center;
background-size: cover;
color: #fff;
}
.hero h1 {
margin: 200px 0 45px 0;
font-weight: 300;
font-size: 45px;
}
.hero h1 span {
display: inline-block;
color: #a1a9b0;
}
#home {
width: 100%;
height: 100%;
}
.hero {
width: 100%;
height: 100%;
}
header i {
margin-left: 5px
}
/* ==========================================================================
Video
========================================================================== */
section.video i {
margin-right: 10px;
color: #323a45;
vertical-align: middle;
font-size: 50px;
-webkit-transition: color 300ms ease-in-out;
transition: color 300ms ease-in-out;
}
section.video h1 {
font-weight: 400;
font-size: 20px;
}
section.video {
padding: 60px 0;
background-color: #f6f7f9;
}
section.video a {
color: #323a45
}
section.video a:hover, section.video a:focus {
color: #73d0da;
text-decoration: none;
}
section.video a:hover i, section.video a:focus i {
color: #73d0da
}
/* ==========================================================================
Custom Slider Controls (Flickity)
========================================================================== */
.flickity-page-dots .dot {
width: 13px;
height: 13px;
opacity: 1;
background: transparent;
border: 2px solid white;
-webkit-transition: background 0.3s;
transition: background 0.3s;
}
.flickity-page-dots .dot.is-selected {
background: white;
}
/* ==========================================================================
Features Slider
========================================================================== */
.features-bg {
position: relative;
min-height: 400px;
background: url('../img/features-intro-01.jpg') no-repeat center center;
background-size: cover;
}
.features-img {
width: 100%;
height: 400px;
text-align: center;
line-height: 400px;
}
.features-slider {
position: relative;
padding: 11% 100px 10% 100px;
height: 400px;
background-color: #3F6184;
}
.features-slider ul {
margin: 0;
padding: 0;
list-style: none;
}
.features-slider ul li {
width: 100%;
}
.features-slider li h1 {
margin-bottom: 15px;
color: #fff;
font-weight: 400;
font-size: 22px;
}
.features-slider li p {
color: #fff;
font-size: 14px;
}
.features-intro-img {
position: relative
}
.slides li h1 {
margin: 0;
padding: 0;
}
.features-slider .flickity-page-dots {
text-align: left;
margin-top: 50px;
position: static;
}
.features-slider .flickity-page-dots .dot {
margin: 0 12px 0 0;
}
/* ==========================================================================
Features List
========================================================================== */
.features-list {
padding: 130px 0
}
.features-list h1 {
margin: 0 0 10px 0;
padding: 0;
color: #24374b;
font-size: 20px;
}
.features-list p {
margin-bottom: 20px;
color: #778899;
}
.feature-content {
display: inline-block;
margin-left: 0;
width: 65%;
}
.feature-icon {
display: inline-block;
margin-right: 25px;
width: 90px;
height: 90px;
border: solid 2px #4e9ba3;
border-radius: 50%;
vertical-align: top;
text-align: center;
font-size: 25px;
line-height: 90px;
}
.feature-icon i {
color: #4e9ba3
}
$(document).ready(function(){$(".wp1").waypoint(function(){$(".wp1").addClass("animated fadeInLeft")},{offset:"75%"});$(".wp2").waypoint(function(){$(".wp2").addClass("animated fadeInDown")},{offset:"75%"});$(".wp3").waypoint(function(){$(".wp3").addClass("animated bounceInDown")},{offset:"75%"});$(".wp4").waypoint(function(){$(".wp4").addClass("animated fadeInDown")},{offset:"75%"});$("#featuresSlider").flickity({cellAlign:"left",contain:true,prevNextButtons:false});$("#showcaseSlider").flickity({cellAlign:"left",contain:true,prevNextButtons:false,imagesLoaded:true});$(".youtube-media").on("click",function(e){var t=$(window).width();if(t<=768){return}$.fancybox({href:this.href,padding:4,type:"iframe",href:this.href.replace(new RegExp("watch\\?v=","i"),"v/")});return false})});$(document).ready(function(){$("a.single_image").fancybox({padding:4})});$(".nav-toggle").click(function(){$(this).toggleClass("active");$(".overlay-boxify").toggleClass("open")});$(".overlay ul li a").click(function(){$(".nav-toggle").toggleClass("active");$(".overlay-boxify").toggleClass("open")});$(".overlay").click(function(){$(".nav-toggle").toggleClass("active");$(".overlay-boxify").toggleClass("open")});$("a[href*=#]:not([href=#])").click(function(){if(location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&location.hostname===this.hostname){var e=$(this.hash);e=e.length?e:$("[name="+this.hash.slice(1)+"]");if(e.length){$("html,body").animate({scrollTop:e.offset().top},2e3);return false}}})
$(document).ready(function() {
/***************** Waypoints ******************/
$('.wp1').waypoint(function() {
$('.wp1').addClass('animated fadeInLeft');
}, {
offset: '75%'
});
$('.wp2').waypoint(function() {
$('.wp2').addClass('animated fadeInDown');
}, {
offset: '75%'
});
$('.wp3').waypoint(function() {
$('.wp3').addClass('animated bounceInDown');
}, {
offset: '75%'
});
$('.wp4').waypoint(function() {
$('.wp4').addClass('animated fadeInDown');
}, {
offset: '75%'
});
/***************** Flickity ******************/
$('#featuresSlider').flickity({
cellAlign: 'left',
contain: true,
prevNextButtons: false
});
$('#showcaseSlider').flickity({
cellAlign: 'left',
contain: true,
prevNextButtons: false,
imagesLoaded: true
});
/***************** Fancybox ******************/
$(".youtube-media").on("click", function(e) {
var jWindow = $(window).width();
if (jWindow <= 768) {
return;
}
$.fancybox({
href: this.href,
padding: 4,
type: "iframe",
'href': this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
});
return false;
});
});
$(document).ready(function() {
$("a.single_image").fancybox({
padding: 4,
});
});
/***************** Nav Transformicon ******************/
/* When user clicks the Icon */
$(".nav-toggle").click(function() {
$(this).toggleClass("active");
$(".overlay-boxify").toggleClass("open");
});
/* When user clicks a link */
$(".overlay ul li a").click(function() {
$(".nav-toggle").toggleClass("active");
$(".overlay-boxify").toggleClass("open");
});
/* When user clicks outside */
$(".overlay").click(function() {
$(".nav-toggle").toggleClass("active");
$(".overlay-boxify").toggleClass("open");
});
/***************** Smooth Scrolling ******************/
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 2000);
return false;
}
}
});
!function(e){function n(e){return new RegExp("(^|\\s+)"+e+"(\\s+|$)")}function t(e,n){var t=s(e,n)?i:a;t(e,n)}if(Modernizr.touch){var s,a,i;"classList"in document.documentElement?(s=function(e,n){return e.classList.contains(n)},a=function(e,n){e.classList.add(n)},i=function(e,n){e.classList.remove(n)}):(s=function(e,t){return n(t).test(e.className)},a=function(e,n){s(e,n)||(e.className=e.className+" "+n)},i=function(e,t){e.className=e.className.replace(n(t)," ")});var c={hasClass:s,addClass:a,removeClass:i,toggleClass:t,has:s,add:a,remove:i,toggle:t};"function"==typeof define&&define.amd?define(c):e.classie=c,[].slice.call(document.querySelectorAll("ul.grid > li > figure")).forEach(function(e,n){e.querySelector("figcaption").addEventListener("touchstart",function(e){e.stopPropagation()},!1),e.addEventListener("touchstart",function(e){c.toggle(this,"visible")},!1)})}}(window);
\ No newline at end of file
/** Used Only For Touch Devices **/
( function( window ) {
// for touch devices: add class visible to the figcaption when touching it.
if( Modernizr.touch ) {
// classie.js https://github.com/desandro/classie/blob/master/classie.js
// class helper functions from bonzo https://github.com/ded/bonzo
function classReg( className ) {
return new RegExp("(^|\\s+)" + className + "(\\s+|$)");
}
// classList support for class management
// altho to be fair, the api sucks because it won't accept multiple classes at once
var hasClass, addClass, removeClass;
if ( 'classList' in document.documentElement ) {
hasClass = function( elem, c ) {
return elem.classList.contains( c );
};
addClass = function( elem, c ) {
elem.classList.add( c );
};
removeClass = function( elem, c ) {
elem.classList.remove( c );
};
}
else {
hasClass = function( elem, c ) {
return classReg( c ).test( elem.className );
};
addClass = function( elem, c ) {
if ( !hasClass( elem, c ) ) {
elem.className = elem.className + ' ' + c;
}
};
removeClass = function( elem, c ) {
elem.className = elem.className.replace( classReg( c ), ' ' );
};
}
function toggleClass( elem, c ) {
var fn = hasClass( elem, c ) ? removeClass : addClass;
fn( elem, c );
}
var classie = {
// full names
hasClass: hasClass,
addClass: addClass,
removeClass: removeClass,
toggleClass: toggleClass,
// short names
has: hasClass,
add: addClass,
remove: removeClass,
toggle: toggleClass
};
// transport
if ( typeof define === 'function' && define.amd ) {
// AMD
define( classie );
} else {
// browser global
window.classie = classie;
}
[].slice.call( document.querySelectorAll( 'ul.grid > li > figure' ) ).forEach( function( el, i ) {
el.querySelector( 'figcaption' ).addEventListener( 'touchstart', function(e) {
e.stopPropagation();
}, false );
el.addEventListener( 'touchstart', function(e) {
classie.toggle( this, 'visible' );
}, false );
} );
}
})( window );
\ No newline at end of file
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-touch-shiv-cssclasses-teststyles-prefixes-load
*/
;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["&#173;",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:t(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c};for(var B in n)v(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.testStyles=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))};
\ No newline at end of file
/*!
* Retina.js v1.3.0
*
* Copyright 2014 Imulus, LLC
* Released under the MIT license
*
* Retina.js is an open source script that makes it easy to serve
* high-resolution images to devices with retina displays.
*/
(function() {
var root = (typeof exports === 'undefined' ? window : exports);
var config = {
// An option to choose a suffix for 2x images
retinaImageSuffix : '@2x',
// Ensure Content-Type is an image before trying to load @2x image
// https://github.com/imulus/retinajs/pull/45)
check_mime_type: true,
// Resize high-resolution images to original image's pixel dimensions
// https://github.com/imulus/retinajs/issues/8
force_original_dimensions: true
};
function Retina() {}
root.Retina = Retina;
Retina.configure = function(options) {
if (options === null) {
options = {};
}
for (var prop in options) {
if (options.hasOwnProperty(prop)) {
config[prop] = options[prop];
}
}
};
Retina.init = function(context) {
if (context === null) {
context = root;
}
var existing_onload = context.onload || function(){};
context.onload = function() {
var images = document.getElementsByTagName('img'), retinaImages = [], i, image;
for (i = 0; i < images.length; i += 1) {
image = images[i];
if (!!!image.getAttributeNode('data-no-retina')) {
retinaImages.push(new RetinaImage(image));
}
}
existing_onload();
};
};
Retina.isRetina = function(){
var mediaQuery = '(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)';
if (root.devicePixelRatio > 1) {
return true;
}
if (root.matchMedia && root.matchMedia(mediaQuery).matches) {
return true;
}
return false;
};
var regexMatch = /\.\w+$/;
function suffixReplace (match) {
return config.retinaImageSuffix + match;
}
function RetinaImagePath(path, at_2x_path) {
this.path = path || '';
if (typeof at_2x_path !== 'undefined' && at_2x_path !== null) {
this.at_2x_path = at_2x_path;
this.perform_check = false;
} else {
if (undefined !== document.createElement) {
var locationObject = document.createElement('a');
locationObject.href = this.path;
locationObject.pathname = locationObject.pathname.replace(regexMatch, suffixReplace);
this.at_2x_path = locationObject.href;
} else {
var parts = this.path.split('?');
parts[0] = parts[0].replace(regexMatch, suffixReplace);
this.at_2x_path = parts.join('?');
}
this.perform_check = true;
}
}
root.RetinaImagePath = RetinaImagePath;
RetinaImagePath.confirmed_paths = [];
RetinaImagePath.prototype.is_external = function() {
return !!(this.path.match(/^https?\:/i) && !this.path.match('//' + document.domain) );
};
RetinaImagePath.prototype.check_2x_variant = function(callback) {
var http, that = this;
if (this.is_external()) {
return callback(false);
} else if (!this.perform_check && typeof this.at_2x_path !== 'undefined' && this.at_2x_path !== null) {
return callback(true);
} else if (this.at_2x_path in RetinaImagePath.confirmed_paths) {
return callback(true);
} else {
http = new XMLHttpRequest();
http.open('HEAD', this.at_2x_path);
http.onreadystatechange = function() {
if (http.readyState !== 4) {
return callback(false);
}
if (http.status >= 200 && http.status <= 399) {
if (config.check_mime_type) {
var type = http.getResponseHeader('Content-Type');
if (type === null || !type.match(/^image/i)) {
return callback(false);
}
}
RetinaImagePath.confirmed_paths.push(that.at_2x_path);
return callback(true);
} else {
return callback(false);
}
};
http.send();
}
};
function RetinaImage(el) {
this.el = el;
this.path = new RetinaImagePath(this.el.getAttribute('src'), this.el.getAttribute('data-at2x'));
var that = this;
this.path.check_2x_variant(function(hasVariant) {
if (hasVariant) {
that.swap();
}
});
}
root.RetinaImage = RetinaImage;
RetinaImage.prototype.swap = function(path) {
if (typeof path === 'undefined') {
path = this.path.at_2x_path;
}
var that = this;
function load() {
if (! that.el.complete) {
setTimeout(load, 5);
} else {
if (config.force_original_dimensions) {
that.el.setAttribute('width', that.el.offsetWidth);
that.el.setAttribute('height', that.el.offsetHeight);
}
that.el.setAttribute('src', path);
}
}
load();
};
if (Retina.isRetina()) {
Retina.init(root);
}
})();
// Generated by CoffeeScript 1.6.2
/*
jQuery Waypoints - v2.0.3
Copyright (c) 2011-2013 Caleb Troughton
Dual licensed under the MIT license and GPL license.
https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt
*/
(function(){var t=[].indexOf||function(t){for(var e=0,n=this.length;e<n;e++){if(e in this&&this[e]===t)return e}return-1},e=[].slice;(function(t,e){if(typeof define==="function"&&define.amd){return define("waypoints",["jquery"],function(n){return e(n,t)})}else{return e(t.jQuery,t)}})(this,function(n,r){var i,o,l,s,f,u,a,c,h,d,p,y,v,w,g,m;i=n(r);c=t.call(r,"ontouchstart")>=0;s={horizontal:{},vertical:{}};f=1;a={};u="waypoints-context-id";p="resize.waypoints";y="scroll.waypoints";v=1;w="waypoints-waypoint-ids";g="waypoint";m="waypoints";o=function(){function t(t){var e=this;this.$element=t;this.element=t[0];this.didResize=false;this.didScroll=false;this.id="context"+f++;this.oldScroll={x:t.scrollLeft(),y:t.scrollTop()};this.waypoints={horizontal:{},vertical:{}};t.data(u,this.id);a[this.id]=this;t.bind(y,function(){var t;if(!(e.didScroll||c)){e.didScroll=true;t=function(){e.doScroll();return e.didScroll=false};return r.setTimeout(t,n[m].settings.scrollThrottle)}});t.bind(p,function(){var t;if(!e.didResize){e.didResize=true;t=function(){n[m]("refresh");return e.didResize=false};return r.setTimeout(t,n[m].settings.resizeThrottle)}})}t.prototype.doScroll=function(){var t,e=this;t={horizontal:{newScroll:this.$element.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.$element.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};if(c&&(!t.vertical.oldScroll||!t.vertical.newScroll)){n[m]("refresh")}n.each(t,function(t,r){var i,o,l;l=[];o=r.newScroll>r.oldScroll;i=o?r.forward:r.backward;n.each(e.waypoints[t],function(t,e){var n,i;if(r.oldScroll<(n=e.offset)&&n<=r.newScroll){return l.push(e)}else if(r.newScroll<(i=e.offset)&&i<=r.oldScroll){return l.push(e)}});l.sort(function(t,e){return t.offset-e.offset});if(!o){l.reverse()}return n.each(l,function(t,e){if(e.options.continuous||t===l.length-1){return e.trigger([i])}})});return this.oldScroll={x:t.horizontal.newScroll,y:t.vertical.newScroll}};t.prototype.refresh=function(){var t,e,r,i=this;r=n.isWindow(this.element);e=this.$element.offset();this.doScroll();t={horizontal:{contextOffset:r?0:e.left,contextScroll:r?0:this.oldScroll.x,contextDimension:this.$element.width(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:r?0:e.top,contextScroll:r?0:this.oldScroll.y,contextDimension:r?n[m]("viewportHeight"):this.$element.height(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};return n.each(t,function(t,e){return n.each(i.waypoints[t],function(t,r){var i,o,l,s,f;i=r.options.offset;l=r.offset;o=n.isWindow(r.element)?0:r.$element.offset()[e.offsetProp];if(n.isFunction(i)){i=i.apply(r.element)}else if(typeof i==="string"){i=parseFloat(i);if(r.options.offset.indexOf("%")>-1){i=Math.ceil(e.contextDimension*i/100)}}r.offset=o-e.contextOffset+e.contextScroll-i;if(r.options.onlyOnScroll&&l!=null||!r.enabled){return}if(l!==null&&l<(s=e.oldScroll)&&s<=r.offset){return r.trigger([e.backward])}else if(l!==null&&l>(f=e.oldScroll)&&f>=r.offset){return r.trigger([e.forward])}else if(l===null&&e.oldScroll>=r.offset){return r.trigger([e.forward])}})})};t.prototype.checkEmpty=function(){if(n.isEmptyObject(this.waypoints.horizontal)&&n.isEmptyObject(this.waypoints.vertical)){this.$element.unbind([p,y].join(" "));return delete a[this.id]}};return t}();l=function(){function t(t,e,r){var i,o;r=n.extend({},n.fn[g].defaults,r);if(r.offset==="bottom-in-view"){r.offset=function(){var t;t=n[m]("viewportHeight");if(!n.isWindow(e.element)){t=e.$element.height()}return t-n(this).outerHeight()}}this.$element=t;this.element=t[0];this.axis=r.horizontal?"horizontal":"vertical";this.callback=r.handler;this.context=e;this.enabled=r.enabled;this.id="waypoints"+v++;this.offset=null;this.options=r;e.waypoints[this.axis][this.id]=this;s[this.axis][this.id]=this;i=(o=t.data(w))!=null?o:[];i.push(this.id);t.data(w,i)}t.prototype.trigger=function(t){if(!this.enabled){return}if(this.callback!=null){this.callback.apply(this.element,t)}if(this.options.triggerOnce){return this.destroy()}};t.prototype.disable=function(){return this.enabled=false};t.prototype.enable=function(){this.context.refresh();return this.enabled=true};t.prototype.destroy=function(){delete s[this.axis][this.id];delete this.context.waypoints[this.axis][this.id];return this.context.checkEmpty()};t.getWaypointsByElement=function(t){var e,r;r=n(t).data(w);if(!r){return[]}e=n.extend({},s.horizontal,s.vertical);return n.map(r,function(t){return e[t]})};return t}();d={init:function(t,e){var r;if(e==null){e={}}if((r=e.handler)==null){e.handler=t}this.each(function(){var t,r,i,s;t=n(this);i=(s=e.context)!=null?s:n.fn[g].defaults.context;if(!n.isWindow(i)){i=t.closest(i)}i=n(i);r=a[i.data(u)];if(!r){r=new o(i)}return new l(t,r,e)});n[m]("refresh");return this},disable:function(){return d._invoke(this,"disable")},enable:function(){return d._invoke(this,"enable")},destroy:function(){return d._invoke(this,"destroy")},prev:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e>0){return t.push(n[e-1])}})},next:function(t,e){return d._traverse.call(this,t,e,function(t,e,n){if(e<n.length-1){return t.push(n[e+1])}})},_traverse:function(t,e,i){var o,l;if(t==null){t="vertical"}if(e==null){e=r}l=h.aggregate(e);o=[];this.each(function(){var e;e=n.inArray(this,l[t]);return i(o,e,l[t])});return this.pushStack(o)},_invoke:function(t,e){t.each(function(){var t;t=l.getWaypointsByElement(this);return n.each(t,function(t,n){n[e]();return true})});return this}};n.fn[g]=function(){var t,r;r=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(d[r]){return d[r].apply(this,t)}else if(n.isFunction(r)){return d.init.apply(this,arguments)}else if(n.isPlainObject(r)){return d.init.apply(this,[null,r])}else if(!r){return n.error("jQuery Waypoints needs a callback function or handler option.")}else{return n.error("The "+r+" method does not exist in jQuery Waypoints.")}};n.fn[g].defaults={context:r,continuous:true,enabled:true,horizontal:false,offset:0,triggerOnce:false};h={refresh:function(){return n.each(a,function(t,e){return e.refresh()})},viewportHeight:function(){var t;return(t=r.innerHeight)!=null?t:i.height()},aggregate:function(t){var e,r,i;e=s;if(t){e=(i=a[n(t).data(u)])!=null?i.waypoints:void 0}if(!e){return[]}r={horizontal:[],vertical:[]};n.each(r,function(t,i){n.each(e[t],function(t,e){return i.push(e)});i.sort(function(t,e){return t.offset-e.offset});r[t]=n.map(i,function(t){return t.element});return r[t]=n.unique(r[t])});return r},above:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset<=t.oldScroll.y})},below:function(t){if(t==null){t=r}return h._filter(t,"vertical",function(t,e){return e.offset>t.oldScroll.y})},left:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset<=t.oldScroll.x})},right:function(t){if(t==null){t=r}return h._filter(t,"horizontal",function(t,e){return e.offset>t.oldScroll.x})},enable:function(){return h._invoke("enable")},disable:function(){return h._invoke("disable")},destroy:function(){return h._invoke("destroy")},extendFn:function(t,e){return d[t]=e},_invoke:function(t){var e;e=n.extend({},s.vertical,s.horizontal);return n.each(e,function(e,n){n[t]();return true})},_filter:function(t,e,r){var i,o;i=a[n(t).data(u)];if(!i){return[]}o=[];n.each(i.waypoints[e],function(t,e){if(r(i,e)){return o.push(e)}});o.sort(function(t,e){return t.offset-e.offset});return n.map(o,function(t){return t.element})}};n[m]=function(){var t,n;n=arguments[0],t=2<=arguments.length?e.call(arguments,1):[];if(h[n]){return h[n].apply(null,t)}else{return h.aggregate.call(null,n)}};n[m].settings={resizeThrottle:100,scrollThrottle:30};return i.load(function(){return n[m]("refresh")})})}).call(this);
\ No newline at end of file
"Boxify" One Page Website Template by Peter Finlan for Codrops
Demo: http://tympanus.net/Freebies/Boxify/
Download and article: http://tympanus.net/codrops/?p=22554
Use it freely but please do not redistribute or sell.
Read more here: http://tympanus.net/codrops/licensing/
Enjoy!
\ No newline at end of file
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Boxify: Free HTML5/CSS3 Template by Peter Finlan</title>
<meta name="description" content="A free HTML5/CSS3 template made exclusively for Codrops by Peter Finlan" />
<meta name="keywords" content="html5 template, css3, one page, animations, agency, portfolio, web design" />
<meta name="author" content="Peter Finlan" />
<!-- Bootstrap -->
<script src="js/modernizr.custom.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/jquery.fancybox.css" rel="stylesheet">
<link href="css/flickity.css" rel="stylesheet" >
<link href="css/animate.css" rel="stylesheet">
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'>
<link href="css/styles.css" rel="stylesheet">
<link href="css/queries.css" rel="stylesheet">
<!-- Facebook and Twitter integration -->
<meta property="og:title" content=""/>
<meta property="og:image" content=""/>
<meta property="og:url" content=""/>
<meta property="og:site_name" content=""/>
<meta property="og:description" content=""/>
<meta name="twitter:title" content="" />
<meta name="twitter:image" content="" />
<meta name="twitter:url" content="" />
<meta name="twitter:card" content="" />
<!-- 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.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- open/close -->
<section class="hero">
<div class="texture-overlay"></div>
<div class="container">
<div class="row nav-wrapper">
<a href="#"><img src="img/logo_ftie.png" alt="Boxify Logo" width="200px" height="200px"></a>
</div>
<div class="row hero-content">
<div class="col-md-12">
<h1></h1>
<p class="animated fadeInDown" class="hidden-xs" class="animated fadeInDown" style="font-size: 30px; margin-bottom:-10px; ">Institut Teknologi Del</p>
<p class="animated fadeInDown" class="hidden-xs" style="font-size: 64px; color:white; ">BADAN EKSEKUTIF MAHASISWA</p>
<p class="animated fadeInDown" class="hidden-xs hidden-sm" style="font-size: 36px; margin-top:-15px; ">Fakultas Teknologi Informatika dan Elektro</p>
<a href="http://tympanus.net/codrops/?p=22554" class="use-btn animated fadeInUp">View Profile BEM</a>
</div>
</div>
</div>
</section>
<footer>
<div class="container">
<div class="row">
<div class="col-md-5">
<h1 class="footer-logo">
<img src="img/logo-blue.png" alt="Footer Logo Blue">
</h1>
<p>© Boxify 2015 - <a href="http://tympanus.net/codrops/licensing/">Licence</a> - Designed &amp; Developed by <a href="http://www.peterfinlan.com/">Peter Finlan</a></p>
</div>
<div class="col-md-7">
<ul class="footer-nav">
<li><a href="#about">About</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#screenshots">Screenshots</a></li>
<li><a href="#download">Download</a></li>
</ul>
</div>
</div>
</div>
</footer>
<div class="overlay overlay-boxify">
<nav>
<ul>
<li><a href="#about"><i class="fa fa-heart"></i>About</a></li>
<li><a href="#features"><i class="fa fa-flash"></i>Features</a></li>
</ul>
<ul>
<li><a href="#screenshots"><i class="fa fa-desktop"></i>Screenshots</a></li>
<li><a href="#download"><i class="fa fa-download"></i>Download</a></li>
</ul>
</nav>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/min/toucheffects-min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/flickity.pkgd.min.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/retina.js"></script>
<script src="js/waypoints.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/min/scripts-min.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
</html>
 
/*==================================== /*====================================
Free To Use For Personal And Commercial Usage Free To Use For Personal And Commercial Usage
Author: http://binarytheme.com Author: http://binarytheme.com
...@@ -32,7 +32,7 @@ margin-top: 20px; ...@@ -32,7 +32,7 @@ margin-top: 20px;
} }
.user-info { .user-info {
display: block; display: block;
color:#000!important; color:#C9D1C8!important;
display: inline-block; display: inline-block;
padding: 15px; padding: 15px;
margin-bottom: 0px margin-bottom: 0px
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment