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

Clint tailwind #31

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"window.zoomLevel": 6
}
"window.zoomLevel": 0
}
35 changes: 1 addition & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
# MIJE Next Site
5 changes: 5 additions & 0 deletions components/contact/contact-us.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';

export default function ContactUs() {
return <h1>Contact Us - Page</h1>;
}
Empty file.
16 changes: 13 additions & 3 deletions components/home-page/featured-posts.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
import Head from 'next/head';
import PostsGrid from '../posts/posts-grid';
import classes from './featured-posts.module.css';

function FeaturedPosts(props) {
return (
<section className={classes.latest}>
<h2>Featured Posts</h2>
<>
<Head>
<title>MIJE</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@700&display=swap" rel="stylesheet" />
</Head>
<section className="bg-lightGray flex justify-center items-center flex-col">
<h2 className="text-6xl font-extrabold p-10 font-oswald"
>Maynard News</h2>
<PostsGrid posts={props.posts} />
</section>
</>

);
}

Expand Down
17 changes: 0 additions & 17 deletions components/home-page/featured-posts.module.css

This file was deleted.

23 changes: 12 additions & 11 deletions components/home-page/hero.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import Image from 'next/image';

import classes from './hero.module.css';

function Hero() {
return (
<section className={classes.hero}>
<div className={classes.image}>
<section className="bg-gray">
<div className='p-7 flex justify-center class'>
<Image
src='/images/site/max.png'
alt='An image showing Max'
src="/images/site/g1.jpg"
alt="An image showing a rainbow gradient."
width={300}
height={300}
className="rounded-full"
/>
</div>
<h1>Hi, I'm Max</h1>
<p>
I blog about web development - especially frontend frameworks like
Angular or React.
</p>
<div className='uppercase flex justify-center'>
<h1 className="text-gray-300 text-5xl text-center pb-7 font-extrabold">
40 YEARS OF DRIVING <br />
DIVERSITY IN JOURNALISM
</h1>
</div>

</section>
);
}
Expand Down
40 changes: 0 additions & 40 deletions components/home-page/hero.module.css

This file was deleted.

15 changes: 13 additions & 2 deletions components/layout/logo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import classes from './logo.module.css';
import Head from "next/head";

function Logo() {
return <div className={classes.logo}>Max' Next Blog</div>;
return(
<>
<Head>
<title>Mije</title>
</Head>
<div className="text-white uppercase text-4xl ml-25 font-oswald"
>Maynard Institute</div>

</>


)
}

export default Logo;
13 changes: 0 additions & 13 deletions components/layout/logo.module.css

This file was deleted.

29 changes: 19 additions & 10 deletions components/layout/main-navigation.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
import Head from 'next/head';
import Link from 'next/link';

import Logo from './logo';
import classes from './main-navigation.module.css';

function MainNavigation() {
return (
<header className={classes.header}>
<Link href='/'>
<header className="flex justify-between bg-primary p-6 place-items-center px-36"
>
<Link href="/">
<a>
<Logo />
</a>
</Link>
<nav>
<ul>
<li>
<Link href='/posts'>Posts</Link>
<ul className='flex'>
<li className='p-4 text-white'
style={{
fontSize: "20px",
}}
>
<Link href="/news"
>News</Link>
</li>
<li>
<Link href='/contact'>Contact</Link>
<li className='p-4 text-white'
style={{
fontSize: "20px",
}}
>
<Link href="/contact">Contact</Link>
</li>
</ul>
</nav>
</header>
);
}

export default MainNavigation;
export default MainNavigation;
42 changes: 0 additions & 42 deletions components/layout/main-navigation.module.css

This file was deleted.

2 changes: 1 addition & 1 deletion components/posts/all-posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PostsGrid from './posts-grid';
function AllPosts(props) {
return (
<section className={classes.posts}>
<h1>All Posts</h1>
<h1>Maynard News</h1>
<PostsGrid posts={props.posts} />
</section>
);
Expand Down
20 changes: 13 additions & 7 deletions components/posts/post-detail/post-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ function PostContent(props) {
// />
// );
// },
paragraph(paragraph) {
p(paragraph) {
const { node } = paragraph;

if (node.children[0].type === 'image') {
if (node.children[0].tagName === 'img') {
const image = node.children[0];

return (
<div className={classes.image}>
<Image
src={`/images/posts/${post.slug}/${image.url}`}
src={`/images/posts/${post.slug}/${image.properties.src}`}
alt={image.alt}
width={600}
height={300}
Expand All @@ -49,22 +49,28 @@ function PostContent(props) {
},

code(code) {
const { language, value } = code;
const { className, children } = code;
const language = className.split('-')[1]; // className is something like language-js => We need the "js" part here
return (
<SyntaxHighlighter
style={atomDark}
language={language}
children={value}
children={children}
/>
);
},
};

return (
<article className={classes.content}>
<div className="flex justify-center">
<div className="flex justify-center bg-slate w-4/5 p-4 m-4">
<article className={classes.content}>
<PostHeader title={post.title} image={imagePath} />
<ReactMarkdown renderers={customRenderers}>{post.content}</ReactMarkdown>
<ReactMarkdown components={customRenderers}>{post.content}</ReactMarkdown>
</article>
</div>
</div>

);
}

Expand Down
13 changes: 11 additions & 2 deletions components/posts/post-detail/post-header.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import Head from 'next/head';
import Image from 'next/image';

import classes from './post-header.module.css';
Expand All @@ -6,10 +7,18 @@ function PostHeader(props) {
const { title, image } = props;

return (
<header className={classes.header}>
<h1>{title}</h1>
<>
<Head>
<title>{title}</title>
</Head>
<header className="border-b-4 border-orange-300 flex justify-between m-4 p-4">
<h1
className="break-normal font-oswald text-5xl"
>{title}</h1>
<Image src={image} alt={title} width={200} height={150} />
</header>
</>

);
}

Expand Down
Loading