Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ProleWiki:User guide/Library: Difference between revisions

From ProleWiki, the proletarian encyclopedia
More languages
(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...")
Tag: Visual edit
 
No edit summary
Tag: Visual edit
Line 27: Line 27:


===Adding a topic===
===Adding a topic===
To add a topic, you simply need to add a level 1 heading on the page. Then, you should add <nowiki><div class="library-container"></div></nowiki> right under it. Then, you need to add a <nowiki><div>. It will look like this:</nowiki>
To add a topic, you simply need to add a heading (level of your choice) on the page. Then, you should add <nowiki><div class="library-container"></div></nowiki> right under it. It will look like this:
  == Marxist-Leninist authors ==
  == Marxist-Leninist authors ==
  <nowiki><div class="library-container"></nowiki>
  <nowiki><div class="library-container"></nowiki>
  /* Card templates go here */
  /* Card templates go here */
  <nowiki></div></nowiki>  
  <nowiki></div></nowiki>  
This div is '''not optional'''! Without it, the library will not render properly.
This div is '''not optional'''! Without it, the library will not render properly. You also need to close the div tag with <nowiki></div></nowiki> as it's HTML code.


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.
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.
Line 42: Line 42:
  <nowiki>{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}</nowiki>
  <nowiki>{{Library card|image=Iosif_Stalin.jpg|category=Library works by Joseph Stalin|name=Stalin|top=0|left=-25}}</nowiki>
You can simply copy this code and change the parameters as needed. These are:
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.
*'''image:''' upload a picture (or use one that's already uploaded) for the author. Use the filename with the extension and no spaces. Please make sure your picture is in color! (We use effects to make it b&w and bring color back when you hover over the card).
*'''category:''' Library works by/about X. We'll go over how to create categories later.
*'''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.
*'''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.
*'''top and left:''' Optional fields. You can offset the picture vertically and horizontally (in pixels) so it's properly aligned in the card. I recommend using very small digits like 5 or 10.
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:
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 ==
  == Marxist-Leninist authors ==
Line 70: Line 70:
* Library works about China
* Library works about China
* Library works about feudalism
* Library works about feudalism
* Library works about economics


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!
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!

Revision as of 11:52, 6 July 2023

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 heading (level of your choice) on the page. Then, you should add <div class="library-container"></div> right under it. 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. You also need to close the div tag with </div> as it's HTML code.

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. Please make sure your picture is in color! (We use effects to make it b&w and bring color back when you hover over the card).
  • 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 (in pixels) so it's properly aligned in the card. I recommend using very small digits like 5 or 10.

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
  • Library works about economics

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.