soames-gatsby-theme
Version:
A customizable Gatsby theme for personal websites using WordPress as a headless CMS.
18 lines (17 loc) • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const jsx_runtime_1 = require("react/jsx-runtime");
const gatsby_1 = require("gatsby");
const Logo = ({ title }) => {
const data = (0, gatsby_1.useStaticQuery)((0, gatsby_1.graphql) `
query LogoQuery {
wpMediaItem(title: { eq: "logo" }) {
title
guid
}
}
`);
const logo = data.wpMediaItem;
return ((0, jsx_runtime_1.jsx)("div", { className: "menu-logo", children: (0, jsx_runtime_1.jsx)("div", { className: "navbar-brand", children: (0, jsx_runtime_1.jsx)("span", { className: "navbar-caption-wrap", children: (0, jsx_runtime_1.jsxs)("a", { className: "navbar-caption text-white display-5", href: "/", children: [logo ? ((0, jsx_runtime_1.jsx)("img", { width: "108", alt: logo.title, src: logo.guid })) : ((0, jsx_runtime_1.jsx)("img", { width: "108", alt: "Orbi Software", src: "https://orbivision.net/wp-content/uploads/2023/01/punch_card.png" })), "\u00A0\u00A0", title] }) }) }) }));
};
exports.default = Logo;