ProleWiki:User guide/Library

From ProleWiki, the proletarian encyclopedia
Revision as of 13:13, 5 July 2023 by CriticalResist (talk | contribs) (Created page with "thumb|451x451px|mockup of the new library Welcome to this subpage for the new library. We are completely redoing our library to make it more user-friendly and easier to browse. Please read this page thoroughly to understand how to use and add works/topics to the new library. ==How the new Library is organised== ===Topics=== The new library works by '''topics'''. A topic can be an author, a place, a subject, or anythin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
mockup of the new library

Welcome to this subpage for the new library.

We are completely redoing our library to make it more user-friendly and easier to browse.

Please read this page thoroughly to understand how to use and add works/topics to the new library.

How the new Library is organised

Topics

The new library works by topics. A topic can be an author, a place, a subject, or anything you want.

In the screenshot, we see for example "Marxist-Leninist authors". This is one topic which appears on the library page. It's simply created with a Heading (level 1 heading).

Cards

Inside each topic, there are cards (Stalin, Lenin in the screenshot) that are about a category. These cards are added with the Template:Library card.

If you click on Stalin, for example, you will be taken to the page Category:Library works by Joseph Stalin. You can change the name of the card to be whatever you want, but we'll go over that in the next section.

Overall organisation

This gives the new library a scalable format: we can have topics about anything we want, with the same work appearing in different categories. We could even have reading lists made by our editors, for example.

Note that in this new view (but much like the old library), any work that exists in the Library: namespace but isn't in a card category will essentially be invisible. It's good practice then to categorize all our works, especially as you import them to the library.

How to add something to the library

We recommend working on the library with the source editor, as the visual editor is a bit messy with it.

Adding a topic

To add a topic, you simply need to add a level 1 heading on the page. Then, you should add <div class="library-container"></div> right under it. Then, you need to add a <div>. It will look like this:

== Marxist-Leninist authors ==
<div class="library-container">
/* Card templates go here */
</div> 

This div is not optional! Without it, the library will not render properly.

If this is complicated for you, you can simply copy another section of the library in the source editor and paste it to the topic you want to create.

Adding a card

Next, as you can see from the code above, you need to add the card template to your topic section.

This template is quite easy to use:

{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}

You can simply copy this code and change the parameters as needed. These are:

  • image: upload a picture (or use one that's already uploaded) for the author. Use the filename with the extension and no spaces.
  • category: Library works by/about X. We'll go over how to create categories later.
  • name: name you want to appear on the card. Can be anything.
  • top and left: Optional fields. You can offset the picture vertically and horizontally so it's properly aligned in the card. You can use negative values, and they will be expressed in pixels.

There's no limits to the number of cards you can add under every topic, but it's good practice to linebreak after every card you add. This is how a topic looks like after it's filled out:

== Marxist-Leninist authors ==
<div class="library-container">
{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}
{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}
{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}
</div>

Adding categories to works

Finally, we need to add categories to works. Categories are a namespace; refer to the user guide if you need help on that.

To add a category to a work, you first need to create it if it doesn't exist, then you can add it to the work.

Naming your category

Before we create a category, note that it must be called "Library works by/about X". The reason for that is that if you add, say, Category:China to a library work, it will join actual wiki pages that are about China. These two shouldn't mix as the library is entirely different from our main articles.

Also note the case. It's not Library Works, it's Library works.

Some examples include:

  • Library works by Michael Parenti
  • Library works by Joseph Stalin
  • Library works about China
  • Library works about feudalism

Examples are endless, but they need to make sense. "Library works about history" for example is very large, and might not make the most sense. Remember though that categorizing a book does not instantly put it in the library page, we still need to add the topic and card template. So feel free to categorize as many works as you can!

Creating a category

It's good practice to create a category before you start using it. To create a category, simply do it like you would a new page: search for Category:Library works by X, and if it doesn't exist, click on the red link to create it. This is in the main user guide if you need more help with this.

Make sure to look at the search results to see if your category already exists but you just mistyped it!! (remember ProleWiki is case-sensitive).

Create your category using the source editor and just click "save changes". You will get a warning that the page is empty, but this is normal. We don't fill these pages ourselves, they are automatically populated. See for example Category:Library works by Deng Xiaoping.

We could add our own content, which would show at the top of the category page. This would allow us, for example, to organise some works in a given category. This is hypothetical, we haven't really done it yet.

Adding a category to a work

To add/apply a category to a work, we also show how to do that in the main user guide.

You can find all our Library works here: Special:AllPages. In the "namespace" dropdown menu, select Library and click Go.