Skip to content

Instantly share code, notes, and snippets.

View brainhell's full-sized avatar

Edgar Rojas brainhell

  • SAICA
  • Caracas - Venezuela
View GitHub Profile
@brainhell
brainhell / GlobalStyles.js
Created September 5, 2023 12:29
Adding localfont on NextJS-TwinMacro website
'use client'
import { createGlobalStyle } from 'styled-components'
import tw, { theme, css, GlobalStyles as BaseStyles } from 'twin.macro'
const CustomStyles = createGlobalStyle`
@font-face {
font-family: 'Lobster';
src: url('fonts/Lobster.woff2') format('woff2');
/* https://styled-components.com/docs/faqs#how-do-i-fix-flickering-text-after-server-side-rendering */
font-display: fallback;
@brainhell
brainhell / navbar.jsx
Last active September 5, 2023 12:26
Navbar items with diferent color on page change (NextJS)
//NextJS-Twin.Macro Navbar
"use client";
/* import { useRouter } from "next/router"; */
import { usePathname } from "next/navigation";
import tw, { styled, css } from "twin.macro";
import Link from "next/link";
import LogoCapres from "/public/images/capres.jpg";
import Image from "next/image";
import { Button } from "@/components/atoms/StyledButton";
@brainhell
brainhell / css_resources.md
Created August 31, 2014 12:00 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@brainhell
brainhell / 0_reuse_code.js
Created August 31, 2014 11:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console