diff --git a/ui/src/components/search/SearchPagination.tsx b/ui/src/components/search/SearchPagination.tsx index 71e3f7d35..0d73703bd 100644 --- a/ui/src/components/search/SearchPagination.tsx +++ b/ui/src/components/search/SearchPagination.tsx @@ -26,6 +26,7 @@ const SearchPagination: React.FC = ({ count, params }) => { showSizeChanger={false} current={Number(params?.page) || 1} hideOnSinglePage + className="md:mb-0 mb-3" /> ); }; diff --git a/ui/src/components/search/SearchResults.tsx b/ui/src/components/search/SearchResults.tsx index 1ab444d5c..81716e456 100644 --- a/ui/src/components/search/SearchResults.tsx +++ b/ui/src/components/search/SearchResults.tsx @@ -44,8 +44,8 @@ const SearchResults: React.FC = ({ return (
-
-

Found {count} results.

+
+

Found {count} results.

{count > 0 && ( @@ -72,7 +72,7 @@ const SearchResults: React.FC = ({ ))} -
+
diff --git a/ui/src/components/shared/Header.tsx b/ui/src/components/shared/Header.tsx index 2e7400346..11ddca00c 100644 --- a/ui/src/components/shared/Header.tsx +++ b/ui/src/components/shared/Header.tsx @@ -1,5 +1,5 @@ /* eslint-disable react/jsx-key */ -import React, { useState } from "react"; +import React, { MouseEventHandler, useState } from "react"; import Image from "next/image"; import Link from "next/link"; import { Button } from "antd"; @@ -10,6 +10,7 @@ import { BASE_URL } from "@/utils/utils"; interface MenuProps { items: MenuItem[]; + onClick?: MouseEventHandler; mobile?: boolean; collapsed?: boolean; } @@ -48,6 +49,7 @@ const labels = [ const Menu: React.FC = ({ items, + onClick = () => {}, mobile = false, collapsed = true, }) => ( @@ -57,7 +59,7 @@ const Menu: React.FC = ({ }`} > {items.map((item: MenuItem) => ( -
  • +
  • {item.label}
  • ))} @@ -90,7 +92,12 @@ const Header: React.FC = () => {
    - +
    ); }; diff --git a/ui/src/components/shared/JsonPreview.tsx b/ui/src/components/shared/JsonPreview.tsx index 54cf39d11..a5de230b7 100644 --- a/ui/src/components/shared/JsonPreview.tsx +++ b/ui/src/components/shared/JsonPreview.tsx @@ -10,6 +10,7 @@ interface JsonPreviewProps { export const JsonPreview = ({ article }: JsonPreviewProps) => { return ( = ({ article }) => { return ( -
    -
    -
    +
    +
    +

    {ReactHtmlParser(article?.title)} @@ -31,14 +31,12 @@ const RecordPage: React.FC = ({ article }) => {

    {ReactHtmlParser(article?.abstract)}

    + +

    +
    +
    -
    - -
    -
    -
    -
    ); diff --git a/ui/src/styles/globals.css b/ui/src/styles/globals.css index 8f7341357..b34b3c403 100644 --- a/ui/src/styles/globals.css +++ b/ui/src/styles/globals.css @@ -125,7 +125,7 @@ a { align-items: flex-start; margin: 10px 0; border-top: 1px solid #7a5380; - height: 280px; + height: 300px; } .header .ant-btn { @@ -297,11 +297,6 @@ a { padding: 15px 0; } -.search-facets { - width: 25%; - padding: 0 15px; -} - .search-results { width: 75%; padding: 0 15px; @@ -364,7 +359,25 @@ a { font-size: 85%; } +@media (max-width: 1024px) { + .search { + flex-direction: column; + justify-content: center; + align-items: center; + } + + .search-results { + order: 1; + width: 100%; + } +} + /* Facets */ +.search-facets { + width: 25%; + padding: 0 15px; +} + .badge.dark { font-weight: bold; color: #fff; @@ -446,10 +459,23 @@ a { left: 80% !important; } +@media (max-width: 1024px) { + .search-facets { + order: 2; + width: 100%; + } +} + /* DETAIL */ .detail-page-main { padding: 0 15px; + width: 75%; +} + +.detail-page-right { + width: 20%; + padding-left: 15px; } .detail-page-right dt { @@ -498,7 +524,12 @@ a { display: block; } -@media (max-width: 1024px) { +.json-preview-content { + background: rgba(0, 0, 0, 0.02); + line-break: anywhere; +} + +@media (max-width: 767px) { .detail-page-main { width: 100%; padding: 0; @@ -528,31 +559,6 @@ a { font-size: 1.2rem; } -.json-preview-content { - background: rgba(0, 0, 0, 0.02); -} - -#json-preview-card .ant-card-body { - padding: 0; -} - - /* ERROR PAGES */ - -.error-page { - color: #777; - margin: 15% auto; - text-align: center; -} - -.error-page .anticon { - font-size: 5rem; - margin-bottom: 1rem; -} - -.error-page p { - font-size: 1.2rem; -} - /* PARTNERS */ .partners {