Merge pull request #27 from bipproduction/amalia/8-jul-24

upd: tampilan
This commit is contained in:
Amalia
2024-07-08 14:26:53 +08:00
committed by GitHub
6 changed files with 58 additions and 25 deletions

View File

@@ -4,6 +4,7 @@ import LayoutIconBack from "./layout/layout_icon_back";
import LoadingPage from "./layout/layout_loading_page"; import LoadingPage from "./layout/layout_loading_page";
import LayoutLogin from "./layout/layout_login"; import LayoutLogin from "./layout/layout_login";
import LayoutNavbarHome from "./layout/layout_navbar_home"; import LayoutNavbarHome from "./layout/layout_navbar_home";
import LayoutNavbarNew from "./layout/layout_navbar_new";
import { isDrawer } from "./val/isDrawer"; import { isDrawer } from "./val/isDrawer";
import { isModal } from "./val/isModal"; import { isModal } from "./val/isModal";
@@ -15,3 +16,4 @@ export { LoadingPage }
export { LayoutDrawer } export { LayoutDrawer }
export { isDrawer } export { isDrawer }
export { isModal } export { isModal }
export { LayoutNavbarNew }

View File

@@ -10,6 +10,8 @@ export default function LayoutDrawer({ opened, onClose, title, children, size }:
content: { content: {
backgroundColor: "white", backgroundColor: "white",
borderRadius: "20px 20px 0px 0px", borderRadius: "20px 20px 0px 0px",
maxWidth: 550,
margin: "0 auto",
}, },
}} }}
> >

View File

@@ -8,7 +8,8 @@ export const LayoutNavbarHome = ({ children }: { children: React.ReactNode }) =>
style={{ style={{
borderBottomLeftRadius: 20, borderBottomLeftRadius: 20,
borderBottomRightRadius: 20, borderBottomRightRadius: 20,
zIndex: 100 zIndex: 100,
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
}} }}
> >
{children} {children}

View File

@@ -0,0 +1,35 @@
'use client'
import { ActionIcon, Box, Grid, Group, Text, Title } from '@mantine/core';
import React from 'react';
import { WARNA } from '../fun/WARNA';
import LayoutIconBack from './layout_icon_back';
import _ from 'lodash';
export const LayoutNavbarNew = ({ back, title, menu }: { back: string, title: string, menu: React.ReactNode }) => {
return (
<Box pt={25} pl={20} pr={20} m={0} pos={'sticky'} top={0} pb={25} bg={WARNA.biruTua}
style={{
borderBottomLeftRadius: 20,
borderBottomRightRadius: 20,
zIndex: 100,
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)"
}}
>
<Grid justify='center' align='center'>
<Grid.Col span="auto">
<LayoutIconBack back={back} />
</Grid.Col>
<Grid.Col span={6}>
{/* <Text ta={'center'} fw={'bold'} c={'white'}>GROUP</Text> */}
<Title c={WARNA.bgWhite} ta={'center'} order={3}>{_.startCase(title)}</Title>
</Grid.Col>
<Grid.Col span="auto">
<Group justify='flex-end'>
{menu}
</Group>
</Grid.Col>
</Grid>
</Box>
);
}
export default LayoutNavbarNew

View File

@@ -1,5 +1,5 @@
"use client" "use client"
import { isDrawer, LayoutDrawer, LayoutIconBack, LayoutNavbarHome, WARNA } from '@/module/_global'; import { isDrawer, LayoutDrawer, LayoutIconBack, LayoutNavbarHome, LayoutNavbarNew, WARNA } from '@/module/_global';
import { ActionIcon, Box, Drawer, Grid, Group, Text } from '@mantine/core'; import { ActionIcon, Box, Drawer, Grid, Group, Text } from '@mantine/core';
import { useRouter } from 'next/navigation'; import { useRouter } from 'next/navigation';
import React from 'react'; import React from 'react';
@@ -11,23 +11,12 @@ export default function NavbarAnnouncement() {
const openDrawer = useHookstate(isDrawer) const openDrawer = useHookstate(isDrawer)
return ( return (
<> <>
<LayoutNavbarHome> <LayoutNavbarNew back='/home' title='pengumuman'
<Grid justify='center' align='center'> menu={
<Grid.Col span="auto"> <ActionIcon onClick={() => openDrawer.set(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
<LayoutIconBack back='/home' /> <HiMenu size={20} color='white' />
</Grid.Col> </ActionIcon>
<Grid.Col span={6}> } />
<Text ta={'center'} fw={'bold'} c={'white'}>PENGUMUMAN</Text>
</Grid.Col>
<Grid.Col span="auto">
<Group justify='flex-end'>
<ActionIcon onClick={() => openDrawer.set(true)} variant="light" bg={WARNA.bgIcon} size="lg" radius="lg" aria-label="Settings">
<HiMenu size={20} color='white' />
</ActionIcon>
</Group>
</Grid.Col>
</Grid>
</LayoutNavbarHome>
<LayoutDrawer opened={openDrawer.get()} title={'MENU'} onClose={() => openDrawer.set(false)}> <LayoutDrawer opened={openDrawer.get()} title={'MENU'} onClose={() => openDrawer.set(false)}>
<DrawerAnnouncement /> <DrawerAnnouncement />
</LayoutDrawer> </LayoutDrawer>

View File

@@ -1,6 +1,7 @@
"use client"; "use client";
import { import {
Anchor, Anchor,
Box,
Button, Button,
Center, Center,
Flex, Flex,
@@ -37,8 +38,8 @@ export function ViewWelcome() {
function onLanjutkan() { function onLanjutkan() {
if (index === listTextWellcome.length - 1) { if (index === listTextWellcome.length - 1) {
// return router.push("/home"); return router.replace("/home");
return window.location.href = "/home" // return window.location.href = "/home"
} }
setIndex(index + 1); setIndex(index + 1);
} }
@@ -51,9 +52,10 @@ export function ViewWelcome() {
} }
return ( return (
<Stack> <Stack>
<Group pos={"absolute"} top={20} right={40}> <Flex justify={'right'} mr={30} mt={20}>
<Anchor>Lewati</Anchor> <Anchor onClick={() => router.replace("/home")}>Lewati</Anchor>
</Group> </Flex>
<Stack gap={"xl"} p={"xl"} pt={50}> <Stack gap={"xl"} p={"xl"} pt={50}>
<WelcomeItem index={index} listTextWellcome={listTextWellcome} /> <WelcomeItem index={index} listTextWellcome={listTextWellcome} />
</Stack> </Stack>
@@ -66,6 +68,8 @@ export function ViewWelcome() {
right={0} right={0}
p={"xl"} p={"xl"}
align={"center"} align={"center"}
maw={550}
m={"0 auto"}
> >
<Button <Button
display={index === 0 ? "none" : "block"} display={index === 0 ? "none" : "block"}