Skip to content

Commit

Permalink
app: Add main page for app
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Verma <[email protected]>
  • Loading branch information
shank03 committed Oct 29, 2023
1 parent 8d4a09b commit 2b3d014
Show file tree
Hide file tree
Showing 13 changed files with 642 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/main/kotlin/com/mnnit/moticlubs/controller/IndexController.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.mnnit.moticlubs.controller

import io.swagger.v3.oas.annotations.Hidden
import org.springframework.beans.factory.annotation.Value
import org.springframework.core.io.Resource
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import reactor.core.publisher.Mono

@RestController
@RequestMapping("/")
@Hidden
class IndexController {

@GetMapping("", produces = ["text/html"])
fun index(
@Value("classpath:templates/index.html") html: Resource
): Mono<ResponseEntity<Resource>> = Mono.just(ResponseEntity.status(HttpStatus.OK).body(html))

@GetMapping("/privacy", produces = ["text/html"])
fun privacy(
@Value("classpath:templates/privacy.html") html: Resource
): Mono<ResponseEntity<Resource>> = Mono.just(ResponseEntity.status(HttpStatus.OK).body(html))
}
19 changes: 19 additions & 0 deletions src/main/kotlin/com/mnnit/moticlubs/web/security/SecurityConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class SecurityConfig(
"/v3/api-docs",
"/login",
"/logout",
"/static"
)
private val FIXED_BYPASS = arrayOf(
"/",
"/privacy",
"/moticlubs",
"/favicon.ico",
)
}

Expand Down Expand Up @@ -80,6 +87,11 @@ class SecurityConfig(
"/actuator/**",
"/login/**",
"/$BASE_PATH/$AVATAR_ROUTE/g/**",
"/static/**",
"/",
"/moticlubs/**",
"/privacy",
"/favicon.ico"
).permitAll()
.anyExchange().access { authentication, _ ->
authentication.map { auth ->
Expand Down Expand Up @@ -111,6 +123,13 @@ class SecurityConfig(

val reqPath = exchange.request.path.value()

if (FIXED_BYPASS
.map { "$contextPath$it" }
.any { reqPath == it }
) {
return@setServerAuthenticationConverter Mono.empty()
}

if (AUTH_WHITELIST_PATH
.map { "$contextPath$it" }
.any { reqPath.startsWith(it) }
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ springdoc:
spring:
webflux:
base-path: ${app.context-path}
static-path-pattern: /static/**
profiles:
active: dev
config:
Expand Down
Binary file added src/main/resources/static/img/app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/app_login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/home_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/home_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/post_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/post_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/static/img/post_list_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
314 changes: 314 additions & 0 deletions src/main/resources/templates/index.html

Large diffs are not rendered by default.

281 changes: 281 additions & 0 deletions src/main/resources/templates/privacy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,281 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/flowbite.min.css"/>
<link rel="icon" type="image/x-icon" href="static/img/app.png">

<title>MotiClubs - Privacy Policy</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/flowbite/2.0.0/flowbite.min.js"></script>
</head>
<body class="font-sans antialiased text-gray-600 min-h-full flex flex-col [overflow-anchor:none]">

<div>
<nav class="bg-white dark:bg-gray-900 fixed w-full z-40 top-0 left-0 border-b border-gray-200 dark:border-gray-600">
<div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
<a href="./" class="flex items-center" onclick="home()">
<img src="static/img/app.png" class="h-8 mr-3 rounded-lg" alt="MotiClubs Logo">
<span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">MotiClubs</span>
</a>
<div class="flex md:order-2">
<button type="button"
class="flex items-center justify-center text-white bg-[#006C4B] hover:bg-[#006C4B] focus:ring-4 focus:outline-none focus:ring-[#006C4B] font-medium rounded-lg text-sm px-4 py-2 text-center mr-3 md:mr-0 dark:bg-[#006C4B] dark:hover:bg-[#006C4B] dark:focus:ring-[#006C4B]">
Download
</button>
<button data-collapse-toggle="navbar-sticky" type="button"
class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600"
aria-controls="navbar-sticky" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
viewBox="0 0 17 14">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M1 1h15M1 7h15M1 13h15"/>
</svg>
</button>
</div>
<div class="items-center justify-between hidden w-full md:flex md:w-auto md:order-1" id="navbar-sticky">
<ul class="flex flex-col p-4 md:p-0 mt-4 font-medium border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700">
<li>
<a href="./"
class="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-[#006C4B] md:p-0 md:dark:hover:text-[#006C4B] dark:text-white dark:hover:bg-[#006C4B] dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
aria-current="page"
onclick="home()">
Home
</a>
</li>
<li>
<a href="./#about"
class="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-[#006C4B] md:p-0 md:dark:hover:text-[#006C4B] dark:text-white dark:hover:bg-[#006C4B] dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
onclick="hideNav()">
About
</a>
</li>
<li>
<a href="https://github.com/CC-MNNIT/MotiClubs"
class="block py-2 pl-3 pr-4 text-gray-900 rounded hover:bg-gray-100 md:hover:bg-transparent md:hover:text-[#006C4B] md:p-0 md:dark:hover:text-[#006C4B] dark:text-white dark:hover:bg-[#006C4B] dark:hover:text-white md:dark:hover:bg-transparent dark:border-gray-700"
onclick="hideNav()"
target="_blank">
Source
</a>
</li>
</ul>
</div>
</div>
</nav>

<section class="md:mt-16 mt-16 relative overflow-hidden">
<div class="px-4 sm:px-6 lg:px-8">
<div class="relative mx-auto max-w-[37.5rem] pt-20 text-center pb-24"><h1
class="text-4xl font-extrabold tracking-tight text-slate-900 sm:text-5xl">Privacy policy</h1>
<p class="mt-4 text-base leading-7 text-slate-600">Last updated on October 29, 2023</p>
</div>
</div>
<div class="relative px-4 sm:px-6 lg:px-8">
<div class="mx-auto max-w-[40rem] text-slate-600">
<p>
Computer Coding Club built the MotiClubs app as
a Free app. This SERVICE is provided by
Computer Coding Club at no cost and is intended for use as
is.
</p>
<p>
This page is used to inform visitors regarding my
policies with the collection, use, and disclosure of Personal
Information if anyone decided to use my Service.
</p>
<br>
<p>
If you choose to use my Service, then you agree to
the collection and use of information in relation to this
policy. The Personal Information that we collect is
used for providing and improving the Service. We will not use or share your information with
anyone except as described in this Privacy Policy.
</p>
<br>
<p>
The terms used in this Privacy Policy have the same meanings
as in our Terms and Conditions, which are accessible at
MotiClubs unless otherwise defined in this Privacy Policy.
</p>
<br>
<p><strong>Information Collection and Use</strong></p>
<br>
<p>
For a better experience, while using our Service, We
may require you to provide us with certain personally
identifiable information. The information that
we request will be retained on your device and is not collected by me in any way.
</p>
<br>
<div>
<p>
The app does use third-party services that may collect
information used to identify you.
</p>
<p>
Link to the privacy policy of third-party service providers used
by the app
</p>
<ul>
<li>
<a href="https://www.google.com/policies/privacy/" target="_blank"
rel="noopener noreferrer">- Google Play Services</a>
</li>
<li>
<a href="https://firebase.google.com/support/privacy" target="_blank"
rel="noopener noreferrer">- Google Analytics for Firebase</a>
</li>
<li><a href="https://firebase.google.com/support/privacy/" target="_blank"
rel="noopener noreferrer">- Firebase Crashlytics</a>
</li>
</ul>
</div>
<br>
<p><strong>Log Data</strong></p>
<br>
<p>
We want to inform you that whenever you
use my Service, in a case of an error in the app
We collect data and information (through third-party
products) on your phone called Log Data. This Log Data may
include information such as your device Internet Protocol
(“IP”) address, device name, operating system version, the
configuration of the app when utilizing my Service,
the time and date of your use of the Service, and other
statistics.
</p>
<br>
<p><strong>Cookies</strong></p>
<br>
<p>
Cookies are files with a small amount of data that are
commonly used as anonymous unique identifiers. These are sent
to your browser from the websites that you visit and are
stored on your device's internal memory.
</p>
<br>
<p>
This Service does not use these “cookies” explicitly. However,
the app may use third-party code and libraries that use
“cookies” to collect information and improve their services.
You have the option to either accept or refuse these cookies
and know when a cookie is being sent to your device. If you
choose to refuse our cookies, you may not be able to use some
portions of this Service.
</p>
<br>
<p><strong>Service Providers</strong></p>
<br>
<p>
We may employ third-party companies and
individuals due to the following reasons:
</p>
<ul>
<li>- To facilitate our Service;</li>
<li>- To provide the Service on our behalf;</li>
<li>- To perform Service-related services; or</li>
<li>- To assist us in analyzing how our Service is used.</li>
</ul>
<br>
<p>
We want to inform users of this Service
that these third parties have access to their Personal
Information. The reason is to perform the tasks assigned to
them on our behalf. However, they are obligated not to
disclose or use the information for any other purpose.
</p>
<br>
<p><strong>Security</strong></p>
<br>
<p>
We value your trust in providing us your
Personal Information, thus we are striving to use commercially
acceptable means of protecting it. But remember that no method
of transmission over the internet, or method of electronic
storage is 100% secure and reliable, and we cannot
guarantee its absolute security.
</p>
<br>
<p><strong>Links to Other Sites</strong></p>
<br>
<p>
This Service may contain links to other sites. If you click on
a third-party link, you will be directed to that site. Note
that these external sites are not operated by me.
Therefore, We strongly advise you to review the
Privacy Policy of these websites. We have
no control over and assume no responsibility for the content,
privacy policies, or practices of any third-party sites or
services.
</p>
<br>
<p><strong>Children’s Privacy</strong></p>
<br>
<div>
<p>
These Services do not address anyone under the age of 13.
We do not knowingly collect personally
identifiable information from children under 13 years of age. In the case
we discover that a child under 13 has provided
me with personal information, we will immediately
delete this from our servers. If you are a parent or guardian,
and you are aware that your child has provided us with
personal information, please contact me so that
we will be able to do the necessary actions.
</p>
</div> <!---->
<br>
<p><strong>Changes to This Privacy Policy</strong></p>
<br>
<p>
We may update our Privacy Policy from
time to time. Thus, you are advised to review this page
periodically for any changes. We will
notify you of any changes by posting the new Privacy Policy on
this page.
</p>
<br>
<p>This policy is effective as of 2023-10-29 (October 29, 2023).</p>
<br>
<p><strong>Contact Us</strong></p>
<br>
<p>
If you have any questions or suggestions about our
Privacy Policy, do not hesitate to contact [email protected].
</p>
</div>
</div>
</section>

<footer class="p-4 bg-white md:p-8 lg:p-10 dark:bg-gray-800">
<div class="mx-auto max-w-screen-xl text-center">
<a href="./" class="flex justify-center items-center text-2xl font-semibold text-gray-900 dark:text-white">
<img class="mr-2 h-8 rounded-lg" src="static/img/app.png" alt="MotiClubs logo">
MotiClubs
</a>
<p class="my-6 text-gray-500 dark:text-gray-400">Communication platform explicitly for MNNIT Allahabad</p>
<ul class="flex flex-wrap justify-center items-center mb-6 text-gray-900 dark:text-white">
<li>
<a href="https://github.com/CC-MNNIT/MotiClubs" class="mr-4 hover:underline md:mr-6">Source Code</a>
</li>
<li>
<a href="swagger" class="mr-4 hover:underline md:mr-6 ">Swagger</a>
</li>
</ul>
<span class="text-sm text-gray-500 sm:text-center dark:text-gray-400">
© 2023
<a href="#"
class="hover:underline">
Computer Coding Club - MNNIT Allahabad
</a>
. All Rights Reserved.
</span>
</div>
</footer>
</div>
</body>
</html>

0 comments on commit 2b3d014

Please sign in to comment.