Skip to content

Commit

Permalink
Set up meta files
Browse files Browse the repository at this point in the history
  • Loading branch information
mikker committed Dec 20, 2023
1 parent de2f437 commit b885bcc
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 7 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright Mikkel Malmberg

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# sourdough-toast

## License

MIT
4 changes: 2 additions & 2 deletions example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="../src/sourdough.css" />
<link rel="stylesheet" href="../src/sourdough-toast.css" />
<style>
body {
background: #eee;
}
</style>
<script type="module">
import { toast } from "../src/sourdough.js";
import { toast } from "../src/sourdough-toast.js";

window.toast = toast;

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "sourdough",
"name": "sourdough-toast",
"version": "1.0.0",
"description": "",
"main": "index.js",
"main": "src/sourdough-toast.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "five-server"
"dev": "five-server --open=false"
},
"keywords": [],
"author": "",
Expand Down
5 changes: 5 additions & 0 deletions src/sourdough.css → src/sourdough-toast.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* This file is copied, more or less directly, from sonner by Emil Kowalski
* - see https://sonner.emilkowal.ski
*/

[data-sourdough-toaster] {
position: fixed;
width: var(--width);
Expand Down
2 changes: 0 additions & 2 deletions src/sourdough.js → src/sourdough-toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ class Sourdough {

const front = toasts_to_render[toasts_to_render.length - 1];

console.log("toasts to render", toasts_to_render.length);

for (const [index, t] of toasts_to_render.entries()) {
if (changedExtended) {
t.paused ? t.resume() : t.pause();
Expand Down

0 comments on commit b885bcc

Please sign in to comment.