User:Oznogon/Notice

From PathfinderWiki


This page contains a proposed template replacing the table-based {{Notice}} with a CSS grid-based design. These further standardize on the banner CSS class and propose new CSS classes specific to notice boxes.

This proposed template takes the same parameters as {{Notice}} as well as additional parameters for further customization, and in the case of images further separation of content from markup with opinionated defaults.

Template code

If implemented, Style:Notice should contain these CSS classes:

.pfw-notice {
  margin: 0;
  border: 1px solid black;
  padding: 1rem;
  overflow: auto;
  background-color: @article-color; /* #f5f5dc */
}

.pfw-notice-grid {
  display: grid;
  gap: 0 1em;
  align-items: center;
  justify-content: left;
}

.pfw-notice-content {
  grid-column: 2;
  display: grid;
  gap: 0.5em 0;
  align-items: center;
  justify-items: left;
}

.pfw-notice-image {
  grid-column: 1;
}

.pfw-notice-image2 {
  grid-column: 3;
}

.pfw-notice-content-header {
  grid-row: 1;
  font-weight: bold;
}

.pfw-notice-content-body {
  grid-row: 2;
  font-size: 0.9em;
}

.pfw-notice-body p {
  margin: 0.5em 0 0 0;
}

.pfw-notice-footer {
  font-size: 0.8em;
  text-align: right;
}

{{Notice}} should then contain this:

<includeonly><div style="{{{style|}}}" class="{{{class|pfw-notice}}}"><!--
--><div class="pfw-notice-grid"><div style="{{#if: {{{header|{{{headline|}}}}}} |{{#if: {{{body|{{{text|}}}}}} ||grid-row: 1;}} |grid-row: 1;}} {{{imagestyle|}}}" class="{{{imageclass|pfw-notice-image}}}">{{{image|[[{{{imagefile|File:Information icon.svg}}}|{{{imagesize|64px}}}|{{{imagealt|Information icon}}}|link={{{imagelink|}}}]]}}}</div><!--
--><div style="{{{contentstyle|}}}" class="{{{contentclass|pfw-notice-content}}}"><!--
-->{{#if: {{{header|{{{headline|}}}}}} | <div style="{{{headerstyle|}}}" class="{{{headerclass|pfw-notice-content-header}}}">{{{header|{{{headline|}}}}}}</div>}}<!--
-->{{#if: {{{body|{{{text|}}}}}} | <div style="{{#if: {{{header|{{{headline|}}}}}} |<!--grid-row: 2;-->|grid-row: 1;}} {{{bodystyle|}}}" class="{{{bodyclass|pfw-notice-content-body}}}">{{{body|{{{text|}}}}}}</div>}}<!--
--></div><!--
-->{{#if: {{{image2|}}} | <div style="{{#if: {{{header|{{{headline|}}}}}} |{{#if: {{{body|{{{text|}}}}}} ||grid-row: 1;}} |grid-row: 1;}} {{{image2style|}}}" class="{{{image2class|pfw-notice-image2}}}">{{{image2|}}}</div>}}</div><!--
-->{{#if: {{{footer|}}} |
<div style="{{{footerstyle|}}}" class="{{{footerclass|pfw-notice-footer}}}">{{{footer|}}}</div>}}{{{categories|}}}</div></includeonly>

Examples

Below are several templates currently using {{Notice}} followed by a version adapted to {{User:Oznogon/Notice}} that would replace that template's current contents if {{Notice}} were updated.

{{Copyrighted free use}}

Now:

Copyright symbol

The copyright holder of this image allows anyone to use it for any purpose including unrestricted redistribution, commercial use, and modification.


To the uploader: Please specify who the copyright holder is.

  • If the media requires attribution, use {{Attribution}} instead.
  • If this is your own work, please consider using {{PublicDomain-Self}} instead.

Proposed, making the style consistent with other notice templates:

Copyright symbol
This image is copyrighted but available for free use.
The copyright holder of this image allows anyone to use it for any purpose including unrestricted redistribution, commercial use, and modification.

To the uploader: Please specify who the copyright holder is.

  • If the media requires attribution, use {{Attribution}} instead.
  • If this is your own work, please consider using {{PublicDomain-Self}} instead.

Or retaining its prior distinct style:

Copyright symbol
The copyright holder of this image allows anyone to use it for any purpose including unrestricted redistribution, commercial use, and modification.

To the uploader: Please specify who the copyright holder is.

  • If the media requires attribution, use {{Attribution}} instead.
  • If this is your own work, please consider using {{PublicDomain-Self}} instead.

{{Paizo CUP}}

Now ({{Paizo CUP|blog}}):

Copyright symbol

This is a copyrighted image that has been released by Paizo Inc. as part of their Community Use Policy allowing reuse of unmodified artwork from approved products posted to the Paizo Blog.

The copyright for it is owned by Paizo Inc. and is used with permission under their Community Use Policy. Other uses of this image, on this Wiki or elsewhere, may be copyright infringement.

For more information about Paizo's Community Use Policy, please visit paizo.com/communityuse. For more information about Paizo Inc. and Paizo products, please visit paizo.com.

Community Use Policy symbol

Proposed:

Copyright symbol
This is a copyrighted image that has been released by Paizo Inc. as part of their Community Use Policy allowing reuse of unmodified artwork from approved products posted to the Paizo Blog.
The copyright for it is owned by Paizo Inc. and is used with permission under their Community Use Policy. Other uses of this image, on this Wiki or elsewhere, may be copyright infringement. For more information about Paizo's Community Use Policy, please visit paizo.com/community/communityuse. For more information about Paizo Inc. and Paizo products, please visit paizo.com.
Community Use Policy symbol

{{Policy}}

Now:

PathfinderWiki policy logo

This page is an official policy on the PathfinderWiki.
It has wide acceptance among editors and is considered a standard that all users should follow.

In accordance with policy, this page has been protected. You can suggest changes by following the revision procedure or discussing it on the talk page.


Proposed:

PathfinderWiki policy logo
This page is an official policy on PathfinderWiki.
It has wide acceptance among editors and is considered a standard that all users should follow. In accordance with policy, this page has been protected. You can suggest changes by following the revision procedure or discussing it on the talk page.

{{WIP}}

Now:


Proposed:

Constructing something new
This article is a work in progress.
Editors are making significant changes to the article, and you might encounter awkward formatting, contradictory or unsourced information, or other undesirable elements below. Learn how you can help in the discussion.

{{Cleanup}}

Now:

Sweeper is helping, and so can you

This article might require cleanup.
Please help improve it if you can; the talk page might contain suggestions.


Proposed, making the style consistent with other notice templates:

Sweeper is helping, and so can you
This article might require cleanup.
Please help improve it if you can. The discussion or meta pages might contain suggestions.

Or, maintaining elements of the previous distinct style:

Sweeper is helping, and so can you
This article might require cleanup.
Please help improve it if you can. The discussion or meta pages might contain suggestions.

{{Proposal}}

Now:

Purple question mark.svg

The following is a proposed PathfinderWiki policy, guideline, or process.
The proposal may still be in development, under discussion, or in the process of gathering consensus for adoption. References or links to this page should not describe it as "policy".

A proposal's acceptance or rejection is not determined simply by counting votes.


Proposed:

A question mark
The following is a proposed PathfinderWiki policy, guideline, or process.
The proposal may still be in development, under discussion, or in the process of gathering consensus for adoption. References or links to this page should not describe it as "policy". A proposal's acceptance or rejection is not determined simply by counting votes.

{{Esoteric}}

Now:

Information icon.jpg

This template employs some extremely complicated or esoteric features of template syntax.
Please do not attempt to alter it unless you are certain that you understand the setup and are prepared to repair/revert any consequent collateral damage if the results are unexpected. Any experiments should be conducted in the sandbox or your user space.


Proposed:

Information icon
This template employs some extremely complicated or esoteric features of template syntax.
Please do not attempt to alter it unless you are certain that you understand the setup and are prepared to repair/revert any consequent collateral damage if the results are unexpected. Any experiments should be conducted in the sandbox or your user space.

{{Interwiki}}

Now ({{Interwiki|sfw|target=Elf}}):

SFW compass rose 150.png

This article might have further canon details available on StarfinderWiki.


Proposed; an pfw-notice-interwiki class could negate the need for overrides to banner, but a wrapping div would still be required for the notice to be centered and not the full width of the containing element:

StarfinderWiki
This article might have further canon details available on StarfinderWiki.

Or presenting the copy as a notice heading (larger, with the option of adding body text beneath):

StarfinderWiki
This article might have further canon details available on StarfinderWiki.

{{Badges/Spoilerbanner}}

Now:

Spoiler.svg This page contains spoilers for the following products: Burnt Offerings, The Apocalypse Prophet, Lords of Rust, Fists of the Ruby Phoenix.
You can disable this banner in your personal preferences.


Proposed:

Spoiled content
This article contains spoilers for the following products: Burnt Offerings, The Apocalypse Prophet, Lords of Rust, Fists of the Ruby Phoenix