+
{props.post.description}
- - {props.post.created}
- - {props.post.readingTime}
+ -
+ {props.post.created}
+
+ -
+ {props.post.readingTime}
+
);
@@ -22,7 +26,7 @@ const BlogArticlePreview = (props) => {
const BlogPage = (props) => {
return (
-
There's nothing here yet
+
There's nothing here yet
{/*
*/}
{/* {props.posts.map((post, index) => {*/}
diff --git a/src/components/pages/portfolio.jsx b/src/components/pages/portfolio.jsx
index 37442d3..21487a8 100644
--- a/src/components/pages/portfolio.jsx
+++ b/src/components/pages/portfolio.jsx
@@ -1,7 +1,7 @@
import React from "react";
import { connect } from "react-redux";
import Contacts from "../elements/contacts";
-import {APP} from "../../constants/link-types";
+import { APP } from "../../constants/link-types";
const PortfolioItem = (props) => {
const name = props.project.name;
@@ -24,7 +24,15 @@ const PortfolioItem = (props) => {
key={link.src}
className={`project-link project-link--${link.type}`}
>
- {link.type === APP && link.logo ? : ''}
+ {link.type === APP && link.logo ? (
+
+ ) : (
+ ""
+ )}
{link.name}
diff --git a/src/constants/link-types.js b/src/constants/link-types.js
index e750dea..0b82b75 100644
--- a/src/constants/link-types.js
+++ b/src/constants/link-types.js
@@ -1,6 +1,6 @@
-export const APP = "app"
-export const GITHUB = "github"
-export const IPHONE = "iphone"
-export const ANDROID = "android"
-export const APP_PAGE = "app-page"
-export const DEFAULT_DOMAIN = "horhik.xyz"
+export const APP = "app";
+export const GITHUB = "github";
+export const IPHONE = "iphone";
+export const ANDROID = "android";
+export const APP_PAGE = "app-page";
+export const DEFAULT_DOMAIN = "horhik.xyz";
diff --git a/src/constants/routes.js b/src/constants/routes.js
index 267c1cc..76b8d87 100644
--- a/src/constants/routes.js
+++ b/src/constants/routes.js
@@ -2,7 +2,7 @@
import BlogPage from "../components/pages/blog";
import PortfolioPage from "../components/pages/portfolio";
import HomePage from "../components/pages/homepage";
-import {DEFAULT_DOMAIN} from '../constants/link-types'
+import { DEFAULT_DOMAIN } from "../constants/link-types";
const pages = [
{
diff --git a/src/index.js b/src/index.js
index 9a9f618..ccf7bdb 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,14 +1,14 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
-import {Provider} from "react-redux";
+import { Provider } from "react-redux";
import store from "./store";
ReactDOM.render(
-
-
-
+
+
+
,
document.getElementById("root")
);
diff --git a/src/reducers/client-reducer.js b/src/reducers/client-reducer.js
index 0718ae3..a546fba 100644
--- a/src/reducers/client-reducer.js
+++ b/src/reducers/client-reducer.js
@@ -1,6 +1,6 @@
import { SET_CURRENT_PAGE } from "../constants/routes";
import HomePage from "../components/pages/homepage";
-import {DEFAULT_DOMAIN} from "../constants/link-types"
+import { DEFAULT_DOMAIN } from "../constants/link-types";
const initialState = {
lang: "en",
diff --git a/src/reducers/site-content-reducer.js b/src/reducers/site-content-reducer.js
index 2fa25ef..2ebc0e4 100644
--- a/src/reducers/site-content-reducer.js
+++ b/src/reducers/site-content-reducer.js
@@ -1,19 +1,35 @@
-import {DEFAULT_DOMAIN, APP, APP_PAGE, GITHUB} from "../constants/link-types";
-
+import { DEFAULT_DOMAIN, APP, APP_PAGE, GITHUB } from "../constants/link-types";
const initialState = {
- recentNews: ["nope"],
+ recentNews: [
+ {
+ src: '/portfolio',
+ type: 'github',
+ content: 'Added "TaSquare" project to portfolio ',
+ },
+ {
+ src: '/portfolio',
+ type: 'github',
+ content: 'Added Snake game to portfolio',
+ },
+ {
+ src: '/portfolio',
+ type: 'github',
+ content: 'Added "AnkiLan" project to portfolio',
+ },
+ ],
portfolioItems: [
{
- name: 'AnkiLan',
- description: 'The app created for pushing cards with english words and their definitions to Anki',
+ name: "AnkiLan",
+ description:
+ "The app created for pushing cards with english words and their definitions to Anki",
gallery: [],
- pageLink: '',
+ pageLink: "",
links: [
{
- name: 'GitHub page',
+ name: "GitHub page",
type: GITHUB,
- src: 'https://github.com/horhik/ankilan'
+ src: "https://github.com/horhik/ankilan",
},
/*{
name: 'App page',
@@ -21,74 +37,76 @@ const initialState = {
src: 'https://github.com'
},
*/
- ]
+ ],
},
{
- name: 'Snake Game',
+ name: "Snake Game",
description: 'Just the "Snake" game with smooth graphics',
gallery: [],
- pageLink: '',
+ pageLink: "",
links: [
{
- name: 'GitHub page',
+ name: "GitHub page",
type: GITHUB,
- src: 'https://github.com/horhik/snake'
+ src: "https://github.com/horhik/snake",
},
{
- name: 'Game page',
+ name: "Game page",
type: APP,
- src: 'https://smoothsnake.netlify.app',
+ src: "https://smoothsnake.netlify.app",
// logo: 'https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg'
- }
-
- ]
+ },
+ ],
},
{
- name: 'TaSquare',
- description: 'TODO app for mobile',
+ name: "TaSquare",
+ description: "TODO app for mobile",
gallery: [],
- pageLink: '',
+ pageLink: "",
links: [
{
- name: 'GitHub page',
+ name: "GitHub page",
type: GITHUB,
- src: 'https://github.com/horhik/tasquare'
+ src: "https://github.com/horhik/tasquare",
},
{
- name: 'App page',
+ name: "App page",
type: APP,
- src: 'https://tasquare.netlify.app',
- logo: 'https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg'
- }
-
- ]
- }
+ src: "https://tasquare.netlify.app",
+ logo:
+ "https://raw.githubusercontent.com/Horhik/tasquare/master/src/svg/logo.svg",
+ },
+ ],
+ },
],
- blogPageContent:[
+ blogPageContent: [
{
- name: 'The point of life by Linus Torvalds',
- description: 'Some about OpenSource philosophy and “just for fun” by Linus Torvalds',
- created: '02.04.2021',
- readingTime: '8min read',
- src: `https://${DEFAULT_DOMAIN}`
+ name: "The point of life by Linus Torvalds",
+ description:
+ "Some about OpenSource philosophy and “just for fun” by Linus Torvalds",
+ created: "02.04.2021",
+ readingTime: "8min read",
+ src: `https://${DEFAULT_DOMAIN}`,
},
{
- name: 'Haskell on Back-end, how it is?',
- description: 'This site’s back-end written on haskell, let’s talks about privileges of haskell on backend',
- created: '11.03.2020',
- readingTime: '11min read',
- src: `https://${DEFAULT_DOMAIN}`
+ name: "Haskell on Back-end, how it is?",
+ description:
+ "This site’s back-end written on haskell, let’s talks about privileges of haskell on backend",
+ created: "11.03.2020",
+ readingTime: "11min read",
+ src: `https://${DEFAULT_DOMAIN}`,
},
{
- name: 'ArchLinux and a lot of tiling window managers',
- description: 'Did you try something another than floating windows, like in windows?',
- created: '01.09.2020',
- readingTime: '4min read',
- src: `https://${DEFAULT_DOMAIN}`
- }
- ]
-}
+ name: "ArchLinux and a lot of tiling window managers",
+ description:
+ "Did you try something another than floating windows, like in windows?",
+ created: "01.09.2020",
+ readingTime: "4min read",
+ src: `https://${DEFAULT_DOMAIN}`,
+ },
+ ],
+};
const siteContentReducer = (state = initialState, action) => {
switch (action.type) {
diff --git a/src/serviceWorker.js b/src/serviceWorker.js
index b04b771..c7cd666 100644
--- a/src/serviceWorker.js
+++ b/src/serviceWorker.js
@@ -11,9 +11,9 @@
// opt-in, read https://bit.ly/CRA-PWA
const isLocalhost = Boolean(
- window.location.hostname === 'localhost' ||
+ window.location.hostname === "localhost" ||
// [::1] is the IPv6 localhost address.
- window.location.hostname === '[::1]' ||
+ window.location.hostname === "[::1]" ||
// 127.0.0.0/8 are considered localhost for IPv4.
window.location.hostname.match(
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
@@ -21,7 +21,7 @@ const isLocalhost = Boolean(
);
export function register(config) {
- if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
+ if (process.env.NODE_ENV === "production" && "serviceWorker" in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
if (publicUrl.origin !== window.location.origin) {
@@ -31,7 +31,7 @@ export function register(config) {
return;
}
- window.addEventListener('load', () => {
+ window.addEventListener("load", () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
if (isLocalhost) {
@@ -42,8 +42,8 @@ export function register(config) {
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
- 'This web app is being served cache-first by a service ' +
- 'worker. To learn more, visit https://bit.ly/CRA-PWA'
+ "This web app is being served cache-first by a service " +
+ "worker. To learn more, visit https://bit.ly/CRA-PWA"
);
});
} else {
@@ -57,21 +57,21 @@ export function register(config) {
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
- .then(registration => {
+ .then((registration) => {
registration.onupdatefound = () => {
const installingWorker = registration.installing;
if (installingWorker == null) {
return;
}
installingWorker.onstatechange = () => {
- if (installingWorker.state === 'installed') {
+ if (installingWorker.state === "installed") {
if (navigator.serviceWorker.controller) {
// At this point, the updated precached content has been fetched,
// but the previous service worker will still serve the older
// content until all client tabs are closed.
console.log(
- 'New content is available and will be used when all ' +
- 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
+ "New content is available and will be used when all " +
+ "tabs for this page are closed. See https://bit.ly/CRA-PWA."
);
// Execute callback
@@ -82,7 +82,7 @@ function registerValidSW(swUrl, config) {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
- console.log('Content is cached for offline use.');
+ console.log("Content is cached for offline use.");
// Execute callback
if (config && config.onSuccess) {
@@ -93,25 +93,25 @@ function registerValidSW(swUrl, config) {
};
};
})
- .catch(error => {
- console.error('Error during service worker registration:', error);
+ .catch((error) => {
+ console.error("Error during service worker registration:", error);
});
}
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl, {
- headers: { 'Service-Worker': 'script' },
+ headers: { "Service-Worker": "script" },
})
- .then(response => {
+ .then((response) => {
// Ensure service worker exists, and that we really are getting a JS file.
- const contentType = response.headers.get('content-type');
+ const contentType = response.headers.get("content-type");
if (
response.status === 404 ||
- (contentType != null && contentType.indexOf('javascript') === -1)
+ (contentType != null && contentType.indexOf("javascript") === -1)
) {
// No service worker found. Probably a different app. Reload the page.
- navigator.serviceWorker.ready.then(registration => {
+ navigator.serviceWorker.ready.then((registration) => {
registration.unregister().then(() => {
window.location.reload();
});
@@ -123,18 +123,18 @@ function checkValidServiceWorker(swUrl, config) {
})
.catch(() => {
console.log(
- 'No internet connection found. App is running in offline mode.'
+ "No internet connection found. App is running in offline mode."
);
});
}
export function unregister() {
- if ('serviceWorker' in navigator) {
+ if ("serviceWorker" in navigator) {
navigator.serviceWorker.ready
- .then(registration => {
+ .then((registration) => {
registration.unregister();
})
- .catch(error => {
+ .catch((error) => {
console.error(error.message);
});
}
diff --git a/src/store.js b/src/store.js
index 351293b..c81f693 100644
--- a/src/store.js
+++ b/src/store.js
@@ -1,6 +1,9 @@
-import { createStore } from 'redux'
+import { createStore } from "redux";
import rootReducer from "./reducers/all-reducers";
-const store = createStore(rootReducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())
+const store = createStore(
+ rootReducer,
+ window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
+);
-export default store
\ No newline at end of file
+export default store;