11import * as React from "react"
22import { useState } from "react"
33
4- import styled from "styled-components"
5-
64import { useMediaQuery } from "react-responsive"
75import { device } from "../components/util/styles/breakpoints"
86import ExtensionCard from "../components/extension-card"
@@ -13,81 +11,7 @@ import Sortings from "../components/sortings/sortings"
1311import { slugForExtensionsAddedYear } from "../components/util/extension-slugger"
1412import Link from "gatsby-link"
1513import { ExtensionCardList } from "../components/extensions-list"
16-
17- const FilterableList = styled . div `
18- display: flex;
19- justify-content: space-between;
20- flex-direction: row;
21-
22- // noinspection CssUnknownProperty
23- @media ${ device . sm } {
24- flex-direction: column;
25- }
26- `
27-
28- const Extensions = styled . ol `
29- list-style: none;
30- width: 100%;
31- padding-inline-start: 0;
32- grid-template-rows: repeat(auto-fill, 1fr);
33- display: grid;
34- grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
35- gap: 30px;
36-
37- // noinspection CssUnknownProperty
38- @media ${ device . xs } {
39- display: flex;
40- flex-direction: column;
41- }
42- `
43-
44- const CardItem = styled . li `
45- height: 100%;
46- width: 100%;
47- display: flex;
48- max-height: 34rem;
49- `
50-
51- const InfoSortRow = styled . div `
52- display: flex;
53- column-gap: var(--a-generous-space);
54- justify-content: space-between;
55- flex-direction: row;
56-
57- // noinspection CssUnknownProperty
58- @media ${ device . sm } {
59- flex-direction: column;
60- margin-top: 0;
61- }
62- `
63-
64- const Heading = styled . h1 `
65- font-size: 3rem;
66- @media screen and (max-width: 768px) {
67- font-size: 2rem;
68- }
69- font-weight: var(--font-weight-boldest);
70- margin: 2.5rem 0 1.5rem 0;
71- padding-bottom: var(--a-modest-space);
72- width: calc(100vw - 2 * var(--site-margins));
73- // noinspection CssUnknownProperty
74- @media ${ device . xs } {
75- border-bottom: 1px solid var(--card-outline);
76- }
77- `
78-
79- const ExtensionCount = styled . h4 `
80- margin-top: 1.25rem;
81- margin-bottom: 0.5rem;
82- font-size: 1rem;
83- font-weight: 400;
84- font-style: italic;
85-
86- // noinspection CssUnknownProperty
87- @media ${ device . sm } {
88- font-size: var(--font-size-14);
89- }
90- `
14+ import { CardItem , ExtensionCount , Extensions , FilterableList , Heading , InfoSortRow } from "./extensions-added-list"
9115
9216const prettyDate = ( timestamp ) => new Date ( + timestamp ) . getFullYear ( )
9317
@@ -140,7 +64,7 @@ const ExtensionsAddedByYearListTemplate = (
14064 const yearTimestamp = extensions [ 0 ] . metadata . maven . sinceYear
14165 const now = new Date ( )
14266 const date = new Date ( + yearTimestamp )
143- const verb = now . getFullYear ( ) === date . getFullYear ( ) && now . getUTCFullYear ( ) === date . getUTCFullYear ( ) ? "have been" : "were"
67+ const verb = now . getFullYear ( ) === date . getFullYear ( ) ? "have been" : "were"
14468
14569 if ( extensions && extensions . length > 0 ) {
14670
@@ -158,7 +82,6 @@ const ExtensionsAddedByYearListTemplate = (
15882
15983 const countMessage = `${ extensionCount } new extensions ${ verb } added this year.`
16084
161-
16285 const name = `Extensions added in ${ formattedYear } `
16386
16487 return (
0 commit comments