Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const Contributors = (props: ContributorsProps) => {
}, []);

return (
<div className="whitespace-tight raised" style={{ padding: 0 }}>
<div className="whitespace-tight raised no-print" style={{ padding: 0 }}>
<Row className="justify-between small-columns">
<Section sKey="pr">
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const NextPrev = (props: NextPrevProps) => {
const next = props.next && props.next.childMarkdownRemark.frontmatter

return (
<div className="whitespace-tight raised">
<div className="whitespace-tight raised no-print">
<Row className="justify-between">
{!prev ? <EmptyLink /> : <LinkSection i={props.i} data={prev} InltLink={props.IntlLink} type="prev" />}
<div className="hide-small vertical-line" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const Sidebar = (props: Props) => {
}

return (
<nav id="sidebar">
<nav id="sidebar" className="np-print">
<ul>
{props.navItems.map(item => <RenderItem key={item.id} item={item} openAllSectionsExceptWhatsNew={props.openAllSectionsExceptWhatsNew} selectedID={props.selectedID} />)}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export const SiteFooter = (props: Props) => {
const hideDocs = props.suppressDocRecommendations
const lang = props.lang
return (
<footer id="site-footer" role="contentinfo">
<footer id="site-footer" role="contentinfo" className="no-print">
{props.suppressCustomization ? null : <Customize />}

{hideDocs ? null :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const SiteNav = (props: Props) => {


return (
<header dir="ltr">
<header dir="ltr" className="no-print">
<a className="skip-to-main" href={props.skipToAnchor || '#site-content'} tabIndex={0}>{i("skip_to_content")}</a>

<div id="top-menu" className="up">
Expand Down
11 changes: 11 additions & 0 deletions packages/typescriptlang-org/src/style/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,14 @@ $z-index-for-search: 100;
$z-index-for-site-nav: 101;
$z-index-for-handbook-nav: 99;
$z-index-for-handbook-nav-button: 100;

// add print media query
@media print {
.no-print, .no-print * {
display: none !important;
}
.code-container {
display: block;
break-inside: avoid;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const HandbookTemplate: React.FC<Props> = (props) => {
<MarkdownHeadingTree tree={headerListToTree(sidebarHeaders)} className="handbook-on-this-page-section-list" slug={slug} />
</>
}
<div id="like-dislike-subnav">
<div id="like-dislike-subnav" className="no-print">
<h5>{i("handb_like_dislike_title")}</h5>
<div>
<button title="Like this page" id="like-button"><LikeUnfilledSVG /> {i("handb_like_desc")}</button>
Expand Down