A simple App using Vue.js & Firebase with Auth.
See the DEMO.
A simple App using Vue.js & Firebase with Auth.
See the DEMO.
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
// Sass modifiers mixin by Sarah Dayan | |
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps | |
// http://frontstuff.io | |
// https://github.com/sarahdayan |
language: node_js | |
node_js: | |
- "8" | |
cache: | |
directories: | |
- "node_modules" | |
branches: | |
only: |
#!/usr/bin/env bash | |
echo "Starting bootstrapping" | |
# Check for Homebrew, install if we don't have it | |
if test ! $(which brew); then | |
echo "Installing homebrew..." | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
fi |
/** | |
* @flow | |
*/ | |
import * as React from "react"; | |
type SafeAreaInsetsContextType = $ReadOnly<{| | |
top: number, | |
left: number, | |
right: number, |
Inspired by https://medium.com/@var_bin/angularjs-webpack-lazyload-bb7977f390dd
but using wepback import()
function
Working with:
/** | |
* @flow | |
*/ | |
import * as React from "react"; | |
import { unstable_createResource } from "react-cache"; | |
import * as Scheduler from "scheduler"; | |
import { StorageArea } from "std:kv-storage"; | |
// Creates a ref that tracks the latest value of the argument passed to it |
// Handle outside and local measurements easily | |
function Singular({ ref, value }) { | |
const [width, setWidth] = useState(-1) | |
const [useMeasureRef, useMeasureEffect] = useMeasure() | |
useMeasureRef(ref) | |
useMeasureEffect( | |
([node]) => { | |
setWidth(node.offsetWidth) | |
}, | |
[value] |
import * as React from "react"; | |
import { useMousePosition } from "~/hooks/useMousePosition"; | |
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */ | |
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) { | |
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {}; | |
const [mouseX, mouseY] = useMousePosition(); | |
const positions = { x, y, h, w, mouseX, mouseY }; | |
return ( | |
<div |
function partition(inputArray, callback) { | |
const result = {}; | |
for (const [indexOfValue, value] of inputArray.entries()) { | |
const propertyKey = callback(value, indexOfValue); | |
if (propertyKey === null || propertyKey === '') { | |
continue; | |
} | |
if (!{}.hasOwnProperty.call(result, propertyKey)) { | |
result[propertyKey] = []; | |
} |