From 021d0db0bf4304521c6c5f566e8449cdc9df52f6 Mon Sep 17 00:00:00 2001 From: Steve Persch Date: Mon, 29 Apr 2024 12:04:57 -0500 Subject: [PATCH] Delete src/templates/resource.js (#8967) It appears this file is not used at all, but it does through a warning during the Gatsby build process. --- src/templates/resource.js | 164 -------------------------------------- 1 file changed, 164 deletions(-) delete mode 100644 src/templates/resource.js diff --git a/src/templates/resource.js b/src/templates/resource.js deleted file mode 100644 index 3ce1e1c471..0000000000 --- a/src/templates/resource.js +++ /dev/null @@ -1,164 +0,0 @@ -import React from "react" -import { graphql } from "gatsby" -import { MDXRenderer } from "gatsby-plugin-mdx" -import { MDXProvider } from "@mdx-js/react" - -import Layout from "../layout/layout" -import HeaderBody from "../components/headerBody" - -import Callout from "../components/callout" -import Alert from "../components/alert" -import Accordion from "../components/accordion" -import ExternalLink from "../components/externalLink" -import Icon from "../components/icon" -import Popover from "../components/popover" -import TabList from "../components/tabList" -import Tab from "../components/tab" -import TOC from "../components/toc" -import GetFeedback from "../components/getFeedback" -import Card from "../components/card" -import CardGroup from "../components/cardGroup" -import SEO from "../layout/seo" -import Enablement from "../components/enablement" -import Color from "../components/color.js" -import Download from "../components/download" -import Partial from "../components/partial" -import Image from "../layout/image" -import Example from "../components/styleExample" -import LocaldevChangelog from "../components/localdevChangelog" -import DrushChangelog from "../components/drushChangelog" -import ReviewDate from "../components/reviewDate" -import ResourceSelector from "../components/resourceSelector" - -const shortcodes = { - Callout, - Alert, - Accordion, - ExternalLink, - Icon, - Popover, - TabList, - Tab, - Card, - CardGroup, - Enablement, - Color, - Download, - Partial, - Image, - Example, - LocaldevChangelog, - DrushChangelog, - ReviewDate, - ResourceSelector, -} - -class ResourceTemplate extends React.Component { - componentDidMount() { - $("[data-toggle=popover]").popover({ - trigger: "click", - placement: "right", - }) - - $("body").on("click", function (e) { - $('[data-toggle="popover"]').each(function () { - if ( - !$(this).is(e.target) && - $(this).has(e.target).length === 0 && - $(".popover").has(e.target).length === 0 - ) { - $(this).popover("hide") - } - }) - }) - - $("body").keyup(function (e) { - $('[data-toggle="popover"]').each(function () { - if (event.which === 27) { - $(this).popover("hide") - } - }) - }) - } - - render() { - const node = this.props.data.page - const isoDate = this.props.data.date - - return ( - - -
-
-
- -
- - {node.body} - -
-
- {/* */} -
-
-
- ) - } -} - -export default ResourceTemplate - -export const pageQuery = graphql` - query PageBySlug($slug: String!) { - page: mdx(fields: { slug: { eq: $slug } }) { - id - body - fields { - slug - editPath - } - frontmatter { - title - description - categories - contributors { - yamlId - name - twitter - bio - avatar - url - } - featuredcontributor - reviewed(formatString: "MMMM DD, YYYY") - tags - type - } - fileAbsolutePath - } - date: mdx(fields: { slug: { eq: $slug } }) { - frontmatter { - reviewed - } - } - } -`