mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
fix styling bug + name
This commit is contained in:
parent
4c04c28f39
commit
6f1e0854e0
4 changed files with 42 additions and 12 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import styles from './project-view.module.css'
|
||||
import { Button } from 'theme-ui'
|
||||
import { Button, Text } from 'theme-ui'
|
||||
import Icon from '@hackclub/icons'
|
||||
/** @jsxImportSource theme-ui */
|
||||
|
||||
const ProjectView = ({
|
||||
|
|
@ -20,9 +21,36 @@ const ProjectView = ({
|
|||
: 'View project source'
|
||||
return (
|
||||
<div {...props} className="gaegu" sx={{ position: 'relative' }}>
|
||||
<div sx={{ py: 4, backgroundColor: '#F4E7C7', textAlign: 'center' }}>
|
||||
<h1 className="slackey">{title}</h1>
|
||||
<div sx={{ py: 4, backgroundColor: '#F4E7C7', textAlign: 'center', color: '#333' }}>
|
||||
<h1 className="slackey" sx={{color: '#FF5C00'}}>{title}</h1>
|
||||
<h3>By {user}</h3>
|
||||
<Text
|
||||
as="a"
|
||||
href="/arcade/showcase/my"
|
||||
sx={{
|
||||
border: '2px dashed #333',
|
||||
borderRadius: '5px',
|
||||
position: ['relative', 'relative', 'absolute'],
|
||||
display: 'flex',
|
||||
left: '10px',
|
||||
top: '10px',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
px: 2,
|
||||
py: 1,
|
||||
transitionDuration: '0.4s',
|
||||
cursor: 'pointer',
|
||||
textDecoration: 'none',
|
||||
mb: 3,
|
||||
color: '#333',
|
||||
'&:hover': {
|
||||
background: '#333',
|
||||
color: '#F4E7C7'
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Icon glyph="home" /> View all my ships
|
||||
</Text>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ export default async function handler(req, res) {
|
|||
githubProf: p.fields['Github Profile'] || '',
|
||||
user: user.fields['Name']
|
||||
}))
|
||||
return res.status(200).json({ projects: results })
|
||||
return res.status(200).json({ projects: results, name: user.fields['Name']})
|
||||
}
|
||||
|
|
@ -264,7 +264,7 @@ const my = () => {
|
|||
}}
|
||||
>
|
||||
<Text className="gaegu" sx={{ color: '#FF5C00' }}>
|
||||
{status == 'success' ? `Welcome, ${projects.user}` : ''}
|
||||
{status == 'success' ? `Welcome, ${name}` : ''}
|
||||
|
||||
</Text>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import Nav from '../../../../../components/Nav'
|
|||
import Footer from '../../../../../components/arcade/Footer'
|
||||
import BGImg from '../../../../../components/background-image'
|
||||
import styles from '../../../../../components/arcade/showcase/project-view.module.css'
|
||||
import { Box } from 'theme-ui'
|
||||
import { Box, Text } from 'theme-ui'
|
||||
import Icon from '@hackclub/icons'
|
||||
/** @jsxImportSource theme-ui */
|
||||
|
||||
const styled = `
|
||||
|
|
@ -118,20 +119,21 @@ const ProjectShowPage = ({ projectID }) => {
|
|||
maxWidth: '200px',
|
||||
position: 'absolute',
|
||||
top: '20px',
|
||||
right: '20px'
|
||||
right: '20px',
|
||||
zIndex: 10
|
||||
}}
|
||||
/>
|
||||
<div className={styles.min}>
|
||||
{
|
||||
{/* {
|
||||
status == 'loading' && <Loading />
|
||||
}
|
||||
|
||||
{
|
||||
status == 'error' && <ErrorMessage />
|
||||
}
|
||||
} */}
|
||||
|
||||
{
|
||||
status == 'success' &&
|
||||
{/* {
|
||||
status == 'success' && */}
|
||||
<ProjectView
|
||||
key={project.id}
|
||||
id={project.id}
|
||||
|
|
@ -144,7 +146,7 @@ const ProjectShowPage = ({ projectID }) => {
|
|||
githubProf={project.githubProf}
|
||||
user={project.user}
|
||||
/>
|
||||
}
|
||||
{/* } */}
|
||||
</div>
|
||||
</div>
|
||||
<style>{styled}</style>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue