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
2 changes: 1 addition & 1 deletion src/Content/blogs/0000-image-viewer/post.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { post } from "virtual:data";
import post from "virtual:post";

post({
title: "Making an image viewer",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0000-tass/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "TASS",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0001-city-under-a-hill/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "City Under a Hill",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0002-capitol/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Modern Capitol",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0003-purpura-nubes/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Purpura Nubes",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0004-rosea-nubes/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Rosea Nubes",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0005-infrablue/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Infrablue",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0006-ruddy-shelduck/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Tadorna ferruginea",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0007-sternwarte/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Die Sternwarte",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0008-a7c/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "α7c",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0009-pathways/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Pathways",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0010-farmlands/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Farmlands",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0011-symbols/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Symbols",
Expand Down
4 changes: 2 additions & 2 deletions src/Content/photos/0012-stigma/info.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Stigma",
camera: "Sony α7c",
lens: "Sony 90mm f/2.8 macro G OSS",
tags: ["digital", "macro", "nature", "flowers"],
tags: ["digital", "macro", "nature"],
});
4 changes: 2 additions & 2 deletions src/Content/photos/0013-cross/info.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "†",
camera: "Sony α3000 IR modified",
lens: "Sony FE 28-70mm F3.5-5.6 OSS",
tags: ["digital", "nature", "landscape", "infrared"],
tags: ["digital", "infrared", "nature", "landscape"],
});
2 changes: 1 addition & 1 deletion src/Content/photos/0014-electric-trinity/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Electric Trinity",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0015-other-side/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Other side",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0016-singer-company/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Компания Зингеръ",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0017-sunburn/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Sunburn",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0018-architecture-00/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Architecture 0",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0019-emperor-claudius/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Emperor Claudius",
Expand Down
2 changes: 1 addition & 1 deletion src/Content/photos/0020-architecture-01/info.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { photo } from "virtual:data";
import photo from "virtual:photo";

photo({
name: "Architecture 1",
Expand Down
19 changes: 1 addition & 18 deletions src/virtual.d.ts → src/Virtual/data.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,9 @@ declare module "virtual:data" {
cut: JSX.Element;
}

function photo(description: {
name: string;
description?: JSX.Element;
camera?: string;
lens?: string;
film?: string;
tags: string[];
});

function post(description: {
title: string;
date_modified: Date;
date_published: Date;
status: "draft" | "published" | "hidden";
cut: JSX.Element;
});

export type { ImageInfo, PostInfo };

export { photo, post };
export { post };

export const photos: ImageInfo[];
export const posts: PostInfo[];
Expand Down
27 changes: 27 additions & 0 deletions src/Virtual/photo.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { JSX } from "solid-js";

declare module "virtual:photo" {
type Medium = "digital" | "film" | "infrared";
type Location = "moscow" | "saint petersburg" | "veliky novgorod";
type Genre =
| "architecture"
| "landscape"
| "wildlife"
| "weather"
| "macro"
| "product"
| "nature";

type Tag = Medium | Location | Genre;

function photo(description: {
name: string;
description?: JSX.Element;
camera?: string;
lens?: string;
film?: string;
tags: Tag[];
});

export default photo;
}
13 changes: 13 additions & 0 deletions src/Virtual/post.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { JSX } from "solid-js";

module "virtual:post" {
function post(description: {
title: string;
date_modified: Date;
date_published: Date;
status: "draft" | "published" | "hidden";
cut: JSX.Element;
});

export default post;
}
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"jsx": "preserve",
"jsxImportSource": "solid-js",
"types": ["vite-plugin-solid-svg/types-component-solid", "vite/client"],
"paths": { "virtual:data": ["./src/virtual.d.ts"] },
"paths": {
"virtual:data": ["./src/Virtual/data.d.ts"],
"virtual:photo": ["./src/Virtual/photo.d.ts"],
"virtual:post": ["./src/Virtual/post.d.ts"]
},
"noEmit": true,
"skipLibCheck": true,
"isolatedModules": true,
Expand Down