-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from torontojs/chore/reformat
Chore: reformat project
- Loading branch information
Showing
82 changed files
with
1,042 additions
and
1,143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
.user-avatar { | ||
--image-size: var(--size-13); | ||
|
||
display: block; | ||
|
||
width: var(--image-size); | ||
height: var(--image-size); | ||
aspect-ratio: var(--ratio-square); | ||
border-radius: var(--radius-round); | ||
overflow: hidden; | ||
border: solid var(--title-color) var(--size-2); | ||
border-radius: var(--radius-round); | ||
box-shadow: var(--size-1) var(--size-1) var(--size-1) var(--gray-12); | ||
display: block; | ||
height: var(--image-size); | ||
overflow: hidden; | ||
width: var(--image-size); | ||
} | ||
|
||
.user-avatar img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
object-position: center; | ||
width: 100%; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.user-avatar { --image-size: var(--size-12); } | ||
} | ||
@media (max-width: 768px) { .user-avatar { --image-size: var(--size-12); } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,105 +1,3 @@ | ||
--- | ||
import { pwaInfo } from 'virtual:pwa-info'; | ||
import defaultSocialImage from '../../assets/icons/logo.svg'; | ||
import printStylesheet from './print.css?url'; | ||
interface Props { | ||
htmlTitle?: string[], | ||
title: string, | ||
url: string, | ||
description: string, | ||
tags?: string[], | ||
authors?: string[], | ||
image?: string, | ||
imageAlt?: string, | ||
createdAt?: Date, | ||
updatedAt?: Date, | ||
hasFeed?: boolean | ||
} | ||
const { | ||
htmlTitle, title, url, | ||
description, tags, | ||
authors, | ||
image, imageAlt, | ||
createdAt: publishedDate, | ||
updatedAt: updatedDate, | ||
hasFeed = false | ||
} = Astro.props; | ||
const BLOG_URL = Astro.site?.href; | ||
const fullUrl = new URL(url, Astro.site).toString(); | ||
const socialImageAlt = imageAlt ?? 'Logo for TorontoJS, consisting of a red square with the letters "JS" in black on the left, and a sillouette of the CN Tower seen from the ground up on the right.'; | ||
const socialImage = `${BLOG_URL}${(image ?? defaultSocialImage.src).replace(/^\//iu, '')}`; | ||
--- | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
|
||
<title>{htmlTitle?.join(' | ') ?? title}</title> | ||
|
||
<!-- URLs --> | ||
<link rel="canonical" href={fullUrl} /> | ||
<link rel="sitemap" href={`${BLOG_URL}sitemap-index.xml`} /> | ||
{ hasFeed && <link rel="alternate" type="application/rss+xml" href={`${BLOG_URL}feed.xml`} title="TorontoJS Blog" /> } | ||
|
||
<!-- App Metadata --> | ||
<link rel="icon" href={`${BLOG_URL}icons/icon.svg`} sizes="any" type="image/svg+xml" /> | ||
<meta name="theme-color" content="#ee2e24" /> | ||
<link rel="license" href={`${BLOG_URL}license`} /> | ||
|
||
{/* eslint-disable-next-line astro/no-set-html-directive */} | ||
{pwaInfo && (<Fragment set:html={pwaInfo.webManifest.linkTag} />)} | ||
|
||
<!-- Social metadata --> | ||
<meta property="og:title" name="twitter:title" itemprop="name" content={title} /> | ||
|
||
<meta property="og:type" content={hasFeed ? 'article' : 'website'} /> | ||
<meta name="twitter:card" content={socialImage ? 'summary_large_image' : 'summary'} /> | ||
|
||
<meta property="og:locale" itemprop="inLanguage" content="en_US" /> | ||
<meta property="og:url" itemprop="url" content={fullUrl} /> | ||
|
||
<meta property="og:description" name="description" itemprop="abstract" content={description} /> | ||
<meta name="twitter:description" content={description} /> | ||
|
||
<meta property="og:image" name="twitter:image" itemprop="image" content={socialImage} /> | ||
<meta property="og:image:alt" name="twitter:image:alt" content={socialImageAlt} /> | ||
|
||
{authors?.map((author) => ( | ||
<> | ||
<meta property="article:author" name="author" content={author} /> | ||
<meta name="twitter:creator" content={author} /> | ||
<!-- TODO: fix to specifically reference to twitter handle --> | ||
</> | ||
))} | ||
|
||
<meta name="twitter:dnt" content="on" /> | ||
<meta name="twitter:widgets:csp" content="on" /> | ||
<meta name="twitter:widgets:autoload" content="off" /> | ||
<meta name="twitter:widgets:theme" content="dark" /> | ||
|
||
<meta name="generator" content={Astro.generator} /> | ||
|
||
{tags && (<meta name="keywords" itemprop="keywords" property="article:tag" content={tags.join(', ')} />)} | ||
{publishedDate && (<meta property="article:published_time" content={publishedDate.toISOString()} />)} | ||
{updatedDate && (<meta property="article:modified_time" content={updatedDate.toISOString()} />)} | ||
|
||
<!-- Changelog --> | ||
<link rel="alternate" type="application/rss+xml" href={`${BLOG_URL}changelog.xml`} title="Changelog (Version History)" /> | ||
|
||
<!-- Apple icons --> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | ||
|
||
<!-- Print Stylesheet --> | ||
<link rel="stylesheet" type="text/css" href={printStylesheet} media="print" /> | ||
|
||
<!-- Fonts --> | ||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,700|Inter:400,700" rel="stylesheet" /> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.