/* * [AnimalRightsHead.java] * * Summary: Produce the header for an Animal Rights essay. * * Copyright: (c) 2004-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.8 2009-02-06 include go package in ZIP bundle. */ package com.mindprod.htmlmacros.macro; import com.mindprod.htmlmacros.support.GoogleAdSense; import com.mindprod.htmlmacros.support.Indexing; import static java.lang.System.*; /** * Produce the header for an Animal Rights essay. * * @author Roedy Green, Canadian Mind Products * @version 1.8 2009-02-06 include go package in ZIP bundle. * @since 2004 */ @SuppressWarnings( { "UnusedDeclaration" } ) public final class AnimalRightsHead extends Head { /** * how to use the macro */ private static final String USAGE = "\nAnimalRightsHead needs title description keywords [image]"; /** * Generate the header for an Animal Rights essay. * * @param parms parameters from macro command line. parms[0] = title description of fragment. parms[1] * = description parms[2] = keywords * @param quiet true if want output suppressed. * @param verbose @return expanded macro HTML */ public String expandMacro( String[] parms, final boolean quiet, final boolean verbose ) { if ( !quiet ) { out.print( "A" ); } if ( !( 3 <= parms.length && parms.length <= 4 ) ) { throw new IllegalArgumentException( USAGE ); } String title = parms[ 0 ]; String description = parms[ 1 ]; String keywords = parms[ 2 ]; String topLeftImage; if ( parms.length > 3 ) { topLeftImage = parms[ 3 ]; } else { topLeftImage = ""; } String topRightImage = "icon64/bluewhale.png"; String icon = "icon16/bluewhale.png"; String sectionFile = "animalrights/animalrights.html"; String sectionTitle = "animal rights"; return generalHead( title, null, // shorttitle description, title, // hereBreadcrumbTitle "titlesubsection", // titlestyle keywords, icon, // icon16 null, // topLeftOfPageRef topLeftImage, // topLeftOfPageImage topRightImage, // topRightOfPageImage null, // extraNavigation sectionFile, // sectionBreadcrumbFile sectionTitle, // sectionBreadcrumbTitle null, // subsectionBreadcrumbFile null, // subsectionBreadcrumbTitle null, // subSubsectionBreadcrumbFile null, // subSubsectionBreadcrumbTitle null, // upRelLink null, // upTitleFlattened Indexing.NONE, GoogleAdSense.MEDIUM_RECTANGLE, null, // lastReviewedDate null // googleSiteSearchCode ); } }