-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
20 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,12 +150,14 @@ | |
|
||
<body> | ||
|
||
<div class="container cover-header-contianer"> | ||
<div class="container cover-header-contianer" style="margin-top: 10px;"> | ||
|
||
<div class="row"> | ||
<div class="col-xs-12 text-center cover-header"> | ||
<h1>FZ Notepad</h1> | ||
<h4 class="cover-contact"><a href="mailto: [email protected]">[email protected]</a> | (+91) 7222876247</h4> | ||
<h1 style="font-size: 3em; float: left;">Notepad</h1> | ||
<h4 class="cover-contact" style="text-align: right; font-family: monospace; font-size: 15px;"> | ||
<a href="mailto: [email protected]" style="font-family: monospace;">[email protected]</a> | (+91) 7222876247 | ||
</h4> | ||
<hr> | ||
</div> | ||
</div> | ||
|
@@ -166,12 +168,11 @@ <h4 class="cover-contact"><a href="mailto: [email protected]">[email protected]< | |
|
||
<div class="container"> | ||
<div> | ||
<div class="cover-para" contenteditable="true"> | ||
I am writing to apply for the position of <span contenteditable="true">Software Developer</span> | ||
in your organisation. I am a Full Stack Developer in Enbraun, India with an experience of more than 3 | ||
years. I graduated my "Bachelor of Technology" from "Uttarakhand Technical University", India. | ||
During my graduation I was working as a freelancer, and after that was professionaly working as | ||
full stack developer. | ||
<div class="cover-para" contenteditable="false"> | ||
<div style="text-align: center;"> | ||
Wait... <br /> | ||
Loading data ... | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -187,10 +188,11 @@ <h4 class="cover-contact"><a href="mailto: [email protected]">[email protected]< | |
|
||
gtag('config', 'UA-136552115-1'); | ||
</script> | ||
<script src="https://unpkg.com/rxjs@%5E7/dist/bundles/rxjs.umd.js"></script> | ||
<script type="module"> | ||
// Import the functions you need from the SDKs you need | ||
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.14.0/firebase-app.js"; | ||
import { getFirestore, collection, getDocs } from 'https://www.gstatic.com/firebasejs/9.14.0/firebase-firestore-lite.js'; | ||
import { getFirestore, doc, getDoc, setDoc } from 'https://www.gstatic.com/firebasejs/9.14.0/firebase-firestore-lite.js'; | ||
// TODO: Add SDKs for Firebase products that you want to use | ||
// https://firebase.google.com/docs/web/setup#available-libraries | ||
|
||
|
@@ -211,14 +213,37 @@ <h4 class="cover-contact"><a href="mailto: [email protected]">[email protected]< | |
const db = getFirestore(app); | ||
|
||
|
||
// Get a list of cities from your database | ||
async function getCities(db) { | ||
const citiesCol = collection(db, 'cities'); | ||
const citySnapshot = await getDocs(citiesCol); | ||
const cityList = citySnapshot.docs.map(doc => doc.data()); | ||
return cityList; | ||
// // Get a list of cities from your database | ||
// async function getCities(db) { | ||
// const citiesCol = collection(db, 'cities'); | ||
// const citySnapshot = await getDocs(citiesCol); | ||
// const cityList = citySnapshot.docs.map(doc => doc.data()); | ||
// return cityList; | ||
// } | ||
// getCities(db); | ||
|
||
const notepad = await getDoc(doc(db, 'notepad', 'main')) | ||
const coverParaElem = document.querySelector('.cover-para') | ||
if(notepad.exists()) { | ||
coverParaElem.setAttribute('contenteditable', true) | ||
coverParaElem.innerHTML = notepad.data().content | ||
coverParaElem.focus() | ||
|
||
document.execCommand('selectAll', false, null); | ||
document.getSelection().collapseToEnd(); | ||
|
||
rxjs.fromEvent(coverParaElem, 'input') | ||
.pipe(rxjs.debounceTime(2500)) | ||
.subscribe(e => { | ||
setDoc(doc(db, 'notepad', 'main'), { | ||
content: coverParaElem.innerHTML | ||
}).then(e => { | ||
console.log(e) | ||
}) | ||
}) | ||
} else { | ||
console.log('Not found anything.') | ||
} | ||
getCities(db); | ||
</script> | ||
</body> | ||
|
||
|