Removed horizontal line from Return button
This commit is contained in:
		
							parent
							
								
									e947fd7a0e
								
							
						
					
					
						commit
						acd2d7d482
					
				| @ -25,7 +25,7 @@ import { cIf, cJoin } from "helpers/className"; | |||||||
| import { AppStaticProps } from "graphql/getAppStaticProps"; | import { AppStaticProps } from "graphql/getAppStaticProps"; | ||||||
| import { useAppLayout } from "contexts/AppLayoutContext"; | import { useAppLayout } from "contexts/AppLayoutContext"; | ||||||
| import { Button } from "components/Inputs/Button"; | import { Button } from "components/Inputs/Button"; | ||||||
| import { OpenGraph, TITLE_PREFIX } from "helpers/openGraph"; | import { OpenGraph, TITLE_PREFIX, TITLE_SEPARATOR } from "helpers/openGraph"; | ||||||
| import { getDefaultPreferredLanguages } from "helpers/locales"; | import { getDefaultPreferredLanguages } from "helpers/locales"; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| @ -355,10 +355,12 @@ export const AppLayout = ({ | |||||||
|               ) |               ) | ||||||
|             )} |             )} | ||||||
|           > |           > | ||||||
|             {isDefinedAndNotEmpty( |             {openGraph.title.substring( | ||||||
|               openGraph.title.substring(TITLE_PREFIX.length) |               TITLE_PREFIX.length + TITLE_SEPARATOR.length | ||||||
|             ) |             ) | ||||||
|               ? openGraph.title.substring(TITLE_PREFIX.length) |               ? openGraph.title.substring( | ||||||
|  |                   TITLE_PREFIX.length + TITLE_SEPARATOR.length | ||||||
|  |                 ) | ||||||
|               : "Accord’s Library"} |               : "Accord’s Library"} | ||||||
|           </p> |           </p> | ||||||
|           {isDefined(subPanel) && !turnSubIntoContent && ( |           {isDefined(subPanel) && !turnSubIntoContent && ( | ||||||
|  | |||||||
| @ -1,5 +1,4 @@ | |||||||
| import { useCallback } from "react"; | import { useCallback } from "react"; | ||||||
| import { HorizontalLine } from "components/HorizontalLine"; |  | ||||||
| import { Icon } from "components/Ico"; | import { Icon } from "components/Ico"; | ||||||
| import { Button } from "components/Inputs/Button"; | import { Button } from "components/Inputs/Button"; | ||||||
| import { useAppLayout } from "contexts/AppLayoutContext"; | import { useAppLayout } from "contexts/AppLayoutContext"; | ||||||
| @ -18,7 +17,6 @@ interface Props { | |||||||
|   title: string | null | undefined; |   title: string | null | undefined; | ||||||
|   langui: AppStaticProps["langui"]; |   langui: AppStaticProps["langui"]; | ||||||
|   displayOn: ReturnButtonType; |   displayOn: ReturnButtonType; | ||||||
|   horizontalLine?: boolean; |  | ||||||
|   className?: string; |   className?: string; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -35,7 +33,6 @@ export const ReturnButton = ({ | |||||||
|   title, |   title, | ||||||
|   langui, |   langui, | ||||||
|   displayOn, |   displayOn, | ||||||
|   horizontalLine, |  | ||||||
|   className, |   className, | ||||||
| }: Props): JSX.Element => { | }: Props): JSX.Element => { | ||||||
|   const { setSubPanelOpen } = useAppLayout(); |   const { setSubPanelOpen } = useAppLayout(); | ||||||
| @ -54,7 +51,6 @@ export const ReturnButton = ({ | |||||||
|         text={`${langui.return_to} ${title}`} |         text={`${langui.return_to} ${title}`} | ||||||
|         icon={Icon.NavigateBefore} |         icon={Icon.NavigateBefore} | ||||||
|       /> |       /> | ||||||
|       {horizontalLine === true && <HorizontalLine />} |  | ||||||
|     </div> |     </div> | ||||||
|   ); |   ); | ||||||
| }; | }; | ||||||
|  | |||||||
| @ -86,12 +86,13 @@ export const PostPage = ({ | |||||||
|               title={returnTitle} |               title={returnTitle} | ||||||
|               langui={langui} |               langui={langui} | ||||||
|               displayOn={ReturnButtonType.Desktop} |               displayOn={ReturnButtonType.Desktop} | ||||||
|               horizontalLine |  | ||||||
|             /> |             /> | ||||||
|           )} |           )} | ||||||
| 
 | 
 | ||||||
|           {displayCredits && ( |           {displayCredits && ( | ||||||
|             <> |             <> | ||||||
|  |               <HorizontalLine /> | ||||||
|  | 
 | ||||||
|               {selectedTranslation && ( |               {selectedTranslation && ( | ||||||
|                 <div className="grid grid-flow-col place-content-center place-items-center gap-2"> |                 <div className="grid grid-flow-col place-content-center place-items-center gap-2"> | ||||||
|                   <p className="font-headers font-bold">{langui.status}:</p> |                   <p className="font-headers font-bold">{langui.status}:</p> | ||||||
| @ -126,13 +127,16 @@ export const PostPage = ({ | |||||||
|                   </div> |                   </div> | ||||||
|                 </div> |                 </div> | ||||||
|               )} |               )} | ||||||
| 
 |  | ||||||
|               <HorizontalLine /> |  | ||||||
|             </> |             </> | ||||||
|           )} |           )} | ||||||
| 
 | 
 | ||||||
|           {displayToc && ( |           {displayToc && ( | ||||||
|             <TableOfContents text={body} title={title} langui={langui} /> |             <TableOfContents | ||||||
|  |               text={body} | ||||||
|  |               title={title} | ||||||
|  |               langui={langui} | ||||||
|  |               horizontalLine | ||||||
|  |             /> | ||||||
|           )} |           )} | ||||||
|         </SubPanel> |         </SubPanel> | ||||||
|       ) : undefined, |       ) : undefined, | ||||||
| @ -158,7 +162,7 @@ export const PostPage = ({ | |||||||
|             title={returnTitle} |             title={returnTitle} | ||||||
|             langui={langui} |             langui={langui} | ||||||
|             displayOn={ReturnButtonType.Mobile} |             displayOn={ReturnButtonType.Mobile} | ||||||
|             horizontalLine |             className="mb-10" | ||||||
|           /> |           /> | ||||||
|         )} |         )} | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -15,7 +15,8 @@ const DEFAULT_OG_THUMBNAIL = { | |||||||
|   alt: "Accord's Library Logo", |   alt: "Accord's Library Logo", | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| export const TITLE_PREFIX = "Accord’s Library - "; | export const TITLE_PREFIX = "Accord’s Library"; | ||||||
|  | export const TITLE_SEPARATOR = " - " | ||||||
| 
 | 
 | ||||||
| export interface OpenGraph { | export interface OpenGraph { | ||||||
|   title: string; |   title: string; | ||||||
| @ -29,7 +30,7 @@ export const getOpenGraph = ( | |||||||
|   description?: string | null | undefined, |   description?: string | null | undefined, | ||||||
|   thumbnail?: UploadImageFragment | null | undefined |   thumbnail?: UploadImageFragment | null | undefined | ||||||
| ): OpenGraph => ({ | ): OpenGraph => ({ | ||||||
|   title: `${TITLE_PREFIX}${isDefinedAndNotEmpty(title) ? `${title}` : ""}`, |   title: `${TITLE_PREFIX}${isDefinedAndNotEmpty(title) ? `${TITLE_SEPARATOR}${title}` : ""}`, | ||||||
|   description: isDefinedAndNotEmpty(description) |   description: isDefinedAndNotEmpty(description) | ||||||
|     ? description |     ? description | ||||||
|     : langui.default_description ?? "", |     : langui.default_description ?? "", | ||||||
|  | |||||||
| @ -172,8 +172,10 @@ const Chronicle = ({ | |||||||
|           href="/chronicles" |           href="/chronicles" | ||||||
|           title={langui.chronicles} |           title={langui.chronicles} | ||||||
|           langui={langui} |           langui={langui} | ||||||
|           horizontalLine |  | ||||||
|         /> |         /> | ||||||
|  | 
 | ||||||
|  |         <HorizontalLine /> | ||||||
|  | 
 | ||||||
|         <div className="grid gap-16"> |         <div className="grid gap-16"> | ||||||
|           {filterHasAttributes(chapters, [ |           {filterHasAttributes(chapters, [ | ||||||
|             "attributes.chronicles", |             "attributes.chronicles", | ||||||
|  | |||||||
| @ -57,6 +57,7 @@ import { useSmartLanguage } from "hooks/useSmartLanguage"; | |||||||
| import { getOpenGraph } from "helpers/openGraph"; | import { getOpenGraph } from "helpers/openGraph"; | ||||||
| import { getDescription } from "helpers/description"; | import { getDescription } from "helpers/description"; | ||||||
| import { useIntersectionList } from "hooks/useIntersectionList"; | import { useIntersectionList } from "hooks/useIntersectionList"; | ||||||
|  | import { HorizontalLine } from "components/HorizontalLine"; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *                                         ╭─────────────╮ |  *                                         ╭─────────────╮ | ||||||
| @ -130,9 +131,10 @@ const LibrarySlug = ({ | |||||||
|           title={langui.library} |           title={langui.library} | ||||||
|           langui={langui} |           langui={langui} | ||||||
|           displayOn={ReturnButtonType.Desktop} |           displayOn={ReturnButtonType.Desktop} | ||||||
|           horizontalLine |  | ||||||
|         /> |         /> | ||||||
| 
 | 
 | ||||||
|  |         <HorizontalLine /> | ||||||
|  | 
 | ||||||
|         <div className="grid gap-4"> |         <div className="grid gap-4"> | ||||||
|           <NavOption |           <NavOption | ||||||
|             title={langui.summary} |             title={langui.summary} | ||||||
|  | |||||||
| @ -69,7 +69,6 @@ const WikiPage = ({ | |||||||
|           title={langui.wiki} |           title={langui.wiki} | ||||||
|           langui={langui} |           langui={langui} | ||||||
|           displayOn={ReturnButtonType.Desktop} |           displayOn={ReturnButtonType.Desktop} | ||||||
|           horizontalLine |  | ||||||
|         /> |         /> | ||||||
|       </SubPanel> |       </SubPanel> | ||||||
|     ), |     ), | ||||||
|  | |||||||
| @ -33,6 +33,7 @@ import { datePickerToDate } from "helpers/date"; | |||||||
| import { TranslatedProps } from "helpers/types/TranslatedProps"; | import { TranslatedProps } from "helpers/types/TranslatedProps"; | ||||||
| import { TranslatedNavOption } from "components/PanelComponents/NavOption"; | import { TranslatedNavOption } from "components/PanelComponents/NavOption"; | ||||||
| import { useIntersectionList } from "hooks/useIntersectionList"; | import { useIntersectionList } from "hooks/useIntersectionList"; | ||||||
|  | import { HorizontalLine } from "components/HorizontalLine"; | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *                                           ╭────────╮ |  *                                           ╭────────╮ | ||||||
| @ -71,9 +72,10 @@ const Chronology = ({ | |||||||
|           title={langui.wiki} |           title={langui.wiki} | ||||||
|           langui={langui} |           langui={langui} | ||||||
|           displayOn={ReturnButtonType.Desktop} |           displayOn={ReturnButtonType.Desktop} | ||||||
|           horizontalLine |  | ||||||
|         /> |         /> | ||||||
| 
 | 
 | ||||||
|  |         <HorizontalLine /> | ||||||
|  | 
 | ||||||
|         {filterHasAttributes(chronologyEras, ["attributes", "id"] as const).map( |         {filterHasAttributes(chronologyEras, ["attributes", "id"] as const).map( | ||||||
|           (era, index) => ( |           (era, index) => ( | ||||||
|             <Fragment key={era.id}> |             <Fragment key={era.id}> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 DrMint
						DrMint