blob: 66ffe8cbed11195b2620e8b69c7d30bb1d3a22ba [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
-->
<ui:composition template="/main.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<p>Create an image with <code class="language-markup">&lt;tc:image/&gt;</code>.</p>
<tc:link label="Tag Library Documentation" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/image.html"/>
<tc:section label="Basics">
<demo-highlight language="markup">&lt;tc:image value="\#{request.contextPath}/image/tobago_head.png"/&gt;</demo-highlight>
<tc:image id="i1" value="#{request.contextPath}/image/tobago_head.png"/>
</tc:section>
<tc:section label="Set width">
<p>To set the size of an image, <code>&lt;tc:style/&gt;</code> can be used.</p>
<demo-highlight language="markup">&lt;tc:image value="\#{request.contextPath}/image/tobago_head.png"&gt;
&lt;tc:style width="20%"/&gt;
&lt;/tc:image&gt;</demo-highlight>
<tc:image id="i2" value="#{request.contextPath}/image/tobago_head.png">
<tc:style width="20%"/>
</tc:image>
</tc:section>
<tc:section label="Disable">
<p>The <code>disabled</code> attribute can be used, to let the picture look more 'disabled'.</p>
<tc:section label="Disabled off">
<p>Disabled is 'false' by default.</p>
<demo-highlight language="markup">&lt;tc:image disabled="false" value="\#{request.contextPath}/image/alps.png"/&gt;</demo-highlight>
<tc:image id="i3" disabled="false" value="#{request.contextPath}/image/alps.png"/>
</tc:section>
<tc:section label="Disabled on">
<demo-highlight language="markup">&lt;tc:image disabled="true" value="\#{request.contextPath}/image/alps.png"/&gt;</demo-highlight>
<tc:image id="i4" disabled="true" value="#{request.contextPath}/image/alps.png"/>
</tc:section>
</tc:section>
<tc:section label="Font Awesome">
<demo-highlight language="markup">&lt;tc:image id="fa" value="fa-coffee"/&gt;</demo-highlight>
<tc:image id="fa" value="fa-coffee"/>
</tc:section>
</ui:composition>