Skip to content

Commit

Permalink
change optimized image path
Browse files Browse the repository at this point in the history
  • Loading branch information
clevertree committed Mar 11, 2024
1 parent 07be779 commit 1eed3f2
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 43 deletions.
6 changes: 3 additions & 3 deletions .env
@@ -1,4 +1,4 @@
NEXT_PUBLIC_URL=https://paradigmthreat.net
NEXT_PUBLIC_METADATA_URL=https://paradigmthreat.net
NEXT_PUBLIC_API=https://api.paradigmthreat.com
NEXT_PUBLIC_ASSET_PATH=app
NEXT_PUBLIC_ASSET_BUILD=dist
Expand All @@ -11,6 +11,6 @@ NEXT_PUBLIC_GIT_HASH_URL=https://github.com/clevertree/paradigm-threat-site/comm

NEXT_PUBLIC_CHAT_URL=https:/chat.paradigmthreat.net
NEXT_PRIVATE_CHAT_BOT_TOKEN=
NEXT_PUBLIC_OPTIMIZE_IMAGES=false
#NEXT_PUBLIC_OPTIMIZE_IMAGE_PATH=/site/opt/img/
#NEXT_PUBLIC_OPTIMIZE_IMAGES=false
NEXT_PUBLIC_OPTIMIZE_IMAGE_PATH=/site/thumb
NEXT_PUBLIC_AUTOGEN_IMAGE_WIDTH=384
3 changes: 2 additions & 1 deletion .eslintrc
Expand Up @@ -11,7 +11,8 @@
"cypress/assertion-before-screenshot": "warn",
"cypress/no-force": "warn",
"cypress/no-async-tests": "error",
"cypress/no-pause": "error"
"cypress/no-pause": "error",
"@next/next/no-img-element": "off"
},
"extends": [
"next/core-web-vitals",
Expand Down
1 change: 0 additions & 1 deletion app/_opt/.gitignore

This file was deleted.

Empty file removed app/_opt/.navignore
Empty file.
2 changes: 1 addition & 1 deletion app/censorship/discord-ban/page.mdx
Expand Up @@ -5,7 +5,7 @@ export const metadata = { // Meta Data
description: "The Paradigm Threat Discord Server was taken down, after all these years",
keywords: "Telegram, Discord Death Row, Banned, Censorship",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/conspiracy/cosmology/ralph_juergens_murdered.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/conspiracy/cosmology/ralph_juergens_murdered.jpg`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/chronology/history-qa/page.mdx
Expand Up @@ -8,7 +8,7 @@ export const metadata = {
description: "Before the first memories of Earth's history began, the planets of our Solar System were not yet part of our Sun's orbit. Instead, the planets were part of an L-Type Brown Dwarf System that was floating through our galaxy as a positive anode in a neutral galactic environment. As it entered our positively charged Sun's orbit, Saturn would become connected to the Sun's environment as a negatively charged cathode. Saturn's system drew energy from the Sun into itself as a super-capacitor would until it became 'full', at which point the Saturn system exploded stripping it's outer layers and creating the gas planets Jupiter, Neptune, Uranus, and Venus.",
keywords: "Saturnian Cosmology, Black Cube of Saturn, Electric Universe, History Redacted, Young Earth, Hollow Earth, Conspiracy Theory",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/conspiracy/cosmology/ralph_juergens_murdered.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/conspiracy/cosmology/ralph_juergens_murdered.jpg`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/chronology/page.mdx
Expand Up @@ -8,7 +8,7 @@ export const metadata = {
description: "The objective of this timeline is to compile an accessible alternate history of Earth based on Saturnian Cosmology as a sequence of events from the first memory to modern day. Questioning the 'official' timeline of Earth's history is not a new phenomenon. From the 16th century historian critics like Jean Hardouin, Robert Baldauf, Edwin Johnson, Wilhelm Kammeyer, and Heribert Illig have accused church chronologists of the Holy Roman Empire like Joseph Scaliger of conspiring to obfuscate historical records before the 13th century C.E. A comparison of conflicting records reveal periods of hundreds of thousands of years stretched or squashed, as well as periods that may have never existed.",
keywords: "Saturnian Cosmology Timeline, Human History Timeline, Atlantis, Tower of Babel, Noahs Ark, The Exodus, Deep State, Jews",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/chronology/saturn/norse_yggdrasil.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/chronology/saturn/norse_yggdrasil.jpg`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/conspiracy/philadelphia/page.mdx
Expand Up @@ -5,7 +5,7 @@ export const metadata = { // Meta Data
description: "The Philadelphia Experiment was an attempt to use high amplitude energy to create a cloaking device. While it functioned, the ship didn't just disappear - it was sent somewhere else. Not another dimension. Not another time, nor another universe. Instead, it was sent somewhere locally - Norfolk, Virginia! When the experimental ship device was shut off, humans were frozen into the ships hull. Some went insane. Some caught on fire and could not be put out. No one turned permanently invisible. No one time traveled..",
keywords: "Philadelphia Experiment, cloaking device, quantum teleportation, frozen into the hull",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/conspiracy/philadelphia/philadelphia_experiment.png`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/conspiracy/philadelphia/philadelphia_experiment.png`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/git-log.json
@@ -1 +1 @@
[{"hash":"41fb632aa06a877998dfda90c822f8500a03b5d6","date":"2024-03-11T11:02:26-04:00","message":"Update autogen.js"},{"hash":"b5206cd6c52138a46fabaf7d4e9315337cdc8890","date":"2024-03-11T10:26:37-04:00","message":"Update page.mdx - fixed typo"},{"hash":"7083cf01531581816d56a03bca7bc3dcfa89656f","date":"2024-03-10T17:17:30-04:00","message":"Scalar Energy as the basis of all creation"},{"hash":"395559920df1225489e9b64a8000188d49bed5af","date":"2024-03-10T13:05:42-04:00","message":"Fix for vercel openGraph issue"},{"hash":"ee24c8e4311c98556a67ba11cf5dd8b3da4c2f12","date":"2024-03-10T12:50:33-04:00","message":"readd autogen optimized image script"},{"hash":"717d1ef0f91049010beb84e6f7854ee70c0a415a","date":"2024-03-10T12:19:08-04:00","message":"Added description of period before the Golden Age"},{"hash":"fd545859af77f639111477b90aa951ab7990185c","date":"2024-03-09T11:32:36-05:00","message":"Add planetary lifecycle description"},{"hash":"3b77982e87f2eaee91a9e7da28489494451e43da","date":"2024-03-09T10:37:07-05:00","message":"fix embed videos"}]
[{"hash":"ffc4dccd92d76ea7c7a72d0485654dad9425242d","date":"2024-03-11T13:40:53-04:00","message":"change optimized image path"},{"hash":"07be77940b541ff74ce4f93b507b1bb4bb0aaff2","date":"2024-03-11T11:02:26-04:00","message":"Update autogen.js"},{"hash":"b5206cd6c52138a46fabaf7d4e9315337cdc8890","date":"2024-03-11T10:26:37-04:00","message":"Update page.mdx - fixed typo"},{"hash":"7083cf01531581816d56a03bca7bc3dcfa89656f","date":"2024-03-10T17:17:30-04:00","message":"Scalar Energy as the basis of all creation"},{"hash":"395559920df1225489e9b64a8000188d49bed5af","date":"2024-03-10T13:05:42-04:00","message":"Fix for vercel openGraph issue"},{"hash":"ee24c8e4311c98556a67ba11cf5dd8b3da4c2f12","date":"2024-03-10T12:50:33-04:00","message":"readd autogen optimized image script"},{"hash":"717d1ef0f91049010beb84e6f7854ee70c0a415a","date":"2024-03-10T12:19:08-04:00","message":"Added description of period before the Golden Age"},{"hash":"fd545859af77f639111477b90aa951ab7990185c","date":"2024-03-09T11:32:36-05:00","message":"Add planetary lifecycle description"}]
1 change: 1 addition & 0 deletions app/layout.tsx
Expand Up @@ -15,6 +15,7 @@ import './site/globals.css'
import styles from './site/layout.module.scss';

export const metadata: Metadata = {
metadataBase: new URL(`${process.env.NEXT_PUBLIC_METADATA_URL}`),
title: 'Paradigm Threat',
description: 'Conspiracy Repository',
}
Expand Down
2 changes: 1 addition & 1 deletion app/mars/page.mdx
Expand Up @@ -8,7 +8,7 @@ export const metadata = {
description: "Martial Law. Marshalling. Marching. Mergers. Martyrdom. These familiar terms of conquest are named after the planet of conquest: Mars. The origins of these words suggest systems of control imposed upon us by humans who associate themselves with the planet Mars.",
keywords: "The Pyramidal Empire, The Deep State, Mars, Martians, Humans on Mars, Mars controls Earthm, Inland Empire",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/mars/wotw_technology_heat_ray.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/mars/wotw_technology_heat_ray.jpg`,
}
}

Expand Down
16 changes: 8 additions & 8 deletions app/mudflood/page.mdx
Expand Up @@ -9,7 +9,7 @@ export const metadata = {
description: "The MudFlood Energetic Event Hypothesis proposes a solution to the mystery of the world-wide ‘Mud Flood’ event and its alleged cover-up while attempting to answer: Who it happened to, What happened, When, Where, Why, and How did it happen?",
keywords: "MudFlood, Energetic Event Hypothesis, The Great Reset, Apocalypse, World War of 1812",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/mudflood/mudflood_journalistic_six.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/mudflood/mudflood_journalistic_six.jpg`,
}
}

Expand Down Expand Up @@ -679,7 +679,7 @@ take into account a great deal of 19th century testimony following the war.
<PopImage src={require("./blood_rain_priest_1888.jpg?w=384")} alt="MudFlood Event: BloodRain & Priest
A Jesuit Priest takes advantage of the frightened and confused population as the MudRain pours
## `“God is punishing you”`
## `“God is punishing you”`
"
className={`[&>img]:rounded-md ${imageStyleRight}`}/>
Expand Down Expand Up @@ -1114,12 +1114,12 @@ MudFlood Event Redacted Dates:
<PopImage src={require("./mudflood_buried_russian_winter_palace_deepfake.jpg?w=384")} alt="MudFlood Controlled Opposition Deep Fake by
KorbenDallas from StolenHistory.net
Controlled Opposition agent KorbenDallas deliberately misled MudFlood investigators by claiming engravings by
G. Piranesi illustrate a 'Pre-MudFlooded' view of the Russian Winter Palace when compared to modern photos of the same
palace.
However, the featured engraving shows the Konstantin Palace from the rear, not the Winter Palace from the front.
This example of Revelation of the Method promotes discreditation of MudFlood Research as the StolenHistory.net
thread is purposefully and perpetually net-boosted and designed to be easily debunked.
Controlled Opposition agent KorbenDallas deliberately misled MudFlood investigators by claiming engravings by
G. Piranesi illustrate a 'Pre-MudFlooded' view of the Russian Winter Palace when compared to modern photos of the same
palace.
However, the featured engraving shows the Konstantin Palace from the rear, not the Winter Palace from the front.
This example of Revelation of the Method promotes discreditation of MudFlood Research as the StolenHistory.net
thread is purposefully and perpetually net-boosted and designed to be easily debunked.
"
className={`[&>img]:rounded-md ${imageStyleRight}`}/>

Expand Down
2 changes: 1 addition & 1 deletion app/page.mdx
Expand Up @@ -9,7 +9,7 @@ export const metadata = {
description: "A repository for conspiracy theory investigation and resources. The goal of this website is to seek true-or-false conclusions to every conspiracy theory",
keywords: "Research, Conspiracy, Alt History, MudFlood, Energetic Event Hypothesis, The Great Reset, Apocalypse, World War of 1812",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/chronology/saturn/earth_was_saturns_moon2.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/chronology/saturn/earth_was_saturns_moon2.jpg`,
}
}

Expand Down
1 change: 1 addition & 0 deletions app/site/.gitignore
@@ -0,0 +1 @@
thumb
2 changes: 1 addition & 1 deletion app/war/page.mdx
Expand Up @@ -8,7 +8,7 @@ export const metadata = {
description: "Therefore, it is logical to conclude that the Great Wars of the 20th century were perpetuated through international conglomerates like the Boeing Corporation",
keywords: "All wars are banker wars, War lies, WW2 is a lie, Genocide, World War 2",
openGraph: {
images: `${process.env.NEXT_PUBLIC_URL}/war/ww2meme.jpg`,
images: `${process.env.NEXT_PUBLIC_METADATA_URL}/war/ww2meme.jpg`,
}
}

Expand Down
20 changes: 10 additions & 10 deletions components/FileSearchForm/FileSearchForm.js
Expand Up @@ -27,22 +27,22 @@ export default function FileSearchForm ({ keywords, directory }) {
setSearchResults(files)
setLoading(false)
}
}, [keywordsList])
}, [directory, keywordsList])

return (
<>
<form
onSubmit={onSubmit} className={styles.form}
ref={refForm}
>
<fieldset className='asset-search'>
<fieldset className="asset-search">
<input
name='search'
name="search"
onFocus={onFocus}
onChange={onChange}
defaultValue={keywordsList}
/>
<button type='submit'>Search</button>
<button type="submit">Search</button>
</fieldset>

</form>
Expand Down Expand Up @@ -76,11 +76,11 @@ export default function FileSearchForm ({ keywords, directory }) {
<div className={styles.assetContainer}>
{files.map((filePath) => renderAsset(filePath))}
</div>
)
)
: <h3>No assets found</h3>}
</>
)
)}
)
)}
</>
)

Expand Down Expand Up @@ -125,7 +125,7 @@ export default function FileSearchForm ({ keywords, directory }) {
height={256}
alt={filePath}
>
<a href={filePath} target='_blank' rel='noopener noreferrer'>{filePath}</a>
<a href={filePath} target="_blank" rel="noopener noreferrer">{filePath}</a>
</PopImage>
)
case 'pdf':
Expand All @@ -145,8 +145,8 @@ export default function FileSearchForm ({ keywords, directory }) {
<div
key={filePath}
>
<embed src={filePath} className='w-full min-h-[40vh] min-w-[20vw]' />
<a href={filePath} target='_blank' rel='noopener noreferrer'>{filePath}</a>
<embed src={filePath} className="w-full min-h-[40vh] min-w-[20vw]"/>
<a href={filePath} target="_blank" rel="noopener noreferrer">{filePath}</a>
</div>
)
}
Expand Down
20 changes: 10 additions & 10 deletions components/Image/imgUtil.js
Expand Up @@ -13,14 +13,14 @@ export function processImageProps (props) {
return props
}

const imageSizes = [16, 32, 48, 64, 96, 128, 256, 384]
// const imageSizes = [16, 32, 48, 64, 96, 128, 256, 384]

export function getResizedThumbnail ({ src, width, quality = 75 }) {
if (process.env.NEXT_PUBLIC_OPTIMIZE_IMAGES !== 'true') { return src }
for (const imageSize of imageSizes) {
if (width <= imageSize) {
return `/_next/image?url=${encodeURIComponent(src)}&w=${imageSize}&q=${quality}`
}
}
return src
}
// export function getResizedThumbnail ({ src, width, quality = 75 }) {
// if (process.env.NEXT_PUBLIC_OPTIMIZE_IMAGES !== 'true') { return src }
// for (const imageSize of imageSizes) {
// if (width <= imageSize) {
// return `/_next/image?url=${encodeURIComponent(src)}&w=${imageSize}&q=${quality}`
// }
// }
// return src
// }
4 changes: 2 additions & 2 deletions server/imageLoader.js
Expand Up @@ -33,7 +33,7 @@ module.exports = async function imageLoader (buffer) {
const paramHeight = queryParams.h || queryParams.height || Math.round((paramWidth / width) * height)

const optimizedImageFileName = `${paramWidth}${relativePath.replace(/[/. ]/g, '_')}.webp`
const optimizedImageRelativeDirectoryPath = '/_opt/img'
const optimizedImageRelativeDirectoryPath = process.env.NEXT_PUBLIC_OPTIMIZE_IMAGE_PATH || '/site/thumb'
const optimizedImageRelativePath = join(optimizedImageRelativeDirectoryPath, optimizedImageFileName)
const optimizedImageAbsPath = join(appPath, optimizedImageRelativePath)
if (!existsSync(optimizedImageAbsPath)) {
Expand All @@ -44,7 +44,7 @@ module.exports = async function imageLoader (buffer) {
// console.info(info)
console.log('Optimizing image created: ', optimizedImageRelativePath)
} else {
console.log('Optimizing image already exists: ', optimizedImageRelativePath)
// console.log('Optimizing image already exists: ', optimizedImageRelativePath)
}
data.optimizedSrc = optimizedImageRelativePath
data.width = paramWidth
Expand Down

0 comments on commit 1eed3f2

Please sign in to comment.