make heading smaller for iphone
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -27,4 +27,5 @@ yarn-debug.log*
|
|||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
.cache
|
.cache
|
||||||
public
|
public
|
||||||
|
/public
|
||||||
@@ -31,30 +31,30 @@ const EntryInfo = styled.div`
|
|||||||
const JournalHeading = styled.h2`
|
const JournalHeading = styled.h2`
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-size: ${SIZES.tiny};
|
font-size: ${SIZES.tiny};
|
||||||
color: ${props => props.theme.colors.secondary};
|
color: ${(props) => props.theme.colors.secondary};
|
||||||
display: block;
|
display: block;
|
||||||
`
|
`
|
||||||
const SavedMessaged = styled.div`
|
const SavedMessaged = styled.div`
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto auto;
|
grid-template-columns: auto auto;
|
||||||
grid-gap: 5px;
|
grid-gap: 5px;
|
||||||
color: ${props => props.theme.colors.secondary};
|
color: ${(props) => props.theme.colors.secondary};
|
||||||
font-size: ${SIZES.tiny};
|
font-size: ${SIZES.tiny};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
`
|
`
|
||||||
const OfflineNotice = styled.div`
|
const OfflineNotice = styled.div`
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
color: ${props => props.theme.colors.secondary};
|
color: ${(props) => props.theme.colors.secondary};
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
border-color: ${props => props.theme.colors.tertiary};
|
border-color: ${(props) => props.theme.colors.tertiary};
|
||||||
font-size: ${SIZES.tiny};
|
font-size: ${SIZES.tiny};
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
`
|
`
|
||||||
const JournalEntryArea = styled.textarea`
|
const JournalEntryArea = styled.textarea`
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
flex-grow: 0.85;
|
flex-grow: 0.85;
|
||||||
color: ${props => props.theme.colors.primary};
|
color: ${(props) => props.theme.colors.primary};
|
||||||
caret-color: ${props => props.theme.colors.secondary};
|
caret-color: ${(props) => props.theme.colors.secondary};
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
@@ -69,14 +69,14 @@ const JournalEntryArea = styled.textarea`
|
|||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
padding-bottom: 0px;
|
padding-bottom: 0px;
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: ${props => props.theme.colors.tertiary};
|
color: ${(props) => props.theme.colors.tertiary};
|
||||||
}
|
}
|
||||||
&::selection {
|
&::selection {
|
||||||
background: ${props => props.theme.colors.hover};
|
background: ${(props) => props.theme.colors.hover};
|
||||||
}
|
}
|
||||||
&:focus {
|
&:focus {
|
||||||
box-shadow: 0 0 0 8px ${props => props.theme.colors.bodyBackground},
|
box-shadow: 0 0 0 8px ${(props) => props.theme.colors.bodyBackground},
|
||||||
0 0 0 10px ${props => props.theme.colors.hover};
|
0 0 0 10px ${(props) => props.theme.colors.hover};
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
const Buttons = styled.div`
|
const Buttons = styled.div`
|
||||||
@@ -151,14 +151,14 @@ class Day extends React.Component {
|
|||||||
getData = (docRef, options) => {
|
getData = (docRef, options) => {
|
||||||
docRef
|
docRef
|
||||||
.get(options)
|
.get(options)
|
||||||
.then(doc => {
|
.then((doc) => {
|
||||||
if (doc.data()) {
|
if (doc.data()) {
|
||||||
this.setState({ text: doc.data().text, loading: false })
|
this.setState({ text: doc.data().text, loading: false })
|
||||||
} else {
|
} else {
|
||||||
this.setState({ text: "", loading: false })
|
this.setState({ text: "", loading: false })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch((err) => {
|
||||||
console.warn("entry not found in cache")
|
console.warn("entry not found in cache")
|
||||||
// no doc was found, so reset the entry area to blank
|
// no doc was found, so reset the entry area to blank
|
||||||
this.setState({ loading: false, text: "" })
|
this.setState({ loading: false, text: "" })
|
||||||
@@ -173,7 +173,7 @@ class Day extends React.Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeText = e => {
|
onChangeText = (e) => {
|
||||||
if (this.timeout) clearTimeout(this.timeout)
|
if (this.timeout) clearTimeout(this.timeout)
|
||||||
const text = e.target.value
|
const text = e.target.value
|
||||||
const { year, month, day } = this.props
|
const { year, month, day } = this.props
|
||||||
@@ -243,7 +243,7 @@ class Day extends React.Component {
|
|||||||
disableNext={isAfter(currentDay, startOfYesterday())}
|
disableNext={isAfter(currentDay, startOfYesterday())}
|
||||||
/>
|
/>
|
||||||
<EntryHeading>
|
<EntryHeading>
|
||||||
<JournalHeading>RECORD THOUGHTS ABOUT YOUR DAY</JournalHeading>
|
<JournalHeading>Record thoughts about the day</JournalHeading>
|
||||||
<EntryInfo>
|
<EntryInfo>
|
||||||
{online && (
|
{online && (
|
||||||
<SavedMessaged>
|
<SavedMessaged>
|
||||||
@@ -285,7 +285,7 @@ class Day extends React.Component {
|
|||||||
id="entry-text-area"
|
id="entry-text-area"
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
placeholder="Start writing..."
|
placeholder="Start writing..."
|
||||||
onChange={e => this.onChangeText(e)}
|
onChange={(e) => this.onChangeText(e)}
|
||||||
value={text}
|
value={text}
|
||||||
css={css`
|
css={css`
|
||||||
animation: ${fadeKeyFrames} 0.2s ease-in;
|
animation: ${fadeKeyFrames} 0.2s ease-in;
|
||||||
@@ -306,8 +306,4 @@ class Day extends React.Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default compose(
|
export default compose(withFirebase, withTheme, withAuthentication)(Day)
|
||||||
withFirebase,
|
|
||||||
withTheme,
|
|
||||||
withAuthentication
|
|
||||||
)(Day)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user