Creating Styles in Linkinus

A style in Linkinus is composed of HTML, CSS, and Javascript.  This should allow anyone with experience in designing web pages to create a style in linkinus.  However, there are some differences from webpages that should be noted when creating styles in Linkinus.  This page is meant as a guide to creating styles and contains tips and an overview of how a style is created in Linkinus.  Knowlege of HTML and CSS is assumed.  Javascript knowlege is not necessary for basic styles, but any special features will requireknowlege of Javascript.  To find examples of how to actually write a style, look at a style you want to base your's off of.  This is mearly a guide to how a style works.

Basic Style Creation

HTML

A linkinus style is composed of several HTML files located in the Resources directory of the style package.  A basic style contains the following HTML files

These HTML files contain normal HTML like you'd find on any webpage.  However, there are some points to note when making a style.

CSS

Linkinus uses CSS to style the text.  The main.css file located in the Style package is probably more important than any of the HTML files when creating a basic style in Linkinus.  Some points to know about CSS and Linkinus are highlighted below.

Javascript

Javascript is not necissary to use when creating a basic style.  However, there are some basic functions that are used in every style.

Variables

Each HTML file allows for variables to be used.  The Style SDK shows which variables are allowed below each html file.  An explaination of supported variables is below:

Special Features

Unique Nickname Coloring

In order to have your style support unique nickname coloring, you must make some minor changes to your CSS and HTML.  The changes are as follows below:

HTML: The nickname span class must have a second class added to it.  Accomplish it by adding the class userhost$userhostcolorindex to your nickname class like in the following example:

<span class="nick userhost$userhostcolorindex">$nickname</span>

Please note that Linkinus won't include userhostX into highlighted messages, but if you wish your style to support coloring nicks uniquely with highlighted messages if Linkinus supports it in the future, you may include the HTML in the highlighted message HTML as well.

CSS: The stylesheet for your style also must have the following classes added to the end of your stylesheet.  You may change the color codes to whatever you want, but keep the !important.  It is also a good idea to keep the .userhost1 color the same as your .nick class color in order to keep things consistant.

.userhost1 { color: #0080ff !important; }
.userhost2 { color: #00DF00 !important; }
.userhost3 { color: #ff0080 !important; }
.userhost4 { color: #dd00ff !important; }
.userhost5 { color: #76E0BD !important; }
.userhost6 { color: #7F4FFF !important; }
.userhost7 { color: #8BC100 !important; }
.userhost8 { color: #cc66ff !important; }
.userhost9 { color: #BB0008 !important; }
.userhost10 { color: #6F42BC !important; }
.userhost11 { color: #008080 !important; }
.userhost12 { color: #904000 !important; }
.userhost13 { color: #808000 !important; }
.userhost14 { color: #4ABFD1 !important; }
.userhost15 { color: #3333dd !important; }
.userhost16 { color: #C19C46 !important; }
.userhost17 { color: #0057DA !important; }
.userhost18 { color: #008000 !important; }
.userhost19 { color: #608040 !important; }
.userhost20 { color: #ff6fcf !important; }

Advanced Style Creation

This advanced section primarily deals with Javascript.  However, some CSS will be included to outline webkit specific styles, animation, and other CSS not common to normal web design.

Javascript

While Linkinus is powered by webkit, and can use any javascript supported by webkit, there are some things to keep in mind when scripting for linkinus due to the interface and various limitations of the irc format over a full web browser.

CSS

Since Linkinus uses Webkit, there is a large amount of CSS that can be used to give new effects to styles.  Below is a brief overview of a few CSS tricks that are normally not used in typical webpage design.

Opacity

Webkit supports opacity through CSS.  This makes styles that include background images and dimming history a lot easier.  There are several ways opacity are achieved.

Just about anything can be made transparent! Images, text, block level elements, etc.

Shadows

Shadows are available through CSS, something that is not widely supported in browsers, but can be used in webkit.  The main property used with this is text-shadow.  This property has the following syntax.

The acceptable values for the text-shadow are as follows:

Box Shadows are used to give shadows to block elements.  To use these, the following property and syntax is used:

Animation

Webkit also allows CSS animation such as fades, spinning, and other superfluous effects.  This usually requires an element to be clicked, hovered, or can be accomplished on load (such as having each line fade in as it shows up).

There are several properties to use with animations and they are as follows:

To use a transition, you must define the transition in the selector.  For example, you can do the following:

.newline {
	opacity: 0;
	-webkit-transition-property: opacity;
	-webkit-transition-duration: 2s;
	-webkit-transition-timing-function: linear;
}

.newline:hover {
	opacity: 1;
}

The CSS above will fade the element in over a period of 2 seconds as you mouse over it.

All content and code, unless otherwise specified, is copyright 2004 - 2009 Callen Magnuson.

mmmh... spam...