diff --git a/.env.example b/.env.example index 27fba9a..c8ba620 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,4 @@ -REACT_APP_SITENAME="" -REACT_APP_SITEURL="" -REACT_APP_DEV_API_URL="" \ No newline at end of file +REACT_APP_SITENAME= +REACT_APP_SITEURL= +REACT_APP_DEV_API_URL= +REACT_APP_HEADER_LOGO_TYPE= \ No newline at end of file diff --git a/.gitignore b/.gitignore index b42d57c..b6e115f 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,5 @@ npm-debug.log* debug.log* yarn-debug.log* yarn-error.log* + +src/static/fullLogo.gif diff --git a/package.json b/package.json index c30c4d3..cb0e592 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forfansubsadmin", - "version": "0.1.0", + "version": "2.2.4", "private": true, "homepage": "/admin", "dependencies": { diff --git a/src/components/header/header.js b/src/components/header/header.js index 3ef53a7..e76541b 100644 --- a/src/components/header/header.js +++ b/src/components/header/header.js @@ -33,7 +33,7 @@ import { administrativePage, logsPage } from '../../config/front-routes' -import { fullLogo } from '../../config/theme/images' +import { fullLogo, fullLogoGif } from '../../config/theme/images' const useStyles = makeStyles(theme => ({ root: { @@ -230,7 +230,12 @@ export default function MiniDrawer() { - Site Logo + { + process.env.REACT_APP_HEADER_LOGO_TYPE === "gif" && fullLogoGif !== null ? + Site Logo + : + Site Logo + }
{userInfo.success ? diff --git a/src/config/theme/images.js b/src/config/theme/images.js index 2f82407..5b78af9 100644 --- a/src/config/theme/images.js +++ b/src/config/theme/images.js @@ -1,4 +1,12 @@ import logo from '../../static/logo.png' import fullLogo from '../../static/fullLogo.png' -export { logo, fullLogo } \ No newline at end of file +var fullLogoGif = null +// GIF logosunun dosyalarını dene. Varsa içeri al, birisi yoksa hata ver ve header'da statik logoyu göster. (/components/header/header.js) +try { + fullLogoGif = require('../../static/fullLogo.gif'); +} catch (err) { + console.warn('GIF logo bulunamadı.') +} + +export { logo, fullLogo, fullLogoGif } \ No newline at end of file