Skip to content

Commit

Permalink
Refactor views and add some
Browse files Browse the repository at this point in the history
  • Loading branch information
khasyah-fr committed Nov 30, 2020
1 parent e666abe commit 10f82cf
Show file tree
Hide file tree
Showing 17 changed files with 352 additions and 221 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/StudentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
class StudentController extends Controller
{
public function index() {
return view('student.dashboard');
return view('student.home.dashboard');
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/TeacherController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
class TeacherController extends Controller
{
public function index() {
return view('teacher.dashboard');
return view('teacher.home.dashboard');
}
}
36 changes: 36 additions & 0 deletions resources/views/layouts/studenthome.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@extends('layouts.app')

@section('content')

<div class="grid" style="grid-template-columns: 1fr 4fr 1fr;">
<div class="h-screen bg-white pt-6">
<div class="mb-6">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
<div class="text-center mb-8">
<button class="py-1 px-9 bg-blue-500 text-white rounded hover:bg-blue-700">
<a href="#">Join a class</a>
</button>
</div>
<div class="text-center border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">My Class</a>
</button>
</div>
</div>

<div class="bg-gray-100 pt-7">
@yield('maincontent')
</div>

<div class="h-screen bg-white pt-6">
<div class="mb-6 text-black text-base text-center">
<a href="#">{{ auth()->guard('student')->user()->name }}</a>
<button class="px-1 pb-1 bg-red-500 text-white rounded hover:bg-red-600 ml-6">
<a href="#" class="text-xs">Logout</a>
</button>
</div>
</div>
</div>

@endsection
36 changes: 36 additions & 0 deletions resources/views/layouts/teacherhome.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@extends('layouts.app')

@section('content')

<div class="grid" style="grid-template-columns: 1fr 4fr 1fr;">
<div class="h-screen bg-white pt-6">
<div class="mb-6">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
<div class="text-center mb-8">
<button class="py-1 px-9 bg-blue-500 text-white rounded hover:bg-blue-700">
<a href="#">Create a class</a>
</button>
</div>
<div class="text-center border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">My Class</a>
</button>
</div>
</div>

<div class="bg-gray-100 pt-7">
@yield('maincontent')
</div>

<div class="h-screen bg-white pt-6">
<div class="mb-6 text-black text-base text-center">
<a href="#">{{ auth()->guard('student')->user()->name }}</a>
<button class="px-1 pb-1 bg-red-500 text-white rounded hover:bg-red-600 ml-6">
<a href="#" class="text-xs">Logout</a>
</button>
</div>
</div>
</div>

@endsection
1 change: 1 addition & 0 deletions resources/views/student/course/subjectmatter.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</button>
</div>
@endsection

@section('maincontent')
<div class="container">
<div class="flex flex-wrap flex-col md:flex-row items-center bg-white mt-2 mb-10 w-9/12 mx-auto rounded-lg">
Expand Down
33 changes: 2 additions & 31 deletions resources/views/student/home/dashboard.blade.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
@extends('layouts.app')
@extends('layouts.studenthome')

@section('content')

<div class="grid" style="grid-template-columns: 1fr 4fr 1fr;">
<div class="h-screen bg-white pt-6">
<div class="mb-6">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
<div class="text-center mb-8">
<button class="py-1 px-9 bg-blue-500 text-white rounded hover:bg-blue-700">
<a href="#">Join a class</a>
</button>
</div>
<div class="text-center border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">My Class</a>
</button>
</div>
</div>
<div class="bg-gray-100 pt-7">
@section('maincontent')
<div class="container">
<div class="mb-12 text-black text-4xl font-bold">
<h1 class="pl-12">My Class</h1>
Expand Down Expand Up @@ -64,15 +46,4 @@
</a>
</div>
</div>
</div>
<div class="h-screen bg-white pt-6">
<div class="mb-6 text-black text-base text-center">
<a href="#">{{ auth()->guard('student')->user()->name }}</a>
<button class="px-1 pb-1 bg-red-500 text-white rounded hover:bg-red-600 ml-6">
<a href="#" class="text-xs">Logout</a>
</button>
</div>
</div>
</div>

@endsection
35 changes: 3 additions & 32 deletions resources/views/student/home/joinclass.blade.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
@extends('layouts.app')
@extends('layouts.studenthome')

@section('content')

<div class="grid" style="grid-template-columns: 1fr 4fr 1fr;">
<div class="h-screen bg-white pt-6">
<div class="mb-6">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
<div class="text-center mb-8">
<button class="py-1 px-9 bg-blue-500 text-white rounded hover:bg-blue-700">
<a href="#">Join a class</a>
</button>
</div>
<div class="text-center border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">My Class</a>
</button>
</div>
</div>
<div class="bg-gray-100 pt-7">
@section('maincontent')
<div class="container">
<div class="mb-12 text-black text-4xl font-bold">
<h1 class="pl-12">Join a Class</h1>
Expand All @@ -41,21 +23,10 @@ class="bg-gray-100 border-2 border-blue-400 mt-4 py-4 px-4 rounded-lg @error('cl
@enderror
</div>
<div>
<button type="submit" class="bg-green-500 text-white px-4 py-3 rounded font-medium w-20">Join</button>
<button type="submit" class="bg-green-400 text-white px-4 py-3 rounded font-medium w-20 hover:bg-green-500">Join</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="h-screen bg-white pt-6">
<div class="mb-6 text-black text-base text-center">
<a href="#">{{ auth()->guard('student')->user()->name }}</a>
<button class="px-1 pb-1 bg-red-500 text-white rounded hover:bg-red-600 ml-6">
<a href="#" class="text-xs">Logout</a>
</button>
</div>
</div>
</div>

@endsection
52 changes: 52 additions & 0 deletions resources/views/teacher/class/createassignment.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@extends('layouts.teachercourse')

@section('nav')
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Subject Matter</a>
</button>
</div>
<div class="text-center my-2 border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">Assignment</a>
</button>
</div>
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Review</a>
</button>
</div>
@endsection

@section('maincontent')
<div class="container">
<div class="flex flex-wrap flex-col md:flex-row items-center bg-white mt-2 mb-10 w-9/12 mx-auto rounded-lg">
<div class="flex flex-col xl:w-2/5 overflow-y-hidden lg:items-start pl-4">
<h1 class="text-xl text-black text-left mb-4">Pengolahan Citra Digital</h1>
<h1 class="text-sm text-blacktext-left">Wahyono, Ph.D</h1>
<p class="text-sm text-left">Universitas Gadjah Mada</p>
</div>
<div class="xl:w-3/5 overflow-y-hidden rounded-lg">
<img class="w-full rounded-lg" src="{{asset('img/logo.PNG')}}">
</div>
</div>
<div class="container w-full">
<div class="my-4 text-black text-xl font-bold mx-auto w-9/12">
<h1> Select the type of assignment :</h1>
</div>

<div class="container flex flex-nowrap justify-center gap-8">
<a href="#">
<div class="bg-white my-6 rounded flex col justify-center items-center bg-blue-100 hover:bg-blue-300" style="width: 20rem; height: 20rem;">
<h1 class="text-black text-small font-bold">Quiz / Test</h1>
</div>
</a>
<a href="#">
<div class="bg-white my-6 rounded flex col justify-center items-center bg-green-100 hover:bg-green-300" style="width: 20rem; height: 20rem;">
<h1 class="text-black text-small font-bold">Task</h1>
</div>
</a>
</div>
</div>
</div>
@endsection
87 changes: 87 additions & 0 deletions resources/views/teacher/class/createquiztest.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
@extends('layouts.teachercourse')

@section('nav')
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Subject Matter</a>
</button>
</div>
<div class="text-center my-2 border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">Assignment</a>
</button>
</div>
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Review</a>
</button>
</div>
@endsection

@section('maincontent')
<div class="container">
<div class="my-4 text-black text-3xl font-bold mx-auto pl-12">
<h1> Create new Task :</h1>
</div>

<div class="container">
<div class="flex flex-wrap flex-col md:flex-row items-center my-8 pl-12 mx-auto rounded-lg">
<form action="" method="POST">
@csrf
<div>
<label for="classname" class="tracking-wide text-gray text-base font-bold pb-4">Title :</label>
</div>
<div class="mb-4">
<input type="text" name="classname" id="classname" placeholder="Input title for this task"
class="bg-gray-100 border-2 border-blue-400 mt-4 py-4 px-4 rounded-lg @error('classname') border-red-500 @enderror" value="{{ old('classname') }}" style="width: 32rem">

@error('classname')
<div class="text-red-500 mt-2 text-base">
{{ $message }}
</div>
@enderror
</div>

<div>
<label for="mc" class="tracking-wide text-gray text-base font-bold pb-4">Number of Multiple Choice questions :</label>
</div>
<div class="mb-4">
<input type="number" name="mc" id="mc" placeholder="maximum: 10"
class="bg-gray-100 border-2 border-blue-400 mt-4 py-4 px-4 rounded-lg @error('mc') border-red-500 @enderror" value="{{ old('mc') }}" style="width: 32rem">

@error('mc')
<div class="text-red-500 mt-2 text-base">
{{ $message }}
</div>
@enderror
</div>

<div>
<label for="essay" class="tracking-wide text-gray text-base font-bold pb-4">Number of Essay questions :</label>
</div>
<div class="mb-4">
<input type="number" name="essay" id="essay" placeholder="maximum: 10"
class="bg-gray-100 border-2 border-blue-400 mt-4 py-4 px-4 rounded-lg @error('essay') border-red-500 @enderror" value="{{ old('essay') }}" style="width: 32rem">

@error('essay')
<div class="text-red-500 mt-2 text-base">
{{ $message }}
</div>
@enderror
</div>

<div>
<label for="starttime" class="tracking-wide text-gray text-base font-bold pb-4">Start Time :</label>
</div>
<div>
<label for="endtime" class="tracking-wide text-gray text-base font-bold pb-4">End Time :</label>
</div>

<div>
<button type="submit" class="bg-green-400 text-white px-4 py-3 rounded font-medium w-20 hover:bg-green-500">Create</button>
</div>
</form>
</div>
</div>
</div>
@endsection
43 changes: 16 additions & 27 deletions resources/views/teacher/class/createsubjectmatter.blade.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
@extends('layouts.app')
@extends('layouts.studentcourse')

@section('content')

<div class="grid" style="grid-template-columns: 1fr 4fr 1fr;">
<div class="h-screen bg-white pt-6">
<div class="mb-6">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
@section('nav')
<div class="text-center my-2 border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">Subject Matter</a>
</button>
</div>
<div class="text-center mb-8">
<button class="py-1 px-9 bg-blue-500 text-white rounded hover:bg-blue-700">
<a href="#">Join a class</a>
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Assignment</a>
</button>
</div>
<div class="text-center border-r-2 border-blue-500">
<button class="py-1 px-9 bg-white text-black rounded">
<a href="#" class="text-sm">My Class</a>
<div class="text-center my-2">
<button class="py-1 px-9 bg-white text-gray-300 rounded">
<a href="#" class="text-sm">Review</a>
</button>
</div>
</div>
<div class="bg-gray-100 pt-7">
@endsection

@section('maincontent')
<div class="container">
<div class="mb-12 text-black text-4xl font-bold">
<h1 class="pl-12">Create a Subject Matter</h1>
Expand Down Expand Up @@ -66,21 +66,10 @@ class="bg-gray-100 border-2 border-blue-400 mt-4 py-4 px-4 rounded-lg @error('vi
@enderror
</div>
<div>
<button type="submit" class="bg-green-500 text-white px-4 py-3 rounded font-medium w-24">Publish</button>
<button type="submit" class="bg-green-400 text-white px-4 py-3 rounded font-medium w-24 hover:bg-green-500">Publish</button>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="h-screen bg-white pt-6">
<div class="mb-6 text-black text-base text-center">
<a href="#">{{ auth()->guard('student')->user()->name }}</a>
<button class="px-1 pb-1 bg-red-500 text-white rounded hover:bg-red-600 ml-6">
<a href="#" class="text-xs">Logout</a>
</button>
</div>
</div>
</div>

@endsection
Loading

0 comments on commit 10f82cf

Please sign in to comment.