<HTML> <HEAD> <LINK href="special.css" rel="stylesheet" type="text/css">
Look Stunning On iPhone Android And Other Mobile Devices
Websites built with WebStarts work perfectly on the iPad, iPhone, Android, and other mobile devices. While competitors allow you to create dumbed down versions of your website to fit on mobile displays, your WebStarts website will be displayed in all it’s grandeur on all mobile phones, tablets, and more.
Thank you for taking the time to write to us. We appreciate your feedback and support.
@GimmeBarHelp
Eloquent JavaScriptContents
- Introduction
- Basic JavaScript: values, variables, and control flow
- Functions
- Data structures: Objects and Arrays
- Error Handling
- Functional Programming
- Searching
- Object-oriented Programming
- Modularity
- Regular Expressions
- Web programming: A crash course
- The Document-Object Model
- Browser Events
- HTTP requests
Appendices
Alphabetic index of terms
Cover page© Marijn Haverbeke (license), written March to July 2007, last modified on January 26 2013.
Some characters (e.g. the less than and greater than signs) are reserved for HTML markup. In order to display these characters as text, you must enter the HTML entities in the source code. For example, to display the less than sign (<), you need to enter < (entity name) or < (entity number). Among the entity list, there are quite a lot of symbol entities that we can use in layout design. For examples: → ♥ ♫ ✓ ✗ • ☞ ✁ ★ “ ⊕. Have you seen the snowman ☃ symbol before? If not, continue on this post to find more surprises.
The Advantages of Using Entities Rather Than Images
- It loads fast because it is text base.
- Scalable according to font size.
- Easy to change color and sizing.
Apostrophe & Quotation Marks
Most common typography mistakes found on the internet are probably the misuses of apostrophe and quotation marks. We often misuse the prime symbol ( ' ) as the apostrophe ( ’ ) and the double prime ( " ) as the quotation marks ( “ ” ).
To correct this, you can use the right single quote entity (’) as the apostrophe. Use the left double quote (“) and right double quote (”) for the quotation marks.
Arrows
I particularly find the arrow symbols useful because they can be used as direction arrows or breadcrumb separators.
Link Separators
My favorite entities for separating links are bullet • ( • ) and dot operator ⋅ ( ⋅ ).
Trademark, Copyright, Degree, and Currency
The other commonly used entities are probably the trademark, copyright, degree, and currency symbols.
Trademark ™ | © Copyright | Registered Trademark ®
Degree: 29° | 26 ℃ | 60 ℉
Currency: ¢ Cent | £ Pound | ¥ Yen | € EuroSymbols For Web Design
Here some entities that you can perhaps use for design layout:
✉ ✍ ✎ ✓ ☑ ☒ ✗ ⊕ ⊗ ☞ ☜ ♫ ✄ ✁ ∞ ♨ ☢ ✈ ☰ ☷ ♥ ★ ☆ ☺ ☹
Miscellaneous Symbols
Here are some miscellaneous symbols that you will most likely never going to use (but they are cool):
♔ ♕ ♖ ♘ ♆ ✠ ♂ ♀ ♠ ♣ ♥ ♦ ☣ ☮ ☃ ☂ ☯ ☠
Rendering Issues
Note that Mac and Windows have different rendering system. The symbol entities will most likely appear different on different operating systems. Check before you use it.
Reference Links
Last week I posted a CSS3 dropdown menu and someone complained that I didn't explain the CSS code in detail. Well, here is a post on the basics of the new properties: text-shadow, box-shadow, and border-radius. These CSS3 properties are commonly used to enhance layout and good to know.
RGBA
The first three values are RGB color values and the last value is the level of the transparency (0 = transparent and 1 = opaque).
RBGA can be applied to any properties associated with color such as font color, border color, background color, shadow color, etc.
Text Shadow
Text shadow is structured in the following order: x-offset, y-offset, blur, and color;
Set a negative value for x-offset to shift the shadow to the left. Set a negative value for y-offset to shift the shadow to the top. Don't forget you can use RGBA values for the shadow color.
You can also specify a list of text-shadow (separated by a comma). The following example uses two text-shadow declarations to make a letter press effect (1px top and 1px bottom).
text-shadow: 0 1px 0 #fff, 0 -1px 0 #000;
Border Radius
The shorthand for border radius is similar to the padding and margin property (eg. border-radius: 20px). In order for the browsers to render the border radius, add "-webkit-" in font of the property name for webkit browsers and "-moz-" for Firefox.
You can specify each corner with a different value. Note Firefox and Webkit has different property names for the corners.
Box Shadow
The structure for box shadow is same as the text-shadow property: x-offset, y-offset, blur, and color.
Again, you can apply more than one box shadow. The following example is a list of three box shadow declarations.
-moz-box-shadow: -2px -2px 0 #fff, 2px 2px 0 #bb9595, 2px 4px 15px rgba(0, 0, 0, .3);
Every aspiring Web developer should know about the power of JavaScript and how it can be used to enhance the ways in which people see and interact with Web pages. Fortunately, to help us be more productive, we can use the power of JavaScript libraries, and in this article we will take a good look at jQuery in action.
What Is jQuery?
In a nutshell, jQuery is a leading JavaScript library that can perform wonders on your Web pages and make your Web development life much easier and more enjoyable. With the rise in popularity of jQuery since its arrival in 2006, over an estimated 24 million websites (50% of them being the 10,000 most visited websites) currently reap the benefits, and as Google Trends suggests, it’s the most popular JavaScript library.
Thousands of Web developers worldwide use jQuery to innovate on their websites and stay up to date on trends. This surge has been influenced by several jQuery gurus who have helped make jQuery what is today. I would like to personally thank these guys and gals for their hard work and would like to do my part to spread the news about JavaScript and jQuery. In this article, we’ll show you over 50 of jQuery’s most renowned functions, demonstrated with live visual examples. The jQuery library is comprehensive, so hopefully seeing these most frequently used functions in action will improve your understanding of how they can work together to produce excellent results.
jQuery And CSS
Styles play a big part in the look and feel of any website, and jQuery can help us change them dynamically. In this section, we will look at how jQuery can be used to dynamically add and remove style classes and entire cascading style sheets.
.css()
You can change your website’s styles dynamically with jQuery’s .css() function. Either change styles that are already declared inline or in CSS files (such as font-size, color, background-color, etc.) or create new styles for elements.
Demo: Change text color and background color
Blue text with orange background
Demo: Add a style sheet
.addClass() and .toggleClass()
In addition to the .css() function, you can apply currently defined CSS classes by using the .addClass() function. Its counterpart function, .removeClass(), reverses the action.
Demo: Add a CSS class to an element
Click “Run demo” to add the styles to the button. Click “Reset” to remove the styles.
The .toggleClass() function is a huge time-saver for toggling a state on and off with CSS. The following example sets event handlers for mouseenter (which applies the CSS class img-hover to the image) and mouseleave (which removes it).
Demo: Toggle a CSS class on an element
jQuery Animations And Effects
We can use jQuery to create some very smooth animations and effects with minimal effort. Animations and effects are always best demonstrated with examples, so let’s dive right in.
.animate()
The .animate() function can be used to animate the movement and/or appearance of elements on a Web page. Let’s look at both. You may define the settings parameter with a set duration (in milliseconds) or any of the words slow, normal or fast. The callback, which is the function that runs after the animation has finished, is optional.
Demo: Animate text
Demo: Animate size
Easily change the size of a div.
Demo: Animate movement
The .animate() function is asynchronous, so multiple animations may run at the same time. You can also use the .stop() function to stop the animation. If you click “Run demo” and then “Reset” during the animation, it will demonstrate the .stop() function.
Many pure JavaScript functions are used frequently in animations, such as setInterval(), clearInterval(), setTimeout() and clearTimeout(). Once again, these functions are included in the list because understanding what they can do is important to supporting the jQuery’s animation functions.
setInterval() and clearInterval()
You can automate a task based on time using the JavaScript setInterval() function, which can be used to specify a regular time-based trigger.
Demo: Simple time counter
Click “Run demo” to start the timer, and click “Reset” to stop it.
0 seconds elapsed
Demo: Digital time display
setTimeout() and clearTimeout()
You can also delay a task based on time using the JavaScript setTimeout() function, which can be set to wait for a specified length of time before running the code.
Demo: Do something after a specified length of time.
Click “Run demo” to set the timeout and, click “Reset” to clear it.
This text will disappear after three seconds.
.slideToggle() and .fadeToggle()
jQuery provides various toggle functions that save us heaps of time when we want to bind related events to the same element. For example, .slideToggle() binds both .slideUp() and .slideDown() to the element and also manages that state for us.
Demo: Slide an element in and out of view.
Click “Run demo” to show the paragraph, and click again to hide.
Curabitur placerat commodo augue eget congue. Aliquam id ante leo. Duis at libero magna, at dignissim odio. Aliquam aliquet suscipit mollis. Pellentesque libero tortor, elementum id mattis vel, mattis eget metus. Nam convallis interdum imperdiet. Fusce at magna tellus. Sed mi ante, aliquam at accumsan ac, tristique sit amet dui. Aliquam eleifend molestie ligula. Vivamus eleifend, diam id tincidunt posuere, ipsum dui elementum sapien, posuere pulvinar risus neque id turpis. Nullam volutpat cursus libero, sit amet euismod justo eleifend vitae.
The .fadeToggle() function is similar to .slideToggle() but with a fading effect that uses the .fadeIn() and .fadeOut() methods.
Demo: Fade an element in and out of view.
Click “Run demo” to show the paragraph, and click again to hide it.
Curabitur placerat commodo augue eget congue. Aliquam id ante leo. Duis at libero magna, at dignissim odio. Aliquam aliquet suscipit mollis. Pellentesque libero tortor, elementum id mattis vel, mattis eget metus. Nam convallis interdum imperdiet. Fusce at magna tellus. Sed mi ante, aliquam at accumsan ac, tristique sit amet dui. Aliquam eleifend molestie ligula. Vivamus eleifend, diam id tincidunt posuere, ipsum dui elementum sapien, posuere pulvinar risus neque id turpis. Nullam volutpat cursus libero, sit amet euismod justo eleifend vitae.
.delay()
In this demonstration, we’ll mainly use jQuery’s awesome function-chaining ability by running the .fadeOut(), .fadeIn() and .delay() functions together on the same element. This is very similar to the setTimeout() function we saw earlier but without allowing us to easily interrupt the delay.
Demo: Use .delay() to create a delay between function calls.
jQuery And DOM Manipulation
The DOM (document object model) is all of the HTML content that you see on a website (text, images, container elements, etc.). We can use jQuery to perform wonders with the DOM when all page elements have been loaded. The event that captures when the DOM is ready is called .ready(), and there are a few ways to call it. In this section are demos of jQuery functions that change the DOM in some way.
.clone()
The jQuery .clone() function is pretty simple to use; it basically just copies the element that you specify into a new element.
Demo: Clone an element.
.html(), .text() and .empty()
Using .html() is the most common way to get or set the content of an element using jQuery. If you just want the text and not the HTML tags, you can use .text(), which will return a string containing the combined text of all matched elements. These functions are browser-dependent (i.e. .html() uses the browser’s innerHTML property), so the results returned (including white space and line breaks) will always depend on the browser you are using.
In this example, we are also making use of the .empty() function, which is a quick way to get rid of the content within, and .prev(), which can be used to reference the preceding element, in this case the demo buttons.
Demo: Get the content of an element.
.append(), prepend(), .after() and .before()
These function provide the means of inserting content in particular places relative to elements already on the Web page. Although the differences may appear trivial, each has its own purpose, and knowing exactly where they will all place content will save you coding time.
Demo: Insert content onto a Web page.
jQuery And AJAX
The jQuery library has a full suite of AJAX capabilities that enables us to load data from a server without refreshing the browser page. In this section, we will have a quick look at refreshing page content, loading scripts and retrieving data from different Web pages and servers.
$.ajax()
The $.ajax() function is arguably the most used jQuery function. It gives us a means of dynamically loading content, scripts and data and using them on a live Web page. Other common uses are submitting a form using AJAX and sending data to server-side scripts for storing in a database.
The $.ajax() function has a lot of settings, and the kind team at jQuery has provided many shorthand AJAX methods that already contain the settings we require. Some developers like to write out the full AJAX settings, mainly because they require more options than many shorthand methods provide (such as beforeSubmit()). Also, note that you can use the Firebug NET.panel to analyze HTTP requests for testing, monitoring and debugging AJAX calls.
Demo: Use $.ajax() to load content without reloading the entire page.
For this demo, HTML content is held in separate files, which are inserted below using AJAX. Showing a loading icon while an AJAX request is processing is courteous. The third content block below has a two-second delay to simulate the loading icon.
Content will appear here.
Load content 1 Load content 2 Load content 3
We can also use functions such as $.parseJSON() and JSON.parse() from ECMAScript5, which simplifies JSON parsing. If you’re interested in JSON parsing and tree recursion, see the “Online JSON Tree Viewer Tool.”
.load()
The .load() function is an AJAX shorthand method for inserting HTML straight into a matched element on the Web page.
Demo: Use .load() to grab HTML content from another Web page.
JSONP
AJAX requests are subject to the same origin policy, which means you may only send requests to the same domain. Fortunately, $.ajax() has a property named JSONP (i.e. JSON with padding), which allows a page to request data from a server on a different domain. It works by wrapping the target data in a JavaScript callback function. Note that the response is not parsed as JSON and may be any JavaScript expression.
Demo: Use AJAX and JSONP to load data from an external source.
This demo will load the latest pictures tagged “jQuery” from Flickr’s public feed.
The AJAX shorthand functions $.getJSON and $.getScript and more AJAX examples can be found on my blog.
jQuery And Events
Managing events using regular JavaScript is entirely possible, however, jQuery provides a much more user-friendly interface to manage Web page events. Examples of such events are clicking a hyperlink, moving the mouse over an image and even pressing a key on the keyboard; the list goes on. Here are some examples of key jQuery functions that may be used to manage events.
.bind() and .unbind()
The .bind() function is very useful for adding event triggers and handlers to your DOM elements. In case you didn’t know, you can bind your DOM elements to a whole list of events, such as submit, change, mouseenter and mouseleave.
You may have also seen .click() used in jQuery code. There is no functional difference between .click() and .bind('click'), but with the latter we have the benefits of being able to specify custom events and add data parameters. There is also an .unbind() function to remove any events that have already been bound. As of jQuery 1.7 the .bind() function is an alias to .on() function. When you type in console: “jQuery.fn.bind.toString()” it will return: “function (a, b, c) { return this.on(a, null, b, c); }“.
Demo: Trigger an event when the user clicks on or hovers over a div.
Demo: Trigger an event when the user hovers over or double-clicks a div.
Press “Run demo” a few times in a row for some nice effects. Also, double-clicking the boxes will make them disappear!
Demo: Trigger an event when the user presses a key.
Press any key shown in the boxes below.
Note: The key difference between keydown and keypress events is that the latter captures each individual character entered, as opposed to just firing once per key press. To illustrate, this simple tool shows the keycodes for any key that you press.
.live(), .on() and .off()
The .live() function is essentially the same as .bind(), but it can capture events on new elements that didn’t exist on the page when it was loaded; for example, if your Web page has loaded and then you dynamically insert an image onto it. If we used .bind() to attach an event when the mouse hovers over the image, it would not work. But if we used .live(), it would work! As of jQuery 1.7, you are advised to make use of the new .on() and .off() functions, instead of the .live() function, which has a few disadvantages to .on(). See “jQuery 1.7+ .on() vs. .live() Review” for a more detailed explanation of the differences.
Demo: Capture events on new or changed elements.
Click “Run demo” to dynamically insert more images and check that the event still fires on them.
.delegate()
The .delegate() function provides a means of attaching event handlers to new elements (similar to the .live() function covered above). You might find .delegate() to be faster than .live() because the latter searches the entire document namespace for the elements as opposed to a single document. The much more important difference is that .live() is prone to break if used with traversing.
Demo: Delegate events to the child elements of a root element.
The demo area is the root element (orange border) with colored span child elements that have a hover event attached. Click “Run demo” a few times and hover with the mouse to trigger the effects.
.preventDefault()
The .preventDefault() function can be applied to stop any element with a default action from firing: hyperlinks, keyboard shortcuts, form submit buttons, etc. These are probably the most common uses, and the function stops the hyperlink from going to its destination (the href). It’s very useful for stopping those default actions and running your custom JavaScript actions instead.
Demo: Prevent a hyperlink from going to its href.
.stopPropagation()
There are methods that do things similar to .preventDefault() but that behave differently. The .stopPropagation() function prevents the event from occurring on any ancestor elements. This can be used if you have an exception to the rule that you’ve specified for a container element with child elements. This function currently does not work with .live() events because it handles events once they have propagated to the top of the document.
Demo: Prevent a parent container from firing its event when its child is clicked.
Click both the link and div box area to see which event is fired.
This div does not use the .stopPropagation() function.
This div does use the .stopPropagation() function.
As you can see, when you click the top link it also fires off the div event, but the bottom link uses .stopPropagation(), which prevents the div event from firing. The div event will still fire if you click inside the div, as expected.
.stopImmediatePropagation()
This function is nice for stopping all future bound events. The events will fire in the order they were bound, and when it hits the .stopImmediatePropagation() function, all further bound events are not fired.
Demo: Prevent all future bound events from firing.
Click both the link and div box area to see which event is fired.
Finding, Looping And Filtering Results
jQuery gives us fast access to finding anything on the page and the ability to loop through or filter results as we please. It also has powerful functions to manipulate and extend data and functionality associated with JavaScript objects. There are so many things to cover in this section, so we have narrowed them down to a few key functions.
$.each() and .each()
There are two different methods for iterating with jQuery: .each() is used to iterate only over jQuery objects collections, while $.each() is a general function for iterating over JavaScript objects and arrays. I am a big fan of functions such as these and JavaScript shorthand techniques that provide us with a fast alternative to basic JavaScript coding.
Demo: Use $.each() to loop through values in an array.
Output the countries of the world (stored in an array).
Demo: Use .each() to loop through DOM elements.
This demo loops through all of the h2 tags on this Web page and creates a table of contents.
You can use $.each() and .each() on a lot of different things, such as DOM elements, arrays, objects and JSON. For those of you who are keen, you could try five more jQuery .each() examples.
$.data(), .data(), $.hasData() and $.removeData()
Updates to the jQuery library (mainly since 1.4) has brought the ability to attach data of any type to DOM elements. This is a very useful alternative to storing data in JavaScript objects and other such methods. There are two versions: $.data(), which takes in the element as a parameter, and .data(), which can attach directly to matched elements.
Note that $.data() returns a data object to the caller, whereas .data() does not. There are also many utility functions, such as $.hasData(), $.removeData(), that help with data management.
Demo: Attach data to DOM elements.
The following example sets and gets a data object into the div for this demo area.
.match(), .test() and :contains()
Together with the jQuery :contains() selector, you can use the pure JavaScript functions .match() and .test() to save time when filtering for string values. Let’s look at some examples.
Demo: Extract email addresses from inside HTML (i.e. a string).
We can use .test() to check whether any emails are present, and use .match() to extract them.
Curabitur placerat commodo augue eget congue. Aliquam id ante leo. Duis at libero magna, at dignissim odio. Aliquam aliquet suscipit mollis. Pellentesque libero tortor, elementum id mattis vel, mattis eget metus. somebody1@somewhere.com Nam convallis interdum imperdiet. Fusce at magna tellus. Sed mi ante, aliquam at accumsan ac, tristique sit amet dui. Aliquam eleifend molestie ligula. Vivamus eleifend, somebody2@somewhere.com diam id tincidunt posuere, ipsum dui elementum sapien, posuere pulvinar risus neque id turpis. Nullam volutpat cursus libero, sit amet euismod justo eleifend vitae.
Emails are present?
Demo: Use the jQuery :contains() selector to match elements with substrings.
We can use the :contains() selector to match substrings inside any of that element’s descendants (this is case sensitive).
.find()
The .find() function is very useful for matching elements filtered by a selector, jQuery object or element. The .find() function can be used with the functions .children() (which searches only the direct child siblings of the matched elements) and .parents() (which searches the direct parent elements of the matched element).
Demo: Finde specific descendants of matched elements.
find(folders) find(items)
- Folder 1
- Subfolder 1
- Subfolder 2
- Item 1.2.1
- Item 1.2.1.1
- Item 1.2.1.2
- Folder 2
- Item 1.3.1
- Item 1.3.1.1
- Item 1.3.1.2
.filter()
The .filter() function allows us to reduce a set of matched elements based on a jQuery selector. This is useful when you want to process a group of elements and then further process specific child elements. The .filter() function can be used in a few different ways, such as to filter by a class name, function or jQuery object.
Demo: Use .filter() to match subelements.
In this example, .filter() is used to style paragraphs based on their content.
Alternates Strong tags Span tags “highlight” classParagraph 1
Paragraph 2 with span tag
Paragraph 3 with strong tag
Paragraph 4 with highlight class.
Paragraph 5 with span tag
Paragraph 6
Paragraph 7 with strong tag
Paragraph 8 with span tag
Paragraph 9
.slice()
The .slice() function lets us easily specify a subset of elements to perform actions on. It takes two parameters: start and end indices of subelements in a matched parent element.
Demo: Use .slice() to perform actions on a subset of elements.
Slice 1 Slice 2 Slice 3 1 1 1 1 2 3 1 4 2 7 3 0 3 6 1 Slice me!
.prev() and next()
The .prev() and .next() functions can be used to reference the immediately preceding or next element in a set of matched elements (in the DOM hierarchy). You can also add a selector to the functions that acts as a filter on the elements (shown in the demo).
Demo: Reference the previous and next elements in a list.
$.extend()
The $.extend() function can be used to combine two or more objects into the first object or into a completely new object.
$.extend( target, [object1,] [objectN] )In the demo, we have a functional contact form on our website, and we want two more forms with similar functionality. Instead of copying all of the code that processes the form, we can use $.extend() to copy the functionality to our new forms, thus avoiding repetitive code. You might have noticed that the target element specified is a blank object; this is a trick that you will often see to create a new object of object1 and extend it with objectN (N representing any number of objects). So, in the example, we want to “copy” the existing functionality of forms.enquiry and simply override the email address.
Demo: Use $.extend() to change the send action on a form to different email addresses based on the form used.
This demo simulates the submission of three forms that all use the same code base.
Demo: Use $.extend() to specify custom settings for a plugin.
This demo shows how to specify the length of paragraph excerpts. The default is 150 characters.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Addy Osmani’s book Learning JavaScript Design Patterns gives greater insight into how to use the $.extend() function to override the default values of jQuery plugins.
.serialize() and .serializeArray()
The .serialize() and .serializeArray() functions can create string and array values from form fields in seconds! There are two demos here: the first outputs all of the form’s fields and their values, and the second creates a URL string with the form fields and values appended to the form action ready to be sent.
To run the demo, enter anything into the form and click the “Run demo” buttons below the form.
Demo: Create an array of all of the form’s field values
Demo: Create a URL string with all of the form’s field values
Conclusion
Although we have only scratched the surface of jQuery in this article, we hope you have learned something about some of the most popular jQuery functions and are able to use them to write fantastic code for your next Web development project. Thanks for reading.
If you have a problem and need a solution for it, chances are high that a JavaScript library or jQuery plugin exists that was created to solve this very problem. Such libraries are always great to have in your bookmarks or in your local folders, especially if you aren’t a big fan of cross-browser debugging.
A JavaScript library isn’t always the best solution: it should never be a single point of failure for any website, and neither should a website rely on JavaScript making the content potentially inaccessible. Progressive enhancement is our friend; sometimes JavaScript won’t load properly, or won’t be supported — e.g. users of mobile devices might run into latency issues or performance issues with some JavaScript-libraries. Often large all-around JavaScript libraries such as jQuery might be an overkill, while tiny JavaScript micro-libraries could serve as good, “light” alternatives for a particular problem. We’ll present some of them today.
In this two-part overview, we feature some of the most useful JavaScript and jQuery libraries which could be just the right solutions for your common problems. You might know some of these libraries, but you probably don’t know all of them. In either case, we hope that this overview will help you find or rediscover some tools that you could use in your next projects.
Due to the length of this post, we’ve split it into two parts for your convenience:
Quick Overview:
Below you’ll find a brief overview and links to the libraries and tools featured in this post. They are supposed to help you find just the right tool quickly without browsing the whole page.
Web Forms and Input Validation
Select2 jQuery Plugin
A jQuery-plugin for replacement and enhancement of <select>-boxes. The plugin supports search, remote data sets, and infinite scrolling of results. Users can just start typing what they’re looking for. Non-matching entries are removed from the view, and options can be selected using “Enter” or a mouse click. The plug-in works with standard select input fields as well as with multiple selects and optgroup. It also has support for selected, disabled and default text (HTML5’s placeholder attribute). The plug-in is based on Chosen, an alternative solution which is currently available in jQuery, MooTools and Prototype flavors and as a Drupal 7 module.
jQueryCoreUISelect
Another cross-browser solution to enhance the <select> element with jQuery and CSS. Requires jQuery 1.6 or higher. It provides full customization, support of optiongroup, automatic calculations, keyboard support, callback functions and is compatible with mobile devices.Sisyphus.js
This script allows Gmail-like auto-saving of drafts. It stores form data to the HTML5 local storage of the user’s browser and restores it when the user reloads or reopens the page or opens the page in a new tab. The data is cleared from local storage when the user submits or resets the form.jQuery Credit Card Validator
This library attaches to the input event (with a fallback to the keyup event) and so every time a number in the input field changes, it calls a validation function. When a card is recognized, the credit card type is highlighted; and if the credit card number is correct, it is highlighted with a green checkmark as well. The plugin supports American Express, Diners Club, Discover Card, JCB, Laser, Maestro, MasterCard, Visa and Visa Electron. You might want to consider credit cards JavaScript validator and the Smart Validate Credit Card Validation plugin.TextExt
This library allows you to transform HTML text into input fields, without resorting to code inflation. The plugin inserts aesthetic as well as practical input possibilities, e.g. Tags, Ajax, Focus and others.Avgrund: Better Modal Boxes
A jQuery plugin for displaying a depth illusion between popup and page. The original script by Hakim El Hattab uses CSS transitions and transformations, and the plugin gracefully degrades in those that do not support transitions and transforms. MIT licensed.VisualSearch.js
This library enhances ordinary search boxes with the ability to autocomplete faceted search queries. You can specify the facets for completion, along with the completable values for any facet. You can retrieve the search query as a structured object, so you don’t have to parse the query string yourself.Ideal Forms Framework
A very comprehensive jQuery plugin for building and validating responsive HTML5 forms. It provides keyboard support, customizable input types, “on the spot” validation, localization and HTML5 placeholder polyfill. Supported in IE8+, Chrome, Firefox, Opera, iOS5+, Android 4.0+.Mailcheck
With this JavaScript spell-checker you can suggests another domain when the user misspells it in an email address. Mailcheck helps effectively reducing sign up typos. While it already includes some domains, you can easily supply your own.Validate.js
A lightweight JavaScript form validation library. You can validate form fields using over a dozen rules and set custom messages; the library doesn’t have any dependencies and you can define your own validation callbacks for custom rules. Works in all major browsers (even IE6!).jQuery File Upload
File Upload widget with multiple file selection, drag&drop-support, progress bars and preview images. It supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.Grumble.js
This jQuery plugin provides tool tips without being limited to cardinal directions. A grumble can be rotated around a given element at any angle, all 360 degrees and at any distance — with CSS. Works in Internet Explorer 6+ and modern browsers. Also, check Tipped, a larger library of various designs and implementations of tooltips with an extensive API.Dialogs for Twitter Bootstrap
A small JavaScript library which allows you to create dialog boxes using Twitter’s Bootstrap modals, without having to worry about creating, managing or removing any of the required DOM elements or JS event handlers. You might want to check out the Date Range Picket for Bootstrap as well as a growing library of HTML Snippets for Twitter Bootstrap.ddSlick
Prashant Chaudhary has realeased a free lightweight jQuery plugin that lets you create a custom drop-down that can include images, a short description, along with your usual text and value. It also supports callback functions on selection. You could use CSS3 Drop-Downs as well.noty
This jQuery plugin makes it easy to create alert, success, error, warning, information and confirmation messages. The notification can be positioned anywhere on the page and you can customize the text, animation, speed and buttons easily.jQuery.complexify.js
Complexify helps you to accurately gauge the quality of a user’s password to give them visual feedback, and to enforce a minimum level of security.Numberfy
With Numberfy you can integrate native support for line numbers in your website’s text areas. On every key press in the text area, the text area’s current value is split into lines. This script will not work in IE due to a bug in the text-wrap properties.FormAccordion
A jQuery plugin for easily hiding and revealing related form fields conditionally.jQuery.superLabels
You can use the library to give your forms a fade-out label. This implementation makes the label slide across the field when gaining focus and fade out when a value is entered. A fallback is provided as well.cryptico
An encryption system utilizing RSA and AES for JavaScript.Web Typography Libraries and Plugins
Baseline.js
A jQuery plugin for restoring baselines thrown off by odd image sizes. To use it, you just call the plugin passing the height of your baseline as a variable. You can also define multiple baselines for different responsive breakpoints.FTColumnflow
Developed by the development team of Financial Times, this library is essentially a polyfill that fixes the inadequacies of CSS column layouts. With the library, you can provide configurable column widths, gutters and margins, define elements spanning columns, keep-with-next to avoid headings at the bottom of a column, group columns into pages and standardize line height to align text baseline to a grid.Responsive Measure jQuery Plugin
A simple script that allows you to pass in a selector (ideally the container where your primary content will go), which generates the ideal font size needed to produce the ideal measure for your text. The script also generates a resolution-independent font-scale based on the ideal font-size. Created by Josh Brewer.The Widow Tamer
The Widow Tamer is a small JavaScript library that automatically “fixes” typographic widows. It’s designed to work with responsive sites, fixing widows as it finds them on resize or orientation change.Fluid Line-Height
With his article, Tim Brown inspired developers to release tools that adjust line-height for optimum readability on responsive websites. The so-called molten-leading binds the height of the line to an element’s minimum and maximum width. jQuery-minLineHeight is a jQuery plugin that works similarly with minimum and maximum width association.FitText.js
This jQuery plugin helps you create scalable headlines that fill the width of a parent element in your fluid or responsive layouts. You might want to check out Lettering.js as well to get a complete down-to-the-letter control of letters in your projects.Kerning.js
This library lets you kern, style, transform, and scale your Web type with CSS rules, automatically. You can adjust pairings, introduce font conditionals and augment properties.SlabText.js
The script splits headlines into rows before resizing each row to fill the available horizontal space. The ideal number of characters to set on each row is calculated by dividing the available width by the pixel font-size – the script then uses this ideal character count to split the headline into word combinations that are displayed as separate rows of text.Little Time-Savers
money.js: Open-Source Exchange Rates and Currency Conversion
Joss Crowcroft has created an Open Source Exchange Rates API, which provides up-to-date, flexible and portable currency-conversion data that can be used in any application, framework or language (not just JavaScript). It has no access fees, no rate limits, no nasty XML: just free, hourly updated exchange rates in JSON. Joss also built money.js, a JavaScript currency conversion library that can be easily integrated in any website. A demo playground and detailed documentation are provided on the website, and the source code is available on GitHub.Accounting.js: Easier Number and Currency Formatting
This simple, tiny JavaScript library will solve your currency and numbers-related formatting hassles, and it even includes optional Excel-style column rendering to line up symbols and decimals. It will make all of your numbers and currencies look much more uniform and professional.Moment.js: Format Dates And Times
Moment.js is a lightweight JavaScript library which lets you format, parse and manipulate dates. You can add or subtract dates from one another, as well as parse things like Unix Timestamps. Display options include formatted dates, time from now, difference, time from another moment, native date and support for leap years.Smart Time Ago
This little jQuery library provides you with an intelligent way of updating relative timestamps in your documents. Smart Time Ago checks and updates every 60 seconds the relative time, within a scope which you specify at the start. It checks the newest time in your scope and tunes the checking time interval to a proper value. The tool can be used as a jQuery plugin, or – if using node – can be installed from npm.sortByTimeAgo.js
A little JavaScript library that takes an array of objects with TimeAgo properties and sorts them from newest to oldest.Piecon
Piecon is a tiny JavaScript library for dynamically generating progress pie charts in your favicons. It has been tested to work in Chrome 15+, Firefox 9+ and Opera 11+.Notificon: Favicon Notifications and Alerts
Matt Williams’ Notificon is a JavaScript library for creating favicon alerts and notifications. Instead of having to create a number of favicons and serving them to the client, you can specify a label and a favicon (the default being the current favicon), and it will generate a favicon notification for you. The script currently works with Chrome 6+, Firefox 2+ and Opera, but it’s a nice little add-on for browsers that support it.jQuery Stick ‘em: Make Content Sticky on Scroll, to a Point
A problem: some of the images in the layout are very tall, so by the time you scrolled down to the bottom of the images, you would have to scroll back up just to read the description of the images or navigation items. The solution: make the content sticky as you are scrolling. This library solves this problem.Countdown.js
Human descriptions for a span of time are often fuzzier than a computer naturally computes. For example, how long does “in 1 month” mean? We casually talk about four weeks, but in fact there is only one month in a year which is four weeks long. Countdown.js tackles this problem by producing an accurate and intuitive description of timespans which are consistent as time goes on.geolib
A small library to provide some basic geo functions like distance calculation, conversion of decimal coordinates to sexagesimal and vice versa.Cookies
Cookies.js is a small client-side JavaScript library that makes managing cookies easy. It caches cookie values, making sequential reads faster, supports AMD / CommonJS loaders and is supported in Chrome, Firefox 3+, Safari 4+, Opera 10+ and Internet Explorer 6+.firstImpression.js
firstImpression.js is a micro-library (1 Kb minified) that answers the simple question, “Has this user visited this site before?” The detection doesn’t require much logic, so the majority of the code is just a plain JavaScript port of the popular jquery.cookie plugin.Chirp.js: Tweets on Your Website
A lightweight templating JavaScript library that enables you to display tweets on your website. Client-side caching is available; and you can set if you’d like to show retweets and replies, too.simpleWeather jQuery Plugin
A simple jQuery plugin to display the weather information for any location. The data is pulled from the public Yahoo! Weather feed via the YQL API.zip.js
A JavaScript library to zip and unzip files. zip.js provides a low-level API for writing and reading large zip files (up to 4GB with File Writer API). Works with Chrome, Firefox, Safari 6 and (unfortunately) Internet Explorer 10+. With Safari 5 and IE9, you must disable Web Workers and use a Typed Array polyfill.string.js
A library that provides extra String methods to normalize text strings and manipulate them.Images, Maps, Graphs and Visualization Libraries
jVectorMap
jVectorMap is a jQuery plugin that renders SVG and VML vector maps in browsers ranging from the ancient Internet Explorer 6 to modern browsers. jVectorMap uses JavaScript, CSS, HTML, SVG or VML, and no Flash or any other proprietary browser plugin is required.Subway Map Visualization jQuery Plugin
If you often deal with government projects, university departments or any websites of sophisticated organizations, every now and again you’ll be asked to design a nice visualization that would explain the various divisions, structures and internal hierarchy of those organizations. Where do you start? Well, creating a Subway Map-alike visualization is an option worth considering.GMaps.js
This library allows you to easily use Google Maps in your projects. Extensive documentation or large amount of code aren’t required anymore. You might want to check out Gmap3 jQuery plugin as well.Leaflet: Open-Source Interactive Maps With JavaScript
A library for creating tile-based interactive maps for desktop and mobile browsers. An easy-to-use API is available, and the tool emphasizes usability, performance, flexibility and excellent browser support. The library offers a variety of map layers, including tiles, markers, pop-ups, image overlays and GeoJSON. It supports panning on both mobile and desktop browsers, double-tap zoom on mobile browsers (plus multi-touch zoom on iOS) and more. On iOS, hardware acceleration is enabled, and Leaflet has a modular structure that lets you reduce the size of the library to make it even faster. The project is open source and available for further development and forking on GitHub.SVGeezy: a JavaScript plugin for SVG fallbacks
A JavaScript library which detects SVG images on your website and automatically “looks” for a standard image fallback for those older, less capable browsers. Created by Ben Howdle and Jack Smith.Retina.js
A script that checks each image on your website, when it’s loaded by a user, and replaces low-resolution image with their high-resolution equivalent, if available. It’s assumed that you use Apple’s high resolution modifier (@2x) to designate high resolution versions of images.JustGage
A JavaScript library for generating and animating gauges. Based on Raphaël library for vector drawing, it’s resolution-independent and works in all modern browsers.arbor.js
A graph visualization library for building trees with connected nodes of data. Arbor.js is essentially a layout algorithm with abstractions for graph organization and screen refresh handling.Timeline: Generate Timelines To Visualize Data
This library is supposed to pull in media from different sources. It has built-in support for pulling in data from Twitter, YouTube, Flickr, Vimeo, Google Maps and SoundCloud—and more will be included in the near future. You can easily fill in data from a Google spreadsheet, or use a more detailed method such as JSON to create your time-line. You can also host it on your website by using the Timeline jQuery plugin. The library is available on GitHub, or as WordPress plugin.Unicon
Unicon is a Grunt.js task that makes it easy to manage icons and background images for all devices, preferring HD (retina) SVG icons but also provides fallback support for standard definition browsers, and old browsers alike. From a CSS perspective, it’s easy to use, as it generates a class referencing each icon, and doesn’t use CSS sprites.Foresight.js
This device recognition library, gives websites the ability to gauge the users device capabilities before the image is requested from the server. Judging display resolution and network speed, it customizes the img src attribute to optimize the websites image resolution to the individual users hardware.A Magnifying Glass With CSS3 And jQuery
This technique achieves an aesthetically pleasing visual effect. The CSS3 box-shadow and border-radius properties are used to create the magnifying glass itself, while jQuery is used to detect the cursor coordinates and mouse movements and present the larger image. And when your cursor moves off the image, the magnifying glass elegantly fades away. The included tutorial makes it very easy to learn and understand how to achieve this effect. The technique includes both a small and a large image in the markup, so optimizing the technique to load a larger image on demand might be a good idea.Rickshaw
This free and open source JavaScript toolkit provides the elements which you need to create interactive graphs, such as renderers, legends, hovers and range selectors. Rickshaw is based on D3, graphs are drawn with standard SVG and styled with CSS.Flot: Plotting for jQuery
A JavaScript plotting library for jQuery, supports Internet Explorer 6+, Chrome, Firefox 2+, Safari 3+ and Opera 9.5+. You can use different types of graphs, use multiple axes, annotate a chart, update graphs with AJAX, provide support for zooming and interaction with the data points, use stacked charts, theresholding the data, apply pie charts and plot prerendered images.Chronoline.js
Chronoline.js is a library that allows you to create a chronology time-line out of events on a horizontal timescale. From a list of dates and events, it can generate a graphical representation of schedules, historical events, deadlines, and more.Cubism
This D3 plugin helps you to visualize time series and construct better real-time dashboards, pulling data from Graphite, Cube and other sources. Cubism scales and reduces server load by pulling only the most recent values. Cubism can scale easily to hundreds of metrics updating every ten seconds. Cubism’s horizon charts allow you to see many more metrics at-a-glance space than standard area charts.Envision.js
An alternative library for creating fast, dynamic and interactive HTML5 visualizations.Data Visualization JavaScript Libraries
A growing, curated collection of data visualization JavaScript libraries that make it easier to create meaningful and beautiful data visualizations. If you haven’t one a useful data visualization library in the list above, you’ll definitely find the right one in this overview.Last Click
jQuery Fundamentals
This HTML book is designed to get you comfortable working through common problems you’ll be called upon to solve using jQuery. You can read the content and try the various interactive examples. Each chapter will cover a concept and give you a chance to try example code related to the concept. Written by Rebecca Murphey and recently updated by her and the rest of the gang at Bocoup.JavaScript Patterns Collection
A JavaScript pattern and anti-pattern collection that covers function patterns, jQuery patterns, jQuery plugin patterns, design patterns, general patterns, literals and constructor patterns, object creation patterns, code reuse patterns, DOM and browser patterns.JavaScript Garden
A growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes and subtle bugs, as well as performance issues and bad practices, that non-expert JavaScript programmers may encounter on their endeavors into the depths of the language.Useful JavaScript and jQuery Libraries: Two Parts
Due to the length of this resource, it was split into two parts:
In this article, we take a break from some of the more advanced ways to customize WordPress, and share some super-easy customization techniques for the WordPress Admin area.
If you’re just getting started with WordPress, or have been running with default functionality for a while and now want to dig in with some useful and easy ways to customize your WordPress site, a great place to start is the WordPress Admin area, or backend. One of the great things about WordPress is that each part of the backend is easily customized using simple PHP functions.
In this article, you’ll learn how to customize the login page with your own logo, add new widgets to the dashboard, add custom content to the admin footer, make it easier to get in and out of the Admin area, and more. When combined, these techniques can improve branding, accessibility, and usability of your WordPress-powered site.
Changing the Default WordPress Login URL
By default, logging in to the WordPress Admin area requires either /wp-admin or /wp-login.php in the URL, which isn’t a lot to type. You can, however, make it even easier by changing the login URL to something more memorable and better branded.
This technique requires .htaccess file manipulation. Usually, this is a file hidden in the root of your WordPress installation. It’s automatically created by WordPress after setting custom permalinks using URL rewriting.
First, check your SFTP/FTP client preferences to show hidden files—most FTP clients manage that. Then, check that the file .htaccess exists. If that is not the case, create it by using your favorite notepad. On Windows, use the Notepad++ software to create it. Open it and add this line on top:
RewriteRule ^login$ http://YOUR_SITE.com/wp-login.php [NC,L]Just replace the login keyword with one of your choice and your website’s URL.
Now, open your favorite browser and go to http://yoursite.com/login. You’ll be redirected to the WordPress login page. Remember that your clients are not supposed to know everything about WordPress usages—a user-friendly URL is far better to remember than /wp-login.php.
Easy to remember, easy to teach, easy to learn!
Changing the Default External Link of the WordPress Login Page
When you log into WordPress, the default logo links to WordPress.org. Let me show you a quick tip for using your own link. Open the functions.php file. Then, add the following lines of code. And be sure to remember the PHP tag enclosure.
// Use your own external URL logo link function wpc_url_login(){ return "http://wpchannel.com/"; // your URL here } add_filter('login_headerurl', 'wpc_url_login');Don’t forget to save the file. Log out to view the result. Better, no?
Customizing the Login logo Without a Plugin
Reinforce your brand by changing the default WordPress login logo. The logo is one of the most important elements of your brand! People will memorize it to find you quickly. Showcase it!
This is the default WordPress login screen:
To enhance it, add these lines of code in your functions.php:
// Custom WordPress Login Logo function login_css() { wp_enqueue_style( 'login_css', get_template_directory_uri() . '/css/login.css' ); } add_action('login_head', 'login_css');The third line points towards a separate stylesheet. Even though it’s possible to use that of your default CSS theme, I advise you to use Firebug—a useful Firefox add-on—or any other Web development tool that allows you to edit your website in real-time. As you can see, just one line of code is needed to change the default logo.
#login h1 a { background-image: url("http://YOUR-WEBSITE.com/wp-content/themes/YOUR_THEME/images/custom_logo.png") !important; }Feel free to change the logo URL if it’s not located in your theme folder. Now have a look at your login page: your custom logo appears!
If that is not the case, make sure that no white lines are present at the end of your functions.php file.
Changing the Footer of Your WordPress Administration
The default WordPress administration footer thanks you for using their content management system and links to WordPress.org. For professional use and website branding, you’ll want to customize this area.
Open the Appearance menu and click on Editor. Click on functions.php on the right side of your screen. You can also access the footer by using an FTP client to locate /wp-content/themes/NAME_OF_YOUR_THEME/functions.php.
Now, add the following lines of code, taking care to place them between PHP tags:
// Custom WordPress Footer function remove_footer_admin () { echo '© 2012 - WordPress Channel, Aurélien Denis'; } add_filter('admin_footer_text', 'remove_footer_admin');To customize the content, just change the second line inside the echo, between the quotes.
Finally, refresh your browser to see the result.
Adding Custom Widgets to Your Dashboard
It can be useful to add your own widget to provide general or commercial information. Adding a widget to the WordPress dashboard can be done very quickly. Again, open the functions.php file, then, add the following lines of code:
// Add a widget in WordPress Dashboard function wpc_dashboard_widget_function() { // Entering the text between the quotes echo "<ul> <li>Release Date: March 2012</li> <li>Author: Aurelien Denis.</li> <li>Hosting provider: my own server</li> </ul>"; } function wpc_add_dashboard_widgets() { wp_add_dashboard_widget('wp_dashboard_widget', 'Technical information', 'wpc_dashboard_widget_function'); } add_action('wp_dashboard_setup', 'wpc_add_dashboard_widgets' );In this example, add the desired text between the echo tag, after the quotes. You could also insert HTML; an unordered list for example. Name your widget—this will be the widget title—by replacing “Technical informations” with your title of choice. This is what it will look like.
If you do not see your custom widget, click on the Options menu screen located in the top right of the window to display it.
Hiding Unwanted WordPress Dashboard Widgets
The WordPress dashboard displays multiple widgets that you can easily move by dragging and dropping. To mask them definitively, just add the following lines in the functions.php file:
add_action('wp_dashboard_setup', 'wpc_dashboard_widgets'); function wpc_dashboard_widgets() { global $wp_meta_boxes; // Today widget unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); // Last comments unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); // Incoming links unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); // Plugins unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); }You can choose what widgets you’d like to hide. In this case, “Right Now”, “Recent comments”, “Incoming links” and “Plugins” have been removed from your WordPress dashboard. To learn more about this feature, have a look at the codex.
Creating Your Own Custom Admin Color Scheme
If you’re not totally satisfied with the WordPress admin color scheme, this is how you can customize it. All you need to do is create a new CSS stylesheet. In this example, we’ll call it admin.css and place it in a folder entitled/css. Once again, edit the functions.php file and add this snippet:
// Custom WordPress Admin Color Scheme function admin_css() { wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/css/admin.css' ); } add_action('admin_print_styles', 'admin_css' );Your admin.css file must contain styles that are compatible with WordPress. Again, I recommend you use Firebug or Web Inspector to identify the right ones.
Conclusion
That’s all folks! I hope you have learned a few good tips to make WordPress act more like a white label CMS. Remember that customization is not just a branding technique, but also a way to boosting your productivity, by increasing user-friendliness.
If you’re not comfortable with PHP, you can make most of these changes with the White Label CMS WordPress plugin. Do you know any other great tips? Share them with us!
(jc)
Creating Admin Themes
Languages: English • 日本語 • (Add your language)
WordPress' flexible nature allows for almost every part of it to be easily changed. Creating a custom WordPress Admin Panel Theme is no different. There are essentially two ways of making a WordPress Admin theme: with a Plugin or by simply changing the CSS. The Plugin method is the easier of the two methods, allowing you to install WordPress Admin Themes quickly and easily. You literally "plug it in" and it works.
If you are the creative type, we also have instructions to help you design your own style sheet for the Administration Panels, and even how to turn your Admin Theme into a Plugin for easy distribution to the public.
Using Admin Theme Plugins
WordPress Plugins allow a user to easily add functionality to their blog without editing core WordPress files. There are several WordPress Plugins available that will allow you to use a WordPress Admin Theme with little or no fuss.
Typically, the instructions are to upload the Admin Theme Plugin to your plugins folder and then activate it on your Plugin Panel. Simple and easy.
Other plugins, like WP Admin Theme, allow you to change your layout on the fly, without the need for creating your own plugin.
Styling The Admin Theme
The best way to design your own Administration Panel Theme is to make a plugin, even if you're never going to share the code with anyone else. As a Plugin, the Admin Theme includes a function that will instruct WordPress to use a new stylesheet for displaying the Admin Panel. A distinct advantage to making a plugin is that if you ever want to revert back to the default style, all you have to do is deactivate the plugin.
You can also utilize the mu-plugins folder for your plugin.The Admin Style Sheet
The default Admin Theme style sheet is very complex, covering all aspects of the Administration Panels thoroughly. Not all the parts and pieces may need to be changed to recreate your Admin Theme. You can look at the files stored in /wp-admin/css to see all the style components that go into the admin dashboard.
Here is a partial list of the important style references used in the Administration Panels. Per CSS web standards, # denotes a style ID and . denotes a style class.
- #wphead
- The main title of the admin panel. Used to display the name of the blog and a link to View Site.
- #adminmenu ul
- The main level navigation bar, for links: Dashboard, Write, Manage, etc.
- #adminmenu2 ul
- The sub level navigation bar, for links (example: under Manage: Posts, Pages, Categories).
- .wrap
- The basic wrapper for all content in the admin panel, set in a <div>.
- #zeitgeist
- The sidebar on the Dashboard displaying Latest Activity and Blog Stats.
- #footer
- The footer at the bottom, with Wordpress logo, version number, and help links.
- .wrap h2
- Individual Page headers for the various subpanels, like General Options.
The changes you make can be minor or extensive. You can just change the background color, add a background image to different sections, change the font, or even just do a minor color or design change to the Quicktag buttons. It is up to you to use your imagination and create whatever effect you want.
Creating an Admin Theme Plugin
To create an Admin Theme Plugin, it will need to be easily installed with little effort by the user, and easily uninstalled or deactivated, returning the Administration Panels to their original state. These can be used to change the header or footer of the admin pages in different ways.
We begin by telling WordPress to link to a new style sheet.
In a text editor, in a new document, put the following:
<?php /* Plugin Name: My Admin Theme Plugin URI: http://example.com/my-crazy-admin-theme Description: My WordPress Admin Theme - Upload and Activate. Author: Ms. WordPress Version: 1.0 Author URI: http://example.com */ function my_admin_theme_style() { wp_enqueue_style('my-admin-theme', plugins_url('wp-admin.css', __FILE__)); } add_action('admin_enqueue_scripts', 'my_admin_theme_style'); add_action('login_enqueue_scripts', 'my_admin_theme_style'); ?>This plugin simply allows you to customize the CSS of the admin dashboard via a file called wp-admin.css in your plugin folder.
If you wanted to change the #wphead format to look blue (like in the above image), then you would add in:
#wphead { border-bottom: MidnightBlue 1px solid; background-color: #E4F0FE!important; background: -moz-linear-gradient(bottom,#E4F0FE,#B0C4DE); background: -webkit-gradient(linear,left bottom,left top,from(#E4F0FE),to(#B0C4DE)); }
In addition to using the admin_head Plugin API hook for stylesheets, you can also optionally add a function to add content to the admin_footer. For example, you might want to put a notice about the theme in the footer. Here is how to add it to your plugin:function my_crazy_admin_footer() { echo '<p>This theme was made by <a href="http://example.com">Ms. WordPress</a>.</p>'; } add_action('admin_footer', 'my_crazy_admin_footer');Which looks like this:
Save the plugin and upload it to your site. Select it from the Plugins Panel and see if anything about My Admin Theme appears. If it does, you are on the right track!
Another way would be to use filters instead of actions:
add_filter('admin_footer_text', 'left_admin_footer_text_output'); //left side function left_admin_footer_text_output($text) { $text = 'How much wood would a woodchuck chuck?'; return $text; } add_filter('update_footer', 'right_admin_footer_text_output', 11); //right side function right_admin_footer_text_output($text) { $text = 'That\'s purely hypothetical.'; return $text; }Which looks like this, totally replacing the footer:
Source: WP Glee
Change Log-In page's style
You can use the login_head action to add a style sheet to your log-in page. To get this working, copy the login.css file from /wp-admin/css/ you can append the following to the original plug-in you've created.
function my_login_css() { echo '<link rel="stylesheet" type="text/css" href="' .plugins_url('login.css ', __FILE__). '">'; } add_action('login_head', 'my_login_css');Advanced CSS Styles
Sometimes there are places where CSS just cannot achieve the look you want without making modifications to the HTML of the Administration Panels.
A popular CSS style is to create rounded corners on "boxes" of content. The technique involves adding divisions or wrappers to the HTML architecture in order to achieve the effect. Since we really do not want to get into the core Administration Panels to make these changes, which will disappear with the next upgrade, you can use the DOM (Document Object Model). The DOM is a way of dynamically accessing and updating content, structure, and style of documents.
In this example, using the Transparent Rounded Corners effect from 456 Berea Street, you can add the Javascript provided on the site to your Admin Theme Plugin, without editing the WordPress source.
Download the script and save it to your blue-steel folder as javascript.js. Change the mr_blue_steel() function to:
function mr_blue_steel() { $url = get_option('siteurl'); $dir = $url . '/wp-content/plugins/blue-steel/'; echo '<link rel="stylesheet" type="text/css" href="' . $dir . 'wp-admin.css" />'; echo '<script type="text/javascript" src="' . $dir .'javascript.js"></script>'; }This script uses a single "hook" (cbb) to create many divisions around the container. For this to work, open the Javascript file and change all references of cbb to wrap to match the wp-admin.css standard style references.
Resources
1
2
3
4
5
6
Theme InstallCopy files in folder
Database BackupCreate the database
Minimal ConfigCustomize color & name
Sidebars SetupAdd content to sidebars
Import ContentUpload update.xml
FinishSave & start posting
Note
At the time of writing this is a work in progress – the site is being added to one principle at a time.
You can subscribe to an RSS feed for notification of new additions.
The CORRECT way to link to a stylesheet
<HTML> <HEAD> <LINK href="special.css" rel="stylesheet" type="text/css">
GetSimple is an open source Simple CMS that utilizes the speed and convenience of XML, a best-in-class UI and the easiest learning curve of any lite Content Management System out there. It requires no database and has a powerful plugin system that allows for unlimited expansion.
FullCalendar is a jQuery plugin that provides a full-sized, drag & drop calendar like the one below. It uses AJAX to fetch events on-the-fly for each month and is easily configured to use your own feed format (an extension is provided for Google Calendar). It is visually customizable and exposes hooks for user-triggered events (like clicking or dragging an event). It is open source and dual licensed under the MIT or GPL Version 2 licenses.
Other demos
DISCLAIMER: FullCalendar is great for displaying events, but it isn't a complete solution for event content-management. Beyond dragging an event to a different time/day, you cannot change an event's name or other associated data. It is up to you to add this functionality through FullCalendar's event hooks.
HTML Goodies: The Ultimate HTML Resource
- About HTML Goodies
We've added a new feature to HTMLGoodies for web developers. Whenever we publish a new tutorial, developers will be able to test the HTML out directly from the tutorial page! Try it out!
It was around 1992, when the World Wide Web was still something most people had never heard about. A new browser called Netscape 1.0 had come out, and with it came the seeds that would eventually become HTML Goodies.
You can see the titles but what do they all mean? Where should you start? Where will you find what you're looking for? Read on.....
We know that you're familiar with HTML Goodies, but did you know that HTML Goodies is part of Earthweb. and that Earthweb is part of an even larger family of technology resources? Find out more about our family tree.
Shortcodes have become almost a requirement in Premium Wordpress Themes and their use is on the rise.
This is the first tutorial of many in which we will explain the implementation of the shortcodes we used in our Premium Wordpress Themes inFocus and Awake.
Since there is already a wealth of documentation on the intricacies of how shortcodes work, we will be focusing primarily on their implementation. If you’d like to learn more about shortcodes in general, we recommend the following resources:
1. Wordpress Codex – Shortcode API
2. Mastering WordPress ShortcodesThe following shortcodes allow the end user to create percentage-based infinitely nestable column layouts.
Preview the end result: Awake Column ShortcodesYou can download a plugin version of this tutorial at the bottom of this post.
Step #1 – The PHP Code
Add the following php code to your theme’s functions.php file. If your theme doesn’t have a functions.php file create one and paste in the following:
function webtreats_one_third( $atts, $content = null ) { return '<div class="one_third">' . do_shortcode($content) . '</div>'; } add_shortcode('one_third', 'webtreats_one_third'); function webtreats_one_third_last( $atts, $content = null ) { return '<div class="one_third last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('one_third_last', 'webtreats_one_third_last'); function webtreats_two_third( $atts, $content = null ) { return '<div class="two_third">' . do_shortcode($content) . '</div>'; } add_shortcode('two_third', 'webtreats_two_third'); function webtreats_two_third_last( $atts, $content = null ) { return '<div class="two_third last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('two_third_last', 'webtreats_two_third_last'); function webtreats_one_half( $atts, $content = null ) { return '<div class="one_half">' . do_shortcode($content) . '</div>'; } add_shortcode('one_half', 'webtreats_one_half'); function webtreats_one_half_last( $atts, $content = null ) { return '<div class="one_half last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('one_half_last', 'webtreats_one_half_last'); function webtreats_one_fourth( $atts, $content = null ) { return '<div class="one_fourth">' . do_shortcode($content) . '</div>'; } add_shortcode('one_fourth', 'webtreats_one_fourth'); function webtreats_one_fourth_last( $atts, $content = null ) { return '<div class="one_fourth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('one_fourth_last', 'webtreats_one_fourth_last'); function webtreats_three_fourth( $atts, $content = null ) { return '<div class="three_fourth">' . do_shortcode($content) . '</div>'; } add_shortcode('three_fourth', 'webtreats_three_fourth'); function webtreats_three_fourth_last( $atts, $content = null ) { return '<div class="three_fourth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('three_fourth_last', 'webtreats_three_fourth_last'); function webtreats_one_fifth( $atts, $content = null ) { return '<div class="one_fifth">' . do_shortcode($content) . '</div>'; } add_shortcode('one_fifth', 'webtreats_one_fifth'); function webtreats_one_fifth_last( $atts, $content = null ) { return '<div class="one_fifth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('one_fifth_last', 'webtreats_one_fifth_last'); function webtreats_two_fifth( $atts, $content = null ) { return '<div class="two_fifth">' . do_shortcode($content) . '</div>'; } add_shortcode('two_fifth', 'webtreats_two_fifth'); function webtreats_two_fifth_last( $atts, $content = null ) { return '<div class="two_fifth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('two_fifth_last', 'webtreats_two_fifth_last'); function webtreats_three_fifth( $atts, $content = null ) { return '<div class="three_fifth">' . do_shortcode($content) . '</div>'; } add_shortcode('three_fifth', 'webtreats_three_fifth'); function webtreats_three_fifth_last( $atts, $content = null ) { return '<div class="three_fifth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('three_fifth_last', 'webtreats_three_fifth_last'); function webtreats_four_fifth( $atts, $content = null ) { return '<div class="four_fifth">' . do_shortcode($content) . '</div>'; } add_shortcode('four_fifth', 'webtreats_four_fifth'); function webtreats_four_fifth_last( $atts, $content = null ) { return '<div class="four_fifth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('four_fifth_last', 'webtreats_four_fifth_last'); function webtreats_one_sixth( $atts, $content = null ) { return '<div class="one_sixth">' . do_shortcode($content) . '</div>'; } add_shortcode('one_sixth', 'webtreats_one_sixth'); function webtreats_one_sixth_last( $atts, $content = null ) { return '<div class="one_sixth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('one_sixth_last', 'webtreats_one_sixth_last'); function webtreats_five_sixth( $atts, $content = null ) { return '<div class="five_sixth">' . do_shortcode($content) . '</div>'; } add_shortcode('five_sixth', 'webtreats_five_sixth'); function webtreats_five_sixth_last( $atts, $content = null ) { return '<div class="five_sixth last">' . do_shortcode($content) . '</div><div class="clearboth"></div>'; } add_shortcode('five_sixth_last', 'webtreats_five_sixth_last');Step #2 – The CSS Code
Fluid Columns
When you’re building a site for yourself or a client, you have the luxury of using fixed column layouts like we did in our first theme inFocus.
But, in premium theme development, users will often want to change the width of the site, the width of the sidebar, nest the column shortcodes and use them within other structures that throw the dimensions off.
For this reason, we implemented fluid columns in our second theme Awake. You can see in the examples below how much more flexible they are.
http://themes.mysitemyway.com/awake/shortcodes/column-shortcodes/
http://themes.mysitemyway.com/awake/features/layouts/column-layouts/The CSS
Insert the following CSS in your themes style.css file.
/* ------- Fluid Columns ------- */ .one_half{ width:48%; } .one_third{ width:30.66%; } .two_third{ width:65.33%; } .one_fourth{ width:22%; } .three_fourth{ width:74%; } .one_fifth{ width:16.8%; } .two_fifth{ width:37.6%; } .three_fifth{ width:58.4%; } .four_fifth{ width:67.2%; } .one_sixth{ width:13.33%; } .five_sixth{ width:82.67%; } .one_half,.one_third,.two_third,.three_fourth,.one_fourth,.one_fifth,.two_fifth,.three_fifth,.four_fifth,.one_sixth,.five_sixth{ position:relative; margin-right:4%; float:left; } .last{ margin-right:0 !important; clear:right; } .clearboth {clear:both;display:block;font-size:0;height:0;line-height:0;width:100%;}Step #3 – Disabling Wordpress wpautop and wptexturize filters.
By default Wordpress’s wpautop and wptexturize filters inject p tags and br tags around the outputted column content which is a problem if you need your site to validate.
The following function created by TheBinaryPenguin for his wp-raw plugin takes care of that by disabling WordPress’s auto-formating filters so that the column shortcode is parsed without being run through them, then reapplying the content filters after the column shortcode has been parsed. The result is that all of the column shortcodes will validate.
function webtreats_formatter($content) { $new_content = ''; /* Matches the contents and the open and closing tags */ $pattern_full = '{(\[raw\].*?\[/raw\])}is'; /* Matches just the contents */ $pattern_contents = '{\[raw\](.*?)\[/raw\]}is'; /* Divide content into pieces */ $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); /* Loop over pieces */ foreach ($pieces as $piece) { /* Look for presence of the shortcode */ if (preg_match($pattern_contents, $piece, $matches)) { /* Append to content (no formatting) */ $new_content .= $matches[1]; } else { /* Format and append to content */ $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } // Remove the 2 main auto-formatters remove_filter('the_content', 'wpautop'); remove_filter('the_content', 'wptexturize'); // Before displaying for viewing, apply this function add_filter('the_content', 'webtreats_formatter', 99); add_filter('widget_text', 'webtreats_formatter', 99);Step #4 – Fixing the backtrack_limit Bug
The following takes care of the mysterious disappearing content bug that happens when too many shortcodes are used on a page.
//Long posts should require a higher limit, see http://core.trac.wordpress.org/ticket/8553 @ini_set('pcre.backtrack_limit', 500000);Step #5 – Converting it all to a Plugin (Optional)
If you don’t want to touch your theme files, you can alternately create a plugin following the steps below.
Or download the finished plugin here: Download the Column Shortcode Plugin Here1. Create the following folder structure:
2. Add the following to the top of webtreats-column-shortcodes/column-shortcodes.php so that Wordpress recognizes it as a plugin.
/* Plugin Name: Fluid Column Layout Shortcodes Plugin URI: http://tutorials.mysitemyway.com Description: Adds percentage based infinitely nest-able column shortcodes. Version: 1.0 Author: Webtreats Author URI: http://mysitemyway.com License: GPL2 */3. Beneath the plugin info, add all the php code from steps #1,#3,#4.
4. Also add the following additional function to load the necessary CSS styles:function webtreats_column_stylesheet() { $my_style_url = WP_PLUGIN_URL . '/webtreats-column-shortcodes/styles.css'; $my_style_file = WP_PLUGIN_DIR . '/webtreats-column-shortcodes/styles.css'; if ( file_exists($my_style_file) ) { wp_register_style('column-styles', $my_style_url); wp_enqueue_style('column-styles'); } } add_action('wp_print_styles', 'webtreats_column_stylesheet');5. Add all the css code from step #2 to webtreats-column-shortcodes/styles.css
Step #6 – How to use the shortcodes
You can see the column shortcodes in use on our Awake Wordpress Theme demo here:
http://themes.mysitemyway.com/awake/shortcodes/column-shortcodes/
For pre-formatted starter content in different column configurations just click “Get the Code” beneath each column set and copy/paste the code into your WYSIWYG editor.
We’ve provided a few snippets below as well.
Two column layout:
[one_half] Your content goes here..... [/one_half] [one_half_last] Your content goes here..... [/one_half_last]Three column layout:
[one_third] Your content goes here..... [/one_third] [one_third] Your content goes here..... [/one_third] [one_third_last] Your content goes here..... [/one_third_last]Four column layout:
[one_fourth] Your content goes here..... [/one_fourth] [one_fourth] Your content goes here..... [/one_fourth] [one_fourth] Your content goes here..... [/one_fourth] [one_fourth_last] Your content goes here..... [/one_fourth_last]Five column layout:
[one_fifth] Your content goes here..... [/one_fifth] [one_fifth] Your content goes here..... [/one_fifth] [one_fifth] Your content goes here..... [/one_fifth] [one_fifth] Your content goes here..... [/one_fifth] [one_fifth_last] Your content goes here..... [/one_fifth_last]Six column layout:
[one_sixth] Your content goes here..... [/one_sixth] [one_sixth] Your content goes here..... [/one_sixth] [one_sixth] Your content goes here..... [/one_sixth] [one_sixth] Your content goes here..... [/one_sixth] [one_sixth] Your content goes here..... [/one_sixth] [one_sixth_last] Your content goes here..... [/one_sixth_last]Like this Tutorial? Somebody else might too. Consider sharing it on one of these social bookmarking sites.
Tags: shortcodes, Wordpress
HTML color codes and namesQuick links
About codes and colors and how to apply
Major hexadecimal color codes
Color Code Chart
Top 50 most viewed colors
HTML helpAbout color codes and how to apply
HTML color codes are hexadecimal triplets representing the colors red, green, and blue (#RRGGBB). For example, in the color red, the color code is #FF0000, which is '255' red, '0' green, and '0' blue. These color codes can be used to change the color of the background, text, and tables on a web page.
Below, are some of the common color names and codes. With these colors, you can also use the color name. For example, in HTML tags and CSS that use color codes you could use "red" instead of #FF0000.
Color code chart
Tip: Use our HTML color picker if you need to choose from an almost infinite variety of colors. Also, if you like a color scheme of a web page view Tip142 for a fantastic tool that can be used to gather that page's color codes.
Color Name Code Color Black #000000 Black Gray0 #150517 Gray0 Gray18 #250517 Gray18 Gray21 #2B1B17 Gray21 Gray23 #302217 Gray23 Gray24 #302226 Gray24 Gray25 #342826 Gray25 Gray26 #34282C Gray26 Gray27 #382D2C Gray27 Gray28 #3B3131 Gray28 Gray29 #3E3535 Gray29 Gray30 #413839 Gray30 Gray31 #41383C Gray31 Gray32 #463E3F Gray32 Gray34 #4A4344 Gray34 Gray35 #4C4646 Gray35 Gray36 #4E4848 Gray36 Gray37 #504A4B Gray37 Gray38 #544E4F Gray38 Gray39 #565051 Gray39 Gray40 #595454 Gray40 Gray41 #5C5858 Gray41 Gray42 #5F5A59 Gray42 Gray43 #625D5D Gray43 Gray44 #646060 Gray44 Gray45 #666362 Gray45 Gray46 #696565 Gray46 Gray47 #6D6968 Gray47 Gray48 #6E6A6B Gray48 Gray49 #726E6D Gray49 Gray50 #747170 Gray50 Gray #736F6E Gray Slate Gray4 #616D7E Slate Gray4 Slate Gray #657383 Slate Gray Light Steel Blue4 #646D7E Light Steel Blue4 Light Slate Gray #6D7B8D Light Slate Gray Cadet Blue4 #4C787E Cadet Blue4 Dark Slate Gray4 #4C7D7E Dark Slate Gray4 Thistle4 #806D7E Thistle4 Medium Slate Blue #5E5A80 Medium Slate Blue Medium Purple4 #4E387E Medium Purple4 Midnight Blue #151B54 Midnight Blue Dark Slate Blue #2B3856 Dark Slate Blue Dark Slate Gray #25383C Dark Slate Gray Dim Gray #463E41 Dim Gray Cornflower Blue #151B8D Cornflower Blue Royal Blue4 #15317E Royal Blue4 Slate Blue4 #342D7E Slate Blue4 Royal Blue #2B60DE Royal Blue Royal Blue1 #306EFF Royal Blue1 Royal Blue2 #2B65EC Royal Blue2 Royal Blue3 #2554C7 Royal Blue3 Deep Sky Blue #3BB9FF Deep Sky Blue Deep Sky Blue2 #38ACEC Deep Sky Blue2 Slate Blue #357EC7 Slate Blue Deep Sky Blue3 #3090C7 Deep Sky Blue3 Deep Sky Blue4 #25587E Deep Sky Blue4 Dodger Blue #1589FF Dodger Blue Dodger Blue2 #157DEC Dodger Blue2 Dodger Blue3 #1569C7 Dodger Blue3 Dodger Blue4 #153E7E Dodger Blue4 Steel Blue4 #2B547E Steel Blue4 Steel Blue #4863A0 Steel Blue Slate Blue2 #6960EC Slate Blue2 Violet #8D38C9 Violet Medium Purple3 #7A5DC7 Medium Purple3 Medium Purple #8467D7 Medium Purple Medium Purple2 #9172EC Medium Purple2 Medium Purple1 #9E7BFF Medium Purple1 Light Steel Blue #728FCE Light Steel Blue Steel Blue3 #488AC7 Steel Blue3 Steel Blue2 #56A5EC Steel Blue2 Steel Blue1 #5CB3FF Steel Blue1 Sky Blue3 #659EC7 Sky Blue3 Sky Blue4 #41627E Sky Blue4 Slate Blue #737CA1 Slate Blue Slate Blue #737CA1 Slate Blue Slate Gray3 #98AFC7 Slate Gray3 Violet Red #F6358A Violet Red Violet Red1 #F6358A Violet Red1 Violet Red2 #E4317F Violet Red2 Deep Pink #F52887 Deep Pink Deep Pink2 #E4287C Deep Pink2 Deep Pink3 #C12267 Deep Pink3 Deep Pink4 #7D053F Deep Pink4 Medium Violet Red #CA226B Medium Violet Red Violet Red3 #C12869 Violet Red3 Firebrick #800517 Firebrick Violet Red4 #7D0541 Violet Red4 Maroon4 #7D0552 Maroon4 Maroon #810541 Maroon Maroon3 #C12283 Maroon3 Maroon2 #E3319D Maroon2 Maroon1 #F535AA Maroon1 Magenta #FF00FF Magenta Magenta1 #F433FF Magenta1 Magenta2 #E238EC Magenta2 Magenta3 #C031C7 Magenta3 Medium Orchid #B048B5 Medium Orchid Medium Orchid1 #D462FF Medium Orchid1 Medium Orchid2 #C45AEC Medium Orchid2 Medium Orchid3 #A74AC7 Medium Orchid3 Medium Orchid4 #6A287E Medium Orchid4 Purple #8E35EF Purple Purple1 #893BFF Purple1 Purple2 #7F38EC Purple2 Purple3 #6C2DC7 Purple3 Purple4 #461B7E Purple4 Dark Orchid4 #571B7e Dark Orchid4 Dark Orchid #7D1B7E Dark Orchid Dark Violet #842DCE Dark Violet Dark Orchid3 #8B31C7 Dark Orchid3 Dark Orchid2 #A23BEC Dark Orchid2 Dark Orchid1 #B041FF Dark Orchid1 Plum4 #7E587E Plum4 Pale Violet Red #D16587 Pale Violet Red Pale Violet Red1 #F778A1 Pale Violet Red1 Pale Violet Red2 #E56E94 Pale Violet Red2 Pale Violet Red3 #C25A7C Pale Violet Red3 Pale Violet Red4 #7E354D Pale Violet Red4 Plum #B93B8F Plum Plum1 #F9B7FF Plum1 Plum2 #E6A9EC Plum2 Plum3 #C38EC7 Plum3 Thistle #D2B9D3 Thistle Thistle3 #C6AEC7 Thistle3 Lavender Blush2 #EBDDE2 Lavender Blush2 Lavender Blush3 #C8BBBE Lavender Blush3 Thistle2 #E9CFEC Thistle2 Thistle1 #FCDFFF Thistle1 Lavender #E3E4FA Lavender Lavender Blush #FDEEF4 Lavender Blush Light Steel Blue1 #C6DEFF Light Steel Blue1 Light Blue #ADDFFF Light Blue Light Blue1 #BDEDFF Light Blue1 Light Cyan #E0FFFF Light Cyan Slate Gray1 #C2DFFF Slate Gray1 Slate Gray2 #B4CFEC Slate Gray2 Light Steel Blue2 #B7CEEC Light Steel Blue2 Turquoise1 #52F3FF Turquoise1 Cyan #00FFFF Cyan Cyan1 #57FEFF Cyan1 Cyan2 #50EBEC Cyan2 Turquoise2 #4EE2EC Turquoise2 Medium Turquoise #48CCCD Medium Turquoise Turquoise #43C6DB Turquoise Dark Slate Gray1 #9AFEFF Dark Slate Gray1 Dark Slate Gray2 #8EEBEC Dark slate Gray2 Dark Slate Gray3 #78c7c7 Dark Slate Gray3 Cyan3 #46C7C7 Cyan3 Turquoise3 #43BFC7 Turquoise3 Cadet Blue3 #77BFC7 Cadet Blue3 Pale Turquoise3 #92C7C7 Pale Turquoise3 Light Blue2 #AFDCEC Light Blue2 Dark Turquoise #3B9C9C Dark Turquoise Cyan4 #307D7E Cyan4 Light Sea Green #3EA99F Light Sea Green Light Sky Blue #82CAFA Light Sky Blue Light Sky Blue2 #A0CFEC Light Sky Blue2 Light Sky Blue3 #87AFC7 Light Sky Blue3 Sky Blue #82CAFF Sky Blue Sky Blue2 #79BAEC Sky Blue2 Light Sky Blue4 #566D7E Light Sky Blue4 Sky Blue #6698FF Sky Blue Light Slate Blue #736AFF Light Slate Blue Light Cyan2 #CFECEC Light Cyan2 Light Cyan3 #AFC7C7 Light Cyan3 Light Cyan4 #717D7D Light Cyan4 Light Blue3 #95B9C7 Light Blue3 Light Blue4 #5E767E Light Blue4 Pale Turquoise4 #5E7D7E Pale Turquoise4 Dark Sea Green4 #617C58 Dark Sea Green4 Medium Aquamarine #348781 Medium Aquamarine Medium Sea Green #306754 Medium Sea Green Sea Green #4E8975 Sea Green Dark Green #254117 Dark Green Sea Green4 #387C44 Sea Green4 Forest Green #4E9258 Forest Green Medium Forest Green #347235 Medium Forest Green Spring Green4 #347C2C Spring Green4 Dark Olive Green4 #667C26 Dark Olive Green4 Chartreuse4 #437C17 Chartreuse4 Green4 #347C17 Green4 Medium Spring Green #348017 Medium Spring Green Spring Green #4AA02C Spring Green Lime Green #41A317 Lime Green Spring Green #4AA02C Spring Green Dark Sea Green #8BB381 Dark Sea Green Dark Sea Green3 #99C68E Dark Sea Green3 Green3 #4CC417 Green3 Chartreuse3 #6CC417 Chartreuse3 Yellow Green #52D017 Yellow Green Spring Green3 #4CC552 Spring Green3 Sea Green3 #54C571 Sea Green3 Spring Green2 #57E964 Spring Green2 Spring Green1 #5EFB6E Spring Green1 Sea Green2 #64E986 Sea Green2 Sea Green1 #6AFB92 Sea Green1 Dark Sea Green2 #B5EAAA Dark Sea Green2 Dark Sea Green1 #C3FDB8 Dark Sea Green1 Green #00FF00 Green Lawn Green #87F717 Lawn Green Green1 #5FFB17 Green1 Green2 #59E817 Green2 Chartreuse2 #7FE817 Chartreuse2 Chartreuse #8AFB17 Chartreuse Green Yellow #B1FB17 Green Yellow Dark Olive Green1 #CCFB5D Dark Olive Green1 Dark Olive Green2 #BCE954 Dark Olive Green2 Dark Olive Green3 #A0C544 Dark Olive Green3 Yellow #FFFF00 Yellow Yellow1 #FFFC17 Yellow1 Khaki1 #FFF380 Khaki1 Khaki2 #EDE275 Khaki2 Goldenrod #EDDA74 Goldenrod Gold2 #EAC117 Gold2 Gold1 #FDD017 Gold1 Goldenrod1 #FBB917 Goldenrod1 Goldenrod2 #E9AB17 Goldenrod2 Gold #D4A017 Gold Gold3 #C7A317 Gold3 Goldenrod3 #C68E17 Goldenrod3 Dark Goldenrod #AF7817 Dark Goldenrod Khaki #ADA96E Khaki Khaki3 #C9BE62 Khaki3 Khaki4 #827839 Khaki4 Dark Goldenrod1 #FBB117 Dark Goldenrod1 Dark Goldenrod2 #E8A317 Dark Goldenrod2 Dark Goldenrod3 #C58917 Dark Goldenrod3 Sienna1 #F87431 Sienna1 Sienna2 #E66C2C Sienna2 Dark Orange #F88017 Dark Orange Dark Orange1 #F87217 Dark Orange1 Dark Orange2 #E56717 Dark Orange2 Dark Orange3 #C35617 Dark Orange3 Sienna3 #C35817 Sienna3 Sienna #8A4117 Sienna Sienna4 #7E3517 Sienna4 Indian Red4 #7E2217 Indian Red4 Dark Orange3 #7E3117 Dark Orange3 Salmon4 #7E3817 Salmon4 Dark Goldenrod4 #7F5217 Dark Goldenrod4 Gold4 #806517 Gold4 Goldenrod4 #805817 Goldenrod4 Light Salmon4 #7F462C Light Salmon4 Chocolate #C85A17 Chocolate Coral3 #C34A2C Coral3 Coral2 #E55B3C Coral2 Coral #F76541 Coral Dark Salmon #E18B6B Dark Salmon Salmon1 #F88158 Pale Turquoise4 Salmon2 #E67451 Salmon2 Salmon3 #C36241 Salmon3 Light Salmon3 #C47451 Light Salmon3 Light Salmon2 #E78A61 Light Salmon2 Light Salmon #F9966B Light Salmon Sandy Brown #EE9A4D Sandy Brown Hot Pink #F660AB Hot Pink Hot Pink1 #F665AB Hot Pink1 Hot Pink2 #E45E9D Hot Pink2 Hot Pink3 #C25283 Hot Pink3 Hot Pink4 #7D2252 Hot Pink4 Light Coral #E77471 Light Coral Indian Red1 #F75D59 Indian Red1 Indian Red2 #E55451 Indian Red2 Indian Red3 #C24641 Indian Red3 Red #FF0000 Red Red1 #F62217 Red1 Red2 #E41B17 Red2 Firebrick1 #F62817 Firebrick1 Firebrick2 #E42217 Firebrick2 Firebrick3 #C11B17 Firebrick3 Pink #FAAFBE Pink Rosy Brown1 #FBBBB9 Rosy Brown1 Rosy Brown2 #E8ADAA Rosy Brown2 Pink2 #E7A1B0 Pink2 Light Pink #FAAFBA Light Pink Light Pink1 #F9A7B0 Light Pink1 Light Pink2 #E799A3 Light Pink2 Pink3 #C48793 Pink3 Rosy Brown3 #C5908E Rosy Brown3 Rosy Brown #B38481 Rosy Brown Light Pink3 #C48189 Light Pink3 Rosy Brown4 #7F5A58 Rosy Brown4 Light Pink4 #7F4E52 Light Pink4 Pink4 #7F525D Pink4 Lavender Blush4 #817679 Lavender Blush4 Light Goldenrod4 #817339 Light Goldenrod4 Lemon Chiffon4 #827B60 Lemon Chiffon4 Lemon Chiffon3 #C9C299 Lemon Chiffon3 Light Goldenrod3 #C8B560 Light Goldenrod3 Light Golden2 #ECD672 Light Golden2 Light Goldenrod #ECD872 Light Goldenrod Light Goldenrod1 #FFE87C Light Goldenrod1 Lemon Chiffon2 #ECE5B6 Lemon Chiffon2 Lemon Chiffon #FFF8C6 Lemon Chiffon Light Goldenrod Yellow #FAF8CC Light Goldenrod Yellow
Back to HTML and web design help
Responsive PatternsA collection of patterns and modules for responsive designs.
Mostly Fluid Column Drop Layout Shifter Tiny Tweaks Main column with sidebar 3 column 3 column v2 2 equal-width columns 3 equal-width columns 4 equal-width columns 5 equal-width columns 6 equal-width columns Top Left Right Left and Right Bottom Table Cell Flexbox AppendAround List with Thumbnails List with Thumbnails 2 List with Thumbnails and Summary 4-up Grid Block Double-Wide v1 Double-Wide v2 Double-Wide v3 Double-Wide v4 With Title Sections Equal Height Rows Irregular Grid Blocks Responsive Table Definition List to Table Pie Chart to Table Priority Columns Link to Full-Table Horizontal Overflow Header Orientation FlipToggle Footer Anchor Select Menu Left Nav Flyout Left Nav Flyout w/ 'off-nav closing' Priority+ Top Links Stacked Top Links Horizontal Overflow Overlay Multi-Toggle Multi-Toggle v2 Multi-Toggle v3 Multi-Toggle with Active Parent Links Multi-Toggle with Active Parent Links - Pure CSS The Ol' Right-to-Left The Skip the Subnav The Carousel+ Across the Top Breadcrumbs Dropdown Last-One OnlyBasic Fluid Image Picturefill Server-side Image GridFluid Video Fluid Map Maintaining Aspect Ratio Adaptive MapsForm with Left Labels Fluid Search Form Login Form3-up Carousel 3-up Touch Carousel Fluid Carousel Fluid Accordion to Full Accordion To Tab Vertical to Horizontal Slide-Down Notification Bar Overlay Conditional Lightbox
Bear CSS - Helping you build a solid stylesheet foundation based on your markup
Collection of Useful Open Source CSS ResourcesJanuary 31, 2013 No CommentsThere are loads of free scripts to download and include in your website projects. Developers are constantly releasing their work under open source General Public Licenses. This allows other developers to work off the same code and even customize pieces to better suit their project’s needs. Overall the majority of codes you’ll find these days are written in JavaScript or backend languages.
But I will say there are some newer CSS libraries and resources which are extremely beneficial to most frontend developers. In the article below I have put together a set of very handy tools, resources, and code libraries for web developers. All the codes are written in CSS-only and should not require any JavaScript to function. This is a nice mindset to build around your website since not all users will browse the Internet with support for JavaScript.
1. Ivory Framework
IVORY is a frontend CSS framework for building responsive grids in web design. You can check out their live demo which showcases much of what can be accomplished. The codes are also completely free and open source for developers to play around with.
2. WebInterface Lab CSS Snippets
I found this resource just a few weeks ago and it has proven to be incredibly helpful. You can find loads of pre-built CSS2/CSS3 resources all for website interfaces. Many of these items include buttons, links, navigation bars, tooltips, and loads of other goodies! The site updates frequently so be sure and check back if you like the quality.
3. Github-Style Sliding Links
If you have ever seen longer hidden anchor links on Github you will notice how they slide out to display the full text. This effect may be accomplished very quickly on your own website, and it can also be done using only CSS codes. Check out the blog post by David Walsh which explains how to build this.
4. Workless
Workless is a clean HTML5 and CSS3 framework for web developers. You may not enjoy having to start each project from the beginning – and coding all your header information can be a hassle. Aside from code snippets you may chose to startup with a framework such as Workless. It comes with lots of default styles for tables, links, icons, and even buttons for generic HTML markup.
5. CSS3 Checkboxes
This unique Codepen demo page includes a lot of custom CSS3 checkbox styles. This is perfect for any web developers who have been looking to update their form checkbox designs with newer CSS techniques. I personally love many of the styles included, so be sure and check the source code for snippets to include in your own projects.
6. CSS3 Pictogram Buttons
This great tutorial explains how we can make unique buttons using CSS3 gradients and also include icons related to the class name. The brief demo page is a good indicator of what we can design. This is an excellent resource for just about anybody looking to spruce up button styles.
7. One% CSS Grid
Here we have another free open source CSS grid framework for quickly scaling your own website layouts. The whole grid is fluid and based off a 12-column setup. I would highly recommend testing out their code samples to see if you can build fluid or fixed columns for your website layout.
8. Sosa Icon Font
This newer trend by CSS designers is to include unique font faces based on icon designs. Then using the CSS3 @font-face property we can easily generate custom icons instead of loading images. These could be useful within sidebar content, navigation links, or even inside your post content.
9. Makisu 3D Menu Dropdown
You don’t often find 3-dimensional navigation menus based entirely in CSS code. But I like Makisu for its ease of use and quick installation. On their Github hosted webpage you’ll find a live demo which looks stunning. You may also dig into the source code and see how this effect can be generated through CSS properties.
10. 320 and Up
320 is one of my first CSS frameworks which I ever attempted to play around with. They have support for plenty of mobile responsive content which includes dropped navigation menus and sidebar items. Also your image/audio/video media should automatically resize within any containers. Check out their homepage and give it a shot if you’ve got the time.
11. 34 Responsive Grid System
I find the 34responsive grid system a little easier to manage if you know exactly how many columns are needed. You can quickly setup the margins/padding before downloading their prepackaged CSS library to fit into your layout perfectly. It’s a bit daunting for newcomers, but give this one a shot if you like to build layouts with a pixel-perfect finish.
12. 1140 CSS Grid
The 1140px CSS grid is another fantastic open source library you may consider testing. 1280px width monitors are commonplace and this is the best solution for modern-day layout designs. You may also consider limiting your websites to stretch a bit smaller – and there are always options to customize the exact specifications right from within the CSS.
13. 520 Grid System
Any frequent Facebook users or developers may recognize this CSS framework. 520 is based on the Facebook grid display for creating your own custom Facebook profiles. It is currently the most popular social networking website and provides an excellent resource for marketing and interactions with fans. This CSS grid system is just one method of testing out your layout before applying the changes live on the site.
14. Centurion
Centurion is based on mobile responsive CSS media queries for the best transition between desktop and smartphone. Web developers who are not familiar with responsive techniques may find this CSS library a bit confusing to work with. However their grid system is phenomenal and supports almost any screen resolution.
15. Profound Grid
What I like so much about Profound Grid is how you can easily switch between fluid and fixed layouts. There are basic settings included within the library for coding your document’s width, number of columns, and the gutter margins. Also the website documentation is very easy to follow and the class/ID names make sense as you’re going back into the code.
16. Pondasee
The Pondasee Github page includes all of the resources you’ll need for building a simple frontend CSS design kit. The whole library is built using SCSS and Compass which allows for processing of dynamic CSS data. The internal components include jQuery, Normalize, Modernizr, HTML5 Boilerplate, along with a handful of other tools.
17. Normalize.css
Speaking of Normalize I want to bridge this into the CSS resources list as well. Normalize is a modern library for developers looking to move away from the traditional CSS resets. Many of the typical browser elements such as forms and headers are pre-formatted with generic styles and mirrored for display in all browsers. This allows you to start designing from a blank slate and produce perfect results across the board.
18. CSSDeck
There are plenty of online coding apps for web developers which allow for inline editing to save & share code snippets. CSSDeck is one such tool which also includes a featured gallery of small HTML/CSS/JS code snippets. Developers will create frontend interfaces and offer the codes for free in their gallery! You can find some very interesting samples on the front page, and it’s a fun showcase to browse when looking for inspiration.
19. Bear CSS
This is another free webapp resource which may not hold much value for everybody. However the purpose is to generate a blank CSS stylesheet which contains all the classes and IDs found inside a single HTML document. Simply upload a webpage written in HTML or XHTML and Bear CSS will return a new stylesheet preformatted with all the related element targets.
20. CSS Transitions
I am a big fan of Codrops and love many of their published works. One tutorial in particular focuses on CSS3 transitions fitted inside a website layout. It is possible now to create your own multi-paged website and transition between content using only CSS3 animations. Check out the live demo to get a taste of what I’m talking about.
21. Animated CSS3 Web Banners
This is quite possibly another favorite tutorial by Codrops which illustrates the brilliance of CSS3. You can build your own advertising banners with CSS3 animations that work in all standards-compliant browsers. This technique may be annoying in some websites – but if you can pull it off the customization could generally lead towards much higher CTR in the long-term.
22. Polaroid Images
When discussing images I have to recommend this great tutorial on CSS3 image framing. Here you can build a custom CSS class which appends a white background and dark drop shadows behind any image element. This appears to look like an old-fashioned polaroid photograph, along with image captions and possible rotation as well. Take a peek at their demo page to see the full effect in action.
23. Google+ UI Buttons
Once Google+ initially launched there was a big difference in reviews of critics. However their general layout style has always been minimalist and brilliant in comparison with other social networks. Bruce Galpin has created a clone UI and released the open source codes on Github. This is a beautiful set of user interface elements for designers looking to create a simple aesthetic effect. The live demo page offers a full showcase of what is included in the design kit.
24. Responsive Patterns
This Github resource is new to me and provides such a detailed level of non-official documentation for mobile web designers. These design patterns are all related to responsive website layouts and how you may want to manage a particular project. The patterns focus on topics such as responsive navigation, images, tables, forms, and other common web elements.
25. SpritePad
SpritePad is an online webapp resource for generating sprite sheets to be used in CSS. These sprites are often common interface objects such as navigation menus, sidebar links, icons, footer columns, etc. Generating custom sprites in Photoshop can be a hassle but this unique webapp interface works perfectly – and you can do it from any computer.
26. CSS3 Button UI
The Geekeries CSS3 buttons class is a great starting point for designers looking for a quick solution in smaller web layouts. You do not always need to build heavily customized CSS buttons, and these glossy effects are just perfect for any typical webpage. I would recommend for any curious developer to check out their page and see these buttons in action.
27. Prefixr
How many times have you been writing CSS3 codes and needed to go back filling in the various prefixes? Mozilla, Opera, Webkit, and possibly Microsoft IE all have their own proprietary prefixes for many CSS3 properties. The free webapp Prefixr allows you to copy over a snippet of CSS3 and it will automatically fill in all the appropriate prefixes as needed. Talk about a seriously helpful webapp!
28. Animate.css
I would consider Animate.css as an alternative to the popular jQueryUI library. This CSS-only document allows for quick and painless CSS3 animation effects which behave properly in all modern browsers. The homepage features many smaller demos which you can test out and see how these effects work.
29. Print.css
There are some cases of websites where you simply do not care about printed media. However there will always be users who are interested in keeping a physical copy of your article or webpage. Adding the print.css library into your webpage will force a typical print-style effect over pages which are printed. This will strip many of the colors and distractions from the screen to clean up and offer a nice, simple webpage for white printer-paper quality.
30. Zocial Buttons
I have seen a lot of custom CSS icons in the past, but Zocial is definitely one of my favorites. The buttons are created over a SASS framework which is helpful when trying to churn out codes using multiple social media websites. The buttons also feature icons and custom color codes which match the same branding. Check out their website to learn a bit more about the library.
Final Thoughts
I do hope this showcase of CSS resources may prove useful to at least a few developers. I can’t say that I have found a proper use for everything in this list, but I’ve toyed around with all of the resources and this list includes a few of my favorites. CSS2 and more recently CSS3 has dramatically changed the way designers make websites in a very positive light.
It is nice to see more developers jumping onto the open source bandwagon and supporting the freedom of web collaboration. As the W3C pushes out further specifications I am hoping the models around CSS will become more ubiquitous within all web browsers. Working to support all user environments can be a hassle – but it’s also the mark of a truly skilled web developer. If you have any questions or ideas on these CSS resources feel free to share with us in the post discussion area.
You might also like…
15 Responsive CSS Frameworks Worth Considering →
10 Lightweight & Minimal Responsive Grid Frameworks →
10 Free Pure CSS UI Kits →
15 More Responsive CSS Frameworks & Boilerplates Worth Considering →
10 Responsive Navigation Solutions and Tutorials →Or, you may like to browse our CSS category.
Comments and Reactions
Login to your WordPress dashboard and find your way to Appearance > Themes.
You'll see two tabs at the top - Manage Themes & Install Themes. Click Install Themes.
Now, directly under those two tabs you'll see a line of links - click the Upload (second) link.
You'll now be on a page which gives you the options to install a .zip. Open the installer, and find the "PF 1.x - open me" folder that we extracted (preferably to your Desktop) earlier.
First, we'll install the pro_framework.zip package - but we won't activate it. Select pro_framework.zip, and click "Open". Now click the "Install Now" button and let WordPress do it's thing.
We're not done yet! We don't want to activate the theme yet. We've only installed the Framework, now it's time to install the default child theme (pro_child.zip).
The reason for the child theme is so you can edit Pro Framework's CSS & functions without altering the framework. This allows me to release updates of the Framework - while leaving all of your customizations untouched. So go ahead and repeat the process above, but instead of installing pro_framework.zip, install pro_child.zip.
So now you've uploaded pro_child.zip and the installer has done its thing, you click Activate.
1. A yellow box instructing you to upgrade will show up on every page in your dashboard. It looks like this:
2. If, for some reason, the yellow announcement isn't showing up, but you think there's an update waiting, then go to "Appearance >> Themes" and look under "Pro Framework".
I suggest always checking out the details before updating - they can contain special instructions.
This won't mess with your custom CSS or PHP edits, because you've had a child theme installed - and not the framework, riiiight? ;)
Right, so we go to "Appearance >> Themes" and look for your version of Pro Framework.
Find "Pro Framework" in your list of themes, and press the "Delete" link.
It will say you're going to lose your customizations - but if you've been using a child theme, you won't.
Now that it's deleted, go to "Install Themes >> Upload" and upload the new pro_framework.zip file.
There's no need to activate - as your child theme will kick back into place once the Framework is back.
Just in case - go to "Appearance >> Themes" and make sure the child theme is activated.
Installing a PluginThere's two ways to install a plugin using WordPress. One of them is automatic, and the other involves downloading and uploading the plugin.
The Easy Way
If the plugin you wish to install is hosted on WordPress.org, you can simply go to "Plugins >> Add New" and type the name of the plugin into the search bar. Once you find the plugin, click "Install Now" and let WordPress install it. Once installed, click "Activate" and you're good to go!
The Harder Way
If the plugin requires you to download it and upload it, then follow these steps (it's not hard!)
1. Go to "Plugins >> Add New".
Adding new pages to WordPress
2. Click "Upload" near the top of the page.
3. Upload your plugin, which must be a .zip file.
4. Click "Install Now" and let WordPress do the installation.
5. Click "Activate" and you're all done!First, let's create a homepage!
Navigate to "Pages".
Then, let's click on "Add New".
Now we can add our new homepage.
We can make the "Title" simply say "Home" - that way, we know which is our homepage when we're viewing all of our pages above. By default, if you title your page "Home", the headline on that page will say "Home" - but we can use Pro Framework's custom headline option to change this.
Page layout
You can specify a page layout to be used for each specific page or post. The default is a single right sidebar.
Adding content to our homepage
Important note: If you are going to be pasting content into your website through Word, or any other word processor (or another website), then you MUST paste your content into the "HTML" tab.
When pasting into the HTML editor, we can separate paragraphs by simply leaving a blank line in between them, like this.
Now that we have our content pasted into WordPress' HTML editor, we can switch over to the "Visual" editor. Right away, you might notice the lack of visual options - don't worry, they're just hiding. You need to click the "Kitchen Sink" icon to show the rest of the visual options.
Adding a link
To link a word, simply highlight the word you want linked, and click the little chain-link icon in the Visual editor.
Now we simply enter the URL that we want to highlighted word to point to.
Once we click the chain-link icon, a small box will pop up, allowing us to enter a link. You can either input a custom URL, or you can link to existing content on your website.
Once you have entered your URL, simply click "Add Link".
Adding Headings
Let's add a couple headings now - these are important for breaking up content into sections.
Simply add your heading to a new line, and highlight it like so.
Now click on the "Paragraph" button in the editor - most people will have worked with something like this in a word processor.
From here, we can choose a heading 1, heading 2 and heading 3.
Now I'll give all three headings their appropriate tag.
Adding an image
Now we'll add an image to our content.
First, choose an insertion point inside of your content. I suggest choosing the very beginning of a line.
Now, we can press the "Select Files" button, which will open up a browser. I'll choose this nice creek picture, and click open. Let WordPress do it's thing and upload the file, it will expand with some options when it's done.
Search Engine Optimization
You can specify search engine options on every page and post.
The Meta Title is one of the most important fields for SEO - when you search for something in Google, the titles that you see are the "Meta Titles".
Keywords are less important, and aren't even supported by Google anymore, but other search engines support them.
The Description is the snippet of text that appears under the meta title in search engine results. If you don't fill this out, Pro Framework will automatically grab the sentence of your content.
You can also hide the page or post from being indexed by search engines by checking the noindex box.
The nofollow checkbox makes it so search engines don't follow any links on that specific page or post.
Publishing a page
When your page is ready to be published, you can click the "Publish" button. You can choose whether to publish the page immediately, or you can schedule it to publish at a specific time on a specific date by clicking the "Edit" link next to "Publish Immediately".
.
Make your homepage static
You might notice your homepage has a "post" on it named "Hello World!". Let's go ahead and make your homepage a static page, instead of a blog.
We can do this now that we've created our homepage in the previous step.
Navigate to "Settings >> Reading".
After clicking on "Reading", you'll see something like this.
Notice how the "Front page displays" option is set to "Your latest posts"? This is why your homepage is showing your one and only post, "Hello world!". So, let's select the "A static page" option, and choose our newly created homepage as the "Front page".
Now, when we click "Save Changes", our homepage will replace the latest posts on our front page!
Setting a page for your latest posts
Since we're already in here, I'll explain how to set a page that will display every single "post" you make.
In many cases, this is considered a "blog". But I like to use posts to display many different things throughout the website. Using Pro Framework's Post Lists feature, you can add a new page, and tell it to display posts from certain categories. Meaning you can add posts to a "FAQs" category, and display them on a page by selecting the "FAQs" category inside of the Post Lists box. You can read more about Post Lists here.
If you want every single post you make to show up on one page, then we just need to do two small things.
1. Add a new page, simply title it "Blog" or whatever, and Publish. No need to include content, as it will be overwritten by the posts.
Now that we have a new blank page, we can go back to the "Settings >> Reading" page shown above.
We can now simply select our newly created page as the "Posts page".
We now have a page that will display every post you make!
Pages vs PostsWordPress allows you add two different kinds of "content".
Pages are meant to be static information pages that won't be changing very often (except for the odd content change).
Example Pages
Homepage, About Us, Services, Contact Us etc..Posts are meant to be put into "categories", they allow you to group content with other content, and easily add to each group whenever.
Example Categories
Blog, Recipes, Articles, Portfolio, FAQs, Tutorials, Tips, Events and so much more..You can have a "Recipes" category, which you can add recipes to whenever you want. This groups the recipes together in the category, which we can them use on a page.
Using Pro Framework's 'Post Lists'Using Pro Framework's 'Post Lists' feature, we can harness the power of categories, and display them on our pages.
Let's use categories and posts to create an 'Articles' page.
First, we'll create the 'Articles' category.
Once we click 'Add New Category', we can create our 'Articles' page.
Go to 'Pages >> Add New'.
We'll title it 'Articles'.
Remember from above, we can use the Custom page headline field to change the 'Articles' headline on our live page.
Let's publish and see what happens.
This is what a post list looks like by default. Let's change some options..
We'll tell the page to show the excerpt, and to display the posts in two columns. Let's take a look.
Adding postsLet's go to 'Posts >> Add New' - I'm going to title my article 'One More Article'. Then I'll paste in some dummy content.
Now, the most important part, we have to add our new article to the 'Articles' category, so it will display on our "Articles" page.
Let's take a look.
This will now show up on our 'Articles' page, and if you have a page configured to show all posts (blog), it will show up there.
Using Excerpts
Adding post images
We can spice up our excerpts a little using post images.
Let's start off by clicking 'Add an image'. This will open a box with a button allowing us to select files.
Then, we select our file, and open it.
This will now upload to your website, give it a second, and a box will open up. Now, simply click "Insert Excerpt Image".
The image URL will now be sent to your post image field. There's many other options to choose from as well.
Now, we can publish the post.
I'll do the same to the other post, just for visual purposes ; )
Settings search engine friendly links (WordPress Permalinks)WordPress allows you to easily make your URLs search engine, and human friendly. By default, WordPress will make your URL look somewhat like this:
http://yourdomainname.com/?page_id=18
By switching the permalinks, we can get something like this:
http://yourdomainname.com/my-page-title
More keywords for search engines, and easier to remember for humans!
WordPress Navigation / Menus
Let's now take a look at how to control our main (top) navigation, and our bottom navigation.
download base plugins v.1.5.3 To Do Get better semantic code into the comments.php template... NOTE: see second link listed in comments.php and HTML5 book by Remy Sharp. Add stylesheets with enque Better Documentation, for now please leave comments with questions make a request License The shell comes with ABSOLUTELY NO WARRANTY.
Joomla and WordPress
Widgetkit is built to work perfectly on different systems like Joomla 2.5, 3.0 and WordPress.
Responsive Design
All widgets and their effects are responsive and adapt perfectly for all device resolutions like mobiles, tablets and desktops.
HTML5 and CSS3 Techniques
Take full advantage of modern web technologies. Semantic HTML markup, standards compliant CSS and jQuery.
Admin User InterfaceClearly arranged, easy to use and fully integrated
Folder Picker
Browse through folders of your website to easily select multiple images for your gallery.
Location Picker
Finding and picking locations by dragging a marker with the intuitive location picker!
Item Ordering
Order your widget items with drag & drop and re-order them quickly at any time.
WYSIWYG Editor
Widgetkit automatically uses your built-in WYSIWYG editor like TinyMCE or JCE.
Amazing FeaturesWell-coded, stunning effects and a beautiful look...
17 Transition Effects
Widgetkit offers 17 eye-catching transition effects to impress your visitors with stunning animations.
Automatic Image Sizing
Images are automatically cropped and resized which makes publishing galleries as easy as pie!
Fast Loading
CSS and JavaScripts are combined, minified and cached on the fly. Lazy loading keeps the initial amount small.
Touch Screen Support
Supports touch gestures for mobile devices and keyboard navigation to provide a great usability.
Beautiful Styles
Every widget comes with multiple styles. Each providing its own look and functionality to perfectly fit your website.
RTL Support
All widgets and styles support right-to-left languages. Widgetkit gets your content always right.
Multiple Widgets
Display widgets multiple times on the same page and reuse them on different parts of your website.
Well-engineered
Widgetkit acts as a platform for all widgets and is designed with modularity and extensibility in mind.
Extendable
Do you miss a style or even a widget? No problem! Just build your own and manage them within Widgetkit.
Responsive
The new Gallery theme is completely responsive, making it easy to showcase your grid of images, videos, quotes, blog posts, and more on any screen!
Reading WordPress source code is important thing for a developer. Thing is – not a skill that comes easy or fast.
What if there was better WordPress code reference. More comprehensive and up-to-date than Codex. More friendly and convenient than raw code and cross-references.
With this site I will try to make such. :)
The Boiler is a free responsive WordPress Theme The Boiler is free and includes an unlimited license: Download The Boiler 102 KB .zip archive – Optimized for WordPress 3.4 – Learn MoreHeadline 1
Headline 2
Headline 3
Headline 4
Headline 5
Headline 6
Body Text Sed fermentum sagittis mi id interdum. Quisque et enim justo, a semper odio. Duis semper purus sit amet justo lacinia mollis. Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla. Maecenas non orci neque.
Buttons Alerts and Note ShortcodesOMG! This is an alert window!
Remember, this is a note.
Content Slider Fluid Column ShortcodesSuccess! This is another notice to use!
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris. Etiam neque nibh, feugiat non blandit sodales, facilisis quis urna. Nunc sit amet lorem mi. Aliquam non sapien lectus. Etiam quis tortor tortor, a fermentum massa. Etiam eu euismod nulla.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Mauris ut mi a leo commodo volutpat varius porttitor sapien. Proin tortor quam, eleifend sed laoreet vitae, accumsan in mauris.
Need to know more? View a quick tour
Sample PageThis is an example page. It’s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:
Hi there! I’m a bike messenger by day, aspiring actor by night, and this is my blog. I live in Los Angeles, have a great dog named Jack, and I like piña coladas. (And gettin’ caught in the rain.)
…or something like this:
The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickies to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.
As a new WordPress user, you should go to your dashboard to delete this page and create new pages for your content. Have fun!
Frank is an open source WordPress theme designed specifically for speed.
Frank is the WordPress theme which runs this site and was created with the gracious help of Jon Christopher. Frank is designed and built to provide a light, responsive and unobtrusive reading experience.Frank is fastFrank’s main focus is speed. The parent theme’s default home page makes 9 database queries and consists of 2 requests weighing ~29Kb (9.6Kb gzipped). Frank keeps it basic—no Javascript frameworks, no unecessary images, just a simple, no-frills, screaming fast blog.Frank is flexibleFrank has several different layouts to choose from for your home page. Most layouts let you specify the number of posts to show and from what categories. Templates can be stacked by any amount and order to give you the structure you need. Additionally, there are plenty of well-placed widgets that will give you that extra level of customization.Frank is forward-thinkingFrank is built on HTML5 and CSS3. The theme strives for 100% valid HTML5 templates. One way Frank is so small is that it uses CSS3′s effects and transitions to avoid unneeded images and Javascript. One side effect of this approach is that Frank does not support Internet Explorer 6 and *moderately* supports Internet Explorer 7 & 8.Frank fits on your phoneFrank uses a subset of Foundation to provide a responsive layout for desktops, tablets and phones. Add this to the theme’s small footprint and you have a mobile-optimized blog.Frank is for youFrank isn’t (ever) finishedThere is always more to do, but I need help. This project relies on community support, so if you find this theme helpful, please contribute. Other projects Cue is a public domain gestural icon system which focuses on legibility and symbolic representation.Bitcons is a pixel icon set available in various colors/sizes and completely free to use.Sanscons is a CSS-friendly version of Bitcons — allowing you to set custom backgrounds on your icons.
HTML5 Blank is a deployment theme for WordPress, built for rapid project deployment with preloaded goodness.