Skip to content

Commit

Permalink
WIP : Refactor code to a more reusable parts
Browse files Browse the repository at this point in the history
  • Loading branch information
khasyah-fr committed Nov 30, 2020
1 parent 04269a7 commit e666abe
Show file tree
Hide file tree
Showing 12 changed files with 331 additions and 106 deletions.
29 changes: 29 additions & 0 deletions resources/views/layouts/studentcourse.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@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-12">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>

@yield('nav')

</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
29 changes: 29 additions & 0 deletions resources/views/layouts/teachercourse.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@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-12">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>

@yield('nav')

</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
94 changes: 39 additions & 55 deletions resources/views/student/course/assignment.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
@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-12">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
@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>
Expand All @@ -22,59 +16,49 @@
<a href="#" class="text-sm">Review</a>
</button>
</div>
</div>
<div class="bg-gray-100 pt-7">
<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>
@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>Assignment :</h1>
</div>
<div class="container w-full">
<div class="my-4 text-black text-xl font-bold mx-auto w-9/12">
<h1>Assignment :</h1>
</div>

<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Assignment: Pixel-Based Image Enhancement</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-blue-200 px-4 py-4">Reviewed</h1>
</div>
</a>
<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem, ipsum dolor sit amet consectetur adipisicing.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-green-200 px-4 py-4">Submitted</h1>
</div>
</a>
<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Assignment: Pixel-Based Image Enhancement</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-blue-200 px-4 py-4">Reviewed</h1>
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem ipsum dolor sit amet consectetur.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-gray-200 px-4 py-4">Available</h1>
</div>
</a>
<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem, ipsum dolor sit amet consectetur adipisicing.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-green-200 px-4 py-4">Submitted</h1>
</div>
</a>
<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem ipsum dolor sit amet consectetur.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-gray-200 px-4 py-4">Available</h1>
</div>
</a>
<a href="#">
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem ipsum dolor sit amet consectetur.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-red-200 px-4 py-4">Late</h1>
</div>
</a>
<div class="bg-white w-9/12 mx-auto my-6 rounded flex">
<h1 class="text-black text-base w-9/12 px-4 py-4">Lorem ipsum dolor sit amet consectetur.</h1>
<h1 class="text-black text-small italic font-bold w-3/12 bg-red-200 px-4 py-4">Late</h1>
</div>
</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
26 changes: 5 additions & 21 deletions resources/views/student/course/review.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
@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-12">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
@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>
Expand All @@ -22,8 +16,9 @@
<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="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">
Expand Down Expand Up @@ -60,15 +55,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
25 changes: 4 additions & 21 deletions resources/views/student/course/subjectmatter.blade.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
@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-12">
<img src="{{asset('img/logo.PNG')}}" alt="Klass" style="height: 55px;" class="mx-auto">
</div>
@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>
Expand All @@ -22,8 +16,8 @@
<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="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">
Expand Down Expand Up @@ -62,15 +56,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
File renamed without changes.
61 changes: 61 additions & 0 deletions resources/views/student/home/joinclass.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
@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">
<div class="container">
<div class="mb-12 text-black text-4xl font-bold">
<h1 class="pl-12">Join a Class</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">Class Name :</label>
</div>
<div class="mb-4">
<input type="text" name="classname" id="classname" placeholder="Search your class here"
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>
<button type="submit" class="bg-green-500 text-white px-4 py-3 rounded font-medium w-20">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
Empty file.
Loading

0 comments on commit e666abe

Please sign in to comment.