Grid/Columns

The HTML layout for this site uses a column system with 12 divisions. Each row can contain columns that add up to 12 divisions, and each column can contain a row that has its own set of 12 divisions. This allows columns to be nested almost infinitely (in theory).

12 columns
9 columns
6 columns
6 columns
3 columns
                
                
                
                
                


Most of the time you will not need to use columns. The area that this text appears in behaves as a default 12-column width box. The only time you will need columns is when you want to divide this content area. In SurrealCMS you can add a row of columns only by using the Edit Region Source button (looks like this: </>). Use the links below to choose the column setup you want. Copy the provided code for your chosen row and paste it into the code view at the point where you want the row to start.

Copy and paste the code below




Buttons

Buttons are just regular links with a few classes added to them. There are 4 sizes availabe:
Large Button Default Button Small Button Mini Button

To turn a link into a button, apply classes to it using the SurrealCMS "class" tool (looks like a black drop of water, next to the font options tool). Required classes are btn and btn-primary. Optional classes are for size: btn-lg, btn-sm, and btn-xs.

Images

Responsive Images

All images that appear in this main content column of the site are responsive by default. This means that they will shrink to fit their containing box. The image to the right of this paragraph is really 1000 pixels wide by 1000 pixels tall, but it is inside a 4-column box, so it is being resized by the browser to fit inside its box.

Responsive images will only work if they are inside a constraining column. If you use the floating image style I have provided (see below) to wrap text around an image instead of setting up columns, the image will not be responsive and it will not resize to the user's screen. In the case of responsive images, you can provide an image at the largest size you want people to see it, and the user's device will shrink it to an appropriate size for the screen. In the case of floated images, you will have to provide the image at the one size it will only ever appear at, because it will never be resized by the device.

Also, all images that appear in this main content column of the site will have the gray border and white space between the image and border by default. A class called "no-border" has been provided in the SurrealCMS "class" tool to remove this padding and border if you wish, but for the sake of a consistent site look I recommend that you keep it on all images.

Floated Images

If you want an image to sit to the right or left of a block of text and have the text wrap around it, use the SurrealCMS "class" tool to apply a class of img-float-left or img-float-right to it. As noted above, floated images inside blocks of text will not resize according to the device size. Therefore, it is recommended that you never use an image that is wider than ~280 pixels. This is the nominal size of most smartphone screens minus some padding for safety.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.

Image Folders

All images should be kept in the "img" folder. Images can be uploaded and managed using the SurrealCMS "Manage Files" tool. Inside the "img" folder are several subfolders, for the main sections of the site that have images: "about", "books" (mostly for the Collectible Authors pages), and "events". Additionally, the "events" image folder has sub-folders for each kind of event:

  • /annex-gallery/
  • /annual-events/
  • /author-alley/
  • /book-signings/
  • /classics-club/
  • /edible-books/
  • /larchmere/
  • /music/
  • /nobs/
  • /otis/

Keeping images in the appropriate folders will help to keep the site better organized. And of course, other subfolders can be created within the main "img" folder if you need them.

Image Sizes

Images should be cropped to a consistent size; I recommend 640 x 480 for all images that are going to be responsive. This will allow them to display at a decent size for all users, and on pages like the Edible Books archives pages, the resized image will display at full size with the built-in lightbox/popup. Most images should be JPG format. The only time GIF is an appropriate format is when the image has large areas of flat color, like a cartoon. Even detailed illustrations should be in JPG format in order to preserve as much detail as possible.

Special consideration should be taken to keep file sizes down. There are a lot of images on this site, and visitors who are using the site on cellular data (i.e. not wired or wi-fi internet) will experience a much slower performance if the image file sizes are too large. If you have Photoshop, I recommend using the "Save for Web" option when saving images and keeping the compression at 60%. If you do not have Photoshop, I recommend using kraken.io. It is a free online service that does an excellent job of reducing image file sizes.