官术网_书友最值得收藏!

Styling the Edit Interface

The edit interface appears when you select the "edit" option at the top of the page. It allows visitors to edit the page's content in your wiki by using a mixture of wiki markup and inline CSS. Now that the article interface has been styled, little needs to be styled to alter the appearance of the edit interface.

The Basics

The edit interface is contained within a <form>, which can be styled to differentiate it from the general content.

#content form {
background: #D9D5C3;
border: 1px solid #BEB798;
margin: 3px 0;
padding: 10px 5px;
}

There are a number of elements contained within the edit interface form. These are as follows:

  • #wpSummary is the text box that is used to describe the nature of the edit made by the wiki's visitor.
  • #wpMinorEdit is a check-box that indicates whether the associated edit to the page was "minor" (that is, small changes). pWatchthis is another check box that allows a user to specify whether the page is to be listed in their "watchlist". The watchlist feature is only available to the users who are registered and logged in.
  • #wpSave is a submit button that saves the changes the user has made to the page, so that other users of the wiki can view your changes with immediate effect.
  • #wpPreview is a button that allows the user to preview your page. MediaWiki generates a version of the page as it would appear if the changes were saved, but does not actually save the changes.
  • Finally, #wpDiff is a button that allows the user to see the difference between the last version of the page and the changes that they have made.

It is better not to define the width and the height for the <textarea> (#wpTextbox1) used to edit the wiki, because the columns and rows are defined in XHTML. There are still some small changes that can be made to help style the text area in order to match your skin, such as altering the borders and changing the background colors.

One of the most useful aspects of skinning MediaWiki is the ability to use proportional font sizes in the text area. This would be of a great help to those with disabilities, especially visually impaired persons, as it makes the editing of the content easier.

#wpTextbox1 {
font-family: georgia, "times new roman", times, sans-serif;
font-size: 100%;
}

The background and borders are defined together with the style for the other elements in the form, so as to minimize the CSS file size. The text boxes and check boxes still need styling, as do the background color and border of the text area.

#wpTextbox1, #wpSummary, #wpMinoredit, #wpWatchthis {
background: #E6E4D8;
border: 1px solid #BEB798;
margin: 5px 0;
}

The buttons at the bottom of the form are contained within .editbuttons for ease of movement, and they appear a little close to the other elements in the form. Now, we will add some space above and below them.

.editbuttons {
margin: 10px 0;
}

The "Save", "Preview", and "Diff" (difference) buttons contained within .editbuttons can now be styled to match the remaining elements in the form.

#wpSave, #wpDiff {
font-weight: normal;
}
#wpSave, #wpDiff {
background: #E6E4D8;
border: 2px solid #BEB798;
color: #38230C; /* brown */
padding: 3px 5px;
}
#wpPreview {
background: #8D1425;
border: 2px #FFFFFF solid;
color: #FFFFFF;
font-weight: bold;
padding: 3px 5px;
}

The 'Preview' button appears in red in order to encourage JazzMeet's visitors to preview their page before saving it, and thereby reduce the number of useless edits being made to the wiki. To help accentuate the "preview" button, we can move the "cancel" and "editing help" links beneath the .editbuttons div.

.editHelp {
display: block;
font-size: 75%;
margin: 5px 0;
}

The "edit" interface will now look similar to the following image:

The Basics

Toolbar

You may want to limit what you change in the toolbar, as many of your visitors will already be familiar with the toolbar-based text editor on the web. You may be expecting something similar to be displayed on your website as well. Similar to the rest of MediaWiki's markup, the "edit" interface's toolbar has a unique identifying value (#toolbar).

If you want to alter the toolbar's images, you can replace the images prefixed with button_ in skins/common/images/.

Note

Before replacing the toolbar button images, remember to create a copy of them elsewhere, in case you want to restore them at a later stage.

Legal Notices and Warnings

#editpage-copywarn contains a warning that is displayed on the edit interface's page, thereby notifying the users that the content they submit to the wiki may be "edited mercilessly", and a reminder not to submit the copyrighted work. For JazzMeet, we will decrease the size of the text to help retain a friendly atmosphere for visitors.

#editpage-copywarn {
color: #202020;
font-size: 75%;
}
主站蜘蛛池模板: 商都县| 宿州市| 梅河口市| 宾川县| 剑川县| 兴山县| 南涧| 玉林市| 高平市| 韶关市| 涟水县| 洱源县| 辽阳市| 丰都县| 商都县| 友谊县| 清新县| 高雄市| 镇赉县| 大渡口区| 友谊县| 龙山县| 互助| 怀安县| 安泽县| 柘荣县| 南昌县| 闻喜县| 舒兰市| 凤庆县| 汉源县| 湖南省| 绥阳县| 收藏| 陵水| 凉山| 易门县| 云浮市| 花莲县| 龙陵县| 将乐县|