-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab0bc1a
commit 84d26b3
Showing
19 changed files
with
2,090 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"> | ||
<url><loc>https://abitofpersonal.space</loc><lastmod>2022-10-10T08:29:19.127Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
<url><loc>https://abitofpersonal.space/about</loc><lastmod>2022-10-10T08:29:19.127Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
<url><loc>https://abitofpersonal.space</loc><lastmod>2022-10-10T21:37:38.287Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
<url><loc>https://abitofpersonal.space/about</loc><lastmod>2022-10-10T21:37:38.287Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
<url><loc>https://abitofpersonal.space/submit</loc><lastmod>2022-10-10T21:37:38.287Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url> | ||
</urlset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
@import '../../styles/mixins'; | ||
|
||
.file_input { | ||
flex: 1; | ||
width: 100%; | ||
border: $border; | ||
border-radius: 5px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
cursor: pointer; | ||
transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out, | ||
background-position 0.3s ease-in-out; | ||
background: linear-gradient(to right, $highlight 50%, white 50%); | ||
background-size: 200% 100%; | ||
background-position: right bottom; | ||
letter-spacing: -1px; | ||
white-space: nowrap; | ||
min-width: 100px; | ||
overflow: hidden; | ||
position: relative; | ||
|
||
&:hover { | ||
transform: scale(0.95); | ||
opacity: 1; | ||
} | ||
} | ||
|
||
.file_input_filled { | ||
@extend .file_input; | ||
opacity: 1; | ||
transition: transform 0.1s ease-in-out, opacity 0.1s ease-in-out, | ||
background-position 0.5s ease-in-out; | ||
|
||
&::after { | ||
position: absolute; | ||
width: calc(100% - 6px); | ||
height: calc(100% - 6px); | ||
top: 3px; | ||
left: 3px; | ||
content: ' '; | ||
border: 1px solid $highlight; | ||
border-radius: 5px; | ||
} | ||
overflow: hidden; | ||
} | ||
|
||
.file_input_real { | ||
display: none; | ||
} | ||
|
||
.file_input_real_populated { | ||
display: none; | ||
pointer-events: none; | ||
} | ||
|
||
.file_icon { | ||
border-left: $border; | ||
background-color: white; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100%; | ||
border-top-right-radius: 5px; | ||
border-bottom-right-radius: 5px; | ||
padding: 5px 10px; | ||
cursor: pointer; | ||
pointer-events: all; | ||
|
||
& svg { | ||
transform-origin: 50% 50%; | ||
transition: transform 0.1s ease-in-out; | ||
} | ||
|
||
&:hover svg { | ||
transform: scale(1.2); | ||
} | ||
} | ||
|
||
.file_title { | ||
position: absolute; | ||
bottom: 7px; | ||
left: 10px; | ||
z-index: 1; | ||
opacity: 0.5; | ||
font-style: italic; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* FileUpload.tsx | ||
* author: evan kirkiles | ||
* created on Thu Aug 25 2022 | ||
* 2022 the nobot space, | ||
*/ | ||
import s from './FileUpload.module.scss'; | ||
import { FiX, FiCheckCircle, FiUpload } from 'react-icons/fi'; | ||
import { | ||
ChangeEventHandler, | ||
HTMLAttributes, | ||
MouseEventHandler, | ||
useRef, | ||
} from 'react'; | ||
|
||
type FileUploadProps = { | ||
file: File | null; | ||
setFile: (newFile: File | null) => void; | ||
accept?: string; | ||
children?: React.ReactNode; | ||
style?: HTMLAttributes<HTMLLabelElement>['style']; | ||
required?: boolean; | ||
}; | ||
|
||
const FileUpload: React.FC<FileUploadProps> = function FileUpload({ | ||
file, | ||
accept, | ||
setFile, | ||
children, | ||
style, | ||
required, | ||
}) { | ||
const inputRef = useRef<HTMLInputElement>(null); | ||
const onChange: ChangeEventHandler<HTMLInputElement> = (event) => { | ||
if (!event.target.files) return; | ||
setFile(event.target.files[0]); | ||
}; | ||
|
||
const onClearClick: MouseEventHandler = (event) => { | ||
event.stopPropagation(); | ||
setFile(null); | ||
if (inputRef.current) inputRef.current.value = ''; | ||
}; | ||
|
||
return ( | ||
<> | ||
<label | ||
className={file ? s.file_input_filled : s.file_input} | ||
onClick={() => { | ||
if (!inputRef.current) return; | ||
inputRef.current.click(); | ||
}} | ||
style={style} | ||
> | ||
{children} | ||
<div className={s.file_title}>{file?.name}</div> | ||
</label> | ||
<input | ||
type="file" | ||
multiple={false} | ||
ref={inputRef} | ||
accept={accept} | ||
className={file ? s.file_input_real_populated : s.file_input_real} | ||
onChange={onChange} | ||
required={required} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default FileUpload; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,11 @@ | |
gap: 10px; | ||
cursor: pointer; | ||
} | ||
|
||
.internal_link { | ||
cursor: pointer; | ||
|
||
&:hover { | ||
border-bottom: $border; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
84d26b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
abitofpersonalspace – ./
abitofpersonalspace-evankirkiles.vercel.app
abitofpersonal.space
abitofpersonalspace-git-main-evankirkiles.vercel.app
www.abitofpersonal.space
abitofpersonalspace.vercel.app