Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

Commit

Permalink
feat: starting landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfallet committed Feb 20, 2024
1 parent 279815a commit e7db209
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ package me.nathanfallet.suitebde.controllers.root
import io.ktor.server.freemarker.*
import me.nathanfallet.ktorx.routers.templates.LocalizedTemplateUnitRouter
import me.nathanfallet.ktorx.usecases.localization.IGetLocaleForCallUseCase
import me.nathanfallet.suitebde.usecases.web.IGetRootMenuUseCase

class RootRouter(
controller: IRootController,
getLocaleForCallUseCase: IGetLocaleForCallUseCase,
getRootMenuUseCase: IGetRootMenuUseCase,
) : LocalizedTemplateUnitRouter(
controller,
IRootController::class,
{ template, model ->
respondTemplate(template, model)
respondTemplate(
template, model + mapOf(
"menu" to getRootMenuUseCase(this),
)
)
},
getLocaleForCallUseCase,
"root/error.ftl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ fun Application.configureKoin() {
ListSliceChildModelFromRepositorySuspendUseCase(get<IWebMenusRepository>())
}
single<IGetPublicMenuForCallUseCase> { GetPublicMenuForCallUseCase(get(), get(named<WebMenu>())) }
single<IGetRootMenuUseCase> { GetRootMenuUseCase(get()) }
single<IGetAdminMenuForCallUseCase> {
GetAdminMenuForCallUseCase(get(), get(), get(named<Association>()), get(), get(), get())
}
Expand Down Expand Up @@ -734,7 +735,7 @@ fun Application.configureKoin() {
}
val routerModule = module {
single<IAssociationForCallRouter> { AssociationForCallRouter(get(), get()) }
single { RootRouter(get(), get()) }
single { RootRouter(get(), get(), get()) }
single { DashboardRouter(get(), get(), get(), get(), get()) }
single { AssociationsRouter(get(), get(), get(), get(), get()) }
single { DomainsInAssociationsRouter(get(), get(), get(), get(), get(), get()) }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package me.nathanfallet.suitebde.usecases.web

import io.ktor.server.application.*
import me.nathanfallet.ktorx.usecases.localization.IGetLocaleForCallUseCase
import me.nathanfallet.suitebde.models.web.WebMenu

class GetRootMenuUseCase(
private val getLocaleForCallUseCase: IGetLocaleForCallUseCase,
) : IGetRootMenuUseCase {

override suspend fun invoke(input: ApplicationCall): List<WebMenu> = listOf(

)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package me.nathanfallet.suitebde.usecases.web

import io.ktor.server.application.*
import me.nathanfallet.suitebde.models.web.WebMenu
import me.nathanfallet.usecases.base.ISuspendUseCase

interface IGetRootMenuUseCase : ISuspendUseCase<ApplicationCall, List<WebMenu>>
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,13 @@ admin_clubs_logo=Logo
admin_clubs_validated=Validated
admin_clubs_memberRoleName=Member role name
admin_clubs_adminRoleName=Admin role name
hero_title=One app for everything
hero_description=Join the ecosystem of your school\'s association by logging in or creating an account.
hero_email=Email us at {0}
hero_email_description=For any question or concern
features_one_title=Effortless association management
features_one_description=Our platform simplifies tasks, allowing BDEs to manage members, events, and clubs seamlessly.
features_two_title=Boosted member management
features_two_description=We provide interactive features to simplify member management and foster a stronger community.
features_three_title=Flexible and scalable solutions
features_three_description=Our customizable platform grows alongside BDEs, ensuring they always have the tools they need to thrive.
11 changes: 11 additions & 0 deletions suitebde-backend/src/commonMain/resources/static/img/icon-01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions suitebde-backend/src/commonMain/resources/static/img/icon-02.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions suitebde-backend/src/commonMain/resources/static/img/icon-03.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 88 additions & 3 deletions suitebde-backend/src/commonMain/resources/templates/root/home.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,89 @@
<#import "template.ftl" as template>
<#import "../template.ftl" as template>
<@template.page>
Welcome!
</@template.page>
<!-- ===== Hero Start ===== -->
<section class="pt-35 md:pt-40 xl:pt-52 pb-20 lg:pb-30 xl:pb-59 relative overflow-hidden">
<!-- Hero Images -->
<div class="hidden md:block w-1/2 2xl:w-187.5 h-auto 2xl:h-171.5 absolute right-0 top-0">
<img src="img/hero.png" alt="Hero" class="absolute right-0 top-0 z-1"/>
</div>

<!-- Hero Content -->
<div class="mx-auto max-w-1390 px-4 md:px-8 2xl:px-0">
<div class="flex lg:items-center">
<div class="animate_left md:w-1/2">
<h1 class="font-semibold text-3xl lg:text-4xl xl:text-title-xxl text-black dark:text-white mb-6">
<@t key="hero_title"/>
</h1>
<p class="xl:w-[79%]">
<@t key="hero_description"/>
</p>

<div class="flex flex-col-reverse lg:flex-row gap-7.5 mt-10">
<a href="${locale}/auth/join"
class="font-medium leading-7 text-white bg-primary py-3 px-7.5 rounded-full ease-in-out duration-300 inline-flex w-fit hover:shadow-1">
<@t key="auth_field_join"/>
</a>

<span class="flex flex-col">
<a href="mailto:[email protected]"
class="inline-block font-medium text-lg text-black dark:text-white">
<@t key="hero_email" args=["[email protected]"]/>
</a>
<span class="inline-block">
<@t key="hero_email_description"/>
</span>
</span>
</div>
</div>
</div>
</div>
</section>
<!-- ===== Hero End ===== -->

<!-- ===== Small Features Start ===== -->
<section id="features">
<div class="mx-auto max-w-1390 px-4 md:px-7.5 2xl:px-12.5">
<div class="flex flex-wrap lg:flex-nowrap justify-center lg:justify-between gap-7.5 lg:gap-5 xl:gap-22.5">
<!-- Small Features Item -->
<div class="animate_top md:w-[45%] lg:w-1/3 flex gap-5 xl:gap-7.5">
<div class="flex items-center justify-center shrink-0 w-21 h-21 rounded-full bg-primary">
<img src="/img/icon-01.svg" alt="Icon"/>
</div>
<div>
<h4 class="font-medium text-xl md:text-title-sm text-black dark:text-white mb-2.5">
<@t key="features_one_title"/>
</h4>
<p><@t key="features_one_description"/></p>
</div>
</div>

<!-- Small Features Item -->
<div class="animate_top md:w-[45%] lg:w-1/3 flex gap-5 xl:gap-7.5">
<div class="flex items-center justify-center shrink-0 w-21 h-21 rounded-full bg-primary">
<img src="/img/icon-02.svg" alt="Icon"/>
</div>
<div>
<h4 class="font-medium text-xl md:text-title-sm text-black dark:text-white mb-2.5">
<@t key="features_two_title"/>
</h4>
<p><@t key="features_two_description"/></p>
</div>
</div>

<!-- Small Features Item -->
<div class="animate_top md:w-[45%] lg:w-1/3 flex gap-5 xl:gap-7.5">
<div class="flex items-center justify-center shrink-0 w-21 h-21 rounded-full bg-primary">
<img src="/img/icon-03.svg" alt="Icon"/>
</div>
<div>
<h4 class="font-medium text-xl md:text-title-sm text-black dark:text-white mb-2.5">
<@t key="features_three_title"/>
</h4>
<p><@t key="features_three_description"/></p>
</div>
</div>
</div>
</div>
</section>
<!-- ===== Small Features End ===== -->
</@template.page>

This file was deleted.

0 comments on commit e7db209

Please sign in to comment.