You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by da...@apache.org on 2003/08/21 19:05:31 UTC

cvs commit: tcl-site/rivet index.rvt

davidw      2003/08/21 10:05:31

  Modified:    .        style.css
               presentations index.rvt
               rivet    index.rvt
  Log:
  Added some source code examples to the Rivet front page.
  
  Revision  Changes    Path
  1.10      +28 -11    tcl-site/style.css
  
  Index: style.css
  ===================================================================
  RCS file: /home/cvs/tcl-site/style.css,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- style.css	28 May 2003 09:17:21 -0000	1.9
  +++ style.css	21 Aug 2003 17:05:31 -0000	1.10
  @@ -6,7 +6,6 @@
   }
   
   p {
  -    font-size: smaller;
   }
   
   A:link { color: #cc3300 }
  @@ -48,15 +47,9 @@
        color: #006600;
   }
   
  -div.box {
  -    font-size: smaller;
  -    border-width: medium;
  -    padding: 0.3em;
  -    background-color: #dddddd;
  -}
  -
   table.main {
       width: 100%;
  +    font-size: smaller;
   }
   
   table.lists td {
  @@ -77,10 +70,8 @@
   }
   
   table.nav td {
  -//    background-color: #aaaaff;
       font-weight: bold;
       padding: .3em;
  -    font-size: smaller;
   }
   
   li {
  @@ -91,4 +82,30 @@
   blockquote {
       font-size: smaller;
       font-style: italic;
  -}
  \ No newline at end of file
  +}
  +
  +pre.code {
  +    padding: 1ex;
  +}
  +
  +td.code {
  +    background-color: black;
  +    color: white;
  +    border: solid white 1em;
  +}
  +
  +span.type {
  +    color: #4682b4;
  +} /* font-lock-type-face */
  +span.variable-name {
  +    color: #228b22;
  +} /* font-lock-variable-name-face */
  +span.comment {
  +    color: #ff7f24;
  +} /* font-lock-comment-face */
  +span.keyword {
  +    color: #00ffff;
  +} /* font-lock-keyword-face */
  +span.function-name {
  +    color: #87cefa;
  +} /* font-lock-function-name-face */
  
  
  
  1.2       +8 -6      tcl-site/presentations/index.rvt
  
  Index: index.rvt
  ===================================================================
  RCS file: /home/cvs/tcl-site/presentations/index.rvt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.rvt	28 May 2003 09:17:22 -0000	1.1
  +++ index.rvt	21 Aug 2003 17:05:31 -0000	1.2
  @@ -26,20 +26,22 @@
   	      redistribute, or otherwise do as you wish.
   	    </p>
   	    <ul>
  -	      <li>Tcl Presentation: <a href="tcl/">(live)</a> <a
  -	      href="tcl.tgz">(tarball)</a><br>
  +	      <li>Tcl Presentation: <a href="tcl/"></a><br>
   		Presentation on the Tcl programming language and the Tk toolkit.
   	      </li>
  -	      <li>mod_dtcl Presentation: <a href="dtcl/">(live)</a> <a
  -	      href="dtcl.tgz">(tarball)</a><br>
  -		mod_dtcl presentation.
  -	      </li>
   	      <li>
   		Apache Tcl Presentation: <a
   		  href="apache-tcl/">(live)</a><br>
   
   		The present and future of Apache Tcl, and why Tcl is
   		such a logical fit for doing web content.
  +	      </li>
  +	      <li>Rivet Presentation: <a href="rivet">(live)</a><br>
  +
  +		About Rivet, the successor to mod_dtcl and NeoWebScript.
  +	      </li>
  +	      <li>mod_dtcl Presentation: <a href="dtcl/">(live)</a><br>
  +		What mod_dtcl is and how it works.
   	      </li>
   	    </ul>
   	  </td>
  
  
  
  1.7       +68 -1     tcl-site/rivet/index.rvt
  
  Index: index.rvt
  ===================================================================
  RCS file: /home/cvs/tcl-site/rivet/index.rvt,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- index.rvt	14 Feb 2003 19:33:56 -0000	1.6
  +++ index.rvt	21 Aug 2003 17:05:31 -0000	1.7
  @@ -63,6 +63,73 @@
   	      it continues to improve, yet maintains its rock-solid
   	      nature.
   	    </p>
  +
  +	    <table>
  +	      <tbody>
  +		<tr>
  +		  <td colspan="2"><hr width="80%"></td>
  +		</tr>
  +		<tr>
  +		  <td align="center"><b>Rivet Templates (.rvt)</b></td>
  +		  <td align="center"><b>Tcl Scripts (.tcl)</b></td>
  +		</tr>
  +		<tr>
  +		  <td width="50%">
  +		    Templates let you add a bit of code to your HTML,
  +		    to add dynamic content to it, or speed up creation
  +		    of repetitive elements.  Templates are appropriate
  +		    for quick'n'dirty pages, where you just need to do
  +		    some scripting quickly.  But they are also
  +		    appropriate for the 'display' component of your
  +		    complex application.
  +		  </td>
  +		  <td>
  +		    Pure Tcl scripts let you do the heavy lifting to
  +		    control your application.  A sensible design
  +		    pattern is to put most of your complex logic in
  +		    these files, and then parse template files to
  +		    display the results.  This means that those who
  +		    are creating the HTML files don't have to know
  +		    much Tcl, and only need to call a few simple
  +		    commands.
  +		  </td>
  +		</tr>
  +		<tr class="code">
  +		  <td class="code">
  +<pre class="code">
  +  <span class="type">&lt;table&gt;</span>
  +    <span class="type">&lt;tbody&gt;</span>
  +      <span class="type">&lt;tr&gt;</span>
  +	<span class="type">&lt;td&gt;</span>
  +&lt;?
  +<span class="keyword">foreach</span> line [chat::model::getlines $user] {
  +    puts <span class="string">&quot;$line&lt;br&gt;&quot;</span>
  +}
  +?&gt;
  +	<span class="type">&lt;/td&gt;</span>
  +      <span class="type">&lt;/tr&gt;</span>
  +    <span class="type">&lt;/tbody&gt;</span>
  +  <span class="type">&lt;/table&gt;</span>
  +</pre>
  +		  </td>
  +		  <td class="code">
  +<pre class="code">
  +<span class="keyword">proc</span> <span class="function-name">chat::model::getlines</span> {user} {
  +    set sk [chat::model::getsock]
  +    puts $sk [list user $user cmd get msg <span class="string">&quot;&quot;</span>]
  +    <span class="keyword">if</span> { ! [eof $sk] } {
  +	gets $sk data
  +	<span class="keyword">return</span> <span class="string">&quot;$data&quot;</span>
  +    } <span class="keyword">else</span> {
  +	<span class="keyword">error</span> <span class="string">&quot;Problem with socket&quot;</span>
  +    }
  +}
  +</pre>
  +		  </td>
  +		</tr>
  +	      </tbody>
  +	    </table>
  +
   	  </td>
   	</tr>
       </table>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org