Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions components/common/Button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const Button = styled.a`
line-height: 1.17648;
font-weight: 400;
letter-spacing: -.022em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
min-width: 28px;
padding-left: 16px;
padding-right: 16px;
Expand All @@ -23,18 +23,23 @@ const Button = styled.a`
border: 0;
outline: 0;

${({ compact }) => compact ? `
${({ size }) => size === "sm" ? `
font-size: 12px;
line-height: 1.33337;
font-weight: 400;
letter-spacing: -.01em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
min-width: 23px;
padding-left: 11px;
padding-right: 11px;
padding-top: 4px;
padding-bottom: 4px;
border-radius: 12px;
` : size === "lg" ? `
padding-left: 21px;
padding-right: 21px;
padding-top: 11px;
padding-bottom: 11px;
border-radius: 21px;
` : ``}
svg {
width: 1em;
Expand Down
2 changes: 1 addition & 1 deletion components/common/ColorSchemeToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ColorSchemeToggleWrap = styled.div`
line-height: 1.33337;
font-weight: 400;
letter-spacing: -.01em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
border: 1px solid var(--toggle-color-fill);
border-radius: var(--toggle-border-radius-outer, 2px);
display: inline-flex;
Expand Down
2 changes: 1 addition & 1 deletion components/common/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const FooterWrap = styled.footer`
line-height: 1.33337;
font-weight: 400;
letter-spacing: -.01em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
overflow: hidden;
position: relative;
z-index: 1;
Expand Down
10 changes: 5 additions & 5 deletions components/common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Title = styled.h2`
line-height: 1.14286;
font-weight: 600;
letter-spacing: -0.033em;
font-family: "SF Pro Display","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
cursor: default;
display: block;
margin: 0;
Expand Down Expand Up @@ -103,7 +103,7 @@ const Menu = styled.div`
line-height: 1;
font-weight: 400;
letter-spacing: -.01em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
display: flex;
align-items: center;
gap: 24px;
Expand Down Expand Up @@ -348,7 +348,7 @@ const MenuChevron = styled.span`
`;

function Header() {
const { asPath } = useRouter();
const router = useRouter();
const [isOpen, setIsOpen] = useState();
const menuRef = useRef();

Expand Down Expand Up @@ -397,7 +397,7 @@ function Header() {

return (
<MenuItem key={href} {...(isExternal ? { target: "_blank" } : {})}>
<MenuLink onClick={() => setIsOpen(false)} href={href} $current={asPath === href || (href !== "/" && asPath.startsWith(href))}>
<MenuLink onClick={() => setIsOpen(false)} href={href} $current={router.asPath === href || (href !== "/" && router.asPath.startsWith(href))}>
{item.title}
{isExternal && <StyledExternalLink size={11} />}
</MenuLink>
Expand All @@ -413,7 +413,7 @@ function Header() {
</MenuToggle>
</Action>
<Action>
<Button href="https://github.com/CodeEditApp/CodeEdit/releases/latest" target="_blank" compact>Download</Button>
<Button size="sm" onClick={() => router.push("/download")}>Download</Button>
</Action>
</Actions>
</Menu>
Expand Down
4 changes: 2 additions & 2 deletions components/common/IconButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Button = styled.a`
line-height: 1.17648;
font-weight: 400;
letter-spacing: -.022em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
min-width: 28px;
padding: 4px;
border-radius: 18px;
Expand All @@ -31,7 +31,7 @@ const Button = styled.a`
line-height: 1.33337;
font-weight: 400;
letter-spacing: -.01em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
min-width: 23px;
padding: 0;
border-radius: 12px;
Expand Down
2 changes: 1 addition & 1 deletion components/common/Ribbon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const RibbonContent = styled.div`
line-height: 1.42859;
font-weight: 400;
letter-spacing: -.016em;
font-family: "SF Pro Text","SF Pro Icons","Helvetica Neue","Helvetica","Arial",sans-serif;
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
`;

function Ribbon({ children, onClick, ...props }) {
Expand Down
6 changes: 6 additions & 0 deletions components/common/layout/Container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ const Container = styled.div`
padding-left: calc(max(${gutter}px, env(safe-area-inset-left)));
padding-right: calc(max(${gutter}px, env(safe-area-inset-right)));
position: relative;
@media ${mediaQueries.md} {
margin-left: auto;
margin-right: auto;
width: 692px;
}
@media ${mediaQueries.sm} {
max-width: 366px;
width: calc(100% - ${smallGutter}px * 2);
padding: 0 ${smallGutter}px;
padding-left: calc(max(${smallGutter}px, env(safe-area-inset-left)));
Expand Down
66 changes: 66 additions & 0 deletions components/pages/blog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const TileItem = styled.li`
&.item-portrait-secondary {
& ~ .tile-item {
margin-top: 36px;
@media ${mediaQueries.md} {
margin-top: 22px;
}
}
}
}
Expand Down Expand Up @@ -117,10 +120,22 @@ const TileWrap = styled(Link)`
&.tile-2up {
flex-direction: column;
width: 472px;
@media ${mediaQueries.md} {
width: 333px;
}
@media ${mediaQueries.sm} {
width: 100%;
}
}
&.tile-3up {
flex-direction: column;
width: 303px;
@media ${mediaQueries.md} {
width: 333px;
}
@media ${mediaQueries.sm} {
width: 100%;
}
}
`;
const TileMedia = styled.div`
Expand All @@ -136,6 +151,13 @@ const TileMedia = styled.div`
min-height: 362px;
flex-basis: 643px;
flex-shrink: 1;
@media ${mediaQueries.md} {
width: 100%;
height: auto;
min-height: 255px;
flex-basis: 453px;
flex-shrink: 1;
}
@media ${mediaQueries.sm} {
flex-basis: auto;
min-height: 0;
Expand All @@ -149,6 +171,13 @@ const TileMedia = styled.div`
min-height: auto;
flex-basis: auto;
flex-shrink: 1;
@media ${mediaQueries.md} {
width: 100%;
height: 187px;
min-height: auto;
flex-basis: auto;
flex-shrink: 1;
}
}

.tile-3up & {
Expand Down Expand Up @@ -186,6 +215,9 @@ const TileDescription = styled.div`
padding: 32px;
justify-content: space-between;
flex-basis: 0;
@media ${mediaQueries.md} {
padding: 24px;
}
@media ${mediaQueries.sm} {
padding: 24px;
}
Expand All @@ -195,6 +227,9 @@ const TileDescription = styled.div`
padding: 32px;
justify-content: space-between;
flex-basis: auto;
@media ${mediaQueries.md} {
padding: 24px;
}
@media ${mediaQueries.sm} {
padding: 19px;
}
Expand Down Expand Up @@ -223,9 +258,15 @@ const TileCategory = styled.div`

.tile-1up & {
margin-bottom: 8px;
@media ${mediaQueries.md} {
margin-bottom: 8px;
}
}
.tile-2up & {
margin-bottom: 8px;
@media ${mediaQueries.md} {
margin-bottom: 8px;
}
}
.tile-3up & {
margin-bottom: 8px;
Expand All @@ -250,6 +291,14 @@ const TileHeadline = styled.div`
-webkit-box-orient: vertical;
display: -webkit-box;
overflow: hidden;
@media ${mediaQueries.md} {
font-size: 21px;
line-height: 1.19048;
font-weight: 700;
letter-spacing: 0.011em;
font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue',
'Helvetica', 'Arial', sans-serif;
}
@media ${mediaQueries.sm} {
font-size: 24px;
}
Expand All @@ -266,6 +315,14 @@ const TileHeadline = styled.div`
-webkit-box-orient: vertical;
display: -webkit-box;
overflow: hidden;
@media ${mediaQueries.md} {
font-size: 19px;
line-height: 1.21053;
font-weight: 700;
letter-spacing: 0.012em;
font-family: 'SF Pro Display', 'SF Pro Icons', 'Helvetica Neue',
'Helvetica', 'Arial', sans-serif;
}
}

.tile-3up & {
Expand Down Expand Up @@ -295,12 +352,21 @@ const TileTimestamp = styled.div`

.tile-quick-read.tile-1up & {
margin-top: 16px;
@media ${mediaQueries.md} {
margin-top: 12px;
}
}
.tile-1up & {
margin-top: 12px;
@media ${mediaQueries.md} {
margin-top: 12px;
}
}
.tile-2up & {
margin-top: 12px;
@media ${mediaQueries.md} {
margin-top: 8px;
}
}
.tile-3up & {
margin-top: 8px;
Expand Down
9 changes: 7 additions & 2 deletions components/pages/blog/post/ArticleHeader.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import Image from "next/image";
import ShareSheet from "./ShareSheet";
import styled from "styled-components";
import config from '@/data/config';

const ArticleHeaderWrap = styled.div`
.category.component {
margin-top: 0;
margin-bottom: 20px;
}

.category-eyebrow__category {
text-transform: uppercase;
}

.category-eyebrow__category,
.category-eyebrow__date {
display: block;
Expand Down Expand Up @@ -128,8 +133,8 @@ const ArticleHeader = ({ frontmatter, author }) => {
<div className="category component">
<div className="component-content">
<div className="category-eyebrow">
<span className="category-eyebrow__category category_update">
UPDATE
<span className="category-eyebrow__category">
{config.categories[frontmatter.category ?? "updates"]?.title ?? config.categories.updates.title}
</span>
<span className="category-eyebrow__date">
{formatDate(frontmatter.date)}
Expand Down
Loading