/* JSPWiki - a JSP-based WikiWiki clone. 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"); fyou 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. */ /* Plugin: Viewer This plugin allows inline viewing of images, video, wikipages and external sites (iframe) Example: - %%viewer [link to youtube...] /% - [description | url to youtube... | class='viewer'] DOM Structure: (start code) div.viewer a.href (end) (start code) div.viewer iframe.viewport or object.viewport or img.viewport (end) */ .viewport { margin: 0 0 (@line-height-computed / 2); //inherit from p (bootstrap/style.less) .box-shadow(0 3px 10px rgba(0, 0, 0, 0.175)); min-height:200px; min-width: 200px; max-width: 100%; //shrink images to 100% width of the parent element, if needed } //During loading, iframes are temporarily added to the body -- but not displayed //After loading, the iframes are put into the viewport by js. body > iframe { .hidden; } //avoid that the default background of an iframe is transparent, and contents becomes unreadible //(eg needed for View Page Source .viewport iframe { background-color:fade(@white,92%); padding:.5em; }