mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Update text alignment to the left
This commit is contained in:
+14
-12
@@ -1,13 +1,13 @@
|
|||||||
import { FC } from 'react';
|
import { FC } from "react";
|
||||||
import styled from 'styled-components';
|
import styled from "styled-components";
|
||||||
import Typing from 'react-typing-animation';
|
import Typing from "react-typing-animation";
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
min-height: 45vh;
|
min-height: 45vh;
|
||||||
display: grid;
|
display: grid;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
height: auto;
|
height: auto;
|
||||||
text-align: center;
|
text-align: left;
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
min-height: 65vh;
|
min-height: 65vh;
|
||||||
@@ -41,17 +41,19 @@ const Hero: FC = () => {
|
|||||||
<Typing speed={15} hideCursor={true} loop={false}>
|
<Typing speed={15} hideCursor={true} loop={false}>
|
||||||
<h2>Hi</h2>
|
<h2>Hi</h2>
|
||||||
<h2>I Like Building Things</h2>
|
<h2>I Like Building Things</h2>
|
||||||
<h2 className='green'>
|
<h2 className="green">
|
||||||
Software Developer ✔️<span className='small'>check</span>
|
Software Developer ✔️<span className="small">check</span>
|
||||||
</h2>
|
</h2>
|
||||||
<h2 className='red'>
|
<h2 className="red">
|
||||||
Designer 🛑<span className='small'>error: need more practise and feedback</span>
|
Designer 🛑
|
||||||
|
<span className="small">error: need more practise and feedback</span>
|
||||||
</h2>
|
</h2>
|
||||||
<h2 className='orange'>
|
<h2 className="orange">
|
||||||
Hard Working ⚠️<span className='small'>warning: not always the case</span>
|
Hard Working ⚠️
|
||||||
|
<span className="small">warning: not always the case</span>
|
||||||
</h2>
|
</h2>
|
||||||
<h2 className='green'>
|
<h2 className="green">
|
||||||
Life Long Learner ✔️<span className='small'>check</span>
|
Life Long Learner ✔️<span className="small">check</span>
|
||||||
</h2>
|
</h2>
|
||||||
</Typing>
|
</Typing>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
|
|||||||
+48
-41
@@ -1,18 +1,18 @@
|
|||||||
import { FC, useEffect } from 'react';
|
import { FC, useEffect } from "react";
|
||||||
import { getBlogPostsSlugs, getBlogPostdata } from '../../lib/blog';
|
import { getBlogPostsSlugs, getBlogPostdata } from "../../lib/blog";
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from "next/router";
|
||||||
import { MdxRemote } from 'next-mdx-remote/types';
|
import { MdxRemote } from "next-mdx-remote/types";
|
||||||
import { MDXProvider } from '@mdx-js/react';
|
import { MDXProvider } from "@mdx-js/react";
|
||||||
import { MDXEmbedProvider } from 'mdx-embed';
|
import { MDXEmbedProvider } from "mdx-embed";
|
||||||
import { GetStaticPaths, GetStaticProps } from 'next';
|
import { GetStaticPaths, GetStaticProps } from "next";
|
||||||
import renderToString from 'next-mdx-remote/render-to-string';
|
import renderToString from "next-mdx-remote/render-to-string";
|
||||||
import hydrate from 'next-mdx-remote/hydrate';
|
import hydrate from "next-mdx-remote/hydrate";
|
||||||
import styled from 'styled-components';
|
import styled from "styled-components";
|
||||||
import matter from 'gray-matter';
|
import matter from "gray-matter";
|
||||||
import AllComponents from '../../components/All';
|
import AllComponents from "../../components/All";
|
||||||
import Head from 'next/head';
|
import Head from "next/head";
|
||||||
import IconButton from '../../components/IconButton';
|
import IconButton from "../../components/IconButton";
|
||||||
import CodeBlock from '../../components/CodeBlock';
|
import CodeBlock from "../../components/CodeBlock";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
source: MdxRemote.Source;
|
source: MdxRemote.Source;
|
||||||
@@ -31,8 +31,6 @@ const Wrapper = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -41,9 +39,16 @@ const Wrapper = styled.div`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
p,
|
||||||
|
.tags-wrapper {
|
||||||
|
text-align: left;
|
||||||
|
width: 85%;
|
||||||
|
margin: 0.5rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin: 0.5rem 0rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
@@ -53,7 +58,6 @@ const Wrapper = styled.div`
|
|||||||
.tags-wrapper {
|
.tags-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
@@ -115,42 +119,45 @@ const BlogPost: FC<Props> = ({ source, frontMatter }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name='author' content='Hazem Krimi' />
|
<meta name="author" content="Hazem Krimi" />
|
||||||
<meta
|
<meta
|
||||||
name='description'
|
name="description"
|
||||||
content={
|
content={
|
||||||
frontMatter.description
|
frontMatter.description
|
||||||
? frontMatter.description
|
? frontMatter.description
|
||||||
: 'Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast'
|
: "Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />
|
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||||
<link rel='canonical' href='https://hazemkrimi.tech' />
|
<link rel="canonical" href="https://hazemkrimi.tech" />
|
||||||
<meta property='og:image' content='/logo.jpg' />
|
<meta property="og:image" content="/logo.jpg" />
|
||||||
<meta
|
<meta
|
||||||
property='og:description'
|
property="og:description"
|
||||||
content={
|
content={
|
||||||
frontMatter.description
|
frontMatter.description
|
||||||
? frontMatter.description
|
? frontMatter.description
|
||||||
: 'Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast'
|
: "Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<meta property='og:title' content={`${frontMatter.title} | Hazem Krimi`} />
|
|
||||||
<meta
|
<meta
|
||||||
name='keywords'
|
property="og:title"
|
||||||
|
content={`${frontMatter.title} | Hazem Krimi`}
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="keywords"
|
||||||
content={
|
content={
|
||||||
frontMatter.tags
|
frontMatter.tags
|
||||||
? frontMatter.tags.join(' ')
|
? frontMatter.tags.join(" ")
|
||||||
: 'Hazem, Krimi, Developer, Software, Engineer, Web, Mobile, Frontend, Backend, Fullstack, JavaScript, React.js, React Native, Node.js, Portfolio, Blog, Tutorials, Tech News'
|
: "Hazem, Krimi, Developer, Software, Engineer, Web, Mobile, Frontend, Backend, Fullstack, JavaScript, React.js, React Native, Node.js, Portfolio, Blog, Tutorials, Tech News"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<title>{frontMatter.title} | Hazem Krimi</title>
|
<title>{frontMatter.title} | Hazem Krimi</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<div className='meta'>
|
<div className="meta">
|
||||||
<div className='back' onClick={() => router.back()}>
|
<div className="back" onClick={() => router.back()}>
|
||||||
<IconButton icon='/icons/arrow-left.svg' />
|
<IconButton icon="/icons/arrow-left.svg" />
|
||||||
<span>Back</span>
|
<span>Back</span>
|
||||||
</div>
|
</div>
|
||||||
<h1>{frontMatter.title}</h1>
|
<h1>{frontMatter.title}</h1>
|
||||||
@@ -159,7 +166,7 @@ const BlogPost: FC<Props> = ({ source, frontMatter }) => {
|
|||||||
Written by <b>{frontMatter.author}</b> on <b>{frontMatter.date}</b>
|
Written by <b>{frontMatter.author}</b> on <b>{frontMatter.date}</b>
|
||||||
</p>
|
</p>
|
||||||
{frontMatter.tags && (
|
{frontMatter.tags && (
|
||||||
<div className='tags-wrapper'>
|
<div className="tags-wrapper">
|
||||||
{frontMatter.tags.map((tag: string, index: number) => (
|
{frontMatter.tags.map((tag: string, index: number) => (
|
||||||
<span key={index}>#{tag} </span>
|
<span key={index}>#{tag} </span>
|
||||||
))}
|
))}
|
||||||
@@ -169,7 +176,7 @@ const BlogPost: FC<Props> = ({ source, frontMatter }) => {
|
|||||||
</div>
|
</div>
|
||||||
<MDXProvider components={{ code: CodeBlock }}>
|
<MDXProvider components={{ code: CodeBlock }}>
|
||||||
<MDXEmbedProvider>
|
<MDXEmbedProvider>
|
||||||
<div className='content'>{content}</div>
|
<div className="content">{content}</div>
|
||||||
</MDXEmbedProvider>
|
</MDXEmbedProvider>
|
||||||
</MDXProvider>
|
</MDXProvider>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
@@ -183,7 +190,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
|||||||
const paths = getBlogPostsSlugs();
|
const paths = getBlogPostsSlugs();
|
||||||
return {
|
return {
|
||||||
paths,
|
paths,
|
||||||
fallback: false
|
fallback: false,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
||||||
@@ -191,13 +198,13 @@ export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
|||||||
const { data, content } = matter(blogPostContent);
|
const { data, content } = matter(blogPostContent);
|
||||||
const mdxSource = await renderToString(content, {
|
const mdxSource = await renderToString(content, {
|
||||||
components,
|
components,
|
||||||
scope: data
|
scope: data,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
source: mdxSource,
|
source: mdxSource,
|
||||||
frontMatter: data
|
frontMatter: data,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+49
-39
@@ -1,18 +1,21 @@
|
|||||||
import { FC, useEffect } from 'react';
|
import { FC, useEffect } from "react";
|
||||||
import { getPortfolioPorjectsSlugs, getPortfolioProjectdata } from '../../lib/portfolio';
|
import {
|
||||||
import { useRouter } from 'next/router';
|
getPortfolioPorjectsSlugs,
|
||||||
import { MdxRemote } from 'next-mdx-remote/types';
|
getPortfolioProjectdata,
|
||||||
import { MDXProvider } from '@mdx-js/react';
|
} from "../../lib/portfolio";
|
||||||
import { MDXEmbedProvider } from 'mdx-embed';
|
import { useRouter } from "next/router";
|
||||||
import { GetStaticPaths, GetStaticProps } from 'next';
|
import { MdxRemote } from "next-mdx-remote/types";
|
||||||
import renderToString from 'next-mdx-remote/render-to-string';
|
import { MDXProvider } from "@mdx-js/react";
|
||||||
import hydrate from 'next-mdx-remote/hydrate';
|
import { MDXEmbedProvider } from "mdx-embed";
|
||||||
import styled from 'styled-components';
|
import { GetStaticPaths, GetStaticProps } from "next";
|
||||||
import matter from 'gray-matter';
|
import renderToString from "next-mdx-remote/render-to-string";
|
||||||
import AllComponents from '../../components/All';
|
import hydrate from "next-mdx-remote/hydrate";
|
||||||
import Head from 'next/head';
|
import styled from "styled-components";
|
||||||
import IconButton from '../../components/IconButton';
|
import matter from "gray-matter";
|
||||||
import CodeBlock from '../../components/CodeBlock';
|
import AllComponents from "../../components/All";
|
||||||
|
import Head from "next/head";
|
||||||
|
import IconButton from "../../components/IconButton";
|
||||||
|
import CodeBlock from "../../components/CodeBlock";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
source: MdxRemote.Source;
|
source: MdxRemote.Source;
|
||||||
@@ -31,8 +34,6 @@ const Wrapper = styled.div`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.meta {
|
.meta {
|
||||||
text-align: center;
|
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -41,9 +42,15 @@ const Wrapper = styled.div`
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
p {
|
||||||
|
text-align: left;
|
||||||
|
width: 85%;
|
||||||
|
margin: 0.5rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin: 0.5rem 0rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
@@ -106,44 +113,47 @@ const PortfolioProject: FC<Props> = ({ source, frontMatter }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Head>
|
<Head>
|
||||||
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta name='author' content='Hazem Krimi' />
|
<meta name="author" content="Hazem Krimi" />
|
||||||
<meta
|
<meta
|
||||||
name='description'
|
name="description"
|
||||||
content={
|
content={
|
||||||
frontMatter.description
|
frontMatter.description
|
||||||
? frontMatter.description
|
? frontMatter.description
|
||||||
: 'Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast'
|
: "Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />
|
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||||||
<link rel='canonical' href='https://hazemkrimi.tech' />
|
<link rel="canonical" href="https://hazemkrimi.tech" />
|
||||||
<meta property='og:image' content='/logo.jpg' />
|
<meta property="og:image" content="/logo.jpg" />
|
||||||
<meta
|
<meta
|
||||||
property='og:description'
|
property="og:description"
|
||||||
content={
|
content={
|
||||||
frontMatter.description
|
frontMatter.description
|
||||||
? frontMatter.description
|
? frontMatter.description
|
||||||
: 'Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast'
|
: "Hazem Krimi is a Full Stack JavaScript Developer and a Software Engineering Enthusiast"
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<meta property='og:title' content={`${frontMatter.title} | Hazem Krimi`} />
|
|
||||||
<meta
|
<meta
|
||||||
name='keywords'
|
property="og:title"
|
||||||
content='Hazem, Krimi, Developer, Software, Engineer, Web, Mobile, Frontend, Backend, Fullstack, JavaScript, React.js, React Native, Node.js, Portfolio, Blog, Tutorials, Tech News'
|
content={`${frontMatter.title} | Hazem Krimi`}
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="keywords"
|
||||||
|
content="Hazem, Krimi, Developer, Software, Engineer, Web, Mobile, Frontend, Backend, Fullstack, JavaScript, React.js, React Native, Node.js, Portfolio, Blog, Tutorials, Tech News"
|
||||||
/>
|
/>
|
||||||
<title>{frontMatter.title} | Hazem Krimi</title>
|
<title>{frontMatter.title} | Hazem Krimi</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<div className='meta'>
|
<div className="meta">
|
||||||
<div className='back' onClick={() => router.back()}>
|
<div className="back" onClick={() => router.back()}>
|
||||||
<IconButton icon='/icons/arrow-left.svg' />
|
<IconButton icon="/icons/arrow-left.svg" />
|
||||||
<span>Back</span>
|
<span>Back</span>
|
||||||
</div>
|
</div>
|
||||||
<h1>{frontMatter.title}</h1>
|
<h1>{frontMatter.title}</h1>
|
||||||
<p>{frontMatter.description}</p>
|
<p>{frontMatter.description}</p>
|
||||||
{frontMatter.tags && (
|
{frontMatter.tags && (
|
||||||
<div className='tags-wrapper'>
|
<div className="tags-wrapper">
|
||||||
{frontMatter.tags.map((tag: string, index: number) => (
|
{frontMatter.tags.map((tag: string, index: number) => (
|
||||||
<span key={index}>#{tag} </span>
|
<span key={index}>#{tag} </span>
|
||||||
))}
|
))}
|
||||||
@@ -153,7 +163,7 @@ const PortfolioProject: FC<Props> = ({ source, frontMatter }) => {
|
|||||||
</div>
|
</div>
|
||||||
<MDXProvider components={{ code: CodeBlock }}>
|
<MDXProvider components={{ code: CodeBlock }}>
|
||||||
<MDXEmbedProvider>
|
<MDXEmbedProvider>
|
||||||
<div className='content'>{content}</div>
|
<div className="content">{content}</div>
|
||||||
</MDXEmbedProvider>
|
</MDXEmbedProvider>
|
||||||
</MDXProvider>
|
</MDXProvider>
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
@@ -167,7 +177,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
|||||||
const paths = getPortfolioPorjectsSlugs();
|
const paths = getPortfolioPorjectsSlugs();
|
||||||
return {
|
return {
|
||||||
paths,
|
paths,
|
||||||
fallback: false
|
fallback: false,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
||||||
@@ -175,13 +185,13 @@ export const getStaticProps: GetStaticProps = async ({ params }: any) => {
|
|||||||
const { data, content } = matter(blogPostContent);
|
const { data, content } = matter(blogPostContent);
|
||||||
const mdxSource = await renderToString(content, {
|
const mdxSource = await renderToString(content, {
|
||||||
components,
|
components,
|
||||||
scope: data
|
scope: data,
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
source: mdxSource,
|
source: mdxSource,
|
||||||
frontMatter: data
|
frontMatter: data,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user