-
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
12 changed files
with
2,422 additions
and
30 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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"tabWidth": 2, | ||
"plugins": ["prettier-plugin-tailwindcss"] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Working with templates in endsong_ui | ||
|
||
Use node, install the dependencies. | ||
|
||
Format the .html files with `prettier` always (even if I don't | ||
like self-closing void tags). | ||
|
||
Run | ||
|
||
```shell | ||
npx tailwindcss -i base_style.css -o tailwind_style.css --watch | ||
``` | ||
|
||
in the terminal. |
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 |
---|---|---|
@@ -1,25 +1,58 @@ | ||
<head> | ||
<title>{{ name }}</title> | ||
</head> | ||
<body> | ||
<h1>Summary of {{ name }}</h1> | ||
<h2>General info</h2> | ||
<ul> | ||
<li>Total playcount: {{ plays }}</li> | ||
<li>First listen: {{ first_listen }}</li> | ||
<li>Last listen: {{ last_listen }}</li> | ||
<li>% of total plays: {{ percentage_of_plays }}%</li> | ||
</ul> | ||
<h2>Top {{ top }} songs</h2> | ||
<ol> | ||
{% for song in songs -%} | ||
<li>{{ song.0 }} | {{ song.1 }} plays</li> | ||
{% endfor %} | ||
</ol> | ||
<h2>Top {{ top }} albums</h2> | ||
<ol> | ||
{% for album in albums -%} | ||
<li>{{ album.0 }} | {{ album.1 }} plays</li> | ||
{% endfor %} | ||
</ol> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>{{ name }}</title> | ||
<style> | ||
/* disable html.validate.styles in VS Code */ | ||
{% include "tailwind_style.css" %} | ||
</style> | ||
</head> | ||
</html> | ||
<body class="flex flex-col items-center justify-evenly gap-4 bg-slate-100"> | ||
<header class="p-4 text-center text-3xl"> | ||
<h1>Summary of {{ name }}</h1> | ||
</header> | ||
<main class="flex flex-col items-center gap-8"> | ||
<section class="flex"> | ||
<article | ||
class="flex w-96 flex-col gap-3 rounded-lg border border-gray-200 p-6 shadow" | ||
> | ||
<h2 class="self-center text-xl font-bold">General info</h2> | ||
<ul class="list-none"> | ||
<li>Total playcount: {{ plays }}</li> | ||
<li>First listen: {{ first_listen }}</li> | ||
<li>Last listen: {{ last_listen }}</li> | ||
<li>% of total plays: {{ percentage_of_plays }}%</li> | ||
</ul> | ||
</article> | ||
</section> | ||
<section class="flex gap-16"> | ||
<article | ||
class="flex w-96 flex-col gap-3 rounded-lg border border-gray-200 p-6 shadow" | ||
> | ||
<h2 class="self-center text-xl font-bold">Top {{ top }} songs</h2> | ||
<ol class="list-decimal"> | ||
{% for song in songs -%} | ||
<li class="ml-6">{{ song.0 }} | {{ song.1 }} plays</li> | ||
{% endfor %} | ||
</ol> | ||
</article> | ||
<article | ||
class="flex w-96 flex-col gap-3 rounded-lg border border-gray-200 p-6 shadow" | ||
> | ||
<h2 class="self-center text-xl font-bold">Top {{ top }} albums</h2> | ||
<ol class="list-decimal"> | ||
{% for album in albums -%} | ||
<li class="ml-6">{{ album.0 }} | {{ album.1 }} plays</li> | ||
{% endfor %} | ||
</ol> | ||
</article> | ||
</section> | ||
</main> | ||
<footer class="p-4 text-center text-xs"> | ||
<p>Generated on {{now}} with files:</p> | ||
<p>|{% for file in filenames %} {{file}} |{% endfor %}</p> | ||
</footer> | ||
</body> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
Oops, something went wrong.
158c582
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.1% JavaScript ;-;
didn't wanna commit tailwind-generated.css but it's better to do it, otherwise you'd have to install all template dependancies, node etc even if you're not working on it