Skip to content

Commit

Permalink
Add images to pages (#4)
Browse files Browse the repository at this point in the history
* fix:block map scrolling without ctrl/cmd key pressed

* feat: add image to blogs page(i dont like it at all)

* fix:active navlinks + add image to the header of every page
  • Loading branch information
RazvanBalota authored Jan 24, 2024
1 parent 5a37635 commit 262d9c1
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
Binary file added public/blog-pic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/gradient.avif
Binary file not shown.
15 changes: 15 additions & 0 deletions src/components/Pattern.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="bg-gray-50 lg:absolute lg:top-0 lg:right-0 lg:w-1/2 relative">
<svg
class="absolute top-0 left-0 hidden h-48 w-fulltranslate-x-1/2 transform fill-white lg:block"
viewBox="0 0 100 100"
preserveAspectRatio="none"
aria-hidden="true"
>
<polygon points="0,0 100,50 50,100 0,100"></polygon>
</svg>
<img
class="aspect-[3/2] object-cover lg:aspect-auto lg:h-48 lg:w-full"
src="/gradient.avif"
alt=""
/>
</div>
9 changes: 5 additions & 4 deletions src/data.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
export const navLinks = [
{ index: 1, name: "Acasă", href: "/" },
{ index: 2, name: "Blog", href: "/blog" },
{ index: 3, name: "Despre", href: "/despre" },
{ index: 4, name: "Contact", href: "/#contact" },
{ index: 1, name: "Home", href: "/" },
{ index: 2, name: "Blog", href: "/blog/" },
{ index: 3, name: "Despre", href: "/despre/" },
{ index: 4, name: "Regulament", href: "/regulament/" },
{ index: 5, name: "Confidențialitate", href: "/confidentialitate/" },
];

export const sponsors = [
Expand Down
2 changes: 2 additions & 0 deletions src/layouts/OtherLayout.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import Navbar from "../components/Navbar.astro";
import Footer from "../components/Footer.astro";
import Pattern from "../components/Pattern.astro";
interface Props {
title: string;
Expand Down Expand Up @@ -38,6 +39,7 @@ const { title } = Astro.props;
>
<slot />
</div>
<Pattern/>
<Footer />
</body>
</html>
Expand Down
6 changes: 4 additions & 2 deletions src/pages/blog.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
import Layout from "../layouts/Layout.astro";
import PostsList from "../components/PostsList.astro";
import Pattern from "../components/Pattern.astro";
---

<Layout title="Blog | CoderDojo Alba Iulia">
<div class="bg-white py-24 sm:py-32">
<div class="relative">
<div class="relative z-50">
<div class="mx-auto max-w-7xl px-6 lg:px-8 -mt-4 md:pt-24">
<div class="mx-auto max-w-2xl lg:max-w-4xl">
<h2
Expand All @@ -24,5 +25,6 @@ import PostsList from "../components/PostsList.astro";
</div>
</div>
</div>
<Pattern/>
</div>
</Layout>
</Layout>
2 changes: 2 additions & 0 deletions src/pages/despre.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import Layout from "../layouts/Layout.astro";
import Mentors from "../components/Mentors.astro";
import Pattern from "../components/Pattern.astro";
---

<Layout title="Despre | CoderDojo Alba Iulia">
Expand Down Expand Up @@ -133,5 +134,6 @@ import Mentors from "../components/Mentors.astro";
</figure>
<Mentors />
</div>
<Pattern/>
</div>
</Layout>

0 comments on commit 262d9c1

Please sign in to comment.