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 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"> | |
<!-- css --> | |
<link rel="stylesheet" href="/css/styles.css" ></link> | |
<!-- mediapipe and tensorflow library --> | |
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js" crossorigin="anonymous"></script> |
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
function deleteAccount(){ | |
//username and password is stored in authcontext | |
user.delete(username,userPassword,({ok})=> { | |
if(ok){ | |
router.push('/') | |
setUsername(''); | |
setUserPassword('') | |
} | |
else{ | |
alert('There was a problem deleting your account') |
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 {useContext, useEffect,useState,createContext} from 'react' | |
import GUN from 'gun' | |
import 'gun/sea' | |
import 'gun/axe' | |
const AuthContext = createContext() | |
export function useAuth() { | |
return useContext(AuthContext) | |
} |
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
// example where i am using this editable p tag | |
import React,{useState} from 'react' | |
import Text from './Text'; | |
const Header = () => { | |
// i want to grab the data from this text file and append it as an object so that i can store it to database later on |
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 fast-glob package | |
const fg = require('fast-glob'); | |
module.exports = config => { | |
config.addPassthroughCopy('./src/images/'); | |
const BASE_DIR = "images/aquapolis"; | |
config.addCollection("images", () => fg.sync(`${BASE_DIR}/**/*.{jpg,png,gif}`)); | |
return { | |
markdownTemplateEngine: 'njk', |
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 syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight"); | |
module.exports = function (eleventyConfig) { | |
eleventyConfig.addPassthroughCopy("images"); | |
eleventyConfig.addPassthroughCopy("admin"); | |
eleventyConfig.addPassthroughCopy("CSS"); | |
eleventyConfig.addPassthroughCopy("Javascript"); | |
eleventyConfig.addPassthroughCopy("manifest.webmanifest"); | |
eleventyConfig.addPassthroughCopy("sw.js"); | |
eleventyConfig.addPassthroughCopy(".well-known"); |
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
module.exports = function (eleventyConfig) { | |
eleventyConfig.addPassthroughCopy("images"); | |
eleventyConfig.addPassthroughCopy("admin"); | |
eleventyConfig.addPassthroughCopy("CSS"); | |
eleventyConfig.addPassthroughCopy("Javascript"); | |
eleventyConfig.addWatchTarget("images"); | |
eleventyConfig.addWatchTarget("admin"); | |
eleventyConfig.addWatchTarget("CSS"); | |
eleventyConfig.addWatchTarget("Javascript"); |
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
--- | |
layout: layouts/allposts.njk | |
permalink: '/posts{% if pagination.pageNumber > 0 %}/page/{{ pagination.pageNumber }}{% endif %}/index.html' | |
title: My Posts | |
pagination: | |
data: collections.posts | |
size: 3 | |
reverse: true | |
--- |