Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boto_github_editar_blog #33

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions components/blog/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Hero } from './sections/hero';
import Comments from '../comments';

import './blog.scss'; // TODO: This styles will be global even only imported here. We should
import Link from 'next/link';

type Props = {
blogPostItem: BlogPostItem;
Expand All @@ -21,7 +22,6 @@ type Props = {
export function Blog({ blogPostItem, dictionary, lang }: Props) {
const host = `https://gironajs.com`; // TODO: Put host value on environment variables
const getFullHref = (post: BlogPostItem) => `${host}/${post.urlPath}`;

return (
<div>
<Hero {...blogPostItem.data} />
Expand All @@ -34,13 +34,26 @@ export function Blog({ blogPostItem, dictionary, lang }: Props) {
</div>

<hr></hr>
<div className="flex items-center justify-between my-4">
<span>{dictionary.blog.sharePost}</span>
<SocialShareButtons
url={getFullHref(blogPostItem)}
title={blogPostItem.data.title}
/>

<div className="my-4">
<p>
{dictionary.blog.edit_github}
<Link
className="underline underline-offset-4"
href={`https://github.com/gironajs/gironajs.com/tree/main/blog/${lang}/${blogPostItem.id}_${blogPostItem.filePath}`}
>
{dictionary.blog.edit_github_link}
</Link>
</p>
<div className="flex items-center justify-between my-4">
<span>{dictionary.blog.sharePost}</span>
<SocialShareButtons
url={getFullHref(blogPostItem)}
title={blogPostItem.data.title}
/>
</div>
</div>

<Comments lang={lang} />
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion dictionaries/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"sharePost": "T'ha agradat el post? Si us plau, comparteix-lo",
"title": "Blog",
"subtitle_1": "Aquí pots trobar totes les entrades del blog publicades per GironaJS",
"subtitle_2": "Qualsevol contribució és benvinguda, així que si vols escriure una entrada, si us plau, contacta'ns!"
"subtitle_2": "Qualsevol contribució és benvinguda, així que si vols escriure una entrada, si us plau, contacta'ns!",
"edit_github": "Has trobat una errada? ",
"edit_github_link": "Edita-la al Github"
},
"map": {
"title": "GironaJS - Mapa 3D de la ciutat",
Expand Down
4 changes: 3 additions & 1 deletion dictionaries/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
"sharePost": "Did you like the post? Please share it",
"title": "Blog posts",
"subtitle_1": "Here you can find all the blog posts published by GironaJS",
"subtitle_2": "Any contribution is welcome, so if you want to write a post, please contact us!"
"subtitle_2": "Any contribution is welcome, so if you want to write a post, please contact us!",
"edit_github": "Have you found a mistake? ",
"edit_github_link": "Edit it on Github!"
},
"map": {
"title": "GironaJS - 3D City Map",
Expand Down
Loading