diff --git a/website/src/pages/api/plants/search.ts b/website/src/pages/api/plants/search.ts index e64f744..273e5a7 100644 --- a/website/src/pages/api/plants/search.ts +++ b/website/src/pages/api/plants/search.ts @@ -73,7 +73,7 @@ export default async function handler( } - query += ` ${selector} (english_name LIKE '${name}%' OR maori_name LIKE '${name}%' OR latin_name LIKE '${name}%')`; + query += ` ${selector} (english_name LIKE '%${name}%' OR maori_name LIKE '%${name}%' OR latin_name LIKE '%${name}%')`; selector = "AND"; } @@ -133,7 +133,7 @@ export default async function handler( if(getUsers){ - query = `SELECT id FROM users WHERE ${tables.user_name} LIKE '${name}%'` + query = `SELECT id FROM users WHERE ${tables.user_name} LIKE '%${name}%'` const users = await makeQuery(query, client) // If there are no users, return an error @@ -150,7 +150,7 @@ export default async function handler( // Get the info - query = `SELECT id FROM posts WHERE ${tables.post_title} LIKE '${name}%' ORDER BY ${tables.post_date} DESC` + query = `SELECT id FROM posts WHERE ${tables.post_title} LIKE '%${name}%' ORDER BY ${tables.post_date} DESC` if(getExtras){ query = `SELECT id, ${tables.post_title}, ${tables.post_date}, ${tables.post_user_id} FROM posts WHERE ${tables.post_title} LIKE '${name}%' ORDER BY ${tables.post_date} DESC` } diff --git a/website/src/styles/media/cards.module.css b/website/src/styles/media/cards.module.css index 47c8fe1..5610f53 100644 --- a/website/src/styles/media/cards.module.css +++ b/website/src/styles/media/cards.module.css @@ -25,6 +25,10 @@ border-radius: 20px; } +.mainImage > div > img{ + opacity: 0; +} + .postHeader{ display: grid; grid-template-columns: 0.2fr 0.75fr 0.25fr; @@ -189,15 +193,18 @@ @keyframes popIn { 0% { + opacity: 0; transform: scale(0); } 30% { + opacity: 1; transform: scale(1); } 60% { transform: scale(1); } 100% { + opacity: 1; transform: scale(0); } } \ No newline at end of file