mobile display; page title

This commit is contained in:
Rüdiger Diedrich
2022-07-27 21:52:18 +02:00
parent bceae20878
commit e0fd6051e3
3 changed files with 10 additions and 5 deletions

View File

@ -10,7 +10,7 @@ body {
.post {
@apply bg-base-200 shadow-md rounded-md;
@apply flex mb-4;
@apply flex flex-col sm:flex-row mb-4;
}
.post :where(article, .userinfo) {
@apply p-4 pt-4;
@ -26,6 +26,7 @@ body {
.post .bbc-spoiler img { @apply invisible; }
.post .bbc-spoiler:hover { @apply text-inherit bg-inherit; }
.post .bbc-spoiler:hover img { @apply visible; }
.post .sa-smilie { @apply inline; }
.post iframe {
@apply w-full bg-[brown];
}
@ -35,6 +36,9 @@ body {
.post .code h5 { @apply hidden; }
.post a[href] { @apply link; }
.post .editedby { @apply text-sm italic opacity-70 mt-4; }
.post .title :where(img[src*="gangtags"]) + * {
@apply mb-1;
}
/* Alerts and form errors used by phx.new */
.alert {

View File

@ -17,6 +17,7 @@ defmodule SomethingErlangWeb.ThreadLive.Show do
thread = Grover.get_thread!(id, page |> String.to_integer())
{:noreply,
socket
|> assign(:page_title, thread.title)
|> assign(:thread, thread)}
end
@ -39,9 +40,9 @@ defmodule SomethingErlangWeb.ThreadLive.Show do
def user(assigns) do
~H"""
<aside class="userinfo bg-base-100 shrink-0 w-[13em]">
<aside class="userinfo bg-base-100 shrink-0 sm:w-[13em]">
<h3 class="mb-4"><%= @info.name %></h3>
<div class="title text-sm pr-4">
<div class="title hidden sm:flex flex-col text-sm pr-4">
<%= raw @info.title %>
</div>
</aside>

View File

@ -5,8 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="csrf-token" content={csrf_token_value()}>
<%= live_title_tag assigns[:page_title] || "SomethingErlang",
suffix: " · Phoenix Framework" %>
<%= live_title_tag assigns[:page_title] || "This awesome page",
suffix: " · Something Erlang" %>
<link phx-track-static rel="stylesheet"
href={Routes.static_path(@conn, "/assets/app.css")}/>
<script defer phx-track-static type="text/javascript"