Skip to content

Instantly share code, notes, and snippets.

View Maruz's full-sized avatar

Marius Nielsen Maruz

  • N5N Technologies
  • Oslo
View GitHub Profile
@Maruz
Maruz / index.html
Last active February 4, 2020 11:11
HTML document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>En HTML mal</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<!-- Innhold som skal vises på nettsiden skal legges inn mellom body-tagene -->
<nav className='navbar'>
{
userRole === 'admin' && (
<AdminPanel />
) || userRole === 'user' && (
<UserPanel />
) || (
<StatusPanel />
)
}
@Maruz
Maruz / App.jsx
Last active September 1, 2017 11:22
React: use ref to get width of MyComponent
render(
<Container>
<Row>
<Col sm={3}>
<MyComponent />
</Col>
<Col sm={9}>
<MyComponent />
</Col>
</Row>
@Maruz
Maruz / FontAwesomeIcon.tsx
Last active November 20, 2019 12:33
React FontAwesomeIcon
import React, { FC } from 'react';
import cx from 'clsx';
export interface FontAwesomeIconProps {
animate?: 'spin' | 'pulse' | undefined;
border?: boolean;
className?: string | undefined;
color?: string | undefined;
fixedWidth?: boolean;
flip?: 'vertical' | 'horizontal' | 'both' | undefined;
@Maruz
Maruz / meny.html
Last active February 2, 2020 21:01
CSS meny
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS meny</title>
<style>
/* Generelle stiler */
* {
margin: 0px;
padding: 0px;