Skip to content
Snippets Groups Projects
Commit e34f02ae authored by Julien MARGAIL's avatar Julien MARGAIL
Browse files

up Footer & News + TailwindCSS (v0.11.0)

parent 9a654d5a
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,18 @@ All notable changes to this project will be documented in this file. ...@@ -7,6 +7,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.11.0] - 2024-01-23
### Fix
- Footer responsive mode
- News template Previous / Next
### Changed
- TailwindCSS 3.4
- tailwind-merge 2.2
## [0.10.1] - 2024-01-09 ## [0.10.1] - 2024-01-09
### Fix ### Fix
......
...@@ -89,8 +89,8 @@ exports.createPages = async function ({ actions, graphql }) { ...@@ -89,8 +89,8 @@ exports.createPages = async function ({ actions, graphql }) {
component: require.resolve(`./src/templates/news.tsx`), component: require.resolve(`./src/templates/news.tsx`),
context: { context: {
id: news.id, id: news.id,
prev: data.directus.news.at(i - 1), prev: data.directus.news.at(i + 1),
next: data.directus.news.at(i + 1), next: i > 0 ? data.directus.news.at(i - 1) : null,
}, },
}) })
}) })
......
{ {
"name": "@onegeo-suite/gatsby-theme-onegeo", "name": "@onegeo-suite/gatsby-theme-onegeo",
"version": "0.10.1", "version": "0.11.0",
"main": "index.js", "main": "index.js",
"types": "index.d.ts", "types": "index.d.ts",
"author": "NEOGEO", "author": "NEOGEO",
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"gatsby": "^4.0.0", "gatsby": "^4.0.0",
"tailwindcss": "^3.0.0", "tailwindcss": "^3.4.0",
"typescript": "^4.0.0" "typescript": "^4.0.0"
}, },
"dependencies": { "dependencies": {
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"react-cookie-consent": "^8.0.1", "react-cookie-consent": "^8.0.1",
"react-leaflet": "^3.2.5", "react-leaflet": "^3.2.5",
"swiper": "^8.4.5", "swiper": "^8.4.5",
"tailwind-merge": "^1.10.0" "tailwind-merge": "^2.2.0"
}, },
"devDependencies": { "devDependencies": {
"dotenv": "^10.0.0" "dotenv": "^10.0.0"
......
...@@ -43,14 +43,17 @@ const Footer = (props: Props) => { ...@@ -43,14 +43,17 @@ const Footer = (props: Props) => {
return ( return (
<footer <footer
className={twMerge( className={twMerge(
"footer bg-base-300 absolute bottom-0 h-24 w-full items-center px-4", "footer bg-base-300 absolute bottom-0 min-h-24 w-full items-center gap-y-0 px-4 ",
className, className,
oClass.main oClass.main
)} )}
data-theme={theme} data-theme={theme}
> >
<div <div
className={twMerge("grid-flow-col items-center", oClass.start)} className={twMerge(
"grid-flow-col justify-self-center lg:justify-self-start",
oClass.start
)}
> >
<Logo title="" image={logo} url="/" /> <Logo title="" image={logo} url="/" />
</div> </div>
...@@ -63,7 +66,7 @@ const Footer = (props: Props) => { ...@@ -63,7 +66,7 @@ const Footer = (props: Props) => {
</div> </div>
<div <div
className={twMerge( className={twMerge(
"grid-flow-col gap-4 md:place-self-center md:justify-self-end", "grid-flow-col gap-4 justify-self-center lg:justify-self-end",
oClass.end oClass.end
)} )}
> >
......
...@@ -113,19 +113,21 @@ const News = ({ pageContext, data, location }: PageProps<Idata>) => { ...@@ -113,19 +113,21 @@ const News = ({ pageContext, data, location }: PageProps<Idata>) => {
</div> </div>
<div className="mb-24 flex justify-center"> <div className="mb-24 flex justify-center">
<div className="flex w-5/6 space-x-4"> <div className="flex w-5/6 space-x-4">
<Card {pageContext.prev ? (
url={"/news/" + pageContext.prev?.slug} <Card
name="Précédent" url={"/news/" + pageContext.prev?.slug}
description={pageContext.prev?.title} name="Précédent"
layout="left" description={pageContext.prev?.title}
size="xs" layout="left"
image={ size="xs"
pageContext.prev?.image != null image={
? pageContext.prev?.image?.imageFile pageContext.prev?.image != null
?.publicURL ? pageContext.prev?.image?.imageFile
: "mock" ?.publicURL
} : "mock"
/> }
/>
) : null}
{pageContext.next ? ( {pageContext.next ? (
<Card <Card
url={"/news/" + pageContext.next?.slug} url={"/news/" + pageContext.next?.slug}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment