Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Search
Editing
User talk:Notjusttired
(section)
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Namespaces
User page
Discussion
More
More
Page actions
Read
Edit source
New topic
History
User contributions
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Category banners: Medical hypotheses and Potential treatments == {{collapse top}} '''Compatibility with all skins''' Both the pivot and Timeless (dark) skins rely on classes being used - without that no banner appears on the Pivot skin and the colors are messed up on Timeless skin (it adds a dark shadow to text to improve contrast: it's also a "low vision" skin). Current banners are created by [[MediaWiki:Common.js]] Javascript using the following classes and css (note: banner position can be moved below heading if "append" is used instead of "prepend"). <pre> //$(".mw-body-content").css ("background-color","#f8d6c2"); //$(".toc").css ("background-color","#f8d6c2"); $(".firstHeading").prepend ('<div style = "margin:auto;padding:20px;width:100%;text-align:center;background-color:#00ee54;">This is a <a href = "/wiki/Category:Potential_treatments">Potential treatments</a> page</div>'); // pivot fix $("h1.title"... </pre> So any h1 headings should apply <code><nowiki>class="title"</nowiki></code> and text not using the "h1" style should include <code><nowiki>class="firstHeading"</nowiki></code>. We should probably move these colors to [[MediaWiki:Common.css]], perhaps creating a class for each banner style with the relevant background and font colors. Suggested new formatting: using low vision sky blue to slightly improve contrast, fixing text color rather than changing depending on if the link has been visited or not, and a text shadow to improve visibly. Add to [[MediaWiki:Common.css]] <pre> .title { background-color: #56b4e9; color: white; margin:auto; padding:20px; width:100%; text-align: center; font-size: 1.8em; text-shadow: 1px 1px black; } .title a.link:active, .title a.link:hover, .title a.link:visited, .title a.link, .title a { color: white !important; font-weight: bold; } </pre> Change code on [[MediaWiki:Top-notice-Biopsychosocial model]] to: <pre> <div class="title" style="background: #56b4e9">This is a [[:Category:Medical_hypotheses|Medical hypothesis]] page.</div> </pre> ~[[User:Notjusttired|Njt]] ([[User talk:Notjusttired|talk]]) 16:55, October 25, 2019 (EDT)[[User:Notjusttired|Njt]] ([[User talk:Notjusttired|talk]]) 16:40, October 25, 2019 (EDT)[[User:Notjusttired|Njt]] ([[User talk:Notjusttired|talk]]) 16:08, October 25, 2019 (EDT) Code now above. I think I over-complicated explanation - won't add new features, just better color contrast and text shadow which works on all skins (light and dark). Once confirmed working small updates needed to [[MediaWiki:Common.js]] for both Potential treatments and Medical hypothesis banners. Pretty much looks like this (but with a link): <div style="margin:auto; padding:20px; width:100%; text-align:center; background-color:#56b4e9!important; font-size: 1.8em!important; color: #fff!important; text-shadow: 1px 1px black;">This is a <span style="font-weight:bold">Medical hypothesis</span> page.</div> ::[[User:Pyrrhus]] ~[[User:Notjusttired|Njt]] ([[User talk:Notjusttired|talk]]) 16:55, October 25, 2019 (EDT) :This sounds like a new feature request. You can start a new section for this request at [[MediaWiki talk:Common.js]]. This talk page will be deleted once I am done testing the new banner. :[[User:Pyrrhus|Pyrrhus]] ([[User talk:Pyrrhus|talk]]) 16:31, October 25, 2019 (EDT) ::I think I understand now. One question: Is "title" a new CSS class or an existing class? If it's a new class, maybe we should choose a more unique name such as "custom-header" or something that won't conflict with other classes? [[User:Notjusttired]] ::[[User:Pyrrhus|Pyrrhus]] ([[User talk:Pyrrhus|talk]]) 18:25, October 25, 2019 (EDT) {{collapse bottom}} ===Re: Category banners: Medical hypotheses and Potential treatments -- ~~~~=== : Replace this text with your reply
Summary:
Please make sure your edits are consistent with
MEpedia's guidelines
.
By saving changes, you agree to the
Terms of use
, and you irrevocably agree to release your contribution under the
CC BY-SA 3.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Navigation
Navigation
Skip to content
Main page
Browse
Become an editor
Random page
Popular pages
Abbreviations
Glossary
About MEpedia
Links for editors
Contents
Guidelines
Recent changes
Pages in need
Search
Help
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
Logs
View user groups
More
What links here
Related changes
Page information
Page logs