This file contains 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" setup> | |
import FetchJson from "./components/fetch-json.vue"; | |
// import { useFetch } from "@vueuse/core"; | |
const url = "https://api.thecatapi.com/v1/images/search"; | |
// const { isFetching: loading, error, data: response } = useFetch(url).json(); | |
</script> | |
<template> | |
<h3>Random Cat Pics!</h3> |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Erik's Google Search</title> | |
<link rel="stylesheet" href="styles.css" /> | |
<link rel="stylesheet" href="https://unpkg.com/normalize.css" /> | |
<script src="app.js" defer></script> |
This file contains 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 URL = "https://www.google.com/search?q="; | |
const FEELING_LUCKY = "&btnI=&sourceid=navclient&gfns=1"; | |
const inputDetails = document.querySelector("input"); | |
const lucky = document.querySelector("button[data-lucky]"); | |
lucky.addEventListener("click", () => { | |
console.log("here", inputDetails.value); | |
if (!inputDetails.value) return; | |
document.location = `${URL}${inputDetails.value}${FEELING_LUCKY}`; |
This file contains 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
* { | |
font-size: 1.4rem; | |
font-family: "Roboto", arial, sans-serif; | |
} | |
html { | |
font-size: 62.5%; | |
padding: 1rem; | |
} |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>Tester</title> | |
</head> | |
<body> | |
<h1>Does this work?</h1> | |
<my-custom-text customText="'heyyou'"></my-custom-text> |
OlderNewer