From 883e2cd7a14d201434dd5987a7d941e782ea804e Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 9 Mar 2023 14:00:57 +0800 Subject: [PATCH] input outline --- tailwind.config.js | 5 +- themes/example/components/ArticleLock.js | 2 +- themes/example/components/SearchInput.js | 2 +- themes/fukasawa/components/ArticleLock.js | 2 +- themes/fukasawa/components/SearchInput.js | 2 +- themes/hexo/components/ArticleLock.js | 2 +- themes/hexo/components/SearchInput.js | 2 +- themes/matery/components/ArticleLock.js | 2 +- themes/matery/components/SearchInput.js | 2 +- themes/medium/components/ArticleLock.js | 2 +- themes/medium/components/SearchInput.js | 2 +- themes/next/components/ArticleLock.js | 2 +- themes/next/components/SearchInput.js | 2 +- themes/nobelium/LayoutTag.js | 2 +- themes/nobelium/components/ArticleLock.js | 2 +- themes/nobelium/components/SearchInput.js | 2 +- themes/simple/LayoutBase.js | 14 ++--- themes/simple/components/ArticleLock.js | 2 +- themes/simple/components/DropMenu.js | 37 +++++++------- themes/simple/components/Header.js | 7 +-- .../simple/components/{Nav.js => NavBar.js} | 27 ++++------ themes/simple/components/NavBarMenu.js | 51 +++++++++++++++++++ themes/simple/components/SideBar.js | 2 +- themes/simple/components/TopBar.js | 6 ++- themes/simple/config_simple.js | 1 + 25 files changed, 118 insertions(+), 64 deletions(-) rename themes/simple/components/{Nav.js => NavBar.js} (57%) create mode 100644 themes/simple/components/NavBarMenu.js diff --git a/tailwind.config.js b/tailwind.config.js index 6da86610..76f8e710 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -21,9 +21,10 @@ module.exports = { } }, maxWidth: { - side: '14rem' + side: '14rem', + '9/10': '90%' } - }, + } }, variants: { extend: {} diff --git a/themes/example/components/ArticleLock.js b/themes/example/components/ArticleLock.js index 6e90f7b2..f21ce74a 100644 --- a/themes/example/components/ArticleLock.js +++ b/themes/example/components/ArticleLock.js @@ -26,7 +26,7 @@ export const ArticleLock = props => {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- +
 {locale.COMMON.SUBMIT}
diff --git a/themes/example/components/SearchInput.js b/themes/example/components/SearchInput.js index 6a95ba01..fdb129b9 100644 --- a/themes/example/components/SearchInput.js +++ b/themes/example/components/SearchInput.js @@ -62,7 +62,7 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => { ref={searchInputRef} type='text' placeholder={currentTag ? `${locale.SEARCH.TAGS} #${currentTag}` : `${locale.SEARCH.ARTICLES}`} - className={'w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} + className={'outline-none w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} onKeyUp={handleKeyUp} onCompositionStart={lockSearchInput} onCompositionUpdate={lockSearchInput} diff --git a/themes/fukasawa/components/ArticleLock.js b/themes/fukasawa/components/ArticleLock.js index 1dedba16..9a8e6081 100644 --- a/themes/fukasawa/components/ArticleLock.js +++ b/themes/fukasawa/components/ArticleLock.js @@ -30,7 +30,7 @@ export const ArticleLock = props => {
{ {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- +
 {locale.COMMON.SUBMIT}
diff --git a/themes/hexo/components/SearchInput.js b/themes/hexo/components/SearchInput.js index fefca73a..462c58b3 100644 --- a/themes/hexo/components/SearchInput.js +++ b/themes/hexo/components/SearchInput.js @@ -69,7 +69,7 @@ const SearchInput = props => { ref={searchInputRef} type="text" className={ - 'w-full text-sm pl-5 rounded-lg transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500' + 'outline-none w-full text-sm pl-5 rounded-lg transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500' } onKeyUp={handleKeyUp} onCompositionStart={lockSearchInput} diff --git a/themes/matery/components/ArticleLock.js b/themes/matery/components/ArticleLock.js index 24f4b55f..0a56f39e 100644 --- a/themes/matery/components/ArticleLock.js +++ b/themes/matery/components/ArticleLock.js @@ -25,7 +25,7 @@ export const ArticleLock = props => {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- +
 {locale.COMMON.SUBMIT}
diff --git a/themes/matery/components/SearchInput.js b/themes/matery/components/SearchInput.js index fefca73a..462c58b3 100644 --- a/themes/matery/components/SearchInput.js +++ b/themes/matery/components/SearchInput.js @@ -69,7 +69,7 @@ const SearchInput = props => { ref={searchInputRef} type="text" className={ - 'w-full text-sm pl-5 rounded-lg transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500' + 'outline-none w-full text-sm pl-5 rounded-lg transition focus:shadow-lg dark:text-gray-300 font-light leading-10 text-black bg-gray-100 dark:bg-gray-500' } onKeyUp={handleKeyUp} onCompositionStart={lockSearchInput} diff --git a/themes/medium/components/ArticleLock.js b/themes/medium/components/ArticleLock.js index af7b4ec1..8ffe4044 100644 --- a/themes/medium/components/ArticleLock.js +++ b/themes/medium/components/ArticleLock.js @@ -26,7 +26,7 @@ export const ArticleLock = props => {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- +
 {locale.COMMON.SUBMIT}
diff --git a/themes/medium/components/SearchInput.js b/themes/medium/components/SearchInput.js index 5b037540..f6c84d9c 100644 --- a/themes/medium/components/SearchInput.js +++ b/themes/medium/components/SearchInput.js @@ -61,7 +61,7 @@ const SearchInput = ({ currentTag, currentSearch, cRef, className }) => { {
{ ref={searchInputRef} type='text' placeholder={currentTag ? `${locale.SEARCH.TAGS} #${currentTag}` : `${locale.SEARCH.ARTICLES}`} - className={'w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-800 dark:text-white'} + className={'outline-none w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-800 dark:text-white'} onKeyUp={handleKeyUp} onCompositionStart={lockSearchInput} onCompositionUpdate={lockSearchInput} diff --git a/themes/nobelium/LayoutTag.js b/themes/nobelium/LayoutTag.js index 2f0ef119..2d85004b 100644 --- a/themes/nobelium/LayoutTag.js +++ b/themes/nobelium/LayoutTag.js @@ -25,7 +25,7 @@ export const LayoutTag = props => { placeholder={ currentTag ? `Search in #${currentTag}` : 'Search Articles' } - className="block w-full border px-4 py-2 border-black bg-white text-black dark:bg-night dark:border-white dark:text-white" + className="outline-none block w-full border px-4 py-2 border-black bg-white text-black dark:bg-night dark:border-white dark:text-white" onChange={e => setSearchValue(e.target.value)} /> {
{locale.COMMON.ARTICLE_LOCK_TIPS}
- +
 {locale.COMMON.SUBMIT}
diff --git a/themes/nobelium/components/SearchInput.js b/themes/nobelium/components/SearchInput.js index 6a95ba01..fdb129b9 100644 --- a/themes/nobelium/components/SearchInput.js +++ b/themes/nobelium/components/SearchInput.js @@ -62,7 +62,7 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => { ref={searchInputRef} type='text' placeholder={currentTag ? `${locale.SEARCH.TAGS} #${currentTag}` : `${locale.SEARCH.ARTICLES}`} - className={'w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} + className={'outline-none w-full text-sm pl-4 transition focus:shadow-lg font-light leading-10 text-black bg-gray-100 dark:bg-gray-900 dark:text-white'} onKeyUp={handleKeyUp} onCompositionStart={lockSearchInput} onCompositionUpdate={lockSearchInput} diff --git a/themes/simple/LayoutBase.js b/themes/simple/LayoutBase.js index 44b9c152..88e17d84 100644 --- a/themes/simple/LayoutBase.js +++ b/themes/simple/LayoutBase.js @@ -1,7 +1,7 @@ import CommonHead from '@/components/CommonHead' import React from 'react' import { Header } from './components/Header' -import { Nav } from './components/Nav' +import { NavBar } from './components/NavBar' import { Footer } from './components/Footer' // import { Title } from './components/Title' import { SideBar } from './components/SideBar' @@ -30,17 +30,17 @@ const LayoutBase = props => { {/* 顶部LOGO */}
- {/* 菜单 */} -