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
<template> | |
<div class="container"> | |
<div> | |
<h2 class="text-center">Google Map Nuxt.js</h2> | |
<label class="form-label"> | |
<gmap-autocomplete @place_changed="initMarker"></gmap-autocomplete> | |
<button @click="addLocationMarker" class="btn btn-primary">Get Location</button> | |
</label> | |
<br /> | |
</div> |
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
methods: { | |
initMarker(loc) { | |
this.existingPlace = loc; | |
}, | |
addLocationMarker() { | |
if (this.existingPlace) { | |
const marker = { | |
lat: this.existingPlace.geometry.location.lat(), | |
lng: this.existingPlace.geometry.location.lng(), | |
}; |
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
<TileLayer | |
attribution='© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' | |
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" | |
/> |
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
import React, { useState, useRef } from 'react' | |
import { MapContainer, TileLayer, Marker } from 'react-leaflet' | |
import 'leaflet/dist/leaflet.css' | |
const OpenStreetMap = () => { | |
const [center, setCenter] = useState({ lat: -4.043477, lng: 39.668205 }) | |
const ZOOM_LEVEL = 9 | |
const mapRef = useRef() | |
return ( |
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
{team.map((member) => ( | |
<ProfileCard | |
key={member.id} | |
image_url={member.image_url} | |
name={member.name} | |
title={member.title} | |
/> | |
))} |
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>images lazyload</title> | |
<!-- CSS only --> | |
<link | |
href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" |
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 video_urls = [ | |
{ | |
id: 1, | |
title: 'Video One', | |
video_url: | |
'https://res.cloudinary.com/chris101/video/upload/v1645684691/video_1.mp4', | |
}, | |
{ | |
id: 2, | |
title: 'Video Two', |
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
import React from 'react' | |
// Import from an installed package - Bootsrap | |
import 'bootstrap/dist/css/bootstrap.min.css' | |
const IndexPage = () => { | |
// video urls | |
const video_urls = [ | |
{ | |
id: 1, | |
title: 'Video One', |