You are not logged in.

#1 2009-02-07 05:05:31

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

New tip, warning, note, etc. box style macros for ArchWiki

Greetings!

I'd like to suggest some nicer style "templates" ("macros"?) be created for the ArchWiki. I'm a strong believer in the power of consistency, and the wiki is in need of a consistent way of accenting important points.

Rather than waste words trying to explain in detail, I direct your attention to my user wiki page for simple examples of what I'd like to see, and the existing Box Note at the bottom for comparison.

(Box Note is the only existing style "template" that I know of -- I could simply be missing the obvious here, so please enlighten me if this is the case! The links on the template index appear to be broken.)

For a good example of why I think these are needed, I direct your attention to The Arch Way section of the Beginners' Guide where some well-meaning contributor has decided bright-green text on a white background is a good way to grab the reader's attention.

Just a few paragraphs later, in Obtain the latest Installation media, we see bright-green warnings (I was raised on green=good, red=bad) and another example of the unusually large top and bottom margins around the Box Note template.

I'm hoping the end result will allow usage along the lines of {{tip|This will create a handy green "tip" box}}.

I'm willing to put some effort into making this happen, but really am lost where to go next.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#2 2009-02-07 15:27:40

ras0ir
Member
From: Ankara/Turkey
Registered: 2008-06-20
Posts: 65
Website

Re: New tip, warning, note, etc. box style macros for ArchWiki

+1 from me
compared to the {{Box Note}} template, a colored box will take more attention.

Offline

#3 2009-02-07 15:56:26

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

Well, I've managed to figure out how to create a Warning template and a Tip template. I'd like to replace the existing Box Note template with my version, so long as no one objects.

Suggestions/criticism/disussion welcome!


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#4 2009-02-07 16:23:37

ras0ir
Member
From: Ankara/Turkey
Registered: 2008-06-20
Posts: 65
Website

Re: New tip, warning, note, etc. box style macros for ArchWiki

Well, you can replace "Tip" and "Warning" text with icons
for example:
Warning: warning.png
Tip: tip.png

Offline

#5 2009-02-07 17:40:19

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

I wanted to do that, but I don't think the wiki supports <img> tags. Probably a security thing. We would need to upload the images to the actual wiki, then use the built-in wiki "image" markup... but uploading is also disabled, AFAIK.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#6 2009-02-07 17:45:24

Vintendo
Member
From: Netherlands
Registered: 2008-04-21
Posts: 375
Website

Re: New tip, warning, note, etc. box style macros for ArchWiki

You can set the images in the css, I saw you can do that.

Offline

#7 2009-02-07 18:24:27

crouse
Arch Linux f@h Team Member
From: Iowa - USA
Registered: 2006-08-19
Posts: 907
Website

Re: New tip, warning, note, etc. box style macros for ArchWiki

uhhhhhhh seems we have something a bit off in the wiki.....

====USB stick====
<font color="red">'''WARNING''': This will destroy all data on your USB stick.</font>

This SHOULD produce RED not LIME text as it is showing up now....

Offline

#8 2009-02-07 18:43:27

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

Changing the " instances to actual quotes solves this problem. I'm betting the user copied-and-pasted the tag from elsewhere. That's another reason why the templates are nice--newbies don't need to worry about editing HMTL.

As far as images in CSS, I can't seem to get it working (background-image). Keep in mind that the wiki only allows a small subset of HTML/CSS. If you could post an example, however, I'd be willing to try.

Last edited by pointone (2009-02-07 18:45:24)


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#9 2009-02-08 01:10:12

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

I've tweaked the colours a bit, and added a spiffy-looking line. Take another look at my user wiki page if the mood should strike you.

After much mulling and tinkering, I don't think images are worth the trouble. They only make it harder to view the wiki in plain-text.

I'm currently trying to work out a spacing issue I discovered with the templates.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#10 2009-02-08 03:18:36

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

Alright, one final update for today.

I've re-created the boxes using <div> tags only (instead of tables). The result is a box that is properly spaced both in the web browser, and when copied-and-pasted into Vim/Notepad. One downside to using <div> tags is an overlap if I try to use 100% width, so I set width to a more-conservative 75%.

If no one else objects, I'm planning on updating the existing {{Box Note}} template tomorrow morning.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#11 2009-02-08 15:10:06

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

This project has now turned into a complete overhaul of the template system on the wiki. They appear to have been neglected for some time...

Watch this space.


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#12 2009-02-08 15:31:44

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: New tip, warning, note, etc. box style macros for ArchWiki

Can we avoid those vertical bars separating "Note" etc from the text?  The boxes look better without them in my opinion.

Last edited by u_no_hu (2009-02-08 15:32:00)


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#13 2009-02-09 02:17:12

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

I've added another style at the bottom of my user wiki page. Is this more to your liking?

Personally, I like the consistent separation of the "title" text ('note', 'warning', 'tip', etc.) and the content. Alternatively, I suppose I could just get rid of the "title" altogether and let the colour do all the talking... but I guess it pays to be explicit.

It took a lot of hacking, but I managed to fix up the {{File}} and {{Command}} templates this afternoon, as well. Feedback is welcome, should you care at all:

http://wiki.archlinux.org/index.php/Template:File
http://wiki.archlinux.org/index.php/Template:Command


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#14 2009-02-09 16:52:59

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: New tip, warning, note, etc. box style macros for ArchWiki

After a bit more tinkering, I'm inclined to agree with u_no_hu. The Note, Warning, and Tip templates are much simpler now.

I've updated most templates to remove the horizontal margins, too.

Finally, both http://wiki.archlinux.org/index.php/Category:Template and http://wiki.archlinux.org/index.php/Help:Template have been updated. I've merged http://wiki.archlinux.org/index.php/Index:Template into the help page, and marked the index for deletion. This is what the category is for.

Last edited by pointone (2009-02-09 16:53:55)


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#15 2009-02-18 06:39:25

adamlau
Member
Registered: 2009-01-30
Posts: 418

Re: New tip, warning, note, etc. box style macros for ArchWiki

I've incorporated two of the new box types in the Nano wiki. Sorry about leaving the wiki it hanging as I did, I forgot about it smile . One point I would like to make is that I put up the 'replacing vi' section as a solution for some people who had asked just that. I will proceed to clarify as days pass, feel free to toss in what you guys feel the wiki requires...

Last edited by adamlau (2009-02-18 06:39:49)


Arch Linux + sway
Debian Testing + GNOME/sway
NetBSD 64-bit + Xfce

Offline

#16 2009-02-18 15:13:40

z0phi3l
Member
From: Waterbury CT
Registered: 2007-11-26
Posts: 278

Re: New tip, warning, note, etc. box style macros for ArchWiki

Very nice work!

Was reading through the Newbie Guide yesterday, and really appreciated the colored highlighted areas, made finding some specific information a lot easier

Offline

#17 2009-02-18 17:09:03

cdwillis
Member
From: /home/usa
Registered: 2008-11-20
Posts: 294

Re: New tip, warning, note, etc. box style macros for ArchWiki

These templates are a great addition to the wiki.

Offline

Board footer

Powered by FluxBB