Skip to content

Commit

Permalink
fix: mask
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jul 8, 2023
1 parent 4a94877 commit eef4ddd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ const NoteScreen = () => {

{!!theLast.images?.[0]?.src && (
<div
className="absolute inset-0 bg-cover bg-center"
className="mask-top absolute inset-0 bg-cover bg-center opacity-50"
style={{
background: `url(${theLast.images[0].src})`,
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/markdown/renderers/link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const MLink: FC<{
type="tooltip"
TriggerComponent={useCallback(
() => (
<span className="inline-flex items-center">
<span className="inline items-center">
{!showRichLink && <Favicon href={href} />}
{showRichLink ? (
<RichLink name={parsedName} source={parsedType} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/rich-link/Favicon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Favicon: Component<FaviconProps> = (props) => {
if (!prefixToIconMap[nextSource]) return null

return (
<span className={clsxm('mr-1', className)}>
<span className={clsxm('mr-1 [&_svg]:inline', className)}>
{prefixToIconMap[nextSource]}
</span>
)
Expand Down
4 changes: 4 additions & 0 deletions src/styles/tailwindcss.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
animation: blink 2s ease infinite both;
}

.mask-top {
mask-image: linear-gradient(to top, transparent, rgb(0 0 0 / 100%) 90%);
opacity: 0.3;
transition: opacity 0.3s ease-in-out;
}

@keyframes blink {
0% {
opacity: 0;
Expand Down

1 comment on commit eef4ddd

@vercel
Copy link

@vercel vercel bot commented on eef4ddd Jul 8, 2023

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:

shiro – ./

springtide.vercel.app
shiro-innei.vercel.app
innei.in
shiro-git-main-innei.vercel.app

Please sign in to comment.