Homepage CSS
Restructuring the Codex
We are currently moving articles around and changing the general structure of the Codex. Please come back later if you get lost!
Before reading this you should first check out the general world homepage customization guide to explore the options available with settings.
All examples in this article will only affect the world homepage as they include selectors unique to the homepage. You can ensure that your own CSS is only applied to the homepage by applying the code below.
Smaller Section Text - Click to Expand
Default Author Link CSS - Click to Expand
The world homepage is a good target for a special layout as it is different from all other pages. The code snippets below are intended to either be used as-is or to make minor adjustments to fit your needs. They either do common tasks or something very specific that is useful to many people. Always read the orange information boxes within the spoilers as they explain any extra steps necessary. Otherwise, you can just copy the code into your world's CSS.
.user-css.page-world-homepage
World Heading
The top section of the world homepage.Title
Default Title CSS - Click to Expand.user-css .heading h1.world-title { font-family: alegreya sc,serif; font-weight: 700; font-size: 42px; padding-top: 10px; padding-bottom: 15px; }
Subtitle
Change Font Size - Click to Expand.user-css h1 .world-subtitle small { font-size: 20px; }
Current Date
Default CSS - Click to Expand.user-css h3.world-currentDate { font-style: oblique; font-size: 18px; margin-bottom: 20px; }
Authors
Hide Authors - Click to Expand.user-css .world-authors { display: none; }
.user-css .world-authors p { font-size: 10px; }
.user-css .world-authors .author-item { font-family: kalam,cursive; font-size: 16px; padding: 10px; }
Description
Hide Description - Click to Expand.user-css .heading .subheading { display: none; }
World Bookcase
The world bookcase contains the book covers of the categories which are configured to be displayed as such. The book covers are centred and begin a new line as soon as there is not enough space within the row. You can change the alignment of the covers by changing the code below to say right or left instead. Default CSS - Click to Expand.user-css .world-bookcase .bookcase { text-align: center; }
Bookcover
The bookcovers can be embedded anywhere on WorldAnvil with the [book:category-id] BBCode. This is why it has its own guide.Custom Content 4
The custom container between the bookcase and the table of contents an be targeted with the following class: Center Align Text - Click to Expand.user-css .user-custom-content-4 { text-align: center; }
CSS Guides
Patreon Button
The patreon button, which appears below the bookcase, should not be changed or moved.
My category content panel and recent/featured articles stopped appearing on my homepage. I came here to see if I could get them to show up again but this only gives command to hide. Does anyone know how to get these to reappear?
Try moving around the individual classes, sometimes an attribute must be given before or after another class. depending on what you're editing