OSDev.org
https://forum.osdev.org/

Main Page design
https://forum.osdev.org/viewtopic.php?f=8&t=12428
Page 2 of 2

Author:  chase [ Sat Dec 16, 2006 11:07 am ]
Post subject: 

Since my boring old page was losing the votes I went ahead and switched the [wiki]Main Page[/wiki]. It's a modified verion of jhawthorns page which was a modified version of Wallings page. My changes were to move the navigation/about stuff of the left side.

Author:  Walling [ Sat Dec 16, 2006 11:11 am ]
Post subject: 

Jhawthorn, that is a cool main page! I'm impressed. I understand that mine and your proposal are two different looks, but I really like yours too. You're inspired from enwiki, whereas some of my inspiration was dawiki (Danish). I like them quite equally. Don't know about the poll then... :?

I also feel a bit controversy about my two proposals from the comments and the votes, so maybe it should be discussed more before any final decision is made. Right now my first proposal leads, but it is just less than half the votes, so what about the majority? (don't know if OSDev is a democracy :)) I don't want to offend anyone.
  • Is the welcome box nice? I think most agree on this. Should the quick links be removed or stay?
  • Mine/Jharthorns looks? (Thin/thick boxes? Colors?) Other look?
  • No boxes for the different subjects?
  • No edit links?

Can we all agree on something? I'm reasonably flexible. Just hoping for a more interesting main page with some colors and nice look. (No offence, chase!)

Edit: It seems that chase has taken a decision... :)

Author:  Walling [ Sat Dec 16, 2006 11:19 am ]
Post subject: 

I removed the gab, don't know if it was intended, but I didn't like it. Neither mine and jhawthorns versions have it.

A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?

Author:  chase [ Sat Dec 16, 2006 11:28 am ]
Post subject: 

Walling wrote:
I removed the gab, don't know if it was intended, but I didn't like it. Neither mine and jhawthorns versions have it.

A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?

Probably just a copy and paste error on my part. Not sure about the title thing, either they have a more up to date version of mediawiki or it's customized.

Author:  Walling [ Sat Dec 16, 2006 2:10 pm ]
Post subject: 

I really like the new main page.

I archived my main page proposals. They can no longer be seen clicking the links in this thread. :)

Author:  Steve the Pirate [ Mon Dec 18, 2006 3:34 am ]
Post subject: 

Quote:
A technical thing... on English Wikipedia, the title is not shown on the mainpage. I thought it was the <div id="mainpage"></div> that did the trick, but it seems it does not. Would it be nice to hide the "Main Page" title on the main page like on enwiki?



Here's one solution (via http://mail.wikipedia.org/pipermail/mediawiki-l/2006-May/012392.html)
Quote:
/* Hide the main page title */
function hideMainPageTitle(e)
{
e = (e) ? e : event;
var mainPageTitle = "Main Page";
var headings = document.getElementsByTagName("h1");
var i, done = false;
for (i = 1; ((!done) && (i <= headings.length)); i++)
{
if (headings[i - 1].className == "firstHeading")
{
done = true;
if ((headings[i - 1].innerHTML == mainPageTitle) && (document.getElementById("contentSub").innerHTML == ""))
{
headings[i - 1].style.display = "none";
document.getElementById("siteSub").style.display = "none";
document.getElementById("contentSub").style.display = "none";
}
}
}
}
window.onload = hideMainPageTitle;


It's not a great way of doing it, but it works...

-Stephen

Author:  Walling [ Mon Dec 18, 2006 4:22 am ]
Post subject: 

Steve the Pirate wrote:
It's not a great way of doing it, but it works...

It seems that user scripts are disabled.

Author:  chase [ Mon Dec 18, 2006 11:36 am ]
Post subject: 

Walling wrote:
Steve the Pirate wrote:
It's not a great way of doing it, but it works...

It seems that user scripts are disabled.
If you want user javascipt and css enabled I can do that. I'd rather figure out how wikipedia is doing it and implement that so everyone gets the same thing for the main page title hiding.

Author:  Walling [ Mon Dec 18, 2006 4:51 pm ]
Post subject: 

chase wrote:
Walling wrote:
Steve the Pirate wrote:
It's not a great way of doing it, but it works...

It seems that user scripts are disabled.
If you want user javascipt and css enabled I can do that. I'd rather figure out how wikipedia is doing it and implement that so everyone gets the same thing for the main page title hiding.

I'd use another implementation than javascript as well. I found this, maybe it is useful: http://bugzilla.wikimedia.org/show_bug.cgi?id=6129 There is a patch file attached. I don't know how to apply it. It will hide the main page title for all users, when enabled in the configuration file. I researched a bit on enwiki and they are using a different method, one using javascript, but not the one posted here. They insert this code in the generated site script (don't know where it is generated from). I stripped out the irrelevant parts:
Code:
var mpTitle = "Main Page";
var isMainPage = (/(title=|\/wiki\/)([Tt]alk:|)[Mm]ain[ _][Pp]age/.test(document.location));
var isMainPageFront = (document.title.substr(0, document.title.lastIndexOf(" - ")) == mpTitle);
var isDiff = (document.location.search && (document.location.search.indexOf("diff=") != -1 ||
             document.location.search.indexOf("oldid=") != -1));

if (isMainPage) {
  if (isMainPageFront && !isDiff)
  {
    document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, #contentSub, ' +
                   'h1.firstHeading { display: none !important; } /*]]>*/</style>');
  }
}

What it does is to locate the main page (excluding diff views and talk page) and then hides it using dynamically generated css code. It is some kind of a "hack". Look up the code on line 334 of this url.

Page 2 of 2 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/