Skip to content

Instantly share code, notes, and snippets.

View laudebugs's full-sized avatar
:fishsticks:
Exploring

Laurence Bugasu Ininda laudebugs

:fishsticks:
Exploring
View GitHub Profile
@laudebugs
laudebugs / ng-sidenav.md
Last active October 5, 2022 20:11
Ready to use collapsable side nav (in Angular with Angular Material)

Sometimes, all you need is a simple collapsible side nav with a bit of animation. I find myself writing a sidenave whenever I'm creating a lot of my web applications. So I refer to this more often as a quick place to start.

app.component.html:

<div class="main-container">
  <div mode="side" opened class="side-nav" [ngClass]="{collapsed}">
      <div class="menu">
        <div class="logo-container">
            <mat-icon class="button-icon">diversity_2</mat-icon>
@laudebugs
laudebugs / 55-bytes-of-css.md
Created October 3, 2022 23:25 — forked from JoeyBurzynski/55-bytes-of-css.md
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@laudebugs
laudebugs / MaterialModule.ts
Last active September 5, 2022 21:03
Angular Material Module
import { A11yModule } from '@angular/cdk/a11y';
import { ClipboardModule } from '@angular/cdk/clipboard';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { OverlayModule } from '@angular/cdk/overlay';
import { PortalModule } from '@angular/cdk/portal';
import { ScrollingModule } from '@angular/cdk/scrolling';
import { CdkStepperModule } from '@angular/cdk/stepper';
import { CdkTableModule } from '@angular/cdk/table';
import { CdkTreeModule } from '@angular/cdk/tree';
import { NgModule } from '@angular/core';