mirror of
https://github.com/kremalicious/blog.git
synced 2025-02-14 21:10:25 +01:00
Merge pull request #174 from kremalicious/fix/exif
fix failing exif extraction for some photos
This commit is contained in:
commit
f0bd16ec65
@ -2,40 +2,22 @@ const fastExif = require('fast-exif')
|
|||||||
const Fraction = require('fraction.js')
|
const Fraction = require('fraction.js')
|
||||||
const dms2dec = require('dms2dec')
|
const dms2dec = require('dms2dec')
|
||||||
|
|
||||||
exports.createExifFields = (node, createNodeField) => {
|
exports.createExifFields = async (node, createNodeField) => {
|
||||||
fastExif
|
let exifData
|
||||||
.read(node.absolutePath, true)
|
try {
|
||||||
.then(exifData => {
|
exifData = await fastExif.read(node.absolutePath, true)
|
||||||
if (!exifData) return
|
if (!exifData) return
|
||||||
constructExifFields(exifData, createNodeField, node)
|
constructExifFields(exifData, createNodeField, node)
|
||||||
})
|
} catch (error) {
|
||||||
.catch(() => null) // just silently fail when exif can't be extracted
|
// console.error(`${node.name}: ${error.message}`)
|
||||||
|
return null // just silently fail when exif can't be extracted
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const constructExifFields = (exifData, createNodeField, node) => {
|
const getGps = gpsData => {
|
||||||
const { Model } = exifData.image
|
if (!gpsData) return
|
||||||
const {
|
|
||||||
ISO,
|
|
||||||
FNumber,
|
|
||||||
ExposureTime,
|
|
||||||
FocalLength,
|
|
||||||
ExposureBiasValue
|
|
||||||
} = exifData.exif
|
|
||||||
const {
|
|
||||||
GPSLatitudeRef,
|
|
||||||
GPSLatitude,
|
|
||||||
GPSLongitudeRef,
|
|
||||||
GPSLongitude
|
|
||||||
} = exifData.gps
|
|
||||||
|
|
||||||
const { n, d } = new Fraction(ExposureTime)
|
const { GPSLatitudeRef, GPSLatitude, GPSLongitudeRef, GPSLongitude } = gpsData
|
||||||
const exposureShortened = parseFloat(ExposureBiasValue.toFixed(2))
|
|
||||||
|
|
||||||
const model = `${Model}`
|
|
||||||
const iso = `ISO ${ISO}`
|
|
||||||
const fstop = `ƒ ${FNumber}`
|
|
||||||
const shutterspeed = `${n}/${d}s`
|
|
||||||
const focalLength = `${FocalLength}mm`
|
|
||||||
|
|
||||||
const GPSdec = dms2dec(
|
const GPSdec = dms2dec(
|
||||||
GPSLatitude,
|
GPSLatitude,
|
||||||
@ -47,31 +29,65 @@ const constructExifFields = (exifData, createNodeField, node) => {
|
|||||||
const latitude = GPSdec[0]
|
const latitude = GPSdec[0]
|
||||||
const longitude = GPSdec[1]
|
const longitude = GPSdec[1]
|
||||||
|
|
||||||
|
return { latitude, longitude }
|
||||||
|
}
|
||||||
|
|
||||||
|
const getExposure = exposureMode => {
|
||||||
|
const exposureShortened = parseFloat(exposureMode.toFixed(2))
|
||||||
let exposure
|
let exposure
|
||||||
|
|
||||||
if (ExposureBiasValue === 0) {
|
if (exposureMode === 0) {
|
||||||
exposure = `+/- ${exposureShortened} ev`
|
exposure = `+/- ${exposureShortened} ev`
|
||||||
} else if (ExposureBiasValue > 0) {
|
} else if (exposureMode > 0) {
|
||||||
exposure = `+ ${exposureShortened} ev`
|
exposure = `+ ${exposureShortened} ev`
|
||||||
} else {
|
} else {
|
||||||
exposure = `${exposureShortened} ev`
|
exposure = `${exposureShortened} ev`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return exposure
|
||||||
|
}
|
||||||
|
|
||||||
|
const constructExifFields = (exifData, createNodeField, node) => {
|
||||||
|
const { Model } = exifData.image
|
||||||
|
const {
|
||||||
|
ISO,
|
||||||
|
FNumber,
|
||||||
|
ExposureTime,
|
||||||
|
FocalLength,
|
||||||
|
ExposureBiasValue,
|
||||||
|
ExposureMode,
|
||||||
|
LensModel
|
||||||
|
} = exifData.exif
|
||||||
|
|
||||||
|
const iso = `ISO ${ISO}`
|
||||||
|
const fstop = `ƒ ${FNumber}`
|
||||||
|
const focalLength = `${FocalLength}mm`
|
||||||
|
|
||||||
|
// Shutter speed
|
||||||
|
const { n, d } = new Fraction(ExposureTime)
|
||||||
|
const shutterspeed = `${n}/${d}s`
|
||||||
|
|
||||||
|
// GPS
|
||||||
|
let latitude
|
||||||
|
let longitude
|
||||||
|
if (exifData.gps) ({ latitude, longitude } = getGps(exifData.gps))
|
||||||
|
|
||||||
|
// Exposure
|
||||||
|
const exposure = getExposure(ExposureBiasValue || ExposureMode)
|
||||||
|
|
||||||
// add exif fields to type File
|
// add exif fields to type File
|
||||||
createNodeField({
|
createNodeField({
|
||||||
node,
|
node,
|
||||||
name: 'exif',
|
name: 'exif',
|
||||||
value: {
|
value: {
|
||||||
iso,
|
iso,
|
||||||
model,
|
model: Model,
|
||||||
fstop,
|
fstop,
|
||||||
shutterspeed,
|
shutterspeed,
|
||||||
focalLength,
|
focalLength,
|
||||||
|
lensModel: LensModel,
|
||||||
exposure,
|
exposure,
|
||||||
gps: {
|
gps: { latitude, longitude }
|
||||||
latitude,
|
|
||||||
longitude
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -35,21 +35,21 @@
|
|||||||
transition-property: transform, background;
|
transition-property: transform, background;
|
||||||
|
|
||||||
:global(.has-menu-open) & {
|
:global(.has-menu-open) & {
|
||||||
transform: translate3d(0, ($spacer * 3), 0);
|
transform: translate3d(0, ($spacer * 3.5), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.dark) & {
|
:global(.dark) & {
|
||||||
background-color: $body-background-color--dark;
|
background-color: $body-background-color--dark;
|
||||||
color: $text-color--dark;
|
color: $text-color--dark;
|
||||||
border-top-color: darken($brand-grey, 15%);
|
border-top-color: darken($brand-grey, 15%);
|
||||||
border-bottom-color: darken($brand-grey, 15%);
|
border-bottom-color: darken($body-background-color--dark, 3%);
|
||||||
box-shadow: 0 1px 4px darken($brand-main, 10%),
|
box-shadow: 0 1px 8px rgba(darken($brand-main, 15%), 0.1),
|
||||||
0 -1px 4px darken($brand-main, 15%);
|
0 -1px 4px darken($brand-main, 15%);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $screen-sm) and (min-height: 500px) {
|
@media (min-width: $screen-sm) and (min-height: 500px) {
|
||||||
margin-top: $spacer * 2.65;
|
margin-top: $spacer * 2.65;
|
||||||
margin-bottom: $spacer * 19; // height of footer
|
margin-bottom: $spacer * 18; // height of footer
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
min-height: 500px;
|
min-height: 500px;
|
||||||
|
@ -2,15 +2,10 @@
|
|||||||
|
|
||||||
.searchInput {
|
.searchInput {
|
||||||
composes: input from '../atoms/Input.module.scss';
|
composes: input from '../atoms/Input.module.scss';
|
||||||
background: $input-bg-focus;
|
|
||||||
|
|
||||||
&::-webkit-search-cancel-button {
|
&::-webkit-search-cancel-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: $input-bg-focus;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchInputClose {
|
.searchInputClose {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
display: block;
|
display: block;
|
||||||
flex: 1 1 20%;
|
flex: 1 1 20%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding: $spacer / 1.5;
|
padding: $spacer $spacer / 1.5;
|
||||||
border-bottom: 1px dashed $brand-grey-dimmed;
|
border-bottom: 1px dashed $brand-grey-dimmed;
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
@ -29,17 +29,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:global(.dark) & {
|
:global(.dark) & {
|
||||||
border-bottom-color: $brand-grey;
|
border-bottom-color: rgba($brand-grey, 0.6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: $screen-sm) {
|
@media (min-width: $screen-sm) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
font-size: $font-size-small;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
border-left: 1px dashed $brand-grey-dimmed;
|
border-left: 1px dashed $brand-grey-dimmed;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
padding: $spacer;
|
padding: $spacer * 1.5 $spacer;
|
||||||
|
|
||||||
&,
|
&,
|
||||||
&:first-child {
|
&:first-child {
|
||||||
@ -51,7 +52,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
:global(.dark) & {
|
:global(.dark) & {
|
||||||
border-left-color: $brand-grey;
|
border-left-color: rgba($brand-grey, 0.6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,5 +63,5 @@
|
|||||||
@include media-frame;
|
@include media-frame;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 160px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ interface ExifProps {
|
|||||||
fstop: string
|
fstop: string
|
||||||
shutterspeed: string
|
shutterspeed: string
|
||||||
focalLength: string
|
focalLength: string
|
||||||
|
lensModel: string
|
||||||
exposure: string
|
exposure: string
|
||||||
gps: {
|
gps: {
|
||||||
latitude: string
|
latitude: string
|
||||||
@ -18,17 +19,21 @@ interface ExifProps {
|
|||||||
export default function Exif({ exif }: { exif: ExifProps }) {
|
export default function Exif({ exif }: { exif: ExifProps }) {
|
||||||
const { iso, model, fstop, shutterspeed, focalLength, exposure, gps } = exif
|
const { iso, model, fstop, shutterspeed, focalLength, exposure, gps } = exif
|
||||||
|
|
||||||
|
// iPhone lenses
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<aside className={styles.exif}>
|
<aside className={styles.exif}>
|
||||||
<div className={styles.data}>
|
<div className={styles.data}>
|
||||||
{model && <span title="Camera model">{model}</span>}
|
{model && <span title="Camera model">{model}</span>}
|
||||||
|
{focalLength && <span title="Focal length">{focalLength}</span>}
|
||||||
{fstop && <span title="Aperture">{fstop}</span>}
|
{fstop && <span title="Aperture">{fstop}</span>}
|
||||||
{shutterspeed && <span title="Shutter speed">{shutterspeed}</span>}
|
{shutterspeed && <span title="Shutter speed">{shutterspeed}</span>}
|
||||||
{exposure && <span title="Exposure">{exposure}</span>}
|
{exposure && <span title="Exposure">{exposure}</span>}
|
||||||
{iso && <span title="ISO">{iso}</span>}
|
{iso && <span title="ISO">{iso}</span>}
|
||||||
{focalLength && <span title="Focal length">{focalLength}</span>}
|
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.map}>{gps && <ExifMap gps={gps} />}</div>
|
{gps.latitude && (
|
||||||
|
<div className={styles.map}>{gps && <ExifMap gps={gps} />}</div>
|
||||||
|
)}
|
||||||
</aside>
|
</aside>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ export default function ExifMap({
|
|||||||
<Map
|
<Map
|
||||||
center={[latitude, longitude]}
|
center={[latitude, longitude]}
|
||||||
zoom={zoom}
|
zoom={zoom}
|
||||||
height={160}
|
height={200}
|
||||||
attribution={false}
|
attribution={false}
|
||||||
provider={isDarkMode ? providers['dark'] : providers['light']}
|
provider={isDarkMode ? providers['dark'] : providers['light']}
|
||||||
metaWheelZoom={true}
|
metaWheelZoom={true}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@import 'variables';
|
@import 'variables';
|
||||||
|
@import 'mixins';
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
display: block;
|
display: block;
|
||||||
@ -16,12 +17,15 @@
|
|||||||
transition: all ease-in-out 0.15s;
|
transition: all ease-in-out 0.15s;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|
||||||
&:hover {
|
@include placeholder();
|
||||||
background: lighten($input-bg, 30%);
|
|
||||||
|
:global(.dark) & {
|
||||||
|
color: $input-color--dark;
|
||||||
|
background-color: $input-bg--dark;
|
||||||
|
@include placeholder($input-color-placeholder--dark);
|
||||||
}
|
}
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
background-color: $input-bg-focus;
|
|
||||||
border-color: $input-border-focus;
|
border-color: $input-border-focus;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
padding: $spacer / 4;
|
padding: $spacer / 4;
|
||||||
margin: 0;
|
margin-left: $spacer / 4;
|
||||||
|
margin-right: $spacer / 4;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
color: $text-color-light;
|
color: $text-color-light;
|
||||||
|
|
||||||
|
@ -44,8 +44,19 @@
|
|||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: $link-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
:global(.dark) & {
|
:global(.dark) & {
|
||||||
|
color: $text-color--dark;
|
||||||
text-shadow: 0 -1px 0 rgba(#000, 0.5);
|
text-shadow: 0 -1px 0 rgba(#000, 0.5);
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
color: $link-color-hover;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
@import 'variables';
|
|
||||||
|
|
||||||
// Subscribe component
|
|
||||||
.subscribe {
|
|
||||||
margin: $spacer auto;
|
|
||||||
|
|
||||||
p {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
font-size: $font-size-h5;
|
|
||||||
margin-bottom: $spacer / 2;
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
import React from 'react'
|
|
||||||
import IconLinks from './IconLinks'
|
|
||||||
import styles from './Subscribe.module.scss'
|
|
||||||
import { useSiteMetadata } from '../../hooks/use-site-metadata'
|
|
||||||
|
|
||||||
export default function Subscribe() {
|
|
||||||
const { rss, jsonfeed } = useSiteMetadata()
|
|
||||||
const links = [rss, jsonfeed]
|
|
||||||
|
|
||||||
return (
|
|
||||||
<aside className={styles.subscribe}>
|
|
||||||
<h1 className={styles.title}>Subscribe</h1>
|
|
||||||
<IconLinks links={links} />
|
|
||||||
</aside>
|
|
||||||
)
|
|
||||||
}
|
|
@ -4,9 +4,7 @@
|
|||||||
.themeSwitch {
|
.themeSwitch {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $spacer;
|
margin-bottom: $spacer * $line-height;
|
||||||
opacity: 0.75;
|
|
||||||
bottom: -0.1rem;
|
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 0.8rem;
|
width: 0.8rem;
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
@import 'variables';
|
@import 'variables';
|
||||||
@import 'mixins';
|
@import 'mixins';
|
||||||
|
|
||||||
|
.vcard {
|
||||||
|
margin-bottom: $spacer * 2;
|
||||||
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
@include media-frame;
|
@include media-frame;
|
||||||
|
|
||||||
margin-bottom: ($spacer / 2);
|
margin-bottom: $spacer / 3;
|
||||||
|
|
||||||
&,
|
&,
|
||||||
img {
|
img {
|
||||||
@ -16,7 +20,7 @@
|
|||||||
.description {
|
.description {
|
||||||
font-size: $font-size-h5;
|
font-size: $font-size-h5;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: ($spacer / 4);
|
margin-bottom: ($spacer / $line-height);
|
||||||
|
|
||||||
a {
|
a {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -23,12 +23,13 @@ const query = graphql`
|
|||||||
|
|
||||||
export default function Vcard() {
|
export default function Vcard() {
|
||||||
const data = useStaticQuery(query)
|
const data = useStaticQuery(query)
|
||||||
const { twitter, github, facebook, name, uri } = useSiteMetadata().author
|
const { author, rss, jsonfeed } = useSiteMetadata()
|
||||||
|
const { twitter, github, name, uri } = author
|
||||||
const avatar = data.avatar.edges[0].node.childImageSharp.fixed
|
const avatar = data.avatar.edges[0].node.childImageSharp.fixed
|
||||||
const links = [twitter, github, facebook]
|
const links = [twitter, github, rss, jsonfeed]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="vcard author">
|
<div className={styles.vcard}>
|
||||||
<Img
|
<Img
|
||||||
className={styles.avatar}
|
className={styles.avatar}
|
||||||
fixed={avatar}
|
fixed={avatar}
|
||||||
|
@ -22,6 +22,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.theme {
|
||||||
|
margin: $spacer auto;
|
||||||
|
|
||||||
|
p {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.themeTitle {
|
||||||
|
font-size: $font-size-h5;
|
||||||
|
margin-bottom: $spacer / 2;
|
||||||
|
}
|
||||||
|
|
||||||
.copyright {
|
.copyright {
|
||||||
padding-top: $spacer;
|
padding-top: $spacer;
|
||||||
padding-bottom: $spacer;
|
padding-bottom: $spacer;
|
||||||
@ -31,22 +45,28 @@
|
|||||||
font-size: $font-size-mini;
|
font-size: $font-size-mini;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
button {
|
||||||
|
margin-left: $spacer;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
svg {
|
svg {
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
margin-right: 0.2em;
|
margin-right: 0.25rem;
|
||||||
margin-bottom: -2px;
|
margin-bottom: -2px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btc {
|
.btc {
|
||||||
margin-left: ($spacer / 2);
|
|
||||||
|
|
||||||
// stylelint-disable-next-line
|
// stylelint-disable-next-line
|
||||||
svg {
|
svg {
|
||||||
width: 10px;
|
width: 10px;
|
||||||
margin-right: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React, { useState } from 'react'
|
import React, { useState } from 'react'
|
||||||
import Container from '../atoms/Container'
|
import Container from '../atoms/Container'
|
||||||
import Vcard from '../molecules/Vcard'
|
import Vcard from '../molecules/Vcard'
|
||||||
import Subscribe from '../molecules/Subscribe'
|
import ThemeSwitch from '../molecules/ThemeSwitch'
|
||||||
import ModalThanks from '../molecules/ModalThanks'
|
import ModalThanks from '../molecules/ModalThanks'
|
||||||
|
|
||||||
import { ReactComponent as Github } from '../../images/github.svg'
|
import { ReactComponent as Github } from '../../images/github.svg'
|
||||||
@ -28,9 +28,6 @@ function Copyright({
|
|||||||
<a href={uri} rel="me">
|
<a href={uri} rel="me">
|
||||||
{name}
|
{name}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href={`${github}/blog`}>
|
<a href={`${github}/blog`}>
|
||||||
<Github />
|
<Github />
|
||||||
View source
|
View source
|
||||||
@ -58,8 +55,9 @@ export default function Footer() {
|
|||||||
return (
|
return (
|
||||||
<footer role="contentinfo" className={styles.footer}>
|
<footer role="contentinfo" className={styles.footer}>
|
||||||
<Container>
|
<Container>
|
||||||
|
<ThemeSwitch />
|
||||||
<Vcard />
|
<Vcard />
|
||||||
<Subscribe />
|
|
||||||
<Copyright showModal={showModal} toggleModal={toggleModal} />
|
<Copyright showModal={showModal} toggleModal={toggleModal} />
|
||||||
</Container>
|
</Container>
|
||||||
</footer>
|
</footer>
|
||||||
|
@ -3,7 +3,6 @@ import { Link } from 'gatsby'
|
|||||||
import Container from '../atoms/Container'
|
import Container from '../atoms/Container'
|
||||||
import Search from '../Search'
|
import Search from '../Search'
|
||||||
import Menu from '../molecules/Menu'
|
import Menu from '../molecules/Menu'
|
||||||
import ThemeSwitch from '../molecules/ThemeSwitch'
|
|
||||||
import { ReactComponent as Logo } from '../../images/logo.svg'
|
import { ReactComponent as Logo } from '../../images/logo.svg'
|
||||||
|
|
||||||
import styles from './Header.module.scss'
|
import styles from './Header.module.scss'
|
||||||
@ -20,7 +19,6 @@ export default function Header() {
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<nav role="navigation" className={styles.nav}>
|
<nav role="navigation" className={styles.nav}>
|
||||||
<ThemeSwitch />
|
|
||||||
<Search lng="en" />
|
<Search lng="en" />
|
||||||
<Menu />
|
<Menu />
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -244,12 +244,12 @@
|
|||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
box-shadow: 0 1px 3px rgba($brand-grey, 0.2);
|
box-shadow: 0 1px 3px rgba($brand-grey, 0.2);
|
||||||
|
|
||||||
:global(.dark) & {
|
|
||||||
box-shadow: 0 3px 5px rgba(darken($brand-main, 20%), 0.15),
|
|
||||||
0 5px 16px rgba(darken($brand-main, 20%), 0.15);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: $screen-sm) {
|
@media (min-width: $screen-sm) {
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global(.dark) & {
|
||||||
|
box-shadow: 0 3px 5px rgba(darken($brand-main, 20%), 0.25),
|
||||||
|
0 5px 16px rgba(darken($brand-main, 20%), 0.25);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,6 @@ $line-height-small: 1.1428571429;
|
|||||||
$font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue',
|
$font-family-base: 'ff-tisa-sans-web-pro', 'Trebuchet MS', 'Helvetica Neue',
|
||||||
Helvetica, Arial, sans-serif;
|
Helvetica, Arial, sans-serif;
|
||||||
$font-weight-base: 400;
|
$font-weight-base: 400;
|
||||||
$font-color-base: $text-color;
|
|
||||||
|
|
||||||
$font-family-monospace: 'Fira Code', 'Fira Mono', Menlo, Monaco, Consolas,
|
$font-family-monospace: 'Fira Code', 'Fira Mono', Menlo, Monaco, Consolas,
|
||||||
'Courier New', monospace;
|
'Courier New', monospace;
|
||||||
@ -103,15 +102,17 @@ $screen-lg: 87.5em;
|
|||||||
// Forms
|
// Forms
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
$input-bg: rgba(#fff, 0.85);
|
$input-bg: darken($body-background-color, 5%);
|
||||||
$input-bg-focus: #fff;
|
$input-bg--dark: darken($body-background-color--dark, 5%);
|
||||||
$input-bg-disabled: $brand-grey-light;
|
$input-bg-disabled: $brand-grey-light;
|
||||||
|
|
||||||
$input-font-size: $font-size-base;
|
$input-font-size: $font-size-base;
|
||||||
$input-font-weight: $font-weight-base;
|
$input-font-weight: $font-weight-base;
|
||||||
|
|
||||||
$input-color: $font-color-base;
|
$input-color: $text-color;
|
||||||
$input-color-placeholder: rgba(46, 79, 92, 0.3);
|
$input-color--dark: $text-color--dark;
|
||||||
|
$input-color-placeholder: $brand-grey-light;
|
||||||
|
$input-color-placeholder--dark: $brand-grey;
|
||||||
|
|
||||||
$input-border: $brand-grey-light;
|
$input-border: $brand-grey-light;
|
||||||
$input-border-radius: $border-radius;
|
$input-border-radius: $border-radius;
|
||||||
|
@ -24,7 +24,7 @@ body {
|
|||||||
font-weight: $font-weight-base;
|
font-weight: $font-weight-base;
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
line-height: $line-height;
|
line-height: $line-height;
|
||||||
color: $font-color-base;
|
color: $text-color;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
font-feature-settings: 'liga', 'kern';
|
font-feature-settings: 'liga', 'kern';
|
||||||
|
@ -75,6 +75,7 @@ export const pageQuery = graphql`
|
|||||||
fstop
|
fstop
|
||||||
shutterspeed
|
shutterspeed
|
||||||
focalLength
|
focalLength
|
||||||
|
lensModel
|
||||||
exposure
|
exposure
|
||||||
gps {
|
gps {
|
||||||
latitude
|
latitude
|
||||||
|
Loading…
x
Reference in New Issue
Block a user