Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import Image from "next/image";
import Link from "next/link";
import type { ReactNode } from "react";
import { getAllArticles } from "src/article";
import { getAllArticles } from "@/src/article";
import {
type Author,
getAllAuthors,
getPodcastEpisodes,
} from "src/data/content";
import { RouteTo } from "src/routing";
} from "@/src/data/content";
import { RouteTo } from "@/src/routing";

const Page = async () => {
const episodes = await getPodcastEpisodes("content/podcast.yml");
Expand Down Expand Up @@ -128,7 +128,7 @@ const PersonCard = ({
photoUrl: string;
mail: string;
}) => (
<div className="w-[180px] text-center">
<div className="w-45 text-center">
<Image
src={photoUrl}
className="rounded-full mb-3 m-auto"
Expand Down
8 changes: 4 additions & 4 deletions app/api/articles/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {
compareByDate,
getAllArticles,
stripBody,
} from "src/article";
import { absolute, getArticlePath } from "src/routing";
import { articleRoot } from "src/server-utils";
import { getResizedImageUrl } from "src/utils";
} from "@/src/article";
import { absolute, getArticlePath } from "@/src/routing";
import { articleRoot } from "@/src/server-utils";
import { getResizedImageUrl } from "@/src/utils";

export async function GET() {
const articles = getAllArticles(articleRoot)
Expand Down
2 changes: 1 addition & 1 deletion app/api/fakturoid/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NextRequest } from "next/server";
import { decodeWebhook } from "src/fakturoid";
import { decodeWebhook } from "@/src/fakturoid";

export async function POST(request: NextRequest): Promise<Response> {
const auth = request.headers.get("Authorization");
Expand Down
6 changes: 3 additions & 3 deletions app/api/feeds/hrebenovka/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { join } from "node:path";
import {
convertEpisodeToPodcastItem,
getPodcastEpisodes,
} from "src/data/content";
import { type iTunesPodcastShow, renderPodcastFeed } from "src/feeds";
import { absolute, RouteTo } from "src/routing";
} from "@/src/data/content";
import { type iTunesPodcastShow, renderPodcastFeed } from "@/src/feeds";
import { absolute, RouteTo } from "@/src/routing";

export async function GET() {
const dataFile = join(process.cwd(), "content/hrebenovka.yml");
Expand Down
6 changes: 3 additions & 3 deletions app/api/feeds/podcast/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { join } from "node:path";
import {
convertEpisodeToPodcastItem,
getPodcastEpisodes,
} from "src/data/content";
import { type iTunesPodcastShow, renderPodcastFeed } from "src/feeds";
import { absolute, RouteTo } from "src/routing";
} from "@/src/data/content";
import { type iTunesPodcastShow, renderPodcastFeed } from "@/src/feeds";
import { absolute, RouteTo } from "@/src/routing";

export async function GET() {
const dataFile = join(process.cwd(), "content/podcast.yml");
Expand Down
6 changes: 3 additions & 3 deletions app/clanky/ArchiveView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Image from "next/image";
import Link from "next/link";
import { useRouter, useSearchParams } from "next/navigation";
import { type ChangeEvent, useState } from "react";
import type { Metadata } from "src/article";
import { RouteTo } from "src/routing";
import { tilde } from "src/utils";
import type { Metadata } from "@/src/article";
import { RouteTo } from "@/src/routing";
import { tilde } from "@/src/utils";
import {
type Filter,
type FilterOptions,
Expand Down
8 changes: 4 additions & 4 deletions app/clanky/[...path]/ArticleContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import Markdoc from "@markdoc/markdoc";
import Image from "next/image";
import { default as NextLink } from "next/link";
import React from "react";
import { plausibleEventClass } from "src/data/plausible";
import { defaultMarkdocConfig } from "src/markdoc-schema";
import { siteUrl } from "src/routing";
import { getImageSrcSet, tilde } from "src/utils";
import { plausibleEventClass } from "@/src/data/plausible";
import { defaultMarkdocConfig } from "@/src/markdoc-schema";
import { siteUrl } from "@/src/routing";
import { getImageSrcSet, tilde } from "@/src/utils";
import { DatawrapperChart } from "./DatawrapperChart";
import { PodcastPlayer } from "./PodcastPlayer";

Expand Down
9 changes: 5 additions & 4 deletions app/clanky/[...path]/PodcastPlayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import Image from "next/image";
import Plausible from "plausible-tracker";
import type { PodcastEpisode } from "src/data/podcast";
import { RouteTo } from "src/routing";
import { tilde } from "src/utils";
import type { PodcastEpisode } from "@/src/data/podcast";
import { RouteTo } from "@/src/routing";
import { tilde } from "@/src/utils";

type PodcastPlayerProps = {
episode: PodcastEpisode;
Expand Down Expand Up @@ -52,7 +52,8 @@ const ServiceButton = ({ href, title }: { href: string; title: string }) => (
<a
href={href}
className="rounded-full whitespace-nowrap border text-white! border-white px-2 hover:bg-white hover:text-plum!"
target="_blank" rel="noopener"
target="_blank"
rel="noopener"
>
▷ {title}
</a>
Expand Down
18 changes: 9 additions & 9 deletions app/clanky/[...path]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { ArticleContent } from "app/clanky/[...path]/ArticleContent";
import { BannerBox } from "components/BannerBox";
import { PreviewNest } from "components/PreviewNest";
import { SectionDivider } from "components/SectionDivider";
import type { Metadata } from "next";
import Image from "next/image";
import { notFound } from "next/navigation";
import { type Article, compareByDate, readArticle } from "src/article";
import { getCachedData } from "src/data/cache";
import { type Author, getAllAuthors } from "src/data/content";
import { ArticleContent } from "@/app/clanky/[...path]/ArticleContent";
import { BannerBox } from "@/components/BannerBox";
import { PreviewNest } from "@/components/PreviewNest";
import { SectionDivider } from "@/components/SectionDivider";
import { type Article, compareByDate, readArticle } from "@/src/article";
import { getCachedData } from "@/src/data/cache";
import { type Author, getAllAuthors } from "@/src/data/content";
import {
articleRoot,
getFileSystemPathForUrlPathFragments,
getFilesRecursively,
getUrlPathFragmentsForFileSystemPath,
} from "src/server-utils";
import { endlessGeneratorOf, getResizedImageUrl, tilde } from "src/utils";
} from "@/src/server-utils";
import { endlessGeneratorOf, getResizedImageUrl, tilde } from "@/src/utils";

type Params = {
path: string[];
Expand Down
4 changes: 2 additions & 2 deletions app/clanky/filters.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Metadata } from "src/article";
import { unique } from "src/utils";
import type { Metadata } from "@/src/article";
import { unique } from "@/src/utils";

export type FilterOptions = Record<string, string[]>;
export type Settings = Record<string, string>;
Expand Down
2 changes: 1 addition & 1 deletion app/clanky/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Metadata } from "next";
import { Suspense } from "react";
import { getAllArticles, stripBody } from "src/article";
import { getAllArticles, stripBody } from "@/src/article";
import { ArchiveView } from "./ArchiveView";
import { buildFilterOptions } from "./filters";

Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Metadata } from "next";
import { PT_Serif } from "next/font/google";
import Image from "next/image";
import Link from "next/link";
import { RouteTo, siteUrl } from "src/routing";
import { RouteTo, siteUrl } from "@/src/routing";
import { NewsletterBox } from "./newsletter/NewsletterBox";
import { SearchForm } from "./SearchForm";
import "./global.css";
Expand Down
2 changes: 1 addition & 1 deletion app/obchod/[slug]/BookDetail.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useState } from "react";
import type { Book } from "src/data/books";
import type { Book } from "@/src/data/books";
import { OrderForm } from "./OrderForm";

type Props = {
Expand Down
14 changes: 7 additions & 7 deletions app/obchod/[slug]/actions.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"use server";

import { type Book, createOrder, getBookById } from "src/data/books";
import {
createInvoice,
createSubject,
getBearerTokenFromEnv,
type InvoiceLine,
} from "src/fakturoid";
import {
type decodeType,
optional,
record,
string,
union,
} from "typescript-json-decoder";
import { type Book, createOrder, getBookById } from "@/src/data/books";
import {
createInvoice,
createSubject,
getBearerTokenFromEnv,
type InvoiceLine,
} from "@/src/fakturoid";

const numberFromString = (val: unknown) => parseInt(string(val), 10);

Expand Down
10 changes: 5 additions & 5 deletions app/obchod/[slug]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { Metadata } from "next";
import Image from "next/image";
import { notFound } from "next/navigation";
import { getAllBooks } from "src/data/books";
import { Breadcrumbs } from "@/components/Breadcrumbs";
import { getAllBooks } from "@/src/data/books";
import { RouteTo } from "@/src/routing";
import { getResizedImageUrl } from "@/src/utils";
import { BookDetails } from "./BookDetail";
import Image from "next/image";
import { getResizedImageUrl } from "src/utils";
import { Breadcrumbs } from "components/Breadcrumbs";
import { RouteTo } from "src/routing";

type Params = {
slug: string;
Expand Down
6 changes: 3 additions & 3 deletions app/obchod/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { type Book, getAllBooks, sortByYear } from "src/data/books";
import { RouteTo } from "src/routing";
import { getResizedImageUrl } from "src/utils";
import { type Book, getAllBooks, sortByYear } from "@/src/data/books";
import { RouteTo } from "@/src/routing";
import { getResizedImageUrl } from "@/src/utils";

export const metadata: Metadata = {
title: "Ohlasy: Knihy",
Expand Down
24 changes: 12 additions & 12 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { BannerBox } from "components/BannerBox";
import { PreviewNest } from "components/PreviewNest";
import { SectionDivider } from "components/SectionDivider";
import Image from "next/image";
import Link from "next/link";
import { compareByDate, getAllArticles, type Metadata } from "src/article";
import type { Banner } from "src/data/banners";
import { getAllBanners } from "src/data/banners";
import { getAllAuthors } from "src/data/content";
import { BannerBox } from "@/components/BannerBox";
import { PreviewNest } from "@/components/PreviewNest";
import { SectionDivider } from "@/components/SectionDivider";
import { compareByDate, getAllArticles, type Metadata } from "@/src/article";
import type { Banner } from "@/src/data/banners";
import { getAllBanners } from "@/src/data/banners";
import { getAllAuthors } from "@/src/data/content";
import {
getLatestTopicsSummary,
getUserAvatar,
type LatestTopicsSummary,
} from "src/data/forum";
import type { TopArticles } from "src/data/plausible";
import { getTopArticles, plausibleEventClass } from "src/data/plausible";
import { RouteTo } from "src/routing";
import { endlessGeneratorOf, shuffleInPlace, tilde } from "src/utils";
} from "@/src/data/forum";
import type { TopArticles } from "@/src/data/plausible";
import { getTopArticles, plausibleEventClass } from "@/src/data/plausible";
import { RouteTo } from "@/src/routing";
import { endlessGeneratorOf, shuffleInPlace, tilde } from "@/src/utils";

// Revalidate this page every 5 minutes
export const revalidate = 300;
Expand Down
6 changes: 3 additions & 3 deletions app/podcast/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Metadata } from "next";
import Image from "next/image";
import Link from "next/link";
import { type Article, compareByDate, getAllArticles } from "src/article";
import { RouteTo } from "src/routing";
import { tilde } from "src/utils";
import { type Article, compareByDate, getAllArticles } from "@/src/article";
import { RouteTo } from "@/src/routing";
import { tilde } from "@/src/utils";

export const metadata: Metadata = {
title: "Ohlasy Podcast",
Expand Down
2 changes: 1 addition & 1 deletion app/stats/content-stats.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Article } from "src/article";
import type { Article } from "@/src/article";

export function groupBySelector<Key extends PropertyKey, Value>(
values: Value[],
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/articles/count/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
import { renderCSV } from "app/stats/content-stats";
import { renderCSV } from "@/app/stats/content-stats";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";

export async function GET() {
const stats: Record<string, number> = {};
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/articles/length/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type Article, getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
import { renderCSV } from "app/stats/content-stats";
import { renderCSV } from "@/app/stats/content-stats";
import { type Article, getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";

const readingSpeedInWordsPerMinute = 200;

Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/authors/bus_factor/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
import { unique } from "src/utils";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";
import { unique } from "@/src/utils";

export function GET() {
const articles = getAllArticles(articleRoot);
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/authors/diversity/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
import { unique } from "src/utils";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";
import { unique } from "@/src/utils";

export function GET() {
const articles = getAllArticles(articleRoot);
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/authors/history/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
import { unique } from "src/utils";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";
import { unique } from "@/src/utils";

export function GET() {
const articles = getAllArticles(articleRoot);
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/authors/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
getArticlesByAuthor,
renderCSV,
sum,
} from "app/stats/content-stats";
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
} from "@/app/stats/content-stats";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";

export function GET(request: Request) {
const { searchParams } = new URL(request.url);
Expand Down
6 changes: 3 additions & 3 deletions app/stats/content/categories/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
getArticlesByCategory,
renderCSV,
sum,
} from "app/stats/content-stats";
import { getAllArticles } from "src/article";
import { articleRoot } from "src/server-utils";
} from "@/app/stats/content-stats";
import { getAllArticles } from "@/src/article";
import { articleRoot } from "@/src/server-utils";

export async function GET(request: Request) {
const { searchParams } = new URL(request.url);
Expand Down
4 changes: 2 additions & 2 deletions app/stats/donations/donors/route.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getPastYearTransactionsByMonth } from "src/data/darujme";
import { unique } from "src/utils";
import { getPastYearTransactionsByMonth } from "@/src/data/darujme";
import { unique } from "@/src/utils";

export const dynamic = "force-dynamic";

Expand Down
4 changes: 2 additions & 2 deletions app/stats/donations/last_year/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
getPastYearTransactionsByMonth,
sumOneTimeDonations,
sumRecurrentDonations,
getPastYearTransactionsByMonth,
} from "src/data/darujme";
} from "@/src/data/darujme";

export const dynamic = "force-dynamic";

Expand Down
Loading
Loading