parent
f9db9bee95
commit
8b3f8ee6b8
10 changed files with 112 additions and 122 deletions
@ -1,6 +1,6 @@ |
||||
--- |
||||
import Icon from './Icon.astro'; |
||||
import Loader from './Loader.astro'; |
||||
import Icon from '../Icon.astro'; |
||||
import Loader from '../Loader.astro'; |
||||
|
||||
export interface Props { |
||||
roadmapId: string; |
@ -1,7 +1,5 @@ |
||||
<div class='bg-gray-50'> |
||||
<div |
||||
class='container prose-blockquote:font-normal prose prose-code:bg-transparent prose-h2:text-3xl prose-h2:mt-4 prose-h2:mb-2 prose-h3:mt-2 prose-img:mt-1' |
||||
> |
||||
<slot /> |
||||
</div> |
||||
<div |
||||
class='prose-blockquote:font-normal prose container prose-code:bg-transparent prose-h2:text-3xl prose-h2:mt-4 prose-h2:mb-2 prose-h3:mt-2 prose-img:mt-1' |
||||
> |
||||
<slot /> |
||||
</div> |
||||
|
@ -1,43 +0,0 @@ |
||||
--- |
||||
import Icon from "./Icon.astro"; |
||||
|
||||
export interface Props { |
||||
pageUrl: string; |
||||
description: string; |
||||
} |
||||
|
||||
const { pageUrl, description } = Astro.props; |
||||
|
||||
const twitterUrl = `https://twitter.com/intent/tweet?text=${description}&url=${pageUrl}`; |
||||
const fbUrl = `https://www.facebook.com/sharer/sharer.php?quote=${description}&u=${pageUrl}`; |
||||
const hnUrl = `https://news.ycombinator.com/submitlink?t=${description}&u=${pageUrl}`; |
||||
const redditUrl = `https://www.reddit.com/submit?title=${description}&url=${pageUrl}`; |
||||
--- |
||||
|
||||
<div |
||||
class="absolute left-[-18px] top-[110px] h-full hidden" |
||||
id="page-share-icons" |
||||
> |
||||
<div class="flex sticky top-[100px] flex-col gap-1.5"> |
||||
<a |
||||
href={twitterUrl} |
||||
target="_blank" |
||||
class="text-gray-500 hover:text-gray-700" |
||||
> |
||||
<Icon icon="twitter" /> |
||||
</a> |
||||
<a href={fbUrl} target="_blank" class="text-gray-500 hover:text-gray-700"> |
||||
<Icon icon="facebook" /> |
||||
</a> |
||||
<a href={hnUrl} target="_blank" class="text-gray-500 hover:text-gray-700"> |
||||
<Icon icon="hackernews" /> |
||||
</a> |
||||
<a |
||||
href={redditUrl} |
||||
target="_blank" |
||||
class="text-gray-500 hover:text-gray-700" |
||||
> |
||||
<Icon icon="reddit" /> |
||||
</a> |
||||
</div> |
||||
</div> |
@ -0,0 +1,34 @@ |
||||
--- |
||||
import Icon from '../Icon.astro'; |
||||
|
||||
export interface Props { |
||||
pageUrl: string; |
||||
description: string; |
||||
} |
||||
|
||||
const { pageUrl, description } = Astro.props; |
||||
|
||||
const twitterUrl = `https://twitter.com/intent/tweet?text=${description}&url=${pageUrl}`; |
||||
const fbUrl = `https://www.facebook.com/sharer/sharer.php?quote=${description}&u=${pageUrl}`; |
||||
const hnUrl = `https://news.ycombinator.com/submitlink?t=${description}&u=${pageUrl}`; |
||||
const redditUrl = `https://www.reddit.com/submit?title=${description}&url=${pageUrl}`; |
||||
--- |
||||
|
||||
<div class='absolute left-[-18px] top-[110px] h-full hidden' id='page-share-icons'> |
||||
<div class='flex sticky top-[100px] flex-col gap-1.5'> |
||||
<a href={twitterUrl} target='_blank' class='text-gray-500 hover:text-gray-700'> |
||||
<Icon icon='twitter' /> |
||||
</a> |
||||
<a href={fbUrl} target='_blank' class='text-gray-500 hover:text-gray-700'> |
||||
<Icon icon='facebook' /> |
||||
</a> |
||||
<a href={hnUrl} target='_blank' class='text-gray-500 hover:text-gray-700'> |
||||
<Icon icon='hackernews' /> |
||||
</a> |
||||
<a href={redditUrl} target='_blank' class='text-gray-500 hover:text-gray-700'> |
||||
<Icon icon='reddit' /> |
||||
</a> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src='./sharer.js'></script> |
Loading…
Reference in new issue