Skip to content

Commit

Permalink
Merge pull request #14 from anishkn04/main
Browse files Browse the repository at this point in the history
fix: whitespaces below and on the right side of /profiles
  • Loading branch information
SatyaRajAwasth1 authored Oct 15, 2024
2 parents c36371d + 099e29d commit 0a0e3cb
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ menu:
title: NCIT Alumns
main:
- title: Home
link: #
link: /
- title: Alumni Directory
subMenu:
- category: Graduation Yearss
Expand Down
2 changes: 1 addition & 1 deletion src/components/MainContent.astro
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<main>
<main class="flex-1">
<slot />
</main>
2 changes: 1 addition & 1 deletion src/components/shared/LeftSidebar.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const currentYear = (new Date()).getFullYear();
const yearsRange = Array.from({ length: currentYear - startYear + 1 }, (_, i) => startYear + i);
---

<nav id="sidebar" class="w-64 bg-gray-800 text-white p-4 fixed inset-y-0 left-0 transform transition-transform duration-200 ease-in-out -translate-x-full sm:translate-x-0 sm:relative z-30 overflow-y-auto h-full">
<nav id="sidebar" class="w-64 bg-gray-800 text-white p-4 fixed inset-y-0 left-0 transform transition-transform duration-200 ease-in-out -translate-x-full sm:translate-x-0 sm:relative z-30 overflow-y-auto h-screen scrollbar">
<div class="flex justify-between items-center mb-4">
<span class="text-lg font-bold">Menu</span>
<button id="closeBtn" class="text-white">
Expand Down
2 changes: 1 addition & 1 deletion src/layout/TwoColLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import MainContent from '../components/MainContent.astro';
const { children } = Astro.props;
---

<div class="flex h-screen">
<div class="flex min-h-screen">
<LeftSidebar />
<MainContent>
<slot/>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/profiles/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const sortedYears = Array.from(batchMap.keys()).sort();
---

<TwoColLayout>
<section class="bg-gray-900 text-white p-4 sm:p-6 lg:p-8">
<section class="bg-gray-900 text-white p-4 sm:p-6 lg:p-8 max-h-screen overflow-y-auto">
{sortedYears.map((year) => {
let showAll = false;

Expand All @@ -42,7 +42,7 @@ const sortedYears = Array.from(batchMap.keys()).sort();
<h3 class="text-lg sm:text-xl lg:text-2xl font-bold flex items-center justify-between">
{year} Batch
</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mt-4">
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 gap-4 mt-4">
{(showAll ? batchMap.get(year) : batchMap.get(year).slice(0, 3))
.map((profile) => (
<ProfileCard slug={profile.slug} {...profile.data} />
Expand Down
23 changes: 22 additions & 1 deletion tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
/** @type {import('tailwindcss').Config} */
const plugin = require('tailwindcss/plugin');
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
plugins: [
plugin(({ addBase, theme }) => {
addBase({
'.scrollbar': {
overflowY: 'auto',
scrollbarColor: `${theme('colors.gray.900')} ${theme('colors.gray.800')}`,
scrollbarWidth: 'auto',
},
'.scrollbar::-webkit-scrollbar': {
height: '4px',
width: '4px',
},
'.scrollbar::-webkit-scrollbar-thumb': {
backgroundColor: theme('colors.gray.900'),
},
'.scrollbar::-webkit-scrollbar-track-piece': {
backgroundColor: theme('colors.gray.800'),
},
});
}),
],
}

0 comments on commit 0a0e3cb

Please sign in to comment.