Professional Documents
Culture Documents
Gallery
Gallery
Gallery
JAMES SINKIEWICZ
JAMES@MYDRUPALJOURNEY.COM
DRUPAL ~ JSCSJSCS
How to Make a Simple Hover Gallery
(with descriptions on shadow overlays)
INSPIRED BY WHITEHOUSE.GOV
CCK ImageCache
• Content • ImageCache UI
• Node reference • ImageAPI
• Text • ImageAPI GD2
• Option widgets
Views
ImageField • Views UI
FileField Views_Slideshow
• Views_Slideshow: singleframe
NodeReference_URL
Create a Gallery Background Image
add action:
Scale and Crop
• Width 520
• Height 345
add action:
Sharpen
• Use defaults
ImageCache – Header Gallery Image
add action:
Of course, you can skip
Scale and Crop
this step if you only • Width 520
upload gallery images • Height 345
1. Name:
o "Header Title Images“
2. Type:
o "header_title_images“
3. Submission form settings:
o Body field label ~ remove
label (make blank)
4. Workflow settings:
o Uncheck “Promoted to front
page”
Create Content Type for Title Images
1. Name:
o "Header Image“
2. Type:
o "header_images“
3. Submission form settings:
o Body field label ~ Optionally
change to “Description”
4. Workflow settings:
o Uncheck “Promoted to front
page”
Create Content Type for Gallery Images
View name:
header_slideshow
View description:
Header Gallery Slideshow
View type:
node
Click “Next”
Create
Views
Block
Format: header-full-520x345
image
Create
Views
Block
Remember
Click + to Add Field this
setting!
Format: header-full-520x345
image
Create
Views
Block
Format: header-full-520x345
image
Create
Views
Block
Node: Body
This is the
interesting
part!
Create Views Block
A class for
the overlay
background.
Create Views Block
Node: Type
Operator: Is One Of
Node type: Header Images
Create Views Block
Views Block
overview
Set “Items to
Display” to 9
Create Views Block
Views Block
overview
Enter “Header
Slideshow Block”
to easily find this
Views Block on Block
settings page.
Add Views Header Slideshow
Block to Header Region
Add
Background “position:relative;” allows us to
use “position:absolute;” on
Image other classes to exactly position
those elements within this
container.
.gallery-container{
position: relative;
width: 950px;
height: 400px;
background-image:url('/demo/sites/default/files/gallery-bkgd.png');
background-repeat:no-repeat;
}
Adding Style with CSS (local.css)
Position
Gallery
Image
.gallery-header-image {
position: absolute;
right: 30px;
top: 27px;
}
Adding Style with CSS (local.css)
Position
Body
(Description)
.gallery-desc {
color: #FFFFFF;
font-size: 1.5em;
position: absolute;
right: 40px;
top: 295px;
width: 490px;
}
#header .gallery-desc p {
line-height: 1.2em;
}
Adding Style with CSS (local.css)
Position
Title
Image
.gallery-title-image {
left: 25px;
position: absolute;
top: 15px;
}
Adding Style with CSS (local.css)
Position Thumbnails
#views_slideshow_singleframe_pager_header_slideshow-block_1 {
position: absolute;
top: 248px;
width: 390px;
z-index: 999;
}
Adding Style with CSS (local.css)
Style Thumbnails
#views_slideshow_singleframe_pager_header_slideshow-block_1 div a img {
height: 70px;
width: 115px;
margin-bottom: 7px;
outline: 3px solid #CCCCFF;
}