-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
135 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"updated": 1708614455938, | ||
"pages": [ | ||
{ | ||
"page": 0, | ||
"contents": "\u201cThe Santa Anas\u201d\nJoan Didion\nThere is something uneasy in the Los Angeles air this afternoon, some unnatural \nstillness, some tension. What it means is that tonight a Santa Ana will begin to \nblow, a hot wind from the northeast whining down through the Cajon and San \nGorgonio Passes, blowing up sand storms out along Route 66, drying the hills and \nthe nerves to flash point. For a few days now we will see smoke back in the \ncanyons, and hear sirens in the night. \nI have neither heard nor read that a Santa Ana is due, but I know it, and almost \neveryone I have seen today knows it too. We know it because we feel it. The baby \nfrets. The maid sulks. I rekindle a waning argument with the telephone company, \nthen cut my losses and lie down, given over to whatever it is in the air. To live \nwith the Santa Ana is to accept, consciously or unconsciously, a deeply \nmechanistic view of human behavior.\nI recall being told, when I first moved to Los Angeles and was living on an \nisolated beach, that the Indians would throw themselves into the sea when the bad \nwind blew. I could see why. The Pacific turned ominously glossy during a Santa \nAna period, and one woke in the night troubled not only by the peacocks \nscreaming in the olive trees but by the eerie absence of surf. The heat was surreal. \nThe sky had a yellow cast, the kind of light sometimes called \"earthquake \nweather\". My only neighbor would not come out of her house for days, and there \nwere no lights at night, and her husband roamed the place with a machete. One \nday he would tell me that he had heard a trespasser, the next a rattlesnake. \n\"On nights like that,\" Raymond Chandler once wrote about the Santa Ana, \"every \nbooze party ends in a fight. Meek little wives feel the edge of the carving knife \nand study their husbands' necks. Anything can happen.\" That was the kind of \nwind it was. I did not know then that there was any basis for the effect it had on \nall of us, but it turns out to be another of those cases in which science bears out \nfolk wisdom. \nThe Santa Ana, which is named for one of the canyons it rushers through, is foehn \nwind, like the foehn of Austria and Switzerland and the hamsin of Israel. There \nare a number of persistent malevolent winds, perhaps the best know of which are \nthe mistral of France and the Mediterranean sirocco, but a foehn wind has distinct \ncharacteristics: it occurs on the leeward slope of a mountain range and, although \nthe air begins as a cold mass, it is warmed as it comes down the mountain and \nappears finally as a hot dry wind. Whenever and wherever foehn blows, doctors \nhear about headaches and nausea and allergies, about \"nervousness,\" about \n\"depression.\" \nIn Los Angeles some teachers do not attempt to conduct formal classes during a \nSanta Ana, because the children become unmanageable. In Switzerland the \u0000", | ||
"ocr": null, | ||
"lang": "eng", | ||
"updated": 1708614455938 | ||
}, | ||
{ | ||
"page": 1, | ||
"contents": "suicide rate goes up during the foehn, and in the courts of some Swiss cantons the \nwind is considered a mitigating circumstance for crime. Surgeons are said to \nwatch the wind, because blood does not clot normally during a foehn. \nA few years ago an Israeli physicist discovered that not only during such winds, \nbut for the ten or twelve hours which precede them, the air carries an unusually \nhigh ratio of positive to negative ions. No one seems to know exactly why that \nshould be; some talk about friction and others suggest solar disturbances. In any \ncase the positive ions are there, and what an excess of positive ions does, in the \nsimplest terms, is make people unhappy. One cannot get much more mechanistic \nthan that. \nEasterners commonly complain that there is no \"weather\" at all in Southern \nCalifornia, that the days and the seasons slip by relentlessly, numbingly bland. \nThat is quite misleading. In fact the climate is characterized by infrequent but \nviolent extremes: two periods of torrential subtropical rains which continue for \nweeks and wash out the hills and send subdivisions sliding toward the sea; about \ntwenty scattered days a year of the Santa Ana, which, with its incendiary dryness, \ninvariably means fire. At the first prediction of a Santa Ana, the Forest Service \nflies men and equipment from northern California into the southern forests, and \nthe Los Angeles Fire Department cancels its ordinary non-firefighting routines. \nThe Santa Ana caused Malibu to burn as it did in 1956, and Bel Air in 1961, and \nSanta Barbara in 1964. In the winter of 1966-67 eleven men were killed fighting a \nSanta Ana fire that spread through the San Gabriel Mountains.\nJust to watch the front-page news out of Los Angeles during a Santa Ana is to get \nvery close to what it is about the place. The longest single Santa Ana period in \nrecent years was in 1957, and it lasted not the usual three or four days but \nfourteen days, from November 21 until December 4. On the first day 25,000 acres \nof the San Gabriel Mountains were burning, with gusts reaching 100 miles an \nhour. In town, the wind reached Force 12, or hurricane force, on the Beaufort \nScale; oil derricks were toppled and people ordered off the downtown streets to \navoid injury from flying objects. On November 22 the fire in the San Gabriels \nwas out of control. On November 24 six people were killed in automobile \naccidents, and by the end of the week the Los Angeles Times was keeping a box \nscore of traffic deaths. On November 26 a prominent Pasadena attorney, \ndepressed about money, shot and killed his wife, their two sons and himself. On \nNovember 27 a South Gate divorc\u00e9e, twenty-two, was murdered and thrown from \na moving car. On November 30 the San Gabriel fire was still out of control, and \nthe wind in town was blowing eighty miles an hour. On the first day of December \nfour people died violently, and on the third the wind began to break. \nIt is hard for people who have not lived in Los Angeles to realize how radically \nthe Santa Ana figures in the local imagination. The city burning is Los Angeles's \ndeepest image of itself. Nathaniel West perceived that, in The Day of the Locust, \nand at the time of the 1965 Watts riots what struck the imagination most indelibly \u0000", | ||
"ocr": null, | ||
"lang": "eng", | ||
"updated": 1708614455938 | ||
}, | ||
{ | ||
"page": 2, | ||
"contents": "were the fires. For days one could drive the Harbor Freeway and see the city on \nfire, just as we had always known it would be in the end. \nLos Angeles weather is the weather of catastrophe, of apocalypse, and, just as the \nreliably long and bitter winters of New England determine the way life is lived \nthere, so the violence and the unpredictability of the Santa Ana affect the entire \nquality of life in Los Angeles, accentuate its impermanence, its unreliability. The \nwinds shows us how close to the edge we are. \nin Slouching Towards Bethlehem, 1969, London: Andre Deutch.\u0000", | ||
"ocr": null, | ||
"lang": "eng", | ||
"updated": 1708614455938 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script lang="ts"> | ||
import { _ } from "svelte-i18n"; | ||
export let page: number; | ||
export let contents: string; | ||
</script> | ||
|
||
<div class="page"> | ||
<h4 id="p{page + 1}"> | ||
<a href="#p{page + 1}">{$_("documents.pageAbbrev")} {page + 1}</a> | ||
</h4> | ||
|
||
<pre> | ||
{contents} | ||
</pre> | ||
</div> | ||
|
||
<style> | ||
.page { | ||
padding: 1rem; | ||
} | ||
.page pre { | ||
background-color: var(--white, #fff); | ||
padding: 1rem; | ||
text-wrap: pretty; | ||
} | ||
h4 a { | ||
color: var(--black); | ||
text-decoration: none; | ||
} | ||
h4 a:hover { | ||
text-decoration: underline; | ||
} | ||
</style> |
19 changes: 19 additions & 0 deletions
19
src/lib/components/documents/stories/TextPage.stories.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script context="module" lang="ts"> | ||
import { Story } from "@storybook/addon-svelte-csf"; | ||
import TextPage from "../TextPage.svelte"; | ||
export const meta = { | ||
title: "Components / Documents / Text", | ||
component: TextPage, | ||
tags: ["autodocs"], | ||
parameters: { layout: "centered" }, | ||
}; | ||
import txt from "$lib/api/fixtures/documents/document.txt.json"; | ||
const page = txt.pages[0]; | ||
</script> | ||
|
||
<Story name="default"> | ||
<TextPage page={page.page} contents={page.contents} /> | ||
</Story> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
import TextPage from "$lib/components/documents/TextPage.svelte"; | ||
export let data; | ||
$: pages = data.pages; | ||
</script> | ||
|
||
<div class="container"> | ||
{#each pages as { page, contents }} | ||
<TextPage {page} {contents} /> | ||
{/each} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { DocumentText } from "$lib/api/types"; | ||
|
||
import { jsonUrl } from "$lib/api/documents"; | ||
import { error } from "@sveltejs/kit"; | ||
import { isErrorCode } from "@/lib/utils/api.js"; | ||
|
||
export async function load({ fetch, parent }) { | ||
const { document } = await parent(); | ||
const url = jsonUrl(document); | ||
|
||
const resp = await fetch(url).catch(console.error); | ||
|
||
if (!resp) { | ||
error(500, "Server error"); | ||
} | ||
|
||
if (isErrorCode(resp.status)) { | ||
error(resp.status, resp.statusText); | ||
} | ||
|
||
const text: DocumentText = await resp.json(); | ||
|
||
return { | ||
pages: text.pages, | ||
}; | ||
} |