diff --git a/src/components/modals/main/scss/index.scss b/src/components/modals/main/scss/index.scss index 7a2d6a34..8c7854ef 100644 --- a/src/components/modals/main/scss/index.scss +++ b/src/components/modals/main/scss/index.scss @@ -272,7 +272,7 @@ li { } } -@media only screen and (max-width: 1300px) { +@media only screen and (max-width: 1650px) { li.navbar-item { span { display: none; diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx index 9c4f6ecc..ef7e19f1 100644 --- a/src/components/widgets/background/Background.jsx +++ b/src/components/widgets/background/Background.jsx @@ -15,7 +15,10 @@ export default class Background extends React.PureComponent { url: '', currentAPI: '', photoInfo: { - hidden: false + hidden: false, + offline: false, + photographerURL: '', + photoURL: '' } }; this.language = window.language.widgets.background; @@ -55,6 +58,7 @@ export default class Background extends React.PureComponent { this.setState({ url: `./offline-images/${randomImage}.webp`, photoInfo: { + offline: true, credit: photographer } }); @@ -158,7 +162,9 @@ export default class Background extends React.PureComponent { location: (data.location.replace(/[null]+/g, '') !== ' ') ? data.location : 'N/A', camera: data.camera, resolution: data.resolution, - url: data.file + url: data.file, + photographerURL: (backgroundAPI === 'unsplash') ? data.photographer_page : '', + photoURL: (backgroundAPI === 'unsplash') ? data.photo_page : '' } }); break; diff --git a/src/components/widgets/background/PhotoInformation.jsx b/src/components/widgets/background/PhotoInformation.jsx index b9d20dcb..bd3cb877 100644 --- a/src/components/widgets/background/PhotoInformation.jsx +++ b/src/components/widgets/background/PhotoInformation.jsx @@ -29,9 +29,21 @@ export default function PhotoInformation(props) { return null; } + // remove unsplash text + const photographer = props.info.credit.split(` ${language.unsplash}`)[0]; + + let credit = props.info.credit; + let photo = language.credit; + + // unsplash + if (props.info.photographerURL !== '' && !props.info.offline) { + photo = {language.credit}; + credit = <>{photographer} {language.unsplash}; + } + return (
-

{language.credit} {props.info.credit}

+

{photo} {credit}

@@ -44,7 +56,7 @@ export default function PhotoInformation(props) { {props.info.resolution || 'N/A'} - {props.info.credit.split(` ${language.unsplash}`)[0]} + {photographer} {(localStorage.getItem('downloadbtn') === 'true') ? <> diff --git a/src/components/widgets/background/scss/_photoinformation.scss b/src/components/widgets/background/scss/_photoinformation.scss index 418a150f..713c9c09 100644 --- a/src/components/widgets/background/scss/_photoinformation.scss +++ b/src/components/widgets/background/scss/_photoinformation.scss @@ -23,6 +23,15 @@ svg:hover+.infoCard { display: block; } + + a { + color: white; + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } } .infoCard { diff --git a/src/components/widgets/weather/Weather.jsx b/src/components/widgets/weather/Weather.jsx index aabba022..af0f8e71 100644 --- a/src/components/widgets/weather/Weather.jsx +++ b/src/components/widgets/weather/Weather.jsx @@ -3,7 +3,7 @@ import React from 'react'; import EventBus from '../../../modules/helpers/eventbus'; import WeatherIcon from './WeatherIcon'; -import WindDirectionIcon from './WindDirectionIcon'; +//import WindDirectionIcon from './WindDirectionIcon'; import { WiHumidity, WiWindy, WiBarometer } from 'weather-icons-react'; import './weather.scss'; @@ -151,7 +151,7 @@ export default class Weather extends React.PureComponent { {this.state.weather.temp + this.state.temp_text} {minmax()} {enabled('humidity') ?
{this.state.weather.humidity}%
: null} - {enabled('windspeed') ?
{this.state.weather.wind_speed} m/s
: null} + {enabled('windspeed') ?
{this.state.weather.wind_speed} m/s{/**/}
: null} {enabled('atmosphericpressure') ?
{this.state.weather.pressure} hPa
: null}
{enabled('showlocation') ? {this.state.location} : null} diff --git a/src/components/widgets/weather/WindDirectionIcon.jsx b/src/components/widgets/weather/WindDirectionIcon.jsx index b4cbebda..d60db5f0 100644 --- a/src/components/widgets/weather/WindDirectionIcon.jsx +++ b/src/components/widgets/weather/WindDirectionIcon.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { WiDirectionDownLeft, WiDirectionDownRight, WiDirectionDown, WiDirectionLeft, WiDirectionRight, WiDirectionUpLeft, WiDirectionUpRight, WiDirectionUp } from 'weather-icons-react'; -export default function WeatherIcon(props) { +export default function WindDirectionIcon(props) { let icon; const getDirection = (angle) => {