Skip to content

Commit

Permalink
add create button podcast and small ui fix
Browse files Browse the repository at this point in the history
  • Loading branch information
VovaStelmashchuk committed Oct 1, 2024
1 parent 36282d3 commit accd293
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 3 deletions.
16 changes: 16 additions & 0 deletions src/public/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,10 @@ input {
margin-top: 1rem;
}

.mt-auto {
margin-top: auto;
}

.line-clamp-3 {
overflow: hidden;
display: -webkit-box;
Expand Down Expand Up @@ -764,6 +768,10 @@ input {
height: 100%;
}

.min-h-screen {
min-height: 100vh;
}

.w-1\/2 {
width: 50%;
}
Expand Down Expand Up @@ -796,6 +804,10 @@ input {
flex: 1 1 0%;
}

.flex-grow {
flex-grow: 1;
}

.cursor-pointer {
cursor: pointer;
}
Expand Down Expand Up @@ -1090,6 +1102,10 @@ html {
overflow-y: scroll;
}

html, body {
height: 100%;
}

.selected {
--tw-bg-opacity: 1;
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
Expand Down
3 changes: 3 additions & 0 deletions src/routers/admin/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ async function adminPodcastList(request, h) {
{
pageTitle: pageTitle,
posts: uiPosts,
createPodcastButton: {
title: 'Create Podcast',
}
},
{
layout: 'admin'
Expand Down
4 changes: 4 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ html {
@apply overflow-y-scroll;
}

html, body {
height: 100%;
}

.selected {
@apply bg-green-500 text-white;
}
Expand Down
11 changes: 9 additions & 2 deletions src/templates/layouts/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@
<script src="https://unpkg.com/[email protected]"></script>
</head>

<body class="bg-gray-100 text-gray-900 font-sans">
<body class="bg-gray-100 text-gray-900 font-sans min-h-screen flex flex-col">
{{> admin_head}}
<div class="container max-w-screen-xl mx-auto">

<div class="container max-w-screen-xl mx-auto flex-grow">
{{{ content }}}
</div>

<div id="dialog-container"></div>

<footer class="bg-black p-4 text-center mt-auto">
<p class="text-white">&copy; 2024 DIY podcast hosting</p>
</footer>
</body>

</html>
2 changes: 2 additions & 0 deletions src/templates/pages/admin/admin_podcast_list.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{> btn_create_podcast createPodcastButton}}

<div class="grid grid-cols-1 gap-4">
{{#each posts}}
<a href="{{detailUrl}}" class="no-underline bg-white p-8 rounded shadow-md">
Expand Down
2 changes: 1 addition & 1 deletion src/templates/pages/podcastDetails.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div>
<div class="flex flex-col md:flex-row w-full">
<div class="hidden md:block md:w-3/10">
<div class="hidden md:block md:w-3/10 py-2">
<img src="{{imageUrl}}" alt="Logo" class="w-64 aspect-square">
</div>
<div class="w-full md:w-7/10 bg-random2 p-4">
Expand Down
4 changes: 4 additions & 0 deletions src/templates/widgets/btn_create_podcast.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<button hx-swap="#dialog-container" hx-post="/admin/show/{{showSlug}}/episode-new"
class="common-button w-full px-4 py-2 my-2 transition-all duration-300 ease-in-out">
{{title}}
</button>

0 comments on commit accd293

Please sign in to comment.