Skip to content

Commit

Permalink
Update styling on forum
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasdeluna committed Feb 20, 2024
1 parent 7cba833 commit edbfeb9
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/actions/ForumActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function createThread(thread: CreateThread) {
types: Thread.CREATE,
endpoint: '/threads/',
method: 'POST',
body: thread ,
body: thread,
schema: threadSchema,
meta: {
errorMessage: 'Opprettelse av tråd feilet',
Expand Down
2 changes: 1 addition & 1 deletion app/components/Search/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const LINKS: Array<Link> = [
},
{
key: 'forum',
title: 'AbaQuery',
title: 'Forum',
icon: 'chatbubbles-outline',
url: '/forum',
},
Expand Down
3 changes: 1 addition & 2 deletions app/routes/forum/components/ForumDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ const ForumDetail = () => {
</NavigationTab>

<h1> {forum.title}</h1>
<Flex column></Flex>
{forum.description}
<p className="secondaryFontColor">{forum.description}</p>
<ThreadList forumId={parseInt(forumId)} threadIds={forum.threads} />
</ContentMain>
</Content>
Expand Down
12 changes: 11 additions & 1 deletion app/routes/forum/components/ForumList.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,28 @@
padding: 0.9375em 1.25em 0.9375em 1em;
margin: 1em 0;

& h4,
h2 {
color: var(--lego-font-color);
}

&:hover {
background-color: rgba(255, 0, 0, var(--color-red-hover-alpha));
}
}

.threadEntry {
border-left: 8px solid var(--color-blue-6);
border-left: 8px solid var(--lego-font-color);
justify-content: space-between;
transition: background-color var(--easing-fast);
padding: 0.9375em 1.25em 0.9375em 1em;
margin: 1em 0;

& h4,
h2 {
color: var(--lego-font-color);
}

&:hover {
background-color: rgba(255, 0, 0, var(--color-red-hover-alpha));
}
Expand Down
2 changes: 1 addition & 1 deletion app/routes/forum/components/ForumList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ForumList = () => {
<LoadingIndicator loading={fetching}>
<Content>
<ContentMain>
<h1>Abaquery</h1>
<h1>Forum</h1>
{actionGrant.includes('create') && (
<NavigationLink to="/forum/new">Nytt forum</NavigationLink>
)}
Expand Down
5 changes: 4 additions & 1 deletion app/routes/forum/components/ForumListEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ const ForumListEntry = ({
<Link to={`/forum/${subForum.id}`}>
<h2>{subForum.title}</h2>
<div>
<h4>{subForum.description}</h4>
<h4>
{subForum.description.substring(0, 100)}
{subForum.description.length > 100 ? '...' : ''}
</h4>
</div>
</Link>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion app/routes/forum/components/ThreadList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ThreadList = ({
<LoadingIndicator loading={fetching}>
<Content>
<ContentMain>
<h1>Tråder</h1>
<h1>Tråder 🧶</h1>
<Flex column>
{threads?.map((t: PublicThread) => (
<ThreadListEntry thread={t} className={''} key={t.id} />
Expand Down

0 comments on commit edbfeb9

Please sign in to comment.