Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add print query to the website #3205

Open
wants to merge 3 commits into
base: v2
Choose a base branch
from
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 @@ -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;
}
}