Skip to content

Commit

Permalink
GH-654 Improve profile link in menu and add some borders
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Mar 14, 2021
1 parent b78a1b5 commit a3f0272
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion hub-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ dependencies {
implementation("org.tinylog:slf4j-tinylog:$tinylog")

testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit")
testImplementation(kotlin("test-junit5"))
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit")
testImplementation(kotlin("test-junit5"))

testImplementation("org.testcontainers:testcontainers:$testcontainers")
testImplementation("org.testcontainers:junit-jupiter:$testcontainers")
Expand Down
1 change: 1 addition & 0 deletions hub-frontend/components/index/PackagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const PackagePreview = (props) => {
bg={bgColor}
shadow="sm"
wrap="wrap"
borderRadius="7px"
>
<Flex flexDirection="column" w="full">
<Flex
Expand Down
32 changes: 16 additions & 16 deletions hub-frontend/components/layout/Header.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useState } from 'react'

import Link from 'next/link'
import {
Flex,
Box,
Heading,
Link,
Link as ChakraLink,
Button,
Img,
Text,
Expand Down Expand Up @@ -49,11 +49,11 @@ const Header = (props) => {
width={{ sm: '100px', base: 'auto' }}
paddingY={{ sm: '0px', base: '7px' }}
>
<Link href="/" _focus={{ outline: 0 }}>
<ChakraLink href="/" _focus={{ outline: 0 }}>
<Heading fontSize="1.5rem" paddingRight="0px">
Hub
</Heading>
</Link>
</ChakraLink>
</Box>
<Navigation paddingY={{ sm: '0px', base: '7px' }} />
<Profile paddingY={{ sm: '0px', base: '7px' }} />
Expand All @@ -75,15 +75,15 @@ const Navigation = (props) => {

const NavigationItem = (props) => {
return (
<Link
<ChakraLink
href={props.href}
fontWeight="bold"
paddingX="13px"
_focus={{ outline: 0 }}
{...props}
>
{props.label}
</Link>
</ChakraLink>
)
}

Expand All @@ -99,14 +99,14 @@ const Profile = (props) => {

const Login = (props) => {
return (
<Link href={getEndpoint('/authorize/github')} {...props}>
<ChakraLink href={getEndpoint('/authorize/github')} {...props}>
<Flex width="100px">
<Text>Sign In</Text>
<Text marginTop="4px" marginLeft="7px">
<FaGithub fontSize="1.15rem" />
</Text>
</Flex>
</Link>
</ChakraLink>
)
}

Expand Down Expand Up @@ -137,20 +137,20 @@ const ProfileMenu = (props) => {
<Box marginLeft="10px">{profile.login}</Box>
</Flex>
</MenuButton>
<MenuList>
<MenuList border="0">
<MenuGroup>
<Link href={"/profile/" + profile.login}>
<MenuItem as={ChakraLink}>My profile</MenuItem>
</Link>
<MenuItem>Settings </MenuItem>
<MenuItem onClick={handleLogout}>Logout</MenuItem>
</MenuGroup>
<MenuDivider />
<Box paddingX="12px">
Dark mode
<ThemeSwitch marginX="7px" />
</Box>
<MenuDivider />
<MenuGroup>
<MenuItem>
<Link href={"/profile/" + profile.login}>My profile</Link>
</MenuItem>
<MenuItem>Settings </MenuItem>
<MenuItem onClick={handleLogout}>Logout</MenuItem>
</MenuGroup>
</MenuList>
</Menu>
</Flex>
Expand Down
1 change: 1 addition & 0 deletions hub-frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
* limitations under the License.
*/

module.exports = {}
10 changes: 6 additions & 4 deletions hub-frontend/pages/profile/[name].js
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,22 @@ const Description = (props) => {
return (
<Flex
flexDirection="column"
width="1280px"
maxWidth="1280px"
width="100%"
paddingX="17px"
{...props}
>
<Head>
<title>Hub - {profile.login}'s profile</title>
</Head>
<Flex bg={bgColor} padding="17px" shadow="sm">
<Img src={profile.avatar_url} boxSize="128px" border="2px solid black" />
<Flex bg={bgColor} padding="17px" shadow="sm" borderRadius="7px">
<Img src={profile.avatar_url} boxSize="128px" border={`2px solid #1d1d1d`} borderRadius="21px" />
<Flex flexDirection="column" paddingX="27px">
<Flex height="52px">
<Text fontSize="3xl" fontWeight="bold">{profile.name}</Text>
<Text fontSize="2xl" fontStyle="italic" paddingX="21px" paddingTop="5px">{profile.login}</Text>
</Flex>
<Text whiteSpace="pre-line" bg={bioBgColor} padding="12px">{profile.bio}</Text>
<Text whiteSpace="pre-line" bg={bioBgColor} padding="12px" borderRadius="7px">{profile.bio}</Text>
</Flex>
</Flex>
</Flex>
Expand Down

0 comments on commit a3f0272

Please sign in to comment.