1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-20 04:39:34 +05:30

(refactor/fixed): updated featured projects fething method and fixed no-scollbar tailwind class missing in production

This commit is contained in:
2024-08-01 23:41:25 +05:30
parent a6fa2a96e7
commit 9d4cbfa040
6 changed files with 34 additions and 55 deletions

View File

@@ -17,7 +17,7 @@
<h6 class="font-bold mb-8">Featured</h6>
<?php
$featured_projects_footer = fetch_all_records($conn, "featured_projects");
$featured_projects_footer = fetch_featured_projects($conn);
if($featured_projects_footer -> num_rows > 0) {
//show all featured projects

View File

@@ -1050,6 +1050,10 @@ video {
height: 5rem;
}
.h-4 {
height: 1rem;
}
.h-\[10px\] {
height: 10px;
}
@@ -1111,14 +1115,6 @@ video {
height: 100vh;
}
.h-3 {
height: 0.75rem;
}
.h-4 {
height: 1rem;
}
.max-h-\[45vh\] {
max-height: 45vh;
}
@@ -1143,6 +1139,10 @@ video {
width: 0.5rem;
}
.w-4 {
width: 1rem;
}
.w-\[120px\] {
width: 120px;
}
@@ -1224,14 +1224,6 @@ video {
width: 100vw;
}
.w-3 {
width: 0.75rem;
}
.w-4 {
width: 1rem;
}
.max-w-\[45vw\] {
max-width: 45vw;
}
@@ -1611,30 +1603,6 @@ video {
background-color: rgb(38 51 74 / var(--tw-bg-opacity));
}
.bg-\[rgba\(0\2c 0\2c 0\2c 0\.15\)\] {
background-color: rgba(0,0,0,0.15);
}
.bg-\[rgba\(0\2c 0\2c 0\2c 0\.20\)\] {
background-color: rgba(0,0,0,0.20);
}
.bg-\[rgba\(255\2c 255\2c 255\2c 0\.2\)\] {
background-color: rgba(255,255,255,0.2);
}
.bg-\[rgba\(0\2c 0\2c 0\2c 0\.2\)\] {
background-color: rgba(0,0,0,0.2);
}
.bg-\[rgba\(56\2c 189\2c 248\2c 0\.5\)\] {
background-color: rgba(56,189,248,0.5);
}
.bg-\[rgba\(56\2c 189\2c 248\2c 0\.7\)\] {
background-color: rgba(56,189,248,0.7);
}
.bg-gradient-to-r {
background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

View File

@@ -71,6 +71,13 @@ function fetch_quick_action_link($conn, $action_name) {
}
}
//function to fetch featured projects
function fetch_featured_projects($conn) {
$sql = "SELECT * FROM projects WHERE is_featured = 1";
$result = $conn -> query($sql);
return $result;
}
//---functions to fetch search results starts here---
//from projects table
function fetch_search_results_projects($conn, $keyword) {

View File

@@ -217,7 +217,7 @@ $years = create_project_years_array($conn);
<div class="w-full flex flex-col justify-center items-center mb-12">
<?php
$featured_projects = fetch_all_records($conn,"featured_projects");
$featured_projects = fetch_featured_projects($conn);
if($featured_projects -> num_rows > 0){
//show top 2 featured projects for sidebar