diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 00000000..75f47cf4 --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,44 @@ +name: Deploy to GitHub Pages + +on: + # Trigger the workflow every time you push to the `main` branch + # Using a different branch name? Replace `main` with your branch’s name + push: + branches: [ main ] + # Allows you to run this workflow manually from the Actions tab on GitHub. + workflow_dispatch: + +# Allow this job to clone the repo and create a page deployment +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout your repository using git + uses: actions/checkout@v5 + - name: Install, build, and upload your site + uses: withastro/action@v5 + with: + package-manager: npm + # with: + # path: . # The root location of your Astro project inside the repository. (optional) + # node-version: 24 # The specific version of Node that should be used to build your site. Defaults to 22. (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) + # build-cmd: pnpm run build # The command to run to build your site. Runs the package build script/task by default. (optional) + # env: + # PUBLIC_POKEAPI: 'https://pokeapi.co/api/v2' # Use single quotation marks for the variable value. (optional) + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.github/workflows/prepare_releases.yml b/.github/workflows/prepare_releases.yml deleted file mode 100644 index e276686f..00000000 --- a/.github/workflows/prepare_releases.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: "prepare-release" - -on: - push: - branches: - - "main" - workflow_dispatch: - -jobs: - pre-release: - name: "Prepare Release" - runs-on: "ubuntu-latest" - - steps: - - uses: "marvinpinto/action-automatic-releases@latest" - with: - repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" - prerelease: true - title: "Next Release" diff --git a/README.md b/README.md index 9e3b170a..ca924110 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,5 @@ -# Accessible Astro Starter +Simple Portfolio Website -[![Built with Astro](https://astro.badg.es/v2/built-with-astro/small.svg)](https://astro.build) - -social-preview - -A ready-to-use, SEO and accessibility-focused Astro starter template. Built with modern web standards, WCAG 2.2 AA guidelines, and European Accessibility Act (EAA) compliance in mind, it provides a solid foundation for creating inclusive websites. Features Tailwind CSS 4 integration, comprehensive component library with enhanced form validation, color contrast checker, and typography with Atkinson Hyperlegible font for improved readability. Includes dynamic blog/portfolio pages with social sharing, contact forms, and full MDX support. - -[![LIVE DEMO](https://img.shields.io/badge/LIVE_DEMO-4ECCA3?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro-starter.incluud.dev/)   -[![DOCUMENTATION](https://img.shields.io/badge/DOCUMENTATION-A682FF?style=for-the-badge&logo=astro&logoColor=black)](https://accessible-astro.incluud.dev/)   -[![Sponsor on Open Collective](https://img.shields.io/badge/Open%20Collective-7FADF2?style=for-the-badge&logo=opencollective&logoColor=white)](https://opencollective.com/incluud)   - -## Our mission - -> Provide developers with accessible, easy-to-use components that make building inclusive web applications simpler and faster, without compromising on customization or performance. - -## (Accessibility) Features - -- Astro 5.13.0+ -- Tailwind CSS 4.1+ support -- TypeScript integration with path aliases for easier imports and content collections support -- Prettier integration with `prettier-plugin-astro` and `prettier-plugin-tailwind` -- ESLint integration with strict accessibility settings for `eslint-plugin-jsx-a11y` -- Markdown and MDX support with comprehensive examples and components -- Modern OKLCH color system with automatic palette generation from primary/secondary colors -- Atkinson Hyperlegible font for improved readability and accessibility -- Lucide icon set via `astro-icon` for consistent, friendly icons -- Semantic HTML structure with `Button`, `Link` and `Heading` components -- Excellent Lighthouse/PageSpeed scores -- Accessible landmarks such as `header`, `main`, `footer`, `section` and `nav` -- Outline focus indicator which works on dark and light backgrounds -- Several `aria` attributes which provide a better experience for screen reader users -- `[...page].astro` and `[post].astro` demonstrate the use of dynamic routes and provide a basic blog with breadcrumbs and pagination -- `404.astro` provides a custom 404 error page which you can adjust to your needs -- `Header.astro` component with optimized accessibility and design -- `Footer.astro` component with informative content and links -- `SkipLinks.astro` component to skip to either the main menu or the main content -- `Navigation.astro` component with keyboard accessible (dropdown) navigation and highlighted menu item option -- `ResponsiveToggle.astro` component with accessible responsive toggle functionality -- `DarkMode.astro` component toggle with accessible button and a user system preferred color scheme setting -- `SiteMeta.astro` SEO component for setting custom metadata on different pages -- `.sr-only` utility class for screen reader only text content (hides text visually) -- `prefers-reduced-motion` disables animations for users that have this preference turned on -- Components including `ColorContrast.astro`, `BlockQuote.astro`, `BreakoutImage.astro`, `Logo.astro`, `SocialShares.astro`, `PageHeader.astro`, `FeaturedPosts.astro`, and `FeaturedProjects.astro` -- Enhanced form components with comprehensive validation: `Form`, `Input`, `Textarea`, `Checkbox`, `Radio`, and `Fieldset` with WCAG 2.2 compliance -- Automatic form validation with custom patterns, error handling, and screen reader support -- Blog and portfolio pages with featured images, author details, social sharing, and breakout images -- Contact page with comprehensive form validation showcase and accessibility demonstrations -- Thank-you page for form submissions with interactive feedback -- Accessibility Statement template page -- Color Contrast Checker interactive page -- Comprehensive sitemap page with organized navigation and automatic XML sitemap generation via `@astrojs/sitemap` -- Enhanced accessible-components showcase page with expanded component demonstrations -- Smooth micro-interactions and animations on hover, open and close states (respecting reduced motion preferences) -- Comprehensive SCSS utility classes -- CSS with logical properties and custom properties -- Accessible button and hyperlink styling with clear focus states -- Styled `` element for keyboard shortcut documentation - -## Getting started - -Clone this theme locally and run any of the following commands in your terminal: - -| Command | Action | -| :---------------- | :------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | - -## Accessible Astro projects - -- [Accessible Astro Starter](https://github.com/incluud/accessible-astro-starter): Fully accessible starter for kickstarting Astro projects, with Tailwind. -- [Accessible Astro Components](https://github.com/incluud/accessible-astro-components/): Library of reusable, accessible components built for Astro. -- [Accessible Astro Dashboard](https://github.com/incluud/accessible-astro-dashboard/): User-friendly dashboard interface with a login screen and widgets. -- [Accessible Astro Docs](https://github.com/incluud/accessible-astro-docs): Comprehensive documentation for all Accessible Astro projects. -- [Color Contrast Checker](https://github.com/incluud/color-contrast-checker): WCAG-compliant color contrast checker with design system token generation. - -Check out our [roadmap](https://github.com/orgs/incluud/projects/4/views/1) to see what's coming next! - -## Contributing - -We welcome contributions to improve the documentation! You can help by: - -1. [Filing an issue](https://github.com/incluud/accessible-astro-starter/issues) -2. [Submitting a pull request](https://github.com/incluud/accessible-astro-starter/pulls) -3. [Starting a discussion](https://github.com/incluud/accessible-astro-starter/discussions) -4. [Supporting on Open Collective](https://opencollective.com/incluud) - -## Support this project - -Your support helps us cover basic costs and continue building accessible solutions for the Astro ecosystem. By becoming a sponsor, you're not just supporting code – you're helping create a more inclusive web for everyone. Every contribution, big or small, helps maintain and improve these accessibility-focused tools. - -[![Sponsor on Open Collective](https://img.shields.io/badge/Open%20Collective-7FADF2?style=for-the-badge&logo=opencollective&logoColor=white)](https://opencollective.com/incluud) - -## Together we make a difference - -We want to express our heartfelt gratitude to everyone who contributes to making the web more accessible: - -- **The Astro team** for creating an amazing static site generator and the wonderful Starlight theme -- **Our contributors** who dedicate their time and expertise to improve these tools -- [**Niek Derksen**](https://niekderksen.nl) for conducting comprehensive accessibility audits to ensure WCAG compliance -- **Our sponsors** who help make this project sustainable -- **The web community** for embracing and promoting web accessibility -- **You, the developer** for choosing to make your projects more accessible - - - -

- -Together, we're not just building documentation or components – we're creating a more inclusive and accessible web for everyone. Every contribution, whether it's code, documentation, bug reports, or feedback, helps move us closer to this goal. ✨ - -Remember: Accessibility is not a feature, it's a fundamental right. Thank you for being part of this journey! +Used Tools: +- Vanta.js +- Astro Template diff --git a/astro.config.mjs b/astro.config.mjs index 68860a55..e8fbc3e6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -8,6 +8,7 @@ import mdx from '@astrojs/mdx' import sitemap from '@astrojs/sitemap' import tailwindcss from '@tailwindcss/vite' import { watch } from 'fs' +import { defineConfig } from 'astro/config'; // Check if we're using a symlinked/workspace setup const componentsPath = resolve('./node_modules/accessible-astro-components') @@ -85,9 +86,18 @@ if (isLinked) { } // https://astro.build/config +// export default defineConfig({ +// compressHTML: true, +// site: 'https://accessible-astro-starter.incluud.dev', +// integrations: [compress(), icon(), mdx(), sitemap()], +// vite: viteConfig, +// }) + + export default defineConfig({ compressHTML: true, - site: 'https://accessible-astro-starter.incluud.dev', + site: 'https://Shaninhooo.github.io', + base: '/Portfolio-Website', integrations: [compress(), icon(), mdx(), sitemap()], vite: viteConfig, -}) +}) \ No newline at end of file diff --git a/package.json b/package.json index 333d133b..2804e7dc 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "responsive", "ui-library", "ui-components", - "blog", + "library", "portfolio" ], "repository": { @@ -34,7 +34,7 @@ "url": "https://github.com/incluud/accessible-astro-starter/issues" }, "devDependencies": { - "@astrojs/mdx": "^4.3.5", + "@astrojs/mdx": "^4.3.13", "@astrojs/partytown": "^2.1.4", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.35.0", @@ -42,7 +42,7 @@ "@types/sanitize-html": "^2.13.0", "@typescript-eslint/eslint-plugin": "^8.43.0", "@typescript-eslint/parser": "^8.43.0", - "astro": "^5.13.7", + "astro": "^5.17.2", "astro-compress": "^2.3.8", "astro-eslint-parser": "^1.2.2", "astro-icon": "^1.1.5", @@ -60,7 +60,7 @@ "tailwindcss": "^4.1.13" }, "dependencies": { - "@astrojs/sitemap": "^3.5.1", + "@astrojs/sitemap": "^3.7.0", "@tailwindcss/vite": "^4.1.13", "accessible-astro-components": "^5.1.1" } diff --git a/public/posts/post-image-1.png b/public/posts/post-image-1.png deleted file mode 100644 index 6f6f5745..00000000 Binary files a/public/posts/post-image-1.png and /dev/null differ diff --git a/public/posts/post-image-2.png b/public/posts/post-image-2.png deleted file mode 100644 index 394c766f..00000000 Binary files a/public/posts/post-image-2.png and /dev/null differ diff --git a/public/posts/post-image-3.png b/public/posts/post-image-3.png deleted file mode 100644 index 94059c0f..00000000 Binary files a/public/posts/post-image-3.png and /dev/null differ diff --git a/public/posts/post-image-4.png b/public/posts/post-image-4.png deleted file mode 100644 index c193798c..00000000 Binary files a/public/posts/post-image-4.png and /dev/null differ diff --git a/public/posts/post-image-5.png b/public/posts/post-image-5.png deleted file mode 100644 index 7898fbf3..00000000 Binary files a/public/posts/post-image-5.png and /dev/null differ diff --git a/public/posts/post-image-6.png b/public/posts/post-image-6.png deleted file mode 100644 index ec82ef74..00000000 Binary files a/public/posts/post-image-6.png and /dev/null differ diff --git a/public/projects/project-image-1.png b/public/projects/project-image-1.png deleted file mode 100644 index 6f6f5745..00000000 Binary files a/public/projects/project-image-1.png and /dev/null differ diff --git a/public/resume.pdf b/public/resume.pdf new file mode 100644 index 00000000..d382e789 Binary files /dev/null and b/public/resume.pdf differ diff --git a/src/assets/images/books/book-01.jpg b/src/assets/images/books/book-01.jpg new file mode 100644 index 00000000..be6d6d67 Binary files /dev/null and b/src/assets/images/books/book-01.jpg differ diff --git a/src/assets/images/books/book-02.jpg b/src/assets/images/books/book-02.jpg new file mode 100644 index 00000000..7a95ce9a Binary files /dev/null and b/src/assets/images/books/book-02.jpg differ diff --git a/src/assets/images/books/book-03.jpg b/src/assets/images/books/book-03.jpg new file mode 100644 index 00000000..63fc6a03 Binary files /dev/null and b/src/assets/images/books/book-03.jpg differ diff --git a/src/assets/images/books/book-04.jpg b/src/assets/images/books/book-04.jpg new file mode 100644 index 00000000..9533385b Binary files /dev/null and b/src/assets/images/books/book-04.jpg differ diff --git a/src/assets/images/books/book-05.jpg b/src/assets/images/books/book-05.jpg new file mode 100644 index 00000000..1e33e1dc Binary files /dev/null and b/src/assets/images/books/book-05.jpg differ diff --git a/src/assets/images/posts/post-image-1.png b/src/assets/images/posts/post-image-1.png deleted file mode 100644 index 6f6f5745..00000000 Binary files a/src/assets/images/posts/post-image-1.png and /dev/null differ diff --git a/src/assets/images/posts/post-image-2.png b/src/assets/images/posts/post-image-2.png deleted file mode 100644 index 394c766f..00000000 Binary files a/src/assets/images/posts/post-image-2.png and /dev/null differ diff --git a/src/assets/images/posts/post-image-3.png b/src/assets/images/posts/post-image-3.png deleted file mode 100644 index 94059c0f..00000000 Binary files a/src/assets/images/posts/post-image-3.png and /dev/null differ diff --git a/src/assets/images/posts/post-image-4.png b/src/assets/images/posts/post-image-4.png deleted file mode 100644 index c193798c..00000000 Binary files a/src/assets/images/posts/post-image-4.png and /dev/null differ diff --git a/src/assets/images/posts/post-image-5.png b/src/assets/images/posts/post-image-5.png deleted file mode 100644 index 7898fbf3..00000000 Binary files a/src/assets/images/posts/post-image-5.png and /dev/null differ diff --git a/src/assets/images/posts/post-image-6.png b/src/assets/images/posts/post-image-6.png deleted file mode 100644 index ec82ef74..00000000 Binary files a/src/assets/images/posts/post-image-6.png and /dev/null differ diff --git a/src/assets/images/projects/project-image-1.jpg b/src/assets/images/projects/project-image-1.jpg new file mode 100644 index 00000000..1db53af3 Binary files /dev/null and b/src/assets/images/projects/project-image-1.jpg differ diff --git a/src/assets/images/projects/project-image-1.png b/src/assets/images/projects/project-image-1.png deleted file mode 100644 index 6f6f5745..00000000 Binary files a/src/assets/images/projects/project-image-1.png and /dev/null differ diff --git a/src/assets/images/projects/project-image-2.jpg b/src/assets/images/projects/project-image-2.jpg new file mode 100644 index 00000000..6ab4d275 Binary files /dev/null and b/src/assets/images/projects/project-image-2.jpg differ diff --git a/src/assets/images/projects/project-image-3.jpg b/src/assets/images/projects/project-image-3.jpg new file mode 100644 index 00000000..e1d98105 Binary files /dev/null and b/src/assets/images/projects/project-image-3.jpg differ diff --git a/src/assets/scss/base/_font.scss b/src/assets/scss/base/_font.scss index 9af25d84..4fa6fe2d 100644 --- a/src/assets/scss/base/_font.scss +++ b/src/assets/scss/base/_font.scss @@ -7,7 +7,7 @@ src: local('Atkinson Hyperlegible Regular'), local('AtkinsonHyperlegible-Regular'), - url('/fonts/AtkinsonHyperlegibleNext-Regular.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -18,7 +18,7 @@ src: local('Atkinson Hyperlegible Italic'), local('AtkinsonHyperlegible-Italic'), - url('/fonts/AtkinsonHyperlegibleNext-RegularItalic.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -29,7 +29,7 @@ src: local('Atkinson Hyperlegible Bold'), local('AtkinsonHyperlegible-Bold'), - url('/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -40,7 +40,7 @@ src: local('Atkinson Hyperlegible Bold Italic'), local('AtkinsonHyperlegible-BoldItalic'), - url('/fonts/AtkinsonHyperlegibleNext-BoldItalic.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -52,7 +52,7 @@ src: local('Atkinson Hyperlegible Light'), local('AtkinsonHyperlegible-Light'), - url('/fonts/AtkinsonHyperlegibleNext-Light.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -63,7 +63,7 @@ src: local('Atkinson Hyperlegible Light Italic'), local('AtkinsonHyperlegible-LightItalic'), - url('/fonts/AtkinsonHyperlegibleNext-LightItalic.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -74,7 +74,7 @@ src: local('Atkinson Hyperlegible Medium'), local('AtkinsonHyperlegible-Medium'), - url('/fonts/AtkinsonHyperlegibleNext-Medium.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -85,7 +85,7 @@ src: local('Atkinson Hyperlegible Medium Italic'), local('AtkinsonHyperlegible-MediumItalic'), - url('/fonts/AtkinsonHyperlegibleNext-MediumItalic.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } @@ -96,7 +96,7 @@ src: local('Atkinson Hyperlegible SemiBold'), local('AtkinsonHyperlegible-SemiBold'), - url('/fonts/AtkinsonHyperlegibleNext-SemiBold.woff2') format('woff2'); + url('/Portfolio-Website/fonts/AtkinsonHyperlegibleNext-Bold.woff2') format('woff2'); /* Updated Path */ font-family: 'Atkinson Hyperlegible'; font-display: swap; } diff --git a/src/assets/scss/base/_root.scss b/src/assets/scss/base/_root.scss index 59d97eb6..514c12cd 100644 --- a/src/assets/scss/base/_root.scss +++ b/src/assets/scss/base/_root.scss @@ -31,7 +31,7 @@ --color-neutral-900: oklch(from var(--brand-neutral) 15% c h); // color scheme - --foreground-color: light-dark(var(--color-neutral-800), var(--color-neutral-100)); + --foreground-color: light-dark(var(--color-neutral-100), var(--color-neutral-100)); --background-color: light-dark(var(--color-neutral-100), var(--color-neutral-900)); --icon-color: light-dark(var(--color-neutral-800), var(--color-neutral-100)); --link-color: light-dark(var(--color-primary-400), var(--color-secondary-100)); @@ -144,7 +144,4 @@ --kbd-color-background: light-dark(var(--color-gray-1000), var(--color-gray-200)); } -// dark color scheme overrides -.darkmode { - color-scheme: dark; -} + diff --git a/src/components/AboutMe.astro b/src/components/AboutMe.astro new file mode 100644 index 00000000..bb2ec1cd --- /dev/null +++ b/src/components/AboutMe.astro @@ -0,0 +1,71 @@ +--- +import { Icon } from 'astro-icon/components' + +interface Props { + src?: string +} +--- + +
+
+ +
+ + 01 // ARCHIVE_DATA + +
+
+ +
+

+ About + Me. +

+
+ +
+
+
+

+ Engineering intelligence at the intersection of Research and Production. +

+ +
+ +
+

+ I am a Computer Science (Honours) student at Adelaide University. My research is focused on Causal Inference within Large Language Models (LLMs)—investigating the transition from pattern matching to logical reasoning. +

+ +

+ I operate at the dual-layer: as a Researcher, I develop frameworks to identify causal pathways in transformer architectures; as a Software Engineer, I architect the high-concurrency pipelines and distributed systems required to scale these experiments in production environments. +

+
+
+
+ +
+

+ Driven by the "How" — identifying bottlenecks to make systems run 10x faster and 10x smarter. +

+ +
+
+

Research_Focus

+
    +
  • Causal Inference
  • +
  • Large Language Models
  • +
+
+
+

Systems_Focus

+
    +
  • High-Concurrency
  • +
  • Automation Infra
  • +
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/components/BlockQuote.astro b/src/components/BlockQuote.astro index 1317ca6f..a17f50a7 100644 --- a/src/components/BlockQuote.astro +++ b/src/components/BlockQuote.astro @@ -6,13 +6,9 @@ interface Props { * The quote content that will be displayed */ children: any - /** - * The name of the person who said the quote - */ - author?: string + } -const { author } = Astro.props ---
@@ -21,7 +17,6 @@ const { author } = Astro.props
\ No newline at end of file diff --git a/src/components/Feature.astro b/src/components/Feature.astro index 7e7e9792..1b78f2fa 100644 --- a/src/components/Feature.astro +++ b/src/components/Feature.astro @@ -77,8 +77,4 @@ const { icon = 'mdi:rocket', title = 'Title' }: Props = Astro.props color: var(--link-color); } - :global(.darkmode .feature::before) { - box-shadow: 0 0 0 6px var(--color-neutral-900); - background-color: var(--color-neutral-900); - } diff --git a/src/components/FeaturedPosts.astro b/src/components/FeaturedPosts.astro deleted file mode 100644 index 73e58cf0..00000000 --- a/src/components/FeaturedPosts.astro +++ /dev/null @@ -1,93 +0,0 @@ ---- -import { Card, Heading, Link } from 'accessible-astro-components' -import { Icon } from 'astro-icon/components' - -// Import images directly for optimization -import postImage1 from '@assets/images/posts/post-image-1.png' -import postImage2 from '@assets/images/posts/post-image-2.png' -import postImage3 from '@assets/images/posts/post-image-3.png' - -/** - * FeaturedPosts Component - * - * @description A component that displays featured blog posts from JSONPlaceholder API - */ -interface Props { - /** - * Additional classes to apply to the section - */ - class?: string - /** - * The number of posts to display - * @default 3 - */ - limit?: number - /** - * The title for the section - * @default "Latest posts" - */ - title?: string -} - -interface Post { - id: number - userId: number - title: string - body: string - featuredImage: any - shortUrl: string -} - -const { class: className, limit = 3, title = 'Latest posts' } = Astro.props - -// Fetch posts from API -const response = await fetch('https://jsonplaceholder.typicode.com/posts') -const data = await response.json() - -const postImages = [postImage1, postImage2, postImage3] - -// Function to truncate title for better display -function truncateTitle(title: string): string { - const words = title.split(' ') - const truncated = words.slice(0, 4).join(' ') - return truncated -} - -// Process and limit posts for featured section -const featuredPosts: Post[] = data.slice(0, limit).map((post: any) => { - const truncatedTitle = truncateTitle(post.title) - return { - ...post, - featuredImage: postImages[post.id % postImages.length], - title: truncatedTitle, - shortUrl: truncatedTitle.replaceAll(' ', '-').toLowerCase(), - } -}) ---- - -
-
- {title} -
- { - featuredPosts.map((post) => ( - - {post.body} - - )) - } -
-
- - Read all posts -
-
-
diff --git a/src/components/FeaturedProjects.astro b/src/components/FeaturedProjects.astro index 5842cc36..9c76cbf3 100644 --- a/src/components/FeaturedProjects.astro +++ b/src/components/FeaturedProjects.astro @@ -1,71 +1,121 @@ --- -import { Card, Heading, Link } from 'accessible-astro-components' +import { Heading, Link } from 'accessible-astro-components' import { Icon } from 'astro-icon/components' import { getCollection } from 'astro:content' +import { Image } from 'astro:assets' -// Import images directly for optimization -import projectImage1 from '@assets/images/projects/project-image-1.png' -import projectImage2 from '@assets/images/projects/project-image-2.png' -import projectImage3 from '@assets/images/projects/project-image-3.png' +// Import images +import projectImage1 from '@assets/images/projects/project-image-1.jpg' +import projectImage2 from '@assets/images/projects/project-image-2.jpg' +import projectImage3 from '@assets/images/projects/project-image-3.jpg' -/** - * FeaturedProjects Component - * - * @description A component that displays featured projects from Astro Content Collections - */ -interface Props { - /** - * Additional classes to apply to the section - */ - class?: string - /** - * The number of projects to display - * @default 3 - */ - limit?: number - /** - * The title for the section - * @default "Featured projects" - */ - title?: string -} +const { class: className, limit = 3, title = 'Project_Archive' } = Astro.props -const { class: className, limit = 3, title = 'Featured projects' } = Astro.props - -// Get projects from content collection const projects = await getCollection('projects') +// Map the imported images to an array to reference them by index in the loop const projectImages = [projectImage1, projectImage2, projectImage3] - -// Limit projects and add featured images -const featuredProjects = projects.slice(0, limit).map((project, index) => ({ - ...project, - featuredImage: projectImages[index % projectImages.length], -})) --- -
-
- {title} -
+
+
+ +
+ + 03 // FIELD_STUDIES + +
+
+ +
+
+

+ Selected + Projects. +

+
+ +
+
+
+ Total_Records: {projects.length} +
+

+ Projects in automation, predictive modeling, and system architecture. +

+
+
+
+ +
{ - featuredProjects.map((project) => ( - - {project.data.description} - + projects.slice(0, limit).map((project, index) => ( +
+ +
+ + 0{index + 1} + +
+

+ + {project.data.category || 'System_Build'} +

+

+ + Verified_2025 +

+
+
+ +
+ + {project.data.title} + +
+
+
+ +
+

+ {project.data.title} +

+

+ {project.data.description} +

+
+ + Analyze_Project + + +
+
+
)) }
-
- - View all projects + +
+ + View_Full_Directory
+ + \ No newline at end of file diff --git a/src/components/Footer.astro b/src/components/Footer.astro index cb343f1e..af6f7c1f 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,7 +1,6 @@ --- import CallToAction from './CallToAction.astro' -import Logo from './Logo.astro' -import { Heading, Link } from 'accessible-astro-components' +import { Heading } from 'accessible-astro-components' /** * Footer Component @@ -12,88 +11,10 @@ const currentYear = new Date().getFullYear() ---