Skip to content

Commit

Permalink
Sitemap etc
Browse files Browse the repository at this point in the history
  • Loading branch information
typeofweb committed Aug 17, 2021
1 parent 2ab710b commit 74ed610
Show file tree
Hide file tree
Showing 16 changed files with 463 additions and 168 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '45 1 * * 4'

Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
12 changes: 6 additions & 6 deletions _wordpress_posts/2019/06/syndrom-oszusta-impostor-syndrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ Ponadto, jak piszą Jaruwan Sakulku i James Alexander, osoby z impostorem obawi
Czy to wszystko brzmi znajomo? Czujesz to u siebie? Widzisz to u innych? Spróbuj ustosunkować się do twierdzeń poniżej:

1. Czuję, że nie zasługuję na sukces, który osiągnęłam/osiągnąłem.
2. Nawet, gdy jestem chwalona/y przez innych, nie czuję, abym osiągnęła/osiągnął aż tak wiele, jak oni sądzą.
3. Może i jestem nagradzany za swoją pracę, ale nie czuję, abym na to zapracował/a.
4. Obawiam się, że ludzie wkrótce dostrzegą, że wcale nie jestem aż tak bystra/bystry, jak udawałam/em, że jestem.
5. Większość moich osiągnęć to szczęśliwy traf.
6. Trudno mi zaakceptować komplementy.
7. Bagatelizuję swoje osiągnięcia, bo nie sądzę, że są aż tak niesamowite, jak ludzie uważają.
2. Nawet, gdy jestem chwalona/y przez innych, nie czuję, abym osiągnęła/osiągnął aż tak wiele, jak oni sądzą.
3. Może i jestem nagradzany za swoją pracę, ale nie czuję, abym na to zapracował/a.
4. Obawiam się, że ludzie wkrótce dostrzegą, że wcale nie jestem aż tak bystra/bystry, jak udawałam/em, że jestem.
5. Większość moich osiągnęć to szczęśliwy traf.
6. Trudno mi zaakceptować komplementy.
7. Bagatelizuję swoje osiągnięcia, bo nie sądzę, że są aż tak niesamowite, jak ludzie uważają.

Ponadto, z ust impostorów często padają takie charakterystyczne stwierdzenia, jak:

Expand Down
4 changes: 3 additions & 1 deletion _wordpress_posts/wspolpraca.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ Na co dzień buduję aplikacje internetowe (Full-Stack JavaScript). Współpracu

Prowadzę <strong>szkolenia autorskie</strong> z zakresu <strong>czytelności kodu, pisania testów jednostkowych</strong> (TDD/BDD) i <em>Code Kata</em>, a także <strong>JavaScript, Node.js, TypeScript, React i HapiJS</strong>. Więcej informacji na temat szkoleń znajdziesz na stronie [https://typeofweb.com/szkolenia](typeofweb.com/szkolenia).

## Inicjatywy społeczne <a href="https://res.cloudinary.com/type-of-web/wp-content/uploads/2018/03/21686839_1666666120073907_3679910495411732745_o.jpg"><img src="https://res.cloudinary.com/type-of-web/wp-content/uploads/2018/03/21686839_1666666120073907_3679910495411732745_o-200x300.jpg" alt="" width="200" height="300" class="alignright size-medium wp-image-1211" /></a>
## Inicjatywy społeczne

<img src="https://res.cloudinary.com/type-of-web/wp-content/uploads/2018/03/21686839_1666666120073907_3679910495411732745_o.jpg" alt="" width="200" height="300" class="alignright size-medium wp-image-1211" />

<p style="hyphens: none; -ms-hyphens: none; -moz-hyphens: none; word-break: normal; -webkit-hyphens: none; word-wrap: normal;">Jedną z moich ambicji jest <strong>pomóc innym w nauce programowania</strong>. Dlatego też, współorganizowałem konferencje <a href="https://typeofweb.com/call-for-proposals-na-meet-js-summit-2018/">meet.js Summit 2018</a>, <a href="https://typeofweb.com/meet-js-summit-2017-kulisami/">meet.js Summit 2017</a> i <a href="http://summit.meetjs.pl/2013/">meet.js Summit 2013</a>. Regularnie prowadzę też darmowe meetupy <a href="https://facebook.com/meetjspl">meet.js Gdańsk</a>. W 2016 roku w Warszawie odebrałem nagrodę <em>Curly Braces</em> dla meet.js Gdańsk za <strong>najlepiej zorganizowane spotkania</strong> w Polsce.</p>

Expand Down
2 changes: 1 addition & 1 deletion components/molecules/SearchWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ const SearchModal = ({ onCancel }: SearchModalProps) => {
return (
<InBody>
<InstantSearch searchClient={searchClient} indexName="typeofweb_prod">
<div className="animate-delay-0 animate-duration-100 lg:pt-[30vh] fixed z-50 inset-0 flex items-start justify-center text-base bg-gray-400 bg-opacity-50 overflow-hidden animate-appear">
<div className="animate-delay-0 animate-duration-100 lg:pt-[20vh] fixed z-50 inset-0 flex items-start justify-center text-base bg-gray-400 bg-opacity-50 overflow-hidden animate-appear">
<div
ref={searchModalRef}
className="flex flex-col items-stretch justify-between w-full max-h-screen bg-white shadow-md xl:max-w-5xl xl:rounded-md"
Expand Down
26 changes: 22 additions & 4 deletions components/organisms/AppFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,33 @@ export const AppFooter = memo(() => {
</nav>
<address className="text-center leading-7">
Type of Web - Michał Miszczyszyn
<div>
<p className="not-italic">
<Link href="/polityka-prywatnosci">
<a className="hover:text-green-700 transition-colors">Polityka prywatności</a>
<a className="hover:text-green-700 underline transition-colors">Polityka prywatności</a>
</Link>
{' | '}
<Link href="/regulamin">
<a className="hover:text-green-700 transition-colors">Regulamin</a>
<a className="hover:text-green-700 underline transition-colors">Regulamin</a>
</Link>
</div>
</p>
<p className="mt-3 font-mono not-italic">
<a href="/humans.txt" className="hover:text-green-700 underline transition-colors">
humans.txt
</a>{' '}
<a href="/lawyers.txt" className="hover:text-green-700 underline transition-colors">
lawyers.txt
</a>
</p>
<p className="mt-3 text-lg not-italic font-bold">
Znalazłeś/aś błąd na stronie?{' '}
<a
className="hover:text-green-700 underline transition-colors"
href="https://github.com/typeofweb/typeofweb.com/issues/new"
>
Otwórz issue na GitHubie
</a>
!
</p>
</address>
</footer>
);
Expand Down
35 changes: 35 additions & 0 deletions generateLawyers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* eslint-disable @typescript-eslint/consistent-type-assertions -- it's a script, c'mon */
import Path from 'path';
import Url from 'url';

import { init } from 'license-checker';

import Pkg from './package.json';
const { dependencies, devDependencies } = Pkg;

const formatRow = (row: readonly (string | readonly string[] | undefined)[]) =>
'| ' + row.map((v) => v ?? '').join(' | ') + ' |';

const columns = ['name', 'version', 'licenses', 'repository', 'publisher', 'url'];

init({ start: Path.dirname(Url.fileURLToPath(import.meta.url)) }, (err, ret) => {
const headers = formatRow(columns);
const emptyRow = formatRow(columns.map(() => '---'));
const rows = Object.entries(ret)
.map(([nameVersion, obj]) => {
const [name, version] = nameVersion.split('@');
const { licenses, repository, publisher, url } = obj;
return { name, version, licenses, repository, publisher, url };
})
.filter(({ name, version }) => {
return (
dependencies[name as keyof typeof dependencies] === version ||
devDependencies[name as keyof typeof devDependencies] === version
);
})
.map(({ name, version, licenses, repository, publisher, url }) => {
return formatRow([name, version, licenses, repository, publisher, url]);
});

console.log([headers, emptyRow, ...rows].join('\n'));
});
10 changes: 5 additions & 5 deletions next-sitemap.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const origin = process.env.NEXT_PUBLIC_HOST || process.env.NEXT_PUBLIC_VERCEL_URL || 'typeofweb.com' ;
const protocol = process.env.NODE_ENV === 'production' ? 'https' : 'http' ;
const host = `${protocol}://${origin}` ;
const origin = process.env.NEXT_PUBLIC_HOST || process.env.NEXT_PUBLIC_VERCEL_URL || 'typeofweb.com';
const protocol = process.env.NODE_ENV === 'production' ? 'https' : 'http';
const host = `${protocol}://${origin}`;

module.exports = {
siteUrl: host,
generateRobotsTxt: true,
exclude: ['/admin']
}
exclude: ['/admin'],
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@types/gtag.js": "0.0.7",
"@types/invariant": "2.2.34",
"@types/js-yaml": "4.0.2",
"@types/license-checker": "25.0.3",
"@types/memoizee": "0.4.6",
"@types/proxyquire": "1.3.28",
"@types/react": "17.0.17",
Expand All @@ -62,6 +63,7 @@
"eslint-config-next": "11.1.0",
"eslint-plugin-react-hooks": "4.2.0",
"hast-util-to-string": "1.0.4",
"license-checker": "25.0.1",
"next-transpile-modules": "8.0.0",
"postcss": "8.3.6",
"postcss-import": "14.0.2",
Expand Down
6 changes: 4 additions & 2 deletions pages/404.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Link from 'next/link';

import { SiteHeader } from '../components/molecules/SiteHeader';
import { AppFooter } from '../components/organisms/AppFooter';

export default function Custom404() {
return (
<>
<div className="h-[80vh] flex flex-col items-center justify-center">
<SiteHeader pageKind="page" />
<div className="h-[80vh] pb-[20vh] flex flex-col items-center justify-center">
<h1 className="glitch" data-text="404 - Page Not Found">
404 - Page Not Found
</h1>
Expand All @@ -25,7 +27,7 @@ export default function Custom404() {
background-clip: text;
white-space: nowrap;
font-size: max(1rem, 3vw);
padding: 1rem 0;
padding: 1rem 0 0 0;
animation: move-bg 1000s infinite linear;
}
Expand Down
13 changes: 11 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ function ScriptOnce(props: NextScriptProps) {

function ScriptAfterInteraction({
children,
id,
...props
}: Partial<Omit<HTMLScriptElement, 'children'>> & { readonly children?: string }) {
}: Partial<Omit<HTMLScriptElement, 'children'>> & { readonly children?: string; readonly id: string }) {
useEffect(() => {
window.addEventListener('scroll', listener, { passive: true, once: true });

if (sessionStorage['s' + id]) {
// hopefully the script is cached at this point
listener();
}

return () => {
window.removeEventListener('scroll', listener);
};

function listener() {
sessionStorage['s' + id] = true;
window.removeEventListener('scroll', listener);
(window.requestIdleCallback || window.requestAnimationFrame)(() => {
const script = Object.entries(props).reduce((script, [key, value]) => {
Expand Down Expand Up @@ -78,11 +85,13 @@ const MyApp: AppType = ({ Component, pageProps }) => {
</UIStateProvider>
</RunningHeaderProvider>
<ScriptAfterInteraction
id="fancyLinkUnderline"
defer
async
>{`w.CSS?.paintWorklet?.addModule("/fancyLinkUnderline.min.js")`}</ScriptAfterInteraction>
<ScriptAfterInteraction src="/contentVisibility.min.js" defer async />
<ScriptAfterInteraction id="contentVisibility" src="/contentVisibility.min.js" defer async />
<ScriptAfterInteraction
id="gtag"
src="https://www.googletagmanager.com/gtag/js?id=G-KNFC661M43"
defer
async
Expand Down
1 change: 1 addition & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default class MyDocument extends Document {
return (
<Html lang="pl-PL" dir="ltr">
<Head>
<link rel="author" href="humans.txt" />
<link
rel="preload"
as="font"
Expand Down
68 changes: 36 additions & 32 deletions public/blog-demos/2017/09/13/index.html
Original file line number Diff line number Diff line change
@@ -1,37 +1,41 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<style>
button {
-webkit-appearance: none;
font-weight: 700;
font-size: 14px;
display: inline-block;
border-color: #e9e9e9;
background-color: #1f133a;
color: #fff;
padding: .7em 1.5em;
border: 0;
font-family: Ubuntu,sans-serif;
border-radius: 100px;
-webkit-transition: background-color .3s ease-in-out;
-moz-transition: background-color .3s ease-in-out;
-o-transition: background-color .3s ease-in-out;
transition: background-color .3s ease-in-out; cursor: pointer;
}
button:hover { background-color: #00f9bd; }
[hidden] { display: none; }
</style>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Payment Request API demo – Type of Web</title>
</head>
<body>
<button style="font-size: 20px;">Zapłać</button>
<head>
<style>
button {
-webkit-appearance: none;
font-weight: 700;
font-size: 14px;
display: inline-block;
border-color: #e9e9e9;
background-color: #1f133a;
color: #fff;
padding: 0.7em 1.5em;
border: 0;
font-family: Ubuntu, sans-serif;
border-radius: 100px;
-webkit-transition: background-color 0.3s ease-in-out;
-moz-transition: background-color 0.3s ease-in-out;
-o-transition: background-color 0.3s ease-in-out;
transition: background-color 0.3s ease-in-out;
cursor: pointer;
}
button:hover {
background-color: #00f9bd;
}
[hidden] {
display: none;
}
</style>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Payment Request API demo – Type of Web</title>
</head>
<body>
<button style="font-size: 20px">Zapłać</button>

<!--<a style="display: block; margin-top: 50px;" href="https://typeofweb.com/">typeofweb.com</a>-->
<!--<a style="display: block; margin-top: 50px;" href="https://typeofweb.com/">typeofweb.com</a>-->

<script src="./payment.js"></script>
</body>
<script src="./payment.js"></script>
</body>
</html>

Loading

1 comment on commit 74ed610

@vercel
Copy link

@vercel vercel bot commented on 74ed610 Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.