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
import React from "react" | |
import DeckGL from "@deck.gl/react" | |
import { StaticMap } from "react-map-gl" | |
import { mapboxToken } from "../../mapbox-token" | |
// Viewport settings | |
const INITIAL_VIEW_STATE = { | |
longitude: -20, | |
latitude: 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
* { | |
margin: 0; | |
padding: 0; | |
box-sizing: border-box; | |
font-family: sans-serif; | |
} |
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
import React from "react" | |
const App = () => { | |
return <div>Covid Tracker</div> | |
} | |
export default App |
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 purgecss = require("@fullhuman/postcss-purgecss")({ | |
content: ["./src/**/*.html", "./src/**/*.svelte"], | |
whitelistPatterns: [/svelte-/, /fa-icon/], | |
defaultExtractor: (content) => content.match(/[A-Za-z0-9-_:/]+/g) || [], | |
}) | |
const dev = process.env.ROLLUP_WATCH |
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 logKeyPressed = () => { | |
console.log("pressed key") | |
} | |
onMount(() => { | |
console.log("addeventlistener") | |
addEventListener("keyup", logKeyPressed) | |
return () => { | |
removeEventListener("keyup", logKeyPressed) | |
} |
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 logKeyPressed = () => { | |
console.log("pressed key") | |
} | |
onMount(() => { | |
console.log("addeventlistener") | |
addEventListener("keyup", logKeyPressed) | |
}) |
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
onMount(() => { | |
console.log("addeventlistener") | |
addEventListener("keyup", () => { | |
console.log("pressed key") | |
}) | |
}) |
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
import { derived } from "svelte/store" | |
import fileSearch from "./fileSearch" | |
import files from "./files" | |
import fileIndex from "./fileIndex" | |
const results = derived([fileSearch, files], ([$fileSearch, $files]) => { | |
const isSearchEmpty = $fileSearch.trim().length === 0 | |
const allFiles = $files.filter((t) => t.type === "file") | |
fileIndex.set(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
<script lang="ts"> | |
import Icon from "svelte-awesome/components/Icon.svelte" | |
import { faFileCode, faFolder } from "@fortawesome/free-regular-svg-icons" | |
import { parseJSON, formatDistanceToNow } from "date-fns" | |
import type { File } from "../../interfaces/file.interface" | |
export let file: File | |
export let active: boolean = false | |
const distance = formatDistanceToNow(parseJSON(file.modified_time)) |
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
<script lang="ts"> | |
import type { File } from "../../interfaces/file.interface" | |
import FileItem from "./FileItem.svelte" | |
import fileIndex from "../../store/fileIndex" | |
export let searching: boolean = false | |
export let files: File[] = [] | |
</script> |