style: reformat

Reformat files using Prettier and Rustywind. I tried the official
Tailwind CSS Prettier plugin but it was erroring when trying to run it -
I assume because I'm using Astro's Tailwind integration.
This commit is contained in:
Oliver Davies 2023-04-19 17:00:29 +01:00
parent f2dc5ad235
commit a33f269253
19 changed files with 111 additions and 113 deletions

View file

@ -1,15 +1,14 @@
---
import DailyEmailForm from "~/components/DailyEmailForm.astro";
import Layout from "~/layouts/DailyEmailLayout.astro";
import { getCollection } from 'astro:content';
import { getCollection } from "astro:content";
export async function getStaticPaths({ paginate }) {
const emails = await getCollection('daily-email');
const emails = await getCollection("daily-email");
const sortedEmails = emails.sort(
(a, b) =>
new Date(b.data.pubDate).valueOf() -
new Date(a.data.pubDate).valueOf()
new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf()
);
return paginate(sortedEmails, { pageSize: 20 });
@ -28,8 +27,8 @@ const { page } = Astro.props;
day: "numeric",
month: "long",
year: "numeric",
})}:
{email.data.title}
})}
:{email.data.title}
</a>
</li>
))

View file

@ -1,25 +1,23 @@
---
import DailyEmailForm from "~/components/DailyEmailForm.astro";
import Layout from "~/layouts/DailyEmailLayout.astro";
import { format } from 'date-fns'
import { getCollection } from 'astro:content';
import { format } from "date-fns";
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const emails = await getCollection('daily-email');
const emails = await getCollection("daily-email");
return emails.map((email) => {
const slug = email.data.permalink
.replace("archive/", "")
.replace("\n", "");
const slug = email.data.permalink.replace("archive/", "").replace("\n", "");
const slugParts = slug.split("/");
return {
params: {
day: format(email.data.pubDate, 'dd'),
month: format(email.data.pubDate, 'MM'),
day: format(email.data.pubDate, "dd"),
month: format(email.data.pubDate, "MM"),
slug: slugParts.reverse()[0],
year: format(email.data.pubDate, 'Y'),
year: format(email.data.pubDate, "Y"),
},
props: {
email,
@ -33,8 +31,8 @@ const { pubDate, title } = Astro.props.email.data;
---
<Layout title={title}>
<time datetime={format(pubDate, 'yyyy-MM-dd')}>
{format(pubDate, 'PPP')}
<time datetime={format(pubDate, "yyyy-MM-dd")}>
{format(pubDate, "PPP")}
</time>
<Content class="mt-6" />

View file

@ -2,10 +2,10 @@
import AboutMe from "~/components/AboutMe.astro";
import Layout from "~/layouts/Layout.astro";
import Markdown from "~/components/Markdown.astro";
import { getCollection } from 'astro:content';
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const posts = await getCollection('blog');
const posts = await getCollection("blog");
return posts.map((post) => {
return {

View file

@ -11,7 +11,7 @@ price: 199
- Once payment is received, youll obtain a link to schedule a meeting in my calendar.
- The meeting will take place over Zoom.
<a class="my-4 py-2 px-5 inline-block rounded-lg border-2 border-blue-primary text-lg bg-blue-primary text-white no-underline transition-colors duration-200 hover:bg-white hover:text-blue-primary" href={frontmatter.link}>Book your call now &rarr;</a>
<a class="inline-block py-2 px-5 my-4 text-lg text-white no-underline rounded-lg border-2 transition-colors duration-200 hover:bg-white border-blue-primary bg-blue-primary hover:text-blue-primary" href={frontmatter.link}>Book your call now &rarr;</a>
If you dont find the call valuable, Ill refund 100% of the cost.
@ -27,5 +27,5 @@ If you dont find the call valuable, Ill refund 100% of the cost.
<aside class="p-6 my-8 border border-gray-300 dark:bg-gray-800 dark:border-gray-700" markdown="1">
<h2 class="mt-0">Ready to book your call?</h2>
<a class="mt-4 py-2 px-5 inline-block rounded-lg border-2 border-blue-primary text-lg bg-blue-primary text-white no-underline transition-colors duration-200 hover:bg-white hover:text-blue-primary" href={frontmatter.link}>Book now for £{frontmatter.price} &rarr;</a>
<a class="inline-block py-2 px-5 mt-4 text-lg text-white no-underline rounded-lg border-2 transition-colors duration-200 hover:bg-white border-blue-primary bg-blue-primary hover:text-blue-primary" href={frontmatter.link}>Book now for £{frontmatter.price} &rarr;</a>
</aside>

View file

@ -49,10 +49,10 @@ A daily newsletter on software development, DevOps, community, and open-source.
<figcaption class="mt-6">{testimonial.name}</figcaption>
</div>
<div class="flex-shrink-0 hidden sm:block">
<div class="hidden flex-shrink-0 sm:block">
<img
alt={testimonial.name}
class="border border-grey rounded-full"
class="rounded-full border border-grey"
src={`/images/daily/${testimonial.image}`}
width="75"
/>

View file

@ -49,7 +49,7 @@ The workshop is currently only available remotely, and the next available date i
Seats are available at <span class="font-bold">{isEarlyBird ? `an early bird price of £${prices.early}` : `a price of £${prices.full}`}</span>, with a 10% discount for bulk orders of 5 or more seats.
<div class="mt-6">
<a class="inline-flex items-center px-6 py-3 font-medium rounded-md bg-blue-primary text-white no-underline hover:bg-white hover:text-blue-primary focus:bg-white focus:text-blue-primary transition-color ease-in-out duration-200 text-base" href="https://buy.stripe.com/6oE3cW4Su7DA1t6144">
<a class="inline-flex items-center py-3 px-6 text-base font-medium text-white no-underline rounded-md duration-200 ease-in-out hover:bg-white focus:bg-white bg-blue-primary transition-color hover:text-blue-primary focus:text-blue-primary" href="https://buy.stripe.com/6oE3cW4Su7DA1t6144">
Book your seat &rarr;
</a>
</div>

View file

@ -27,7 +27,7 @@ const commonSearches = [
</div>
<div>
<input class="button cursor-pointer" type="submit" value="Search" />
<input class="cursor-pointer button" type="submit" value="Search" />
</div>
</form>
</div>

View file

@ -6,10 +6,10 @@ import Markdown from "~/components/Markdown.astro";
import Slides from "~/components/talk/Slides.astro";
import Video from "~/components/talk/Video.astro";
import { getSlugFromFile } from "~/utils.ts";
import { getCollection } from 'astro:content';
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const talks = await getCollection('talk')
const talks = await getCollection("talk");
return talks.map((talk) => {
return {

View file

@ -1,9 +1,9 @@
---
import ListingPage from "~/components/ListingPage.astro";
import _ from "lodash";
import { getCollection } from 'astro:content';
import { getCollection } from "astro:content";
const talks = await getCollection('talk');
const talks = await getCollection("talk");
const talkCount = _(talks)
.flatMap((talk) => talk.data.events)
@ -11,7 +11,7 @@ const talkCount = _(talks)
const sortedTalks = talks
.map((talk) => {
const slug = `/talks/${talk.slug}`
const slug = `/talks/${talk.slug}`;
return { slug, item: talk };
})

View file

@ -58,5 +58,5 @@ Do you want to introduce PHP to your company or team, or add one of these tools
I offer consulting calls and services to reduce your onboarding time and get you up and running quicker and easier.
<div class="mt-6">
<a class="inline-flex items-center px-6 py-3 font-medium rounded-md bg-blue-primary text-white no-underline hover:bg-white hover:text-blue-primary focus:bg-white focus:text-blue-primary transition-color ease-in-out duration-200 text-base" href={`mailto:${email}?subject=Book in my call`}>Book in your call →</a>
<a class="inline-flex items-center py-3 px-6 text-base font-medium text-white no-underline rounded-md duration-200 ease-in-out hover:bg-white focus:bg-white bg-blue-primary transition-color hover:text-blue-primary focus:text-blue-primary" href={`mailto:${email}?subject=Book in my call`}>Book in your call →</a>
</div>