- Timestamp:
- Oct 27, 2010 2:36:14 PM (14 years ago)
- Branches:
- master, trunk
- Children:
- 18050d8
- Parents:
- 6c31c22
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genshi/index.php
r6c31c22 r3f4661f 59 59 60 60 // Enable line numbers. We want fancy line numbers, and we want every 5th line number to be fancy 61 $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 5);61 $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10); 62 62 63 63 // Set the style for the PRE around the code. The line numbers are contained within this box (not 64 64 // XHTML compliant btw, but if you are liberally minded about these things then you'll appreciate 65 65 // the reduced source output). 66 $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #f 0f0f0;', false);66 $geshi->set_overall_style('font: normal normal 90% monospace; color: #000066; border: 1px solid #d0d0d0; background-color: #ffffff;', false); 67 67 68 68 // Set the style for line numbers. In order to get style for line numbers working, the <li> element … … 86 86 // affected by the styles set by set_overall_style. So if the PRE has a border then the header/footer will 87 87 // appear inside it. 88 $geshi->set_header_content('<SPEED> <TIME> GeSHi © 2004-2007, Nigel McNie, 2007-2008 Benny Baumann. View source of example.php for example of using GeSHi');89 $geshi->set_header_content_style('font-family: sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;');88 //$geshi->set_header_content('<SPEED> <TIME> GeSHi © 2004-2007, Nigel McNie, 2007-2008 Benny Baumann. View source of example.php for example of using GeSHi'); 89 //$geshi->set_header_content_style('font-family: sans-serif; color: #808080; font-size: 70%; font-weight: bold; background-color: #f0f0ff; border-bottom: 1px solid #d0d0d0; padding: 2px;'); 90 90 91 91 // You can use <TIME> and <VERSION> as placeholders … … 101 101 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 102 102 <head> 103 <title>GeSHi examples</title>103 <title>GeSHi - Generic Syntax Highlighter</title> 104 104 <style type="text/css"> 105 105 <!-- … … 158 158 </head> 159 159 <body> 160 <!-- 160 161 <h2>GeSHi Example Script</h2> 161 162 <p>To use this script, make sure that <strong>geshi.php</strong> is in the parent directory or in your … … 163 164 <p>Enter your source and a language to highlight the source in and submit, or just choose a language to 164 165 have that language file highlighted in PHP.</p> 166 --> 165 167 <?php 166 168 if (isset($_POST['submit'])) { … … 168 170 echo $geshi->parse_code(); 169 171 echo '<hr />'; 172 echo '</body>'; 173 echo '</html>'; 174 exit; 170 175 } 171 176 ?> 177 <h2>GeSHi - Generic Syntax Highlighter</h2> 178 <ul> 179 <li><a href="docs/geshi-doc.html">GeSHi Documentation</a></li> 180 <li><a href="docs/api/">GeSHi API</a></li> 181 </ul> 172 182 <form action="<?php echo basename($_SERVER['PHP_SELF']); ?>" method="post"> 173 183 <h3>Source to highlight</h3> 174 184 <p> 175 <textarea rows=" 10" cols="60" name="source" id="source"><?php echo $fill_source ? htmlspecialchars($_POST['source']) : '' ?></textarea>185 <textarea rows="30" cols="120" name="source" id="source"><?php echo $fill_source ? htmlspecialchars($_POST['source']) : '' ?></textarea> 176 186 </p> 177 187 <h3>Choose a language</h3>
Note: See TracChangeset
for help on using the changeset viewer.