Building a simple gallery
You can build a simple, and somewhat elegant, gallery to display images you've saved to your files in Mahara. See the example in the following screenshot:
Getting ready
Locate all of the photos you wish to use in your gallery. If they are not already in your Mahara folder, upload them first.
How to do it...
1. Create a new page in the Pages section of the Portfolio tab.
2. Click the Edit Layout tab.
3. Select 5 columns, Equal width.
4. Click Save.
5. Select a theme from the drop-down menu for Themes. I chose Aqua.
6. From Files, Images, and video click-and-drag the An Image block into one of the columns. Do not drag it to the first column as we're going to use that column to create a decorative sidebar.
7. Delete the text in the Block Title field, leaving it empty.
8. Click the word Select next to the image you wish you add.
9. Do not select Show Description.
10. In the box named Width, type
250
. If you were to set it higher, Mahara would still fit it into the column, but it would take longer to load the page.11. Click Save.
12. Now, we will add the little lines you see between the pictures, to give us some extra white space. From the General tab, click-and-drag the Text Box block to the same column as the picture you just added and put it underneath the image.
13. Delete the text from the Block Title field, leaving it empty.
14. Place your cursor in the Block Content field and click the center alignment icon on the HTML toolbar.
15. Make a line using the tilde key (~). Highlight the line, choose the color you would like it to be, and make it bold.
16. Click Save.
17. Continue adding images and spacers (textboxes) until you have a nice-sized gallery.
18. Now, let's make that sidebar. From the General section, click on the Text Box block and drag it to the left-hand column.
19. Delete the text in the Block Title field, leaving it empty.
20. Click the icon in the HTML toolbar to add a table:
21. The Insert/Modify table dialogue box will open.
22. On the General tab set the table to 1 row and 1 column. Set the Alignment to Center and the Width to
200
.23. Next, click on the Advanced tab, and set the background color of the table by clicking the small box furthest to the right of Background color. Then, to make the selection of a color easy, select the Palette tab. Click on the color you'd like your background color to be.
24. Select Apply and then Insert.
25. You will now see a narrow table in the Body of the Text Box. Place your cursor inside your new table and insert a few spaces. Using the various options in the HTML toolbar, set your Font type, Color, and Size (I chose Book Antiqua size 36). Then, type the name of your gallery as you wish it to appear in your sidebar.
26. Insert a few more spaces. Click Save.
27. Finally, add a Creative Commons License to your gallery. From the General tab, select the Creative Commons block and drag it underneath your sidebar (to the bottom of the column on the far left). Set your preferences. Click Save.
How it works...
The images in your gallery are referred to as thumbnails; this means they are smaller pictures of larger images. They are also links to the original images. When visitors click one of your thumbnail images, they will be taken to a larger view of the image. Below the image will be a small link labeled Details, which takes visitors to a page with details about the image. For an example, see the following screenshot:
Adding titles and captions
You can choose to provide titles, as well as descriptions, for each of your images. To add a title, simply enter it in the Block Title field when you add the image to your page. If you choose the option Show descriptions, descriptions will appear centered underneath your photos (like captions). If your photos do not already have descriptions, you will need to add them first by going to the Mahara file section where they have been stored (Files on the Portfolio tab). Click the Edit link next to the photo you wish to add a description for. The image information section will expand and there will be a place where you can add a description of the photo.
Lining up the images more precisely
If you prefer to have all of your images in a neater line than in the example, you can use the Text Box blocks to add additional spacing between your images. When you add these blocks in steps 12 and 13, use the Enter key to add white space above the line you add. You can add space underneath the line as well. Sometimes it takes a little tweaking to get it exactly as you want. You can edit the text in the Text Box until you are happy with the way it looks.
Note
Changing the font size for an empty line, that is the line you simply used to create white space, changes the size of that space.
Using the image gallery block
Mahara 1.4 has an Image Gallery block that will create a gallery for you. While it is a much easier way to create a gallery than the method we used previously, it gives you fewer options for design. The number of images per row changes, depending on the size of the window. Resizing a window (making it wider or narrower) will change the display of the gallery.
To use the Image Gallery block, apply the following instructions:
1. Set the Layout to 2 columns, Larger right column or 3 columns, Much larger center column.
2. From the Files, Images and video tab, click-and-drag the Image Gallery block into the larger column.
3. You can leave
Image Gallery
in the Block Title field.4. Under Image Selection, choose the option I will choose individual images to display.
5. Click the Select button next to each of the images you wish to include in this gallery.
6. Under the option for Style, select Thumbnails.
7. In the box for Width, type
250
.8. Click Save.
See also…
The Art portfolio and the Common Application: Art Supplement recipe in Chapter 7,The College Application Portfolio