style: Adjust button styles for better accessibility

This commit is contained in:
Liuweiqing 2024-01-22 09:27:09 +08:00
parent 22588b48ba
commit a1eef4daa6
2 changed files with 59 additions and 59 deletions

View File

@ -242,7 +242,7 @@ const QEditor = () => {
/> />
<button <button
onClick={handleAIWrite} onClick={handleAIWrite}
className="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 mr-2 rounded" className="bg-gray-300 hover:bg-gray-400 text-black font-bold py-2 px-4 mr-2 rounded"
> >
AI Write AI Write
</button> </button>
@ -254,7 +254,7 @@ const QEditor = () => {
</button> */} </button> */}
<button <button
onClick={() => paper2AI(userInput)} onClick={() => paper2AI(userInput)}
className="bg-red-500 hover:bg-red-700 text-black font-bold py-2 px-4 mr-2 rounded" className="bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 mr-2 rounded"
> >
Paper2AI Paper2AI
</button> </button>
@ -280,7 +280,7 @@ const QEditor = () => {
<button <button
onClick={() => formatTextInEditor(quill)} // 假设 updateIndex 是处理更新操作的函数 onClick={() => formatTextInEditor(quill)} // 假设 updateIndex 是处理更新操作的函数
className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" className="bg-gray-300 hover:bg-gray-400 text-black font-bold py-2 px-4 rounded"
> >
</button> </button>

View File

@ -122,14 +122,14 @@ function ReferenceList({
<div className="container mx-auto p-4"> <div className="container mx-auto p-4">
<div className="flex justify-between items-center mb-4"> <div className="flex justify-between items-center mb-4">
<button <button
className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded " className="bg-gray-300 hover:bg-gray-400 text-black font-bold py-2 px-4 rounded "
type="submit" type="submit"
> >
</button> </button>
<button <button
className="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded " className="bg-gray-300 hover:bg-gray-400 text-black font-bold py-2 px-4 rounded "
type="button" type="button"
onClick={() => onClick={() =>
copyToClipboard(formatAllReferencesForCopy(references)) copyToClipboard(formatAllReferencesForCopy(references))
@ -149,43 +149,43 @@ function ReferenceList({
</form> </form>
{/* 引用列表显示区域 */} {/* 引用列表显示区域 */}
<ul> <ul>
{references && {references &&
references.map( references.map(
(reference, index) => (reference, index) =>
reference && ( reference && (
<li key={index} className="mb-3 p-2 border-b"> <li key={index} className="mb-3 p-2 border-b">
{/* 显示序号 */} {/* 显示序号 */}
<span className="font-bold mr-2">[{index + 1}].</span> <span className="font-bold mr-2">[{index + 1}].</span>
{reference.author}. {reference.title}.{" "} {reference.author}. {reference.title}.{" "}
{/* 判断 journal 字段是否存在 */} {/* 判断 journal 字段是否存在 */}
{reference.journal && reference.journal.name ? ( {reference.journal && reference.journal.name ? (
<span> <span>
{reference.journal.name}[J],{reference.year}, {reference.journal.name}[J],{reference.year},
{reference.journal.volume {reference.journal.volume
? ` ${reference.journal.volume}` ? ` ${reference.journal.volume}`
: ""} : ""}
{reference.journal.pages {reference.journal.pages
? `: ${reference.journal.pages}` ? `: ${reference.journal.pages}`
: ""} : ""}
. .
</span> </span>
) : ( ) : (
<span> <span>
{reference.venue}, {reference.year}. {reference.venue}, {reference.year}.
</span> </span>
)} )}
{reference.url && ( {reference.url && (
<a <a
href={reference.url} href={reference.url}
className="text-blue-500 hover:underline" className="text-blue-500 hover:underline"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
{" "} {" "}
({reference.url}) ({reference.url})
</a> </a>
)} )}
{/* <button {/* <button
className="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-2 ml-2 rounded" className="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-2 ml-2 rounded"
onClick={() => moveReferenceUp(index)} onClick={() => moveReferenceUp(index)}
> >
@ -197,23 +197,23 @@ function ReferenceList({
> >
</button> */} </button> */}
<button <button
className="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-2 ml-2 rounded" className="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-2 ml-2 rounded"
onClick={() => onClick={() =>
copyToClipboard(formatReferenceForCopy(reference)) copyToClipboard(formatReferenceForCopy(reference))
} }
> >
</button> </button>
<button <button
className="text-red-500 hover:text-red-700 ml-4" className="text-red-500 hover:text-red-700 ml-4"
onClick={() => removeReferenceUpdateIndex(index)} onClick={() => removeReferenceUpdateIndex(index)}
> >
X X
</button> </button>
</li> </li>
) )
)} )}
</ul> </ul>
</div> </div>
); );