Skip to content

Sponsors logo #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers;

use App\Models\Article;
use App\Models\Discussion;
use App\Models\Thread;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
Expand Down Expand Up @@ -32,15 +33,20 @@ public function index()
->get();
});

$latestDiscussions = Cache::remember('latestDiscussions', now()->addDay(), function () {
return Discussion::query()
->scopes('popular')
->orderByViews()
->limit(3)
->get();
});

seo()
->description('Laravel Cameroun est le portail de la communauté de développeurs PHP & Laravel au Cameroun, On partage, on apprend, on découvre et on construit une grande communauté.')
->twitterDescription('Laravel Cameroun est le portail de la communauté de développeurs PHP & Laravel au Cameroun, On partage, on apprend, on découvre et on construit une grande communauté.')
->withUrl();

return view('home', [
'latestArticles' => $latestArticles,
'latestThreads' => $latestThreads,
]);
return view('home', compact('latestArticles', 'latestThreads', 'latestDiscussions'));
}

public function slack(Request $request)
Expand Down
10 changes: 5 additions & 5 deletions public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/js/app.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Fuse.js v3.4.6 - Lightweight fuzzy-search (http://fusejs.io)
* Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
Expand All @@ -22,4 +22,4 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/*! choices.js v9.1.0 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
4 changes: 2 additions & 2 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"/js/app.js": "/js/app.js?id=3bd7a17ae8879cea08888521628605ff",
"/css/app.css": "/css/app.css?id=d4494514b4272e25cc1fd3f9575bdb47"
"/js/app.js": "/js/app.js?id=597a05523a083bbacbbf",
"/css/app.css": "/css/app.css?id=f6201a0b1edb9c77ef87"
}
139 changes: 139 additions & 0 deletions resources/views/components/icon/cosna.blade.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/views/components/sponsors.blade.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div {{ $attributes->merge(['class' => 'text-right']) }}>
<h4 class="text-skin-inverted text-sm leading-5 font-semibold uppercase tracking-wide font-sans">Sponsors</h4>
<div class="mt-5 space-y-6">
<a href="https://twitter.com/DarkCodeCompany" class="flex items-center justify-end">
<x-icon.darkcode class="h-5 text-skin-inverted"/>
<a href="https://cosna-afrique.com" class="flex items-center justify-end">
<x-icon.cosna class="h-12 w-auto"/>
</a>
<a href="https://laravelshopper.io" class="flex items-center justify-end">
<img class="h-10 logo-white" src="{{ asset('/images/sponsors/shopper-logo.svg') }}" alt="Laravel Shopper">
Expand Down
88 changes: 71 additions & 17 deletions resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,38 @@
</div>

<div class="divide-y divide-skin-base">
<div class="py-8 lg:py-10 xl:pb-14">
<p class="text-center text-lg font-medium text-skin-base tracking-wider leading-6 font-sans">
Nous travaillons avec d’autres communautés et grandes startups
<div class="py-10 lg:py-12 xl:pb-14">
<p class="text-center text-base uppercase tracking-tight text-skin-base tracking-wider leading-6 font-sans">
Nous travaillons avec d’autres communautés et startups
</p>
<div class="mt-5 space-y-5 lg:flex lg:items-center lg:justify-around lg:space-y-0 lg:mt-6">
<a href="https://twitter.com/DarkCodeCompany" class="flex items-center justify-center">
<x-icon.darkcode class="h-8 text-skin-inverted" />
</a>
<a href="https://laravelshopper.io" class="flex items-center justify-center">
<img class="h-12 logo-white" src="{{ asset('/images/sponsors/shopper-logo.svg') }}" alt="Laravel Shopper">
<img class="h-12 logo-dark" src="{{ asset('/images/sponsors/shopper-logo-light.svg') }}" alt="Laravel Shopper">
</a>
<a href="https://gdg.community.dev/gdg-douala" class="flex items-center justify-center">
<x-icon.gdg class="h-8 text-skin-inverted" />
</a>
<div class="mt-8 grid grid-cols-2 gap-y-8 lg:grid-cols-3 lg:mt-12">
<div class="col-span-2 flex justify-center lg:col-span-1">
<a href="https://cosna-afrique.com" target="_blank" class="flex items-center">
<x-icon.cosna class="h-14 w-auto"/>
</a>
</div>
<div class="col-span-2 flex justify-center lg:col-span-1">
<a href="https://laravelshopper.io" target="_blank" class="flex items-center">
<img class="h-12 logo-white" src="{{ asset('/images/sponsors/shopper-logo.svg') }}" alt="Laravel Shopper">
<img class="h-12 logo-dark" src="{{ asset('/images/sponsors/shopper-logo-light.svg') }}" alt="Laravel Shopper">
</a>
</div>
<div class="col-span-2 flex justify-center lg:col-span-1">
<a href="https://gdg.community.dev/gdg-douala" target="_blank" class="flex items-center">
<x-icon.gdg class="h-8 text-skin-inverted" />
</a>
</div>
</div>
<div class="mt-6 text-center lg:mt-10">
<a class="text-sm leading-5 text-flag-green hover:text-green-600 hover:underline" href="mailto:[email protected]">Votre logo ici ?</a>
</div>
</div>

<div class="py-12 lg:py-20">
<x-section-header title="Articles Populaires" content="Découvrez les articles les plus appréciés et partagés par les membres de la communauté" />
<x-section-header
title="Articles Populaires"
content="Découvrez les articles les plus appréciés et partagés par les membres de la communauté"
/>
<div class="mt-8 grid gap-10 max-w-xl mx-auto lg:grid-rows-3 lg:grid-flow-col lg:grid-cols-2 lg:mt-10 lg:gap-x-8 lg:max-w-none">
@foreach($latestArticles as $article)
@if($loop->first)
Expand All @@ -83,8 +95,11 @@

@if($latestThreads->isNotEmpty())
<div class="py-12 lg:py-20">
<x-section-header title="On apprend aussi en aidant les autres" content="En rejoignant la communauté, vous pouvez consulter les dernières questions non résolues et apporter votre pierre à l’édifice." />
<div class="mt-12 grid gap-10 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12 lg:mt-12">
<x-section-header
title="On apprend aussi en aidant les autres"
content="En rejoignant la communauté, vous pouvez consulter les dernières questions non résolues et apporter votre pierre à l’édifice."
/>
<div class="mt-10 grid gap-10 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12 lg:mt-12">
@foreach($latestThreads as $thread)
<div>
<div class="flex items-center font-sans text-skin-base">
Expand Down Expand Up @@ -123,6 +138,45 @@
</div>
</div>
@endif

<div class="py-12 lg:py-20">
<x-section-header
title="Ou venez juste discuter"
content="Dans la communauté on partage aussi des sujets de discussions dans divers domaines, pour nous édifier tous ensemble. Rejoins nous en participant"
/>

<div class="mt-8 grid gap-8 md:grid-cols-3 md:gap-x-10 lg:mt-12">
@foreach($latestDiscussions as $discussion)
<div>
<div class="flex items-center text-sm font-sans text-skin-muted">
<a class="shrink-0" href="/user/{{ $discussion->author->username }}">
<img class="h-6 w-6 rounded-full" src="{{ $discussion->author->profile_photo_url }}" alt="{{ $discussion->author->name }}">
</a>
<span class="ml-2 pr-1">Posté par</span>
<div class="flex items-center space-x-1">
<a href="{{ route('profile', $discussion->author->username) }}" class="text-skin-inverted hover:underline">{{ $discussion->author->name }}</a>
<span aria-hidden="true">&middot;</span>
<time-ago time="{{ $discussion->created_at->getTimestamp() }}"/>
</div>
</div>
<a href="{{ route('discussions.show', $discussion) }}" class="mt-2 block">
<p class="text-xl font-semibold text-skin-inverted">{{ $discussion->title }}</p>
<p class="mt-3 text-base text-skin-base">{!! $discussion->excerpt() !!}</p>
</a>
<div class="mt-3">
<a href="{{ route('discussions.show', $discussion) }}" class="text-base font-medium text-flag-green hover:text-green-500"> Lire la discussion </a>
</div>
</div>
@endforeach
</div>

<div class="flex items-center justify-center mt-10 sm:mt-12 xl:mt-16">
<x-button :link="route('discussions.index')">
Voir toutes les discussions
<x-heroicon-o-arrow-narrow-right class="h-5 w-5 ml-1.5" />
</x-button>
</div>
</div>
</div>
</x-container>

Expand Down
3 changes: 3 additions & 0 deletions resources/views/layouts/master.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<!-- Styles -->
<link href="https://fonts.cdnfonts.com/css/operator-mono" rel="stylesheet">
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<link href="{{ mix('css/app.css') }}" rel="stylesheet">
@include('layouts._favicons')
@livewireStyles
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = {
},
fontFamily: {
mono: ['Operator Mono', ...defaultTheme.fontFamily.mono],
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
sans: ['Inter var', 'DM Sans', ...defaultTheme.fontFamily.sans],
},
fontWeight: {
normal: 300
Expand Down