Skip to content

Commit c4adf8c

Browse files
committed
feat: update README and some other improvements
1 parent 6c84aa3 commit c4adf8c

File tree

4 files changed

+50
-22
lines changed

4 files changed

+50
-22
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 📴 HTML Standalone Lesspass
2+
3+
Go to the [🌐 website](https://lesspass-standalone-html.netlify.app/).
4+
5+
This is a lightweight, standalone HTML version of the [Lesspass](https://www.lesspass.com/#/) password manager. In this version, you can download the single HTML file from this page and have your favorite password manager with you forever, without depending on the website, repository, internet connection and without the need to install any app on your OS. Your system only needs a modern browser. You can also back up this file wherever you want.
6+
7+
## 📜 How to use this version
8+
9+
It's simple. Go to the [🌐 website](https://lesspass-standalone-html.netlify.app/), click "⬇️ Download it here." and open the file in your favorite browser(I recommend chrome but other browsers should work)
10+
11+
## 🤔 How it works
12+
13+
You can know how it work [here](https://blog.lesspass.com/2016-10-19/how-does-it-work).
14+
15+
## Development
16+
17+
To install the project in your machine you will need:
18+
19+
- [Git](https://git-scm.com/) to clone this repo
20+
- [Node](https://nodejs.org/) (I'm using v20.15.1)
21+
22+
To run the project:
23+
24+
- `npm i` to install (only necessary the first time)
25+
- `npm run dev` to run the local server
26+
- `npm run build` to generate the HTML file for production
27+
- `npm run preview` to preview the build file
28+
29+
This project use:
30+
31+
- [Lesspass](https://www.npmjs.com/package/lesspass) package
32+
- [water.css](https://watercss.kognise.dev/) with some custom styles
33+
- [Vite](https://vite.dev/) build tool
34+
- [Vanilla JS](http://vanilla-js.com/)

index.html

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<title>HTML Standalone Lesspass</title>
1212
</head>
1313
<body>
14-
<main class="md:d-f md:g-16px">
14+
<main class="md:d-f md:g-24px">
1515
<div class="md:w-50%">
1616
<h1>📴 HTML Standalone Lesspass</h1>
1717

@@ -66,10 +66,12 @@ <h1>📴 HTML Standalone Lesspass</h1>
6666
</div>
6767

6868
<div class="md:w-50%">
69-
<br />
70-
<br />
71-
<hr />
72-
<br />
69+
<div class="md:d-n">
70+
<br />
71+
<br />
72+
<hr />
73+
<br />
74+
</div>
7375

7476
<h2>💬 About</h2>
7577

@@ -79,15 +81,15 @@ <h2>💬 About</h2>
7981
password manager. In this version, you can download the single HTML
8082
file from this page and have your favorite password manager with you
8183
forever, without depending on the website, repository, internet
82-
connection and without the need to install any app on your phone. Your
84+
connection and without the need to install any app on your OS. Your
8385
system only needs a modern browser. You can also back up this file
8486
wherever you want.
8587
</p>
8688

8789
<h2>📜 How to use this version</h2>
8890

8991
<p>
90-
It's simple. Just download this page in <a href="index.html" download="lesspass_standalon.html">⬇️ this link</a> and open in your
92+
It's simple. Just download this page in <a href="index.html" download="lesspass_standalon.html">⬇️ this link</a> and open the file in your
9193
favorite browser(I recommend chrome but other browsers should work)
9294
</p>
9395

@@ -111,7 +113,7 @@ <h2>🤔 How it works</h2>
111113
<footer>
112114
<hr>
113115
<br>
114-
<a href="https://github.com/RodrigoWebDev/lessPass-standalone-html" target="_blank">&lt;/&gt; Source code 🐱</a>
116+
<a href="https://github.com/RodrigoWebDev/lessPass-standalone-html" target="_blank">&lt;/&gt; Source code 🐱</a> developed by <a href="https://github.com/RodrigoWebDev" target="_blank">👨🏻‍💻 Rodrigo Queiroz</a>
115117
<br>
116118
</footer>
117119

src/index.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,3 @@ myForm.addEventListener("submit", async (e) => {
4949
}
5050
});
5151

52-
downloadLink.addEventListener("click", () => {
53-
save()
54-
});
55-
56-
function save() {
57-
const data = "<!DOCTYPE html>\n"+document.documentElement.outerHTML; // See sources below for why this gets the entire page content.
58-
const link = document.createElement('a');
59-
link.setAttribute('download', 'default_download_name.html');
60-
link.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(data));
61-
link.click(); // In my tests, there was no need to add the element to the document for this to work.
62-
}
63-

src/styles.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,17 @@ a:hover {
422422
display: flex;
423423
}
424424

425-
.md\:g-16px {
426-
gap: 16px;
425+
.md\:g-24px {
426+
gap: 24px;
427427
}
428428

429429
.md\:w-50\%{
430430
width: 50%;
431431
}
432+
433+
.md\:d-n {
434+
display: none;
435+
}
432436
}
433437

434438
* {

0 commit comments

Comments
 (0)