From 6f2b8c69c8766064081567fe367e23035a34ffd7 Mon Sep 17 00:00:00 2001 From: Nuwan Jaliyagoda Date: Tue, 22 Oct 2024 22:24:12 +0530 Subject: [PATCH] [UI] create a page with contributor details #88 (#200) --- README.md | 9 +- .../Controllers/Frontend/HomeController.php | 32 +++- .../Controllers/Frontend/TermsController.php | 17 -- app/Services/DepartmentDataService.php | 16 +- resources/sass/frontend/_global.scss | 12 ++ resources/views/frontend/index.blade.php | 4 + .../frontend/pages/contributors.blade.php | 80 ++++++++ .../views/frontend/pages/terms.blade.php | 176 +++++++++++++++++- routes/frontend/home.php | 12 +- 9 files changed, 326 insertions(+), 32 deletions(-) delete mode 100644 app/Http/Controllers/Frontend/TermsController.php create mode 100644 resources/views/frontend/pages/contributors.blade.php diff --git a/README.md b/README.md index 9b47e4e7..ff88a1f2 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ Internal and Public web service provider of the Department of Computer Engineeri ## Team of Developers - -To be updated +- [https://portal.ce.pdn.ac.lk/contributors](https://portal.ce.pdn.ac.lk/contributors) ## Useful Commands and Instructions @@ -133,6 +132,8 @@ sudo sh ./scripts/deploy-prod.sh Thanks to all the contributors who have helped with this project! - + + https://portal.ce.pdn.ac.lk/contributors +

-
+ \ No newline at end of file diff --git a/app/Http/Controllers/Frontend/HomeController.php b/app/Http/Controllers/Frontend/HomeController.php index 35565ef3..d49454e3 100644 --- a/app/Http/Controllers/Frontend/HomeController.php +++ b/app/Http/Controllers/Frontend/HomeController.php @@ -2,6 +2,8 @@ namespace App\Http\Controllers\Frontend; +use App\Services\DepartmentDataService; + /** * Class HomeController. */ @@ -14,4 +16,32 @@ public function index() { return view('frontend.index'); } -} + + /** + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View + */ + public function terms() + { + return view('frontend.pages.terms'); + } + + /** + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View + */ + public function contributors() + { + $projects = [ + '/projects/v1/co225/E20/Computer-Engineering-Portal/', + ]; + + $data = []; + $api = new DepartmentDataService(); + + foreach ($projects as $key => $url) { + $projectData = collect($api->getProjectData($url)); + array_push($data, $projectData); + } + + return view('frontend.pages.contributors', compact('data')); + } +} \ No newline at end of file diff --git a/app/Http/Controllers/Frontend/TermsController.php b/app/Http/Controllers/Frontend/TermsController.php deleted file mode 100644 index 11102e62..00000000 --- a/app/Http/Controllers/Frontend/TermsController.php +++ /dev/null @@ -1,17 +0,0 @@ -getData($url); + } + ); + return $project; + } + private function getData($endpoint) { $url = config('constants.department_data.base_url') . $endpoint; @@ -61,4 +75,4 @@ private function getData($endpoint) return []; } } -} \ No newline at end of file +} diff --git a/resources/sass/frontend/_global.scss b/resources/sass/frontend/_global.scss index ab7c812b..b0c7a738 100644 --- a/resources/sass/frontend/_global.scss +++ b/resources/sass/frontend/_global.scss @@ -10,3 +10,15 @@ @import '~@fortawesome/fontawesome-free/scss/regular'; @import '~@fortawesome/fontawesome-free/scss/solid'; @import '~@fortawesome/fontawesome-free/scss/brands'; + +.profile-title { + font-size: 1em !important; +} + +.profile-text { + font-size: 1em !important; +} + +.project-card-title { + font-size: 10pt; +} diff --git a/resources/views/frontend/index.blade.php b/resources/views/frontend/index.blade.php index ed87ae55..ca5f8e76 100644 --- a/resources/views/frontend/index.blade.php +++ b/resources/views/frontend/index.blade.php @@ -140,6 +140,10 @@ diff --git a/resources/views/frontend/pages/contributors.blade.php b/resources/views/frontend/pages/contributors.blade.php new file mode 100644 index 00000000..e934c1a9 --- /dev/null +++ b/resources/views/frontend/pages/contributors.blade.php @@ -0,0 +1,80 @@ +@extends('frontend.layouts.app') + +@section('title', __('Contributors')) + +@section('content') +
+
+
+ @foreach ($data as $key => $project) + + + +

#{{ $key + 1 }} {{ $project['title'] }}

+

{{ $project['description'] }}

+ + + +

Project Team

+
+ @foreach ($project['team'] as $teamMember) +
+
+
+ {{ $teamMember['name'] }} +
+
+

+ {{ $teamMember['name'] }} +

+ + @if ($teamMember['profile_url']) +
+ Profile +
+ @endif +
+
+
+ @endforeach +
+ +

Project Supervisors

+
+ @foreach ($project['supervisors'] as $supervisor) +
+
+
+ {{ $supervisor['name'] }} +
+
+

+ {{ $supervisor['name'] }} +

+ + @if ($supervisor['profile_url']) +
+ Profile +
+ @endif +
+
+
+ @endforeach +
+ +
+
+
+ @endforeach +
+
+
+@endsection diff --git a/resources/views/frontend/pages/terms.blade.php b/resources/views/frontend/pages/terms.blade.php index 5b96970d..d2ee49e2 100644 --- a/resources/views/frontend/pages/terms.blade.php +++ b/resources/views/frontend/pages/terms.blade.php @@ -12,15 +12,177 @@ -

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Molestie ac feugiat sed lectus. Egestas diam in arcu cursus. Vitae nunc sed velit dignissim sodales ut eu sem. Nibh praesent tristique magna sit amet purus gravida quis. Tincidunt lobortis feugiat vivamus at augue. Mi quis hendrerit dolor magna eget est lorem. Dapibus ultrices in iaculis nunc sed augue lacus viverra vitae. Ullamcorper malesuada proin libero nunc consequat interdum varius. Tellus elementum sagittis vitae et leo duis ut diam quam. Nisl pretium fusce id velit. Sed enim ut sem viverra aliquet.

-

Laoreet suspendisse interdum consectetur libero id. Duis ut diam quam nulla porttitor massa id neque. Nullam eget felis eget nunc lobortis mattis aliquam faucibus. Tristique sollicitudin nibh sit amet commodo. A erat nam at lectus urna duis convallis convallis. Commodo sed egestas egestas fringilla phasellus faucibus scelerisque eleifend donec. Bibendum ut tristique et egestas. Risus sed vulputate odio ut enim blandit volutpat maecenas. Lorem dolor sed viverra ipsum nunc aliquet bibendum enim. Tristique sollicitudin nibh sit amet commodo. Ac felis donec et odio pellentesque diam volutpat commodo sed. Quam quisque id diam vel. Massa tempor nec feugiat nisl pretium fusce id. Consectetur purus ut faucibus pulvinar elementum integer enim neque volutpat.

+

Terms and Conditions

+

Last updated: October 21, 2024

+

Please read these terms and conditions carefully before using Our Service.

+

Interpretation and Definitions

+

Interpretation

+

The words of which the initial letter is capitalized have meanings defined under the following + conditions. The following definitions shall have the same meaning regardless of whether they + appear in singular or in plural.

+

Definitions

+

For the purposes of these Terms and Conditions:

+ +

Acknowledgment

+

These are the Terms and Conditions governing the use of this Service and the agreement that + operates between You and the Company. These Terms and Conditions set out the rights and + obligations of all users regarding the use of the Service.

+

Your access to and use of the Service is conditioned on Your acceptance of and compliance with + these Terms and Conditions. These Terms and Conditions apply to all visitors, users and others + who access or use the Service.

+

By accessing or using the Service You agree to be bound by these Terms and Conditions. If You + disagree with any part of these Terms and Conditions then You may not access the Service.

+

You represent that you are over the age of 18. The Company does not permit those under 18 to use + the Service.

+

Your access to and use of the Service is also conditioned on Your acceptance of and compliance + with the Privacy Policy of the Company. Our Privacy Policy describes Our policies and procedures + on the collection, use and disclosure of Your personal information when You use the Application + or the Website and tells You about Your privacy rights and how the law protects You. Please read + Our Privacy Policy carefully before using Our Service.

+

Links to Other Websites

+

Our Service may contain links to third-party web sites or services that are not owned or + controlled by the Company.

+

The Company has no control over, and assumes no responsibility for, the content, privacy + policies, or practices of any third party web sites or services. You further acknowledge and + agree that the Company shall not be responsible or liable, directly or indirectly, for any + damage or loss caused or alleged to be caused by or in connection with the use of or reliance on + any such content, goods or services available on or through any such web sites or services.

+

We strongly advise You to read the terms and conditions and privacy policies of any third-party + web sites or services that You visit.

+

Termination

+

We may terminate or suspend Your access immediately, without prior notice or liability, for any + reason whatsoever, including without limitation if You breach these Terms and Conditions.

+

Upon termination, Your right to use the Service will cease immediately.

+

Limitation of Liability

+

Notwithstanding any damages that You might incur, the entire liability of the Company and any of + its suppliers under any provision of this Terms and Your exclusive remedy for all of the + foregoing shall be limited to the amount actually paid by You through the Service or 100 USD if + You haven't purchased anything through the Service.

+

To the maximum extent permitted by applicable law, in no event shall the Company or its suppliers + be liable for any special, incidental, indirect, or consequential damages whatsoever (including, + but not limited to, damages for loss of profits, loss of data or other information, for business + interruption, for personal injury, loss of privacy arising out of or in any way related to the + use of or inability to use the Service, third-party software and/or third-party hardware used + with the Service, or otherwise in connection with any provision of this Terms), even if the + Company or any supplier has been advised of the possibility of such damages and even if the + remedy fails of its essential purpose.

+

Some states do not allow the exclusion of implied warranties or limitation of liability for + incidental or consequential damages, which means that some of the above limitations may not + apply. In these states, each party's liability will be limited to the greatest extent permitted + by law.

+

"AS IS" and "AS AVAILABLE" Disclaimer

+

The Service is provided to You "AS IS" and "AS AVAILABLE" and with all faults + and defects without warranty of any kind. To the maximum extent permitted under applicable law, + the Company, on its own behalf and on behalf of its Affiliates and its and their respective + licensors and service providers, expressly disclaims all warranties, whether express, implied, + statutory or otherwise, with respect to the Service, including all implied warranties of + merchantability, fitness for a particular purpose, title and non-infringement, and warranties + that may arise out of course of dealing, course of performance, usage or trade practice. Without + limitation to the foregoing, the Company provides no warranty or undertaking, and makes no + representation of any kind that the Service will meet Your requirements, achieve any intended + results, be compatible or work with any other software, applications, systems or services, + operate without interruption, meet any performance or reliability standards or be error free or + that any errors or defects can or will be corrected.

+

Without limiting the foregoing, neither the Company nor any of the company's provider makes any + representation or warranty of any kind, express or implied: (i) as to the operation or + availability of the Service, or the information, content, and materials or products included + thereon; (ii) that the Service will be uninterrupted or error-free; (iii) as to the accuracy, + reliability, or currency of any information or content provided through the Service; or (iv) + that the Service, its servers, the content, or e-mails sent from or on behalf of the Company are + free of viruses, scripts, trojan horses, worms, malware, timebombs or other harmful components. +

+

Some jurisdictions do not allow the exclusion of certain types of warranties or limitations on + applicable statutory rights of a consumer, so some or all of the above exclusions and + limitations may not apply to You. But in such a case the exclusions and limitations set forth in + this section shall be applied to the greatest extent enforceable under applicable law.

+

Governing Law

+

The laws of the Country, excluding its conflicts of law rules, shall govern this Terms and Your + use of the Service. Your use of the Application may also be subject to other local, state, + national, or international laws.

+

Disputes Resolution

+

If You have any concern or dispute about the Service, You agree to first try to resolve the + dispute informally by contacting the Company.

+

For European Union (EU) Users

+

If You are a European Union consumer, you will benefit from any mandatory provisions of the law + of the country in which You are resident.

+

United States Legal Compliance

+

You represent and warrant that (i) You are not located in a country that is subject to the United + States government embargo, or that has been designated by the United States government as a + "terrorist supporting" country, and (ii) You are not listed on any United States + government list of prohibited or restricted parties.

+

Severability and Waiver

+

Severability

+

If any provision of these Terms is held to be unenforceable or invalid, such provision will be + changed and interpreted to accomplish the objectives of such provision to the greatest extent + possible under applicable law and the remaining provisions will continue in full force and + effect.

+

Waiver

+

Except as provided herein, the failure to exercise a right or to require performance of an + obligation under these Terms shall not affect a party's ability to exercise such right or + require such performance at any time thereafter nor shall the waiver of a breach constitute a + waiver of any subsequent breach.

+

Translation Interpretation

+

These Terms and Conditions may have been translated if We have made them available to You on our + Service. + You agree that the original English text shall prevail in the case of a dispute.

+

Changes to These Terms and Conditions

+

We reserve the right, at Our sole discretion, to modify or replace these Terms at any time. If a + revision is material We will make reasonable efforts to provide at least 30 days' notice prior + to any new terms taking effect. What constitutes a material change will be determined at Our + sole discretion.

+

By continuing to access or use Our Service after those revisions become effective, You agree to + be bound by the revised terms. If You do not agree to the new terms, in whole or in part, please + stop using the website and the Service.

+

Contact Us

+

If you have any questions about these Terms and Conditions, You can contact us:

+ -

Gravida rutrum quisque non tellus orci. Eget mauris pharetra et ultrices neque. Habitasse platea dictumst quisque sagittis purus sit amet volutpat. Nunc consequat interdum varius sit amet mattis vulputate enim. Venenatis a condimentum vitae sapien pellentesque habitant morbi tristique senectus. Tempor nec feugiat nisl pretium. Fames ac turpis egestas integer eget aliquet nibh. Mus mauris vitae ultricies leo integer. Vitae proin sagittis nisl rhoncus mattis rhoncus. Commodo odio aenean sed adipiscing diam donec. Purus semper eget duis at tellus at urna condimentum mattis.

- -

Porttitor rhoncus dolor purus non enim praesent elementum facilisis. Massa massa ultricies mi quis hendrerit. Nunc id cursus metus aliquam eleifend mi in nulla posuere. In nisl nisi scelerisque eu ultrices vitae auctor eu augue. Libero nunc consequat interdum varius sit amet mattis vulputate enim. Accumsan tortor posuere ac ut consequat semper viverra nam. Massa tincidunt dui ut ornare. Elit sed vulputate mi sit amet mauris commodo. Faucibus nisl tincidunt eget nullam non nisi. Tortor condimentum lacinia quis vel eros donec ac odio. Posuere ac ut consequat semper. Vestibulum mattis ullamcorper velit sed ullamcorper. Blandit libero volutpat sed cras. Ultricies integer quis auctor elit sed vulputate mi. In hendrerit gravida rutrum quisque non tellus orci ac. Orci phasellus egestas tellus rutrum tellus pellentesque eu. Etiam non quam lacus suspendisse faucibus interdum. Ornare lectus sit amet est. Bibendum est ultricies integer quis auctor elit sed vulputate. Eget duis at tellus at urna.

- -

Sit amet massa vitae tortor condimentum lacinia quis. Id venenatis a condimentum vitae sapien pellentesque habitant. Ac tortor dignissim convallis aenean. Consectetur purus ut faucibus pulvinar elementum integer enim neque volutpat. Consectetur adipiscing elit ut aliquam purus sit amet luctus venenatis. Id porta nibh venenatis cras sed felis. Fermentum odio eu feugiat pretium. Id velit ut tortor pretium viverra. Quis auctor elit sed vulputate mi sit amet mauris. Vel elit scelerisque mauris pellentesque pulvinar pellentesque. Facilisis volutpat est velit egestas dui id ornare. Pretium viverra suspendisse potenti nullam ac. Nulla malesuada pellentesque elit eget gravida cum sociis natoque penatibus. Amet purus gravida quis blandit turpis.

diff --git a/routes/frontend/home.php b/routes/frontend/home.php index 30760361..e7d012de 100644 --- a/routes/frontend/home.php +++ b/routes/frontend/home.php @@ -1,22 +1,30 @@ name('index') ->breadcrumbs(function (Trail $trail) { $trail->push(__('Home'), route('frontend.index')); }); -Route::get('terms', [TermsController::class, 'index']) +Route::get('terms', [HomeController::class, 'terms']) ->name('pages.terms') ->breadcrumbs(function (Trail $trail) { $trail->parent('frontend.index') ->push(__('Terms & Conditions'), route('frontend.pages.terms')); }); + + +Route::get('contributors', [HomeController::class, 'contributors']) + ->name('pages.contributors') + ->breadcrumbs(function (Trail $trail) { + $trail->parent('frontend.index') + ->push(__('Contributors'), route('frontend.pages.contributors')); + });