Skip to content

Commit

Permalink
configured prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorobreza committed Jan 5, 2024
1 parent 245aeca commit f7ceb10
Show file tree
Hide file tree
Showing 28 changed files with 105 additions and 53 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
- name: Install, build, and upload your site output
uses: withastro/action@v1
with:
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
# path: . # The root location of your Astro project inside the repository. (optional)
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)

deploy:
needs: build
Expand All @@ -36,4 +36,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v3
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.astro
.vscode
dist
node_modules
pnpm-lock.yaml
14 changes: 14 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// .prettierrc.mjs
/** @type {import("prettier").Config} */
export default {
plugins: ["prettier-plugin-astro"],
overrides: [
{
files: "*.astro",
options: {
parser: "astro",
},
},
],
proseWrap: "always",
};
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ Inside of your Astro project, you'll see the following folders and files:
└── package.json
```

Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page
is exposed as a route based on its file name.

There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
There's nothing special about `src/components/`, but that's where we like to put
any Astro/React/Vue/Svelte/Preact components.

Any static assets, like images, can be placed in the `public/` directory.

Expand All @@ -51,4 +53,5 @@ All commands are run from the root of the project, from a terminal:

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
Feel free to check [our documentation](https://docs.astro.build) or jump into
our [Discord server](https://astro.build/chat).
3 changes: 1 addition & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import tailwind from "@astrojs/tailwind";
import { rehypeAccessibleEmojis } from "rehype-accessible-emojis";
import sitemap from "@astrojs/sitemap";
import mdx from "@astrojs/mdx";
import remarkToc from 'remark-toc';
import remarkToc from "remark-toc";

// https://astro.build/config
export default defineConfig({
Expand All @@ -20,7 +20,6 @@ export default defineConfig({
applyBaseStyles: false,
}),
sitemap(),

],
redirects: {
"/projects-tags": "/projects",
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
"sharp": "^0.33.1",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3"
},
"devDependencies": {
"prettier": "^3.1.1",
"prettier-plugin-astro": "^0.12.3"
}
}
}
2 changes: 1 addition & 1 deletion src/components/BreadCrumbs.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const breadCrumbs = Astro.url.pathname
});
return accumulator;
},
[] as { path: string; name: string }[]
[] as { path: string; name: string }[],
);
---

Expand Down
4 changes: 2 additions & 2 deletions src/components/ProjectOverview.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ interface Props {
const { slug, title, description, tags, image, githubLink, projectLink } =
Astro.props;
const images = import.meta.glob<{ default: ImageMetadata }>(
"/src/images/*.{jpeg,jpg,png,gif}"
"/src/images/*.{jpeg,jpg,png,gif}",
);
if (!images[image.url])
throw new Error(
`"${image.url}" does not exist in glob: "src/images/*.{jpeg,jpg,png,gif}"`
`"${image.url}" does not exist in glob: "src/images/*.{jpeg,jpg,png,gif}"`,
);
---

Expand Down
7 changes: 4 additions & 3 deletions src/components/home/RenderAbout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ interface Props {
const { about } = Astro.props;
const { Content } = await about.render();
---

<div class="flex flex-col gap-y-3">
<h3>{about.data.title}</h3>
<Content components={{ a: ProjectLink }} />
</div>
<h3>{about.data.title}</h3>
<Content components={{ a: ProjectLink }} />
</div>
17 changes: 10 additions & 7 deletions src/components/home/SkillCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import SkillsetBrands from "./SkillsetBrands.astro";
// const { href, title, body } = Astro.props;
---

<div class="bg-gradient-to-b from-dark-secondary rounded-3xl border border-ghost-white/35 w-full p-8 sm:px-12">
<div class="flex flex-col items-center gap-y-8">
<h2>Most experienced with</h2>
<SkillsetBrands/>
<p class="text-xs text-center">And curious to learn and improve my skill set whenever I can.</p>
</div>
<div
class="bg-gradient-to-b from-dark-secondary rounded-3xl border border-ghost-white/35 w-full p-8 sm:px-12"
>
<div class="flex flex-col items-center gap-y-8">
<h2>Most experienced with</h2>
<SkillsetBrands />
<p class="text-xs text-center">
And curious to learn and improve my skill set whenever I can.
</p>
</div>
</div>

4 changes: 2 additions & 2 deletions src/components/projects/ProjectLayoutImage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const linkStyleClass =
---

<div class="pt-6">
<div class="min-w-40 self-center rounded-lg overflow-hidden relative ">
<div class=" hidden sm:grid grid-flow-col h-full w-full absolute ">
<div class="min-w-40 self-center rounded-lg overflow-hidden relative">
<div class="hidden sm:grid grid-flow-col h-full w-full absolute">
{
githubLink && (
<a href={githubLink} class={linkStyleClass} target="_blank">
Expand Down
5 changes: 3 additions & 2 deletions src/components/projects/ProjectLink.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
const props = Astro.props;
---

<a {...props} class="underline-link">
<slot/>
</a>
<slot />
</a>
6 changes: 3 additions & 3 deletions src/components/projects/ProjectsCardList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ const { title } = Astro.props;
<div class="flex flex-col gap-y-6 divide-y divide-ghost-white/35 w-full">
<slot />
<div class="self-center w-full flex justify-center pt-6">
<PrimaryButton href="/">
<p class="text-sm">Home</p>
</PrimaryButton>
<PrimaryButton href="/">
<p class="text-sm">Home</p>
</PrimaryButton>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/content/about/para-1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
title: "What have I been up to lately"
---

Since on the day job I mostly do front-end development, I work on my back-end skills through building side projects in my spare time. Apart from that I am also interested into business, startups and Saas development. Therefore I am exploring and learning about how to market some of my ideas.
Since on the day job I mostly do front-end development, I work on my back-end
skills through building side projects in my spare time. Apart from that I am
also interested into business, startups and Saas development. Therefore I am
exploring and learning about how to market some of my ideas.
4 changes: 3 additions & 1 deletion src/content/about/para-2.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
title: "What can I help you with"
---
I can help you with building MVPs or whole web applications using React, Next.js, Astro and Supabase. Ping me and we will discuss your challenge.

I can help you with building MVPs or whole web applications using React,
Next.js, Astro and Supabase. Ping me and we will discuss your challenge.
6 changes: 5 additions & 1 deletion src/content/about/para-3.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
title: "Some other facts"
---
Actually, I completed my master's degree in Mechanical Engineering and ventured into programming and web development during the final stages of my studies. Even though I am not so into mechanical engineering anymore, I still like to model and 3D print some ideas from time to time...

Actually, I completed my master's degree in Mechanical Engineering and ventured
into programming and web development during the final stages of my studies. Even
though I am not so into mechanical engineering anymore, I still like to model
and 3D print some ideas from time to time...
5 changes: 4 additions & 1 deletion src/content/about/para-4.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
title: "Random..."
---
Yes I also do other stuff in my life. I enjoy hard strongman and powerlifting training sessions, boxing, reading, having a beer or two with my friends and of course spending time and building our future with my girlfriend.

Yes I also do other stuff in my life. I enjoy hard strongman and powerlifting
training sessions, boxing, reading, having a beer or two with my friends and of
course spending time and building our future with my girlfriend.
5 changes: 3 additions & 2 deletions src/content/projects/barbell-logbook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ title: Barbell Logbook
author: Gregor Obreza
description: "Landing page made with Next.js and Mantine."
image:
url: '/src/images/sample-project-image.png'
alt: "Thumbnail of Astro rays."
url: "/src/images/sample-project-image.png"
alt: "Thumbnail of Astro rays."
pubDate: 2024-01-01
tags: ["nextjs", "react", "typescript", "mantine"]
featured: false
githubLink: "https://github.com/gregorobreza/strong-app-landing-page"
projectLink: "https://barbelllogbook.com/"
---

import WorkInProgress from "../../components/WorkInProgress.astro";

<WorkInProgress text={"This project description is still work in progress"} />
4 changes: 3 additions & 1 deletion src/content/projects/field-measurement-manager.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: "Field measurement manager"
pubDate: 2024-01-04
description: "Currently ongoing project for tracking, managing and planning field measurements."
description:
"Currently ongoing project for tracking, managing and planning field
measurements."
author: "Gregor Obreza"
image:
url: "/src/images/sample-project-image.png"
Expand Down
4 changes: 3 additions & 1 deletion src/content/projects/flare-portal-frontend.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: "Flare Portal Frontend"
pubDate: 2024-01-01
description: "The project I am working on, on my day job. I am responsible for frontend development of that webpage."
description:
"The project I am working on, on my day job. I am responsible for frontend
development of that webpage."
author: "Gregor Obreza"
image:
url: "/src/images/sample-project-image.png"
Expand Down
4 changes: 3 additions & 1 deletion src/content/projects/my-master-thesis.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: Remote monitoring of Structural Dynamics
author: Gregor Obreza
description: "This is my master's thesis project that I worked on while finisnishing my studies."
description:
"This is my master's thesis project that I worked on while finisnishing my
studies."
image:
url: "/src/images/sample-project-image.png"
alt: "Thumbnail of Astro rays."
Expand Down
6 changes: 4 additions & 2 deletions src/content/projects/my-portfolio-website.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ featured: true
githubLink: "https://github.com/gregorobreza/gobreza-simple-portfolio"
projectLink: "https://gregorobreza.com"
---

import WorkInProgress from "../../components/WorkInProgress.astro";

<WorkInProgress text={"This project description is still work in progress"} />

As you probably already noticed, this is the website are currently browsing. It was made using [Astro](https://astro.build/) framework. Here I will breefly describe the proccess of making it.
As you probably already noticed, this is the website are currently browsing. It
was made using [Astro](https://astro.build/) framework. Here I will breefly
describe the proccess of making it.

## Used stuff

Expand All @@ -42,5 +45,4 @@ As you probably already noticed, this is the website are currently browsing. It

## Deployment


## Conclusion
5 changes: 3 additions & 2 deletions src/content/projects/webso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ title: Webso
author: Gregor Obreza
description: "Landing page made in HTML, Sass and JS."
image:
url: '/src/images/sample-project-image.png'
alt: "Thumbnail of Astro rays."
url: "/src/images/sample-project-image.png"
alt: "Thumbnail of Astro rays."
pubDate: 2024-01-01
tags: ["javascript", "sasscss", "gsap"]
featured: false
githubLink: "https://github.com/gregorobreza/webso"
projectLink: "https://www.webso.si/"
---

import WorkInProgress from "../../components/WorkInProgress.astro";

<WorkInProgress text={"This project description is still work in progress"} />
4 changes: 2 additions & 2 deletions src/layouts/ProjectLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ interface Props {
const { frontmatter } = Astro.props;
const images = import.meta.glob<{ default: ImageMetadata }>(
"/src/images/*.{jpeg,jpg,png,gif}"
"/src/images/*.{jpeg,jpg,png,gif}",
);
if (!images[frontmatter.image.url])
throw new Error(
`"${frontmatter.image.url}" does not exist in glob: "src/images/*.{jpeg,jpg,png,gif}"`
`"${frontmatter.image.url}" does not exist in glob: "src/images/*.{jpeg,jpg,png,gif}"`,
);
---

Expand Down
4 changes: 2 additions & 2 deletions src/pages/projects-tags/[tag].astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import ProjectsCardList from "../../components/projects/ProjectsCardList.astro";
import Layout from "../../layouts/Layout.astro";
export async function getStaticPaths() {
const allProjects = (await getCollection("projects")).sort(
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime()
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(),
);
const uniqueTags = [
...new Set(allProjects.map((project) => project.data.tags).flat()),
];
return uniqueTags.map((tag) => {
const filteredProjects = allProjects.filter((project) =>
project.data.tags.includes(tag)
project.data.tags.includes(tag),
);
return {
params: { tag },
Expand Down
2 changes: 1 addition & 1 deletion src/pages/projects/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import WorkInProgress from "../../components/WorkInProgress.astro";
import Layout from "../../layouts/Layout.astro";
import ProjectOverview from "../../components/ProjectOverview.astro";
const allProjects = (await getCollection("projects")).sort(
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime()
(a, b) => b.data.pubDate.getTime() - a.data.pubDate.getTime(),
);
const pageTitle = "Gregor Obreza | Projects";
Expand Down
8 changes: 4 additions & 4 deletions src/styles/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
code {
@apply bg-levender-white text-dark-primary rounded-sm px-0.5;
}
ul{
@apply list-disc px-3 sm:px-8
ul {
@apply list-disc px-3 sm:px-8;
}
ol{
@apply list-decimal px-3 sm:px-8
ol {
@apply list-decimal px-3 sm:px-8;
}
}

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}
}

0 comments on commit f7ceb10

Please sign in to comment.