User:Oznogon/Notice
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:
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.
|
Proposed, making the style consistent with other notice templates:
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:
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}}):
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. |
Proposed:
{{Policy}}
Now:
This page is an official policy on the PathfinderWiki. 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:
{{WIP}}
Now:
This article is a work in progress. |
Proposed:
{{Cleanup}}
Now:
This article might require cleanup. |
Proposed, making the style consistent with other notice templates:
Or, maintaining elements of the previous distinct style:
{{Proposal}}
Now:
The following is a proposed PathfinderWiki policy, guideline, or process. A proposal's acceptance or rejection is not determined simply by counting votes. |
Proposed:
{{Esoteric}}
Now:
This template employs some extremely complicated or esoteric features of template syntax. |
Proposed:
{{Interwiki}}
Now ({{Interwiki|sfw|target=Elf}}):
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:
Or presenting the copy as a notice heading (larger, with the option of adding body text beneath):
{{Badges/Spoilerbanner}}
Now:
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: