Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added public/images/darklogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { Blogs } from './pages/Blogs';
import { BlogPost } from './pages/BlogPost';
import { LinksPage } from './pages/LinksPage';
import * as ga from './utils/analytics';
import ThemeInitializer from "./components/ThemeInitializer";


//Google analytics
function AnalyticsWrapper({ children }: { children: React.ReactNode }) {
Expand All @@ -25,15 +27,17 @@ function AnalyticsWrapper({ children }: { children: React.ReactNode }) {
function App() {
return (
<BrowserRouter>
<ThemeInitializer/>
<AnalyticsWrapper>

<Routes>
<Route path="/" element={<HomePage />} />
<Route path="/courses" element={<HomePage />} />
<Route path="/course/:courseId" element={<CoursePage />} />
<Route path="/leaderboard" element={<LeaderboardPage />} />
<Route path="/blogs" element={<Blogs />} />
<Route path="/blogs/:slug" element={<BlogPost />} />
<Route path="/links" element={<LinksPage />} />
<Route path="/blogs" element={<Blogs />} />
<Route path="/blogs/:slug" element={<BlogPost />} />
<Route path="/links" element={<LinksPage />} />
<Route path="*" element={<Navigate to="/" replace />} />
</Routes>
</AnalyticsWrapper>
Expand Down
20 changes: 12 additions & 8 deletions src/components/AnnouncementBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import announcementsData from '../data/announcements.json';
import { AnnouncementItem } from '../types';
import React from "react";
import announcementsData from "../data/announcements.json";
import { AnnouncementItem } from "../types";

export function AnnouncementBanner() {
const activeItems = announcementsData.items.filter(item => item.isActive);
const activeItems = announcementsData.items.filter((item) => item.isActive);
const [currentIndex, setCurrentIndex] = React.useState(0);
const [isVisible, setIsVisible] = React.useState(true);

Expand All @@ -26,10 +26,14 @@ export function AnnouncementBanner() {
const currentItem = activeItems[currentIndex];

return (
<div className="rounded-lg bg-primary/10 p-4 backdrop-blur-sm">
<div className={`transition-opacity duration-500 ${isVisible ? 'opacity-100' : 'opacity-0'}`}>
<p className="text-center text-sm text-white">{currentItem.content}</p>
<div className="rounded-lg bg-[#F7C60F] text-black dark:bg-primary/10 dark:text-white p-4 backdrop-blur-sm transition-colors">
<div
className={`transition-opacity duration-500 ${
isVisible ? "opacity-100" : "opacity-0"
}`}
>
<p className="text-center text-sm">{currentItem.content}</p>
</div>
</div>
);
}
}
12 changes: 8 additions & 4 deletions src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function CourseCard({ course }: CourseCardProps) {
return (
<div
onClick={() => navigate(`/course/${course.id}`)}
className="group cursor-pointer overflow-hidden rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 transition-all duration-300 hover:scale-[1.02] hover:bg-white/20"
className="group cursor-pointer overflow-hidden rounded-xl bg-white/10 backdrop-blur-sm border border-gray-300 transition-all duration-300 hover:scale-[1.02] hover:bg-white/20 dark:border-gray-700 hover:shadow-lg hover:shadow-gray-700 "
>
<div className="relative h-48 overflow-hidden">
<img
Expand Down Expand Up @@ -59,12 +59,16 @@ export function CourseCard({ course }: CourseCardProps) {
<div className="p-6">
<div className="flex items-center gap-2">
<BookOpen className="h-5 w-5 text-primary" />
<span className="text-sm text-gray-400">{totalVideos} videos</span>
<span className="text-sm text-black dark:text-white ">
{totalVideos} videos
</span>
</div>
<h3 className="mt-2 text-xl font-semibold text-white">
<h3 className="mt-2 text-xl font-semibold text-black dark:text-white">
{course.title}
</h3>
<p className="mt-2 text-gray-400">{course.description}</p>
<p className="mt-2 text-black dark:text-white ">
{course.description}
</p>
</div>
</div>
);
Expand Down
18 changes: 9 additions & 9 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { FaXTwitter } from "react-icons/fa6";

export function Footer() {
return (
<footer className="bg-dark/50 backdrop-blur-sm border-t border-white/10">
<footer className="bg-white dark:bg-dark/50 backdrop-blur-sm border-t dark:border-gray-700 border-gray-400">
<div className="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8">
<div className="flex flex-col items-center">
<div className="flex items-center gap-2">
<GraduationCap className="h-8 w-8 text-primary" />
<span className="text-xl font-bold text-white">
<span className="text-xl font-bold text-black dark:text-white">
Engineering in Kannada
</span>
</div>

<p className="mt-4 max-w-md text-center text-sm text-gray-400">
<p className="mt-4 max-w-md text-center text-sm dark:text-gray-400 text-gray-900">
Empowering Kannada-speaking students with quality engineering
education. Learn at your own pace, completely free.
</p>
Expand All @@ -24,37 +24,37 @@ export function Footer() {
href="https://www.youtube.com/@EngineeringinKannada"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-primary"
className="dark:text-gray-400 text-gray-900 hover:text-primary"
>
<Youtube className="h-5 w-5" />
<Youtube className="h-5 w-5 " />
</a>
<a
href="https://www.instagram.com/engineering_in_kannada/"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-primary"
className="dark:text-gray-400 text-gray-900 hover:text-primary"
>
<Instagram className="h-5 w-5" />
</a>
<a
href="https://twitter.com/chandansgowdru"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-primary"
className="dark:text-gray-400 text-gray-900 hover:text-primary"
>
<FaXTwitter className="h-5 w-5" />
</a>
<a
href="https://www.linkedin.com/in/chandan-s-gowda-4b2913183/"
target="_blank"
rel="noopener noreferrer"
className="text-gray-400 hover:text-primary"
className="dark:text-gray-400 text-gray-900 hover:text-primary"
>
<Linkedin className="h-5 w-5" />
</a>
</div>

<div className="mt-8 text-center text-sm text-gray-400">
<div className="mt-8 text-center text-sm dark:text-gray-400 text-gray-900">
<p>
© {new Date().getFullYear()} Engineering in Kannada. All rights
reserved.
Expand Down
Loading