Skip to content

Commit

Permalink
Add banners
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm committed Sep 5, 2023
1 parent dc924cc commit 1bef741
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 0 deletions.
Binary file added public/assets/banners/bazisintezmeny_logo.png
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/assets/banners/hatartalanul.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/assets/banners/ntp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/components/Banners.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.banners {
background-color: #f7f7f7;
display: flex;
border-radius: var(--banners-border-radius);
padding: var(--banners-padding);
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
width: min(var(--page-width), calc(100% - 2 * var(--page-padding)));
margin: {
top: 3.2rem;
inline: auto;
}
}
26 changes: 26 additions & 0 deletions src/components/Banners.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { VoidComponent } from 'solid-js'
import { A } from 'solid-start'
import hatartalanul from '/assets/banners/hatartalanul.jpg'
import ntp from '/assets/banners/ntp.png'
import bazis from '/assets/banners/bazisintezmeny_logo.png'
import styles from './Banners.module.scss'

const Banners: VoidComponent = () => {
return (
<div class={styles.container}>
<div class={styles.banners}>
<A href="/pages/hatartalanul">
<img src={hatartalanul} alt="Határtalanul" />
</A>
<A href="/pages/nemzeti-tehetseg-program">
<img src={ntp} alt="Nemzeti Tehetség Program" height="160" />
</A>
<A href="/pages/bazisintezmeny">
<img src={bazis} alt="Oktatási Hivatal Bázisintézménye" />
</A>
</div>
</div>
)
}

export default Banners
2 changes: 2 additions & 0 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { createGraphQLClient, gql } from '@solid-primitives/graphql'
import { VoidComponent } from 'solid-js'
import Banners from '~/components/Banners'
import CardGrid from '~/components/CardGrid'
import { GRAPHQL_BACKEND_URL } from '~/constants'
import { Post } from '~/models/post'
Expand Down Expand Up @@ -54,6 +55,7 @@ const HomePage: VoidComponent = () => {
<>
<div>
<CardGrid posts={data()?.posts.edges.map((e) => e.node)} />
<Banners />
</div>
</>
)
Expand Down
3 changes: 3 additions & 0 deletions src/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,7 @@ body {

--post-date-color: var(--color-gray500);
--post-index-image-border-color: var(--color-gray100);

--banners-border-radius: 0.8rem;
--banners-padding: 3rem;
}

0 comments on commit 1bef741

Please sign in to comment.