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

Improve print stylesheet #562

Open
wants to merge 2 commits into
base: master
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
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ body {
height: 100%;
overflow-x:hidden;
-webkit-overflow-scrolling: touch;
-webkit-print-color-adjust: exact;
background: #f5f5f5;
color: #555;
font-size: 14px;
Expand Down
17 changes: 15 additions & 2 deletions client/src/modules/index/components/Container.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@ import {
toggleEditDay
} from 'modules/index/redux';
import { createApiActions } from 'resource/actions';
import { media } from 'styled';

const mapStateToProps = (state, ownProps) => {
const {
history,
match: { params: { category } },
match: {
params: { category }
},
location: { search }
} = ownProps;
const services = _.get(state, 'resource.data.services', {});
Expand Down Expand Up @@ -80,7 +83,10 @@ const mapDispatchToProps = dispatch => {
);
};

export default connect(mapStateToProps, mapDispatchToProps)(
export default connect(
mapStateToProps,
mapDispatchToProps
)(
class Container extends Component {
constructor(props) {
super(props);
Expand Down Expand Up @@ -277,3 +283,10 @@ const Content = styled.div`
position: relative;
margin: 10px;
`;
const PrintHeader = styled.div`
display: none;
${media.print`
display: block;
height: 100px;
`};
`;
20 changes: 19 additions & 1 deletion client/src/modules/index/components/QuarterView/Desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ const Grid = styled.table`
font-size: 11px;
min-width: 0;
width: 100%;
border: solid 2px black;
zoom: 94%;
`};
`;
const Cell = styled.td`
Expand All @@ -211,6 +213,8 @@ const Cell = styled.td`
line-height: 1.3;
padding: 8px 4px;
white-space: normal;
border: dashed 1px black;
word-break: break-word;
`};
`;
const Header = styled(Cell)`
Expand All @@ -222,6 +226,10 @@ const Header = styled(Cell)`
text-align: center;
${media.print`
font-size: 11px;
background-color: #242a34;
border-bottom: solid 2px black;
border-top: solid 2px black;
color: white;
`};
`;
const DayCell = styled(Cell)`
Expand All @@ -234,6 +242,8 @@ const DayCell = styled(Cell)`
${media.print`
text-align: center;
white-space: nowrap;
border-right: dashed 1px black;
color: black;
`};
`;
const NameCell = styled(Cell)`
Expand All @@ -244,6 +254,11 @@ const NameCell = styled(Cell)`
border-width: 1px 1px 1px 0;
}
${props => props.isSelected && `z-index: 1`};
${media.print`
&[colspan] {
border-color: black;
}
`};
`;
const NoteCell = styled(NameCell)`
line-height: 1.2;
Expand Down Expand Up @@ -285,7 +300,7 @@ const Row = styled.tr`
${media.print`
${NameCell}, ${NoteCell} {
background-color: transparent;
color: #666;
color: black;
}
`};
`;
Expand All @@ -295,4 +310,7 @@ const CalLink = styled(ICalLink)`
&:visited {
color: #666;
}
${media.print`
display: none;
`};
`;