Browse Source

Merges pull request #12

All code comments resolved.
Issue#126 target documentation at audiences
master
silberengel 1 year ago
parent
commit
f14670c166
No known key found for this signature in database
GPG Key ID: 962BEC8725790894
  1. 6
      README.md
  2. 5
      src/app.css
  3. 5
      src/lib/components/EditorArticle.svelte
  4. 8
      src/lib/components/LinkToArticle.svelte
  5. 2
      src/lib/components/Navigation.svelte
  6. 2
      src/lib/components/Preview.svelte
  7. 0
      src/lib/components/Publication.svelte
  8. 4
      src/lib/components/PublicationFeed.svelte
  9. 0
      src/lib/components/PublicationHeader.svelte
  10. 2
      src/routes/+page.svelte
  11. 49
      src/routes/about/+page.svelte
  12. 2
      src/routes/publication/+page.svelte
  13. BIN
      static/screenshots/Documentation.png
  14. BIN
      static/screenshots/JaneEyre.png
  15. BIN
      static/screenshots/LandingPage.png
  16. BIN
      static/screenshots/ResearchPaper.png
  17. BIN
      static/screenshots/TableOfContents.png
  18. BIN
      static/screenshots/ToC_icon.png
  19. BIN
      static/screenshots/YourRelays.png

6
README.md

@ -2,13 +2,15 @@ @@ -2,13 +2,15 @@
# Alexandria
Alexandria is a reader and writer for curated publications.
For a thorough introduction, please refer to our [project documention](https://next-alexandria.gitcitadel.eu/publication?d=gitcitadel-project-documentation-by-stella-v-1), viewable on Alexandria.
Alexandria is a reader and writer for curated publications, including e-books.
For a thorough introduction, please refer to our [project documention](https://next-alexandria.gitcitadel.eu/publication?d=gitcitadel-project-documentation-by-stella-v-1), viewable on Alexandria, or to the Alexandria [About page](https://next-alexandria.gitcitadel.eu/about).
## Issues and Patches
If you would like to suggest a feature or report a bug, or submit a patch for review, please use the [Nostr git interface](https://gitcitadel.com/r/naddr1qvzqqqrhnypzplfq3m5v3u5r0q9f255fdeyz8nyac6lagssx8zy4wugxjs8ajf7pqyt8wumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6tcqpfqkcetcv9hxgunfvyamcf5z) on our homepage.
You can also contact us [on Nostr](https://njump.me/nprofile1qqsggm4l0xs23qfjwnkfwf6fqcs66s3lz637gaxhl4nwd2vtle8rnfqprfmhxue69uhhg6r9vehhyetnwshxummnw3erztnrdaks5zhueg), directly.
## Developing
Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) (v22 or above) or [Deno](https://docs.deno.com/runtime/getting_started/installation/) (v2) installed.

5
src/app.css

@ -28,6 +28,11 @@ @@ -28,6 +28,11 @@
@apply hover:text-primary-400 dark:hover:text-primary-500 hover:border-primary-400 dark:hover:border-primary-500 hover:bg-gray-200 dark:hover:bg-gray-700;
}
/* Images */
.image-border {
@apply border border-primary-700;
}
/* Card */
div.card-leather {
@apply shadow-none text-primary-1000 border-s-4 bg-highlight border-primary-200 has-[:hover]:border-primary-700;

5
src/lib/components/EditorArticle.svelte

@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
<script lang='ts'>
export let html: string;
</script>

8
src/lib/components/LinkToArticle.svelte

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
<script lang="ts">
export let content: string;
</script>
<button
id={`wikilink-v0-${content.toLocaleLowerCase().replaceAll(' ', '-')}`}
class="text-indigo-600 underline">{content}</button
>

2
src/lib/components/Navigation.svelte

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<NavHamburger class='btn-leather' />
</div>
<NavUl class='ul-leather'>
<NavLi href='/new/edit'>New Note</NavLi>
<NavLi href='/new/edit'>Publish</NavLi>
<NavLi href='/visualize'>Visualize</NavLi>
<NavLi href='/about'>About</NavLi>
<NavLi>

2
src/lib/components/Preview.svelte

@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
{/snippet}
{#snippet contentParagraph(content: string, publicationType: string)}
{#if publicationType === 'book'}
{#if publicationType === 'novel'}
<P class='whitespace-normal' firstupper={isSectionStart}>
{@html content}
</P>

0
src/lib/components/Article.svelte → src/lib/components/Publication.svelte

4
src/lib/components/PublicationFeed.svelte

@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
import { filterValidIndexEvents } from '$lib/utils';
import { NDKRelaySet, type NDKEvent } from '@nostr-dev-kit/ndk';
import { Button, P, Skeleton, Spinner } from 'flowbite-svelte';
import ArticleHeader from './ArticleHeader.svelte';
import ArticleHeader from './PublicationHeader.svelte';
import { onMount } from 'svelte';
let { relays } = $props<{ relays: string[] }>();
@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
<ArticleHeader {event} />
{/each}
{:else}
<p class='text-center'>No articles found.</p>
<p class='text-center'>No publications found.</p>
{/if}
{#if !loadingMore && !endOfFeed}
<div class='flex justify-center mt-4 mb-8'>

0
src/lib/components/ArticleHeader.svelte → src/lib/components/PublicationHeader.svelte

2
src/routes/+page.svelte

@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
{:else}
<div class='leather w-full flex justify-end'>
<Button>
{`Showing articles from: ${getFeedTypeFriendlyName($feedType)}`}<ChevronDownOutline class='w-6 h-6' />
{`Showing publications from: ${getFeedTypeFriendlyName($feedType)}`}<ChevronDownOutline class='w-6 h-6' />
</Button>
<Dropdown class='w-fit p-2 space-y-2 text-sm'>
<li>

49
src/routes/about/+page.svelte

@ -1,15 +1,56 @@ @@ -1,15 +1,56 @@
<script lang='ts'>
import { Heading } from "flowbite-svelte";
</script>
<div class='w-full flex justify-center'>
<main class='main-leather flex flex-col space-y-4 max-w-2xl w-full mt-4 mb-4'>
<Heading tag='h1' class='h-leather mb-2'>About</Heading>
<p>Alexandria is an editor and generator for <a href="https://github.com/nostr-protocol/nips/pull/1600" class='underline'>curated publications</a> and will soon also be a reader for long-form articles and wiki pages.
It is produced by the <a href="https://wikistr.com/gitcitadel-project" class='underline'>GitCitadel project team</a>.</p>
<p>Alexandria is a reader and writer for <a href="https://github.com/nostr-protocol/nips/pull/1600" class='underline'>curated publications</a> (in Asciidoc), and will eventually also support long-form articles (Markdown) and wiki pages (Asciidoc). It is produced by the <a href="https://wikistr.com/gitcitadel-project" class='underline'>GitCitadel project team</a>.</p>
<p>Please submit support issues on the <a href="https://gitcitadel.com/r/naddr1qvzqqqrhnypzplfq3m5v3u5r0q9f255fdeyz8nyac6lagssx8zy4wugxjs8ajf7pqy88wumn8ghj7mn0wvhxcmmv9uqq5emfw33kjarpv3jkcs83wav" class='underline'>project repo page</a> and follow us on <a href="https://github.com/ShadowySupercode/gitcitadel" class='underline'>GitHub</a> and <a href="https://geyser.fund/project/gitcitadel" class='underline'>Geyserfund</a>.</p>
<p>We are easiest to contact over our Nostr address <a href="https://njump.me/nprofile1qqsggm4l0xs23qfjwnkfwf6fqcs66s3lz637gaxhl4nwd2vtle8rnfqprfmhxue69uhhg6r9vehhyetnwshxummnw3erztnrdaks5zhueg" class='underline'>npub1s3ht77dq4zqnya8vjun5jp3p44pr794ru36d0ltxu65chljw8xjqd975wz</a>.</p>
<Heading tag='h2' class='h-leather mb-2'>Overview</Heading>
<p>Alexandria opens up to the <a href="https://next-alexandria.gitcitadel.eu/" class='underline'>landing page</a>, where the user can: login (top-right), select whether to only view the publications hosted on the <a href="https://thecitadel.nostr1.com/" class='underline'>thecitadel document relay</a> or add in their own relays, and scroll/search the publications.</p>
<p><img src="/screenshots/LandingPage.png" alt="Landing page" class='image-border'></p>
<p><img src="/screenshots/YourRelays.png" alt="Relay selection" class='image-border'></p>
<p>There is also the ability to view the publications as a diagram, if you click on "Visualize", and to publish an e-book or other document (coming soon).</p>
<p>If you click on a card, which represents a 30040 index event, the associated reading view opens to the publication. The app then pulls all of the content events (30041s), in the order in which they are indexed, and displays them as a single document.</p>
<p>Each 30041 section is also a level in the table of contents, which can be accessed from the floating icon top-left in the reading view. This allows for navigation within the publication. (This functionality has been temporarily disabled.)</p>
<p><img src="/screenshots/ToC_icon.png" alt="ToC icon" class='image-border'></p>
<p><img src="/screenshots/TableOfContents.png" alt="Table of contents example" class='image-border'></p>
<Heading tag='h2' class='h-leather mb-2'>Typical use cases</Heading>
<Heading tag='h3' class='h-leather mb-2'>For e-books</Heading>
<p>The most common use for Alexandria is for e-books: both those users have written themselves and those uploaded to Nostr from other sources. The first minor version of the app, Gutenberg, is focused on displaying and producing these publications.</p>
<p>An example of a book is <a href="https://next-alexandria.gitcitadel.eu/publication?d=jane-eyre-an-autobiography-by-charlotte-bront%C3%83-v-third-edition" class='underline'>Jane Eyre</a></p>
<p><img src="/screenshots/JaneEyre.png" alt="Jane Eyre, by Charlotte Brontë" class='image-border'></p>
<Heading tag='h3' class='h-leather mb-2'>For scientific papers</Heading>
<p>Alexandria will also display research papers with Asciimath and LaTeX embedding, and the normal advanced formatting options available for Asciidoc. In addition, we will be implementing special citation events, which will serve as an alternative or addition to the normal footnotes.</p>
<p>Correctly displaying such papers, integrating citations, and allowing them to be reviewed (with kind 1111 comments), and annotated (with highlights) by users, is the focus of the second minor version, Euler.</p>
<p>Euler will also pioneer the HTTP-based (rather than websocket-based) e-paper compatible version of the web app.</p>
<p>An example of a research paper is <a href="https://next-alexandria.gitcitadel.eu/publication?d=less-partnering-less-children-or-both-by-j.i.s.-hellstrand-v-1" class='underline'>Less Partnering, Less Children, or Both?</a></p>
<p><img src="/screenshots/ResearchPaper.png" alt="Research paper" class='image-border'></p>
<Heading tag='h3' class='h-leather mb-2'>For documentation</Heading>
<p>Our own team uses Alexandria to document the app, to display our blog entries, as well as to store copies of our most interesting technical specifications.</p>
<p><img src="/screenshots/Documentation.png" alt="Documentation" class='image-border'></p>
</main>
</div>

2
src/routes/publication/+page.svelte

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<script lang="ts">
import Article from "$lib/components/Article.svelte";
import Article from "$lib/components/Publication.svelte";
import { TextPlaceholder } from "flowbite-svelte";
import type { PageData } from "./$types";
import { onDestroy } from "svelte";

BIN
static/screenshots/Documentation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
static/screenshots/JaneEyre.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
static/screenshots/LandingPage.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
static/screenshots/ResearchPaper.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

BIN
static/screenshots/TableOfContents.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
static/screenshots/ToC_icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

BIN
static/screenshots/YourRelays.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Loading…
Cancel
Save