User:RealDonaldTrump/Write
Jump to navigation
Jump to search
Inputboxes
UnNews preload
WIP
Useful markup
Portal redesign
{{#css:Uncyclopedia:Portals/styles.css}}{{PortalNav}} <div class="portal-container portal-platonic"> <!-- INTRO --> <div class="portal-row portal-panel"> <div class="portal-panel-header">{{Portal header|Platonic Portal}}</div> <div class="portal-panel-content">{{/Intro}}</div> </div> <!-- HIGHLIGHTS --> <div class="portal-row portal-highlights"> <!-- HIGHLIGHTS COLUMN 1 --> <div class="portal-highlights-column"> <div class="portal-panel portal-blurb"> <div class="portal-panel-header">{{Portal header|Featured Article|Selected Articles}}</div> <div class="portal-panel-content">{{/Selected Articles}}</div> </div> </div> <!-- HIGHLIGHTS COLUMN 2 --> <div class="portal-highlights-column"> <div class="portal-panel portal-blurb"> <div class="portal-panel-header">{{Portal header|Featured Image|Selected Pictures}}</div> <div class="portal-panel-content">{{/Selected Pictures}}</div> </div> </div> </div> <!-- BOTTOM ROWS --> <div class="portal-row portal-panel"> <div class="portal-panel-header">More Portals</div> <div class="portal-panel-content">{{Topics}}</div> </div> </div> [[Category:Uncyclopedia Portals]]
Portal article blurb page
<noinclude><gallery> File:Article1.jpg|[[Article1]] File:Article2.jpg|[[Article2]] </gallery></noinclude> <includeonly><choose> <option>{{Selected article |article = Article1 |image = Article1.jpg |author = |summary = }}</option> <option>{{Selected article |article = Article2 |image = Article2.jpg |author = |summary = }}</option> </choose></includeonly> <noinclude>[[Category:Portal article blurbs]]</noinclude>
Portal picture blurb page
<noinclude> <gallery> File:Picture1.png File:Picture2.png </gallery></noinclude> <includeonly><choose> <option>{{Selected picture |image = Picture1.png |credit = |caption = }}</option> <option>{{Selected picture |image = Picture2.png |credit = |caption = }}</option> </choose></includeonly> <noinclude>[[Category:Portal picture blurbs]]</noinclude>
If you use this markup with the {{#CSS:}}
parser function instead of TemplateStyles, you'll either have to add some !important tags or make your selectors even more specific, since TemplateStyles adds ".mw-parser-function" to each selector in Template:Simple navbox/styles.css. This is the same reason why code might not work using inspect element, but will work if added to the style page.
.custom-class.simple-navbox { border: 1px solid #4CAF50; } .custom-class.simple-navbox .simple-header.NavHead { background: #4CAF50; color: #fff; } .custom-class .simple-header a { color: #fff; } .custom-class .simple-group-above { background: #A5D6A7; } .custom-class .simple-group { background: #A5D6A7; padding: 0.2em; vertical-align: middle; } .custom-class .simple-list { padding: 0 0.2em; border: 0 !important; } .custom-class .simple-group-row:nth-child(odd) .simple-list { background: #f7f7f7; }
Random notes
Regex for removing {{0}} in Worst 100 pages
Currently sucks.
- Find
\{\{0\|([^\|]+)\|([^\}]+)\}\}
- Replace
; $1. $2