表のレーアウト統一(#194) (#271)

#194

#194

Co-authored-by: miteruzo <miteruzo@naver.com>
Reviewed-on: #271
This commit was merged in pull request #271.
This commit is contained in:
2026-02-24 21:29:00 +09:00
parent a0d6aeb91e
commit 7d1a87f452
4 changed files with 27 additions and 18 deletions
+7 -3
View File
@@ -3,6 +3,7 @@ import { Helmet } from 'react-helmet-async'
import { useLocation } from 'react-router-dom'
import PrefetchLink from '@/components/PrefetchLink'
import PageTitle from '@/components/common/PageTitle'
import MainArea from '@/components/layout/MainArea'
import { SITE_TITLE } from '@/config'
import { apiGet } from '@/lib/api'
@@ -28,8 +29,11 @@ export default () => {
<Helmet>
<title>{`Wiki 変更履歴 | ${ SITE_TITLE }`}</title>
</Helmet>
<PageTitle>Wiki </PageTitle>
<table className="table-auto w-full border-collapse">
<thead>
<thead className="border-b-2 border-black dark:border-white">
<tr>
<th></th>
<th className="p-2 text-left"></th>
@@ -39,8 +43,8 @@ export default () => {
</thead>
<tbody>
{changes.map (change => (
<tr key={change.revisionId}>
<td>
<tr key={change.revisionId} className="even:bg-gray-100 dark:even:bg-gray-700">
<td className="p-2">
{change.pred != null && (
<PrefetchLink
to={`/wiki/${ change.wikiPage.id }/diff?from=${ change.pred }&to=${ change.revisionId }`}>
+6 -5
View File
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
import { Helmet } from 'react-helmet-async'
import PrefetchLink from '@/components/PrefetchLink'
import SectionTitle from '@/components/common/SectionTitle'
import PageTitle from '@/components/common/PageTitle'
import MainArea from '@/components/layout/MainArea'
import { SITE_TITLE } from '@/config'
import { apiGet } from '@/lib/api'
@@ -35,8 +35,9 @@ export default () => {
<Helmet>
<title>Wiki | {SITE_TITLE}</title>
</Helmet>
<div className="max-w-xl">
<SectionTitle>Wiki</SectionTitle>
<PageTitle>Wiki</PageTitle>
<form onSubmit={handleSearch} className="space-y-2">
{/* タイトル */}
<div>
@@ -68,7 +69,7 @@ export default () => {
<div className="mt-4">
<table className="table-auto w-full border-collapse">
<thead>
<thead className="border-b-2 border-black dark:border-white">
<tr>
<th className="p-2 text-left"></th>
<th className="p-2 text-left"></th>
@@ -76,13 +77,13 @@ export default () => {
</thead>
<tbody>
{results.map (page => (
<tr key={page.id}>
<tr key={page.id} className="even:bg-gray-100 dark:even:bg-gray-700">
<td className="p-2">
<PrefetchLink to={`/wiki/${ encodeURIComponent (page.title) }`}>
{page.title}
</PrefetchLink>
</td>
<td className="p-2 text-gray-100 text-sm">
<td className="p-2">
{page.updatedAt}
</td>
</tr>))}