This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from https://astaxie.gitbooks.io/build-web-application-with-golang/content/en/13.4.html | |
package logger | |
import ( | |
"log" | |
"os" | |
) | |
const ( | |
LevelTrace = iota |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; | |
} | |
*, *::before, *::after { | |
box-sizing: inherit; | |
margin: 0; | |
padding: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const hexValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F']; | |
const button = document.querySelector('.btn'); | |
const body = document.querySelector('body'); | |
const value = document.querySelector('.hexValue'); | |
function changeHex() { | |
let hex = '#'; | |
for (let i = 0; i < 6; i++) { | |
const index = Math.floor(Math.random() * hexValues.length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; | |
} | |
*, *::before, *::after { | |
margin: 0; | |
padding: 0; | |
box-sizing: inherit; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Hex colour generator</title> | |
<link rel="stylesheet" href="/assets/css/style.css" /> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Hex Color Code: <span class="hexValue">#ffffff</span></h1> | |
<button class="btn">Click me</button> |