Skip to content

Instantly share code, notes, and snippets.

View adrianhajdin's full-sized avatar

Adrian Hajdin - JS Mastery adrianhajdin

View GitHub Profile
@adrianhajdin
adrianhajdin / index.css
Last active October 11, 2024 09:53 — forked from TidbitsJS/index.css
3D Portfolio Gists
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&family=Work+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap");
@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--blue-rgb: 237 245 255;
--green-rgb: 125 161 35;
}
@adrianhajdin
adrianhajdin / constants.index.ts
Created October 27, 2023 09:18
Build and Deploy a Full Stack Social Media App | React JS, Appwrite, Tailwind CSS, React Query
export const sidebarLinks = [
{
imgURL: "/assets/icons/home.svg",
route: "/",
label: "Home",
},
{
imgURL: "/assets/icons/wallpaper.svg",
route: "/explore",
label: "Explore",
@adrianhajdin
adrianhajdin / constants.index.ts
Created October 13, 2023 10:54
Build and Deploy a Fully Responsive Modern UI/UX Website | React.js, Next.js 13, Tailwind CSS
// NAVIGATION
export const NAV_LINKS = [
{ href: '/', key: 'home', label: 'Home' },
{ href: '/', key: 'how_hilink_work', label: 'How Hilink Work?' },
{ href: '/', key: 'services', label: 'Services' },
{ href: '/', key: 'pricing ', label: 'Pricing ' },
{ href: '/', key: 'contact_us', label: 'Contact Us' },
];
// CAMP SECTION
@adrianhajdin
adrianhajdin / cron.route.ts
Created September 30, 2023 10:15
Web Scraping Full Course 2023 | Build and Deploy eCommerce Price Tracker
import { NextResponse } from "next/server";
import { getLowestPrice, getHighestPrice, getAveragePrice, getEmailNotifType } from "@/lib/utils";
import { connectToDB } from "@/lib/mongoose";
import Product from "@/lib/models/product.model";
import { scrapeAmazonProduct } from "@/lib/scraper";
import { generateEmailBody, sendEmail } from "@/lib/nodemailer";
export const maxDuration = 300; // This function can run for a maximum of 300 seconds
export const dynamic = "force-dynamic";
@adrianhajdin
adrianhajdin / buildQuery.ts
Created September 18, 2023 13:34
How I Made My Website Load in 0.364 Seconds | Build and Deploy
export function buildQuery(params: BuildQueryParams) {
const { type, query, category, page = 1, perPage = 20 } = params;
const conditions = [`*[_type=="${type}"`];
if (query) conditions.push(`title match "*${query}*"`);
if (category && category !== "all") {
conditions.push(`category == "${category}"`);
}
@adrianhajdin
adrianhajdin / .eslintrc.cjs
Last active October 5, 2024 20:14
Tailwind CSS Full Course 2023 | Build and Deploy a Nike Website
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
@adrianhajdin
adrianhajdin / CommunityCard.tsx
Last active October 7, 2024 15:35
Build and Deploy a Full Stack MERN Next.js 13 Threads App | React, Next JS, TypeScript, MongoDB
import Image from "next/image";
import Link from "next/link";
import { Button } from "../ui/button";
interface Props {
id: string;
name: string;
username: string;
imgUrl: string;
@adrianhajdin
adrianhajdin / demo_properties.csv
Created July 21, 2023 09:11
Build and Deploy a Fully Responsive App 10x Faster with AI | Next.js 13
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 2 in line 6.
name,image,price
Riverside Retreat in Sydney,https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80,25000
New York Cozy Cottage,https://images.unsplash.com/photo-1555636222-cae831e670b3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1477&q=80,120000
Luxury Penthouse in Dubai Marina,https://images.unsplash.com/photo-1505843513577-22bb7d21e455?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1632&q=80,450000
Premium Home in Berlin,https://images.unsplash.com/photo-1560185009-dddeb820c7b7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,357000
Seafront Home in Chicago,https://images.unsplash.com/photo-1635108201747-976f7d4ba453?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,650000
Cozy Cottage,
@adrianhajdin
adrianhajdin / ProfileMenu.tsx
Last active May 11, 2024 02:05
Build and Deploy a Full Stack Next.js 13 Application | React, Next JS 13, TypeScript, Tailwind CSS
"use client"
import Link from "next/link";
import Image from "next/image";
import { signOut } from "next-auth/react";
import { Fragment, useState } from "react";
import { Menu, Transition } from "@headlessui/react";
import { SessionInterface } from "@/common.types";
@adrianhajdin
adrianhajdin / api-key
Last active October 6, 2024 06:24
Build and Deploy a Modern Next.js 13 Application | React, Next JS 13, TypeScript, Tailwind CSS
hrjavascript-mastery