This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
styles: apply tailwind styles from Figma #37
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
aec7aca
chore: remove default global styles
hetd54 cb7b26b
chore: add tailwind's full config
hetd54 d04a3d0
feat: apply custom styling to tailwind; apply to global elements
hetd54 d60a5a3
style: bg color match mockup
hetd54 aa30b24
styles: remove style only used in layout
hetd54 290195d
Update src/layouts/BlogPost.astro
hetd54 7c0c278
styles: tailwind no underline
hetd54 e379520
Merge branch 'figma-styles' of https://github.com/brown-ccv/mmp into …
hetd54 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,47 @@ | ||
--- | ||
import type { CollectionEntry } from 'astro:content'; | ||
import BaseHead from '../components/BaseHead.astro'; | ||
import Header from '../components/Header.astro'; | ||
import Footer from '../components/Footer.astro'; | ||
import FormattedDate from '../components/FormattedDate.astro'; | ||
import type { CollectionEntry } from "astro:content" | ||
import BaseHead from "../components/BaseHead.astro" | ||
import Header from "../components/Header.astro" | ||
import Footer from "../components/Footer.astro" | ||
import FormattedDate from "../components/FormattedDate.astro" | ||
|
||
type Props = CollectionEntry<'blog'>['data']; | ||
type Props = CollectionEntry<"blog">["data"] | ||
|
||
const { title, description, pubDate, updatedDate, heroImage } = Astro.props; | ||
const { title, description, pubDate, updatedDate, heroImage } = Astro.props | ||
--- | ||
|
||
<html lang="en"> | ||
<head> | ||
<BaseHead title={title} description={description} /> | ||
<style> | ||
main { | ||
width: calc(100% - 2em); | ||
max-width: 100%; | ||
margin: 0; | ||
} | ||
.hero-image { | ||
width: 100%; | ||
} | ||
.hero-image img { | ||
display: block; | ||
margin: 0 auto; | ||
border-radius: 12px; | ||
box-shadow: var(--box-shadow); | ||
} | ||
.prose { | ||
width: 720px; | ||
max-width: calc(100% - 2em); | ||
margin: auto; | ||
padding: 1em; | ||
color: rgb(var(--gray-dark)); | ||
} | ||
.title { | ||
margin-bottom: 1em; | ||
padding: 1em 0; | ||
text-align: center; | ||
line-height: 1; | ||
} | ||
.title h1 { | ||
margin: 0 0 0.5em 0; | ||
} | ||
.date { | ||
margin-bottom: 0.5em; | ||
color: rgb(var(--gray)); | ||
} | ||
.last-updated-on { | ||
font-style: italic; | ||
} | ||
</style> | ||
</head> | ||
<head> | ||
<BaseHead title={title} description={description} /> | ||
</head> | ||
|
||
<body> | ||
<Header /> | ||
<main> | ||
<article> | ||
<div class="hero-image"> | ||
{heroImage && <img width={1020} height={510} src={heroImage} alt="" />} | ||
</div> | ||
<div class="prose"> | ||
<div class="title"> | ||
<div class="date"> | ||
<FormattedDate date={pubDate} /> | ||
{ | ||
updatedDate && ( | ||
<div class="last-updated-on"> | ||
Last updated on <FormattedDate date={updatedDate} /> | ||
</div> | ||
) | ||
} | ||
</div> | ||
<h1>{title}</h1> | ||
<hr /> | ||
</div> | ||
<slot /> | ||
</div> | ||
</article> | ||
</main> | ||
<Footer /> | ||
</body> | ||
<body class="single-column"> | ||
<Header /> | ||
<main> | ||
<article> | ||
<div> | ||
{heroImage && <img width={1020} height={510} src={heroImage} alt="" />} | ||
</div> | ||
<div> | ||
<div> | ||
<div> | ||
<FormattedDate date={pubDate} /> | ||
{ | ||
updatedDate && ( | ||
<div class="last-updated-on"> | ||
Last updated on | ||
<FormattedDate date={updatedDate} /> | ||
</div> | ||
) | ||
} | ||
</div> | ||
<h1>{title}</h1> | ||
<hr /> | ||
</div> | ||
<slot /> | ||
</div> | ||
</article> | ||
</main> | ||
<Footer /> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
--- | ||
import BaseHead from '../components/BaseHead.astro'; | ||
import Header from '../components/Header.astro'; | ||
import Footer from '../components/Footer.astro'; | ||
import { SITE_TITLE, SITE_DESCRIPTION } from '../consts'; | ||
import BaseHead from "../components/BaseHead.astro" | ||
import Header from "../components/Header.astro" | ||
import Footer from "../components/Footer.astro" | ||
import { SITE_TITLE, SITE_DESCRIPTION } from "../consts" | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> | ||
</head> | ||
<body> | ||
<Header /> | ||
<main> | ||
<h1>🧑🚀 Hello, Astronaut!</h1> | ||
<p> | ||
Welcome to the official <a href="https://astro.build/">Astro</a> blog starter template. This | ||
template serves as a lightweight, minimally-styled starting point for anyone looking to build | ||
a personal website, blog, or portfolio with Astro. | ||
</p> | ||
<p> | ||
This template comes with a few integrations already configured in your | ||
<code>astro.config.mjs</code> file. You can customize your setup with | ||
<a href="https://astro.build/integrations">Astro Integrations</a> to add tools like Tailwind, | ||
React, or Vue to your project. | ||
</p> | ||
<p>Here are a few ideas on how to get started with the template:</p> | ||
<ul> | ||
<li>Edit this page in <code>src/pages/index.astro</code></li> | ||
<li>Edit the site header items in <code>src/components/Header.astro</code></li> | ||
<li>Add your name to the footer in <code>src/components/Footer.astro</code></li> | ||
<li>Check out the included blog posts in <code>src/pages/blog/</code></li> | ||
<li>Customize the blog post page layout in <code>src/layouts/BlogPost.astro</code></li> | ||
</ul> | ||
<p> | ||
Have fun! If you get stuck, remember to <a href="https://docs.astro.build/" | ||
>read the docs | ||
</a> or <a href="https://astro.build/chat">join us on Discord</a> to ask questions. | ||
</p> | ||
<p> | ||
Looking for a blog template with a bit more personality? Check out <a | ||
href="https://github.com/Charca/astro-blog-template" | ||
>astro-blog-template | ||
</a> by <a href="https://twitter.com/Charca">Maxi Ferreira</a>. | ||
</p> | ||
</main> | ||
<Footer /> | ||
</body> | ||
<head> | ||
<BaseHead title={SITE_TITLE} description={SITE_DESCRIPTION} /> | ||
</head> | ||
<body class="single-column"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I imagine this should be in a layout component? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, let's plan on a refactor in a different PR |
||
<Header /> | ||
<main> | ||
<h1>🧑🚀 Hello, Astronaut!</h1> | ||
<p> | ||
Welcome to the official <a href="https://astro.build/">Astro</a> blog starter template. This | ||
template serves as a lightweight, minimally-styled starting point for anyone looking to build | ||
a personal website, blog, or portfolio with Astro. | ||
</p> | ||
<p> | ||
This template comes with a few integrations already configured in your | ||
<code>astro.config.mjs</code> file. You can customize your setup with | ||
<a href="https://astro.build/integrations">Astro Integrations</a> to add tools like Tailwind, | ||
React, or Vue to your project. | ||
</p> | ||
<p>Here are a few ideas on how to get started with the template:</p> | ||
<ul> | ||
<li>Edit this page in <code>src/pages/index.astro</code></li> | ||
<li>Edit the site header items in <code>src/components/Header.astro</code></li> | ||
<li>Add your name to the footer in <code>src/components/Footer.astro</code></li> | ||
<li>Check out the included blog posts in <code>src/pages/blog/</code></li> | ||
<li>Customize the blog post page layout in <code>src/layouts/BlogPost.astro</code></li> | ||
</ul> | ||
<p> | ||
Have fun! If you get stuck, remember to <a href="https://docs.astro.build/" | ||
>read the docs | ||
</a> or <a href="https://astro.build/chat">join us on Discord</a> to ask questions. | ||
</p> | ||
<p> | ||
Looking for a blog template with a bit more personality? Check out <a | ||
href="https://github.com/Charca/astro-blog-template" | ||
>astro-blog-template | ||
</a> by <a href="https://twitter.com/Charca">Maxi Ferreira</a>. | ||
</p> | ||
</main> | ||
<Footer /> | ||
</body> | ||
</html> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
decoration-0
do? Doesn't that just remove the underline? In that case, you could useno-underline
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are correct! Looks like this is leftover from the blog post defaults-- not sure why they didn't use
no-underline
. Changing now~