diff --git a/packages/playground/src/index.ts b/packages/playground/src/index.ts
index d8f1cfa02694..fc01ecec4c66 100644
--- a/packages/playground/src/index.ts
+++ b/packages/playground/src/index.ts
@@ -191,21 +191,21 @@ export const setupPlayground = (
const lenses = !showFileCodeLens
? []
: [
- {
- range: {
- startLineNumber: 1,
- startColumn: 1,
- endLineNumber: 2,
- endColumn: 1,
- },
- id: "implicit-filename-first",
- command: {
- id: "noop",
- title: `// @filename: ${sandbox.filepath}`,
- },
+ {
+ range: {
+ startLineNumber: 1,
+ startColumn: 1,
+ endLineNumber: 2,
+ endColumn: 1,
},
- ]
- return { lenses, dispose: () => {} }
+ id: "implicit-filename-first",
+ command: {
+ id: "noop",
+ title: `// @filename: ${sandbox.filepath}`,
+ },
+ },
+ ]
+ return { lenses, dispose: () => { } }
},
})
@@ -338,7 +338,7 @@ export const setupPlayground = (
a.parentElement!.classList.toggle("open")
a.setAttribute("aria-expanded", "true")
- const exampleContainer = a.closest("li")!.getElementsByTagName("ul").item(0)
+ const exampleContainer = a.closest("li")!.getElementsByClassName("dropdown-dialog").item(0) as HTMLElement
if (!exampleContainer) return
const firstLabel = exampleContainer.querySelector("label") as HTMLElement
@@ -359,7 +359,7 @@ export const setupPlayground = (
if (lastButton) {
redirectTabPressTo(lastButton, exampleContainer, ".examples-close")
} else {
- const sections = document.querySelectorAll("ul.examples-dropdown .section-content")
+ const sections = document.querySelectorAll(".dropdown-dialog .section-content")
sections.forEach(s => {
const buttons = s.querySelectorAll("a.example-link")
const lastButton = buttons.item(buttons.length - 1) as HTMLElement
diff --git a/packages/typescriptlang-org/src/components/ShowExamples.scss b/packages/typescriptlang-org/src/components/ShowExamples.scss
index 30116819454b..5127a2485e88 100644
--- a/packages/typescriptlang-org/src/components/ShowExamples.scss
+++ b/packages/typescriptlang-org/src/components/ShowExamples.scss
@@ -14,8 +14,28 @@
color: var(--link-color);
}
+ button.section-name {
+ font-size: 2rem;
+ font-weight: 600;
+
+ height: 2.8rem;
+ text-decoration: none;
+ border-bottom: none;
+ padding-bottom: 0.05rem;
+ margin-top: 0;
+ padding-top: 0;
+ margin-right: 1rem;
+ border: none;
+ background-color: transparent;
+ color: var(--text-color);
+ }
+
+ button.section-name.selected {
+ border-bottom: $ts-main-blue-color 2px solid;
+ }
+
// The titles of the sections
- > ol {
+ >ol {
padding-left: 0;
li {
@@ -28,26 +48,6 @@
background-color: transparent;
}
}
-
- button.section-name {
- font-size: 2rem;
- font-weight: 600;
-
- height: 2.8rem;
- text-decoration: none;
- border-bottom: none;
- padding-bottom: 0.05rem;
- margin-top: 0;
- padding-top: 0;
- margin-right: 1rem;
- border: none;
- background-color: transparent;
- color: var(--text-color);
- }
-
- button.section-name.selected {
- border-bottom: $ts-main-blue-color 2px solid;
- }
}
ol {
@@ -56,11 +56,11 @@
padding-left: 0;
}
- > div.section-content {
+ >div.section-content {
flex-wrap: wrap;
display: flex;
- > p > a {
+ >p>a {
display: inline-block;
color: $ts-main-blue-color;
padding: 0;
@@ -118,6 +118,7 @@
&.done {
background-color: $ts-main-blue-darker-color;
}
+
&.changed {
border: $ts-main-blue-darker-color 1px solid;
}
@@ -126,4 +127,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/packages/typescriptlang-org/src/components/ShowExamples.tsx b/packages/typescriptlang-org/src/components/ShowExamples.tsx
index 8630312eb2b3..92443572919d 100644
--- a/packages/typescriptlang-org/src/components/ShowExamples.tsx
+++ b/packages/typescriptlang-org/src/components/ShowExamples.tsx
@@ -108,18 +108,16 @@ export const RenderExamples = (props: Props) => {
const sections = props.sections.map(sectionID => locale.sections.find(localeSection => sectionID === localeSection.id) || english.sections.find(localeSection => sectionID === localeSection.id))
return (
-
+
{sections.map(section => {
const startOpen = section.id === props.defaultSection
const selectedClass = startOpen ? " selected" : ""
return (
-
-
-
-
+
)
}
)}
-
+
{sections.map(section => {
const sectionDict = sortedSectionsDictionary(locale, section)
diff --git a/packages/typescriptlang-org/src/components/layout/SiteFooter-PlaygroundSamples.tsx b/packages/typescriptlang-org/src/components/layout/SiteFooter-PlaygroundSamples.tsx
index e3561e306dd3..e8dd3572c7f9 100644
--- a/packages/typescriptlang-org/src/components/layout/SiteFooter-PlaygroundSamples.tsx
+++ b/packages/typescriptlang-org/src/components/layout/SiteFooter-PlaygroundSamples.tsx
@@ -50,7 +50,7 @@ export const PlaygroundSamples = (props: Props) => {
}, []);
return (
-
+
)
diff --git a/packages/typescriptlang-org/src/components/layout/TopNav.tsx b/packages/typescriptlang-org/src/components/layout/TopNav.tsx
index c90245dfb05d..12dab9f44515 100644
--- a/packages/typescriptlang-org/src/components/layout/TopNav.tsx
+++ b/packages/typescriptlang-org/src/components/layout/TopNav.tsx
@@ -30,7 +30,7 @@ export const SiteNav = (props: Props) => {
// @ts-ignore - this comes from the script above
docsearch({
- appId:"BGCDYOIYZ5",
+ appId: "BGCDYOIYZ5",
apiKey: '37ee06fa68db6aef451a490df6df7c60',
indexName: 'typescriptlang',
inputSelector: '.search input',
@@ -99,8 +99,7 @@ export const SiteNav = (props: Props) => {
diff --git a/packages/typescriptlang-org/src/copy/en/community.ts b/packages/typescriptlang-org/src/copy/en/community.ts
index 2d9cc242c6d1..fc5c0b67df10 100644
--- a/packages/typescriptlang-org/src/copy/en/community.ts
+++ b/packages/typescriptlang-org/src/copy/en/community.ts
@@ -1,8 +1,8 @@
export const comCopy = {
- com_layout_title: "How to set up TypeScript", // FIXME: Is this the right title for the community page?
+ com_layout_title: "TypeScript Community Resources",
com_layout_description:
"Connect with other TypeScripters online and offline.",
- com_headline: "Connect with us", // FIXME: I think this is not used anywhere
+ com_headline: "Connect with us",
com_connect_online: "Online",
com_connect_online_description:
" Tell us what’s working well, what you want to see added or improved, and find out about new updates.",
diff --git a/packages/typescriptlang-org/src/templates/documentation.scss b/packages/typescriptlang-org/src/templates/documentation.scss
index c18b4a48b4f1..636764604b1f 100644
--- a/packages/typescriptlang-org/src/templates/documentation.scss
+++ b/packages/typescriptlang-org/src/templates/documentation.scss
@@ -1,13 +1,11 @@
@import "../style/globals.scss";
#beta {
- background: repeating-linear-gradient(
- 45deg,
- #9b9a4e,
- #9b9a4e 10px,
- #6e6a33 10px,
- #6e6a33 20px
- );
+ background: repeating-linear-gradient(45deg,
+ #9b9a4e,
+ #9b9a4e 10px,
+ #6e6a33 10px,
+ #6e6a33 20px);
background-color: "#c63131";
text-align: center;
color: white;
@@ -32,7 +30,7 @@
}
// Page title
- & > h2 {
+ &>h1 {
font-size: 3.5rem;
line-height: 3.5rem;
font-weight: 400;
@@ -76,9 +74,11 @@
nav {
position: sticky;
top: 30px;
+
&.deprecated {
top: 7rem;
}
+
margin-bottom: 1rem;
}
@@ -120,6 +120,7 @@
}
.like-dislike-subnav {
+
#like-button,
#dislike-button {
cursor: pointer;
@@ -130,6 +131,7 @@
.preamble a {
color: var(--text-color);
}
+
.justify-between {
justify-content: space-between;
}
@@ -269,6 +271,7 @@
margin: 0 0 0 0;
padding: 1rem;
flex-direction: column;
+
h3 {
font-size: 0.8rem;
}
@@ -276,6 +279,7 @@
#deprecated-icon {
margin-right: 1rem;
}
+
#deprecated-action {
margin-top: 1rem;
}
@@ -325,24 +329,30 @@
tr {
width: 100%;
+
p {
margin: 0;
padding: 0;
}
+
code {
word-wrap: normal;
}
}
+
// Override the default stripes
tr.odd {
background-color: var(--background-color) !important;
}
+
tr.even {
background-color: var(--background-minor-highlight-color) !important;
}
+
ul {
margin: 0;
padding: 0;
+
li {
list-style: none;
margin: 0;
@@ -446,4 +456,4 @@
-webkit-animation: 0.1s ease forwards;
animation: 0.1s ease forwards;
}
-}
+}
\ No newline at end of file
diff --git a/packages/typescriptlang-org/src/templates/documentation.tsx b/packages/typescriptlang-org/src/templates/documentation.tsx
index 0cae8d84ece4..7b698c2e1fd7 100644
--- a/packages/typescriptlang-org/src/templates/documentation.tsx
+++ b/packages/typescriptlang-org/src/templates/documentation.tsx
@@ -96,7 +96,7 @@ const HandbookTemplate: React.FC = (props) => {