소스 검색

finally add the Kwiki::Theme::OpenPKG I've prepared for wiki.openpkg.org

Ralf S. Engelschall 21 년 전
부모
커밋
b6512d58d3
3개의 변경된 파일266개의 추가작업 그리고 2개의 파일을 삭제
  1. 247 0
      kwiki/kwiki-openpkg.pm
  2. 1 0
      kwiki/kwiki-plugins.txt
  3. 18 2
      kwiki/kwiki.spec

+ 247 - 0
kwiki/kwiki-openpkg.pm

@@ -0,0 +1,247 @@
+##  
+##  kwiki-openpkg.pm -- Kwiki OpenPKG Theme
+##
+
+package Kwiki::Theme::OpenPKG;
+
+use strict;
+use warnings;
+use Kwiki::Theme '-Base';
+use mixin 'Kwiki::Installer';
+our $VERSION = '1.0';
+
+const theme_id    => 'openpkg';
+const class_title => 'OpenPKG Wiki Theme';
+
+1;
+
+__DATA__
+
+=head1 NAME 
+
+Kwiki::Theme::OpenPKG - Kwiki OpenPKG Theme
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+This is the Kwiki theme of the OpenPKG Wiki http://wiki.openpkg.org/
+
+=head1 AUTHOR
+
+Ralf S. Engelschall <rse@engelschall.com>
+
+=cut
+
+__theme/openpkg/template/tt2/kwiki_screen.html__
+
+[%- INCLUDE kwiki_doctype.html %]
+[% INCLUDE kwiki_begin.html %]
+
+<div>
+  <table width=100%>
+    <tr>
+      <td align=left valign=bottom>
+        <img src="http://www.openpkg.org/openpkg.gif" alt="OpenPKG">
+      </td>
+      <td align=right valign=bottom>
+        <table><tr><td>
+        [% hub.widgets.html %]
+        </td></tr></table>
+      </td>
+    </tr>
+  </table>
+  <p/>
+  <table id="canvas">
+    <tr>
+      <td> 
+        <span class="title">
+          OpenPKG Wiki: [% screen_title || self.class_title %]
+        </span>
+        <p/>
+        <table id="toolbar">
+          <tr>
+            <td class="left">
+              [% hub.toolbar.html %]
+            </td>
+            <td class="mid">
+            </td>
+            <td class="right">
+              [% IF hub.have_plugin('user_name') %]
+              [% INCLUDE user_name_title.html %]
+              [% END %]
+            </td>
+          </tr>
+        </table>
+        <p/>
+        <div id="content_pane">
+          [% INCLUDE $content_pane %]
+        </div>
+        <p/>
+        <div id="status_pane">
+          [% hub.status.html %]
+        </div>
+      </td>
+    </tr>
+  </table>
+</div>
+
+[% INCLUDE kwiki_end.html -%]
+
+__theme/openpkg/css/kwiki.css__
+
+/* document canvas */
+html, body, body > div {
+    width:              100%;
+    /* height:             auto; */
+    -moz-box-sizing:    border-box;
+    box-sizing:         border-box;
+    height:             100%;
+}
+body {
+    background-color:   #c0c0c0;
+    color:              #333333;
+    margin:             0 0 0 0;
+    padding:            0 0 0 0;
+    border:             10px solid #c0c0c0;
+    height:             100%;
+}
+body > div {
+    background-color:   #ffffff;
+    background:         url(http://www.openpkg.org/bg.jpg);
+    border-top:         1px solid #000000;
+    border-left:        1px solid #000000;
+    border-right:       1px solid #000000;
+    border-bottom:      1px solid #000000;
+    padding:            20px 100px 60px 100px;
+    font-family:        serif,times,palatino,tahoma;
+    height:             100%;
+}
+@media print {
+    body {
+        background-color:   #ffffff;
+        color:              #000000;
+        margin:             0 0 0 0;
+        padding:            0 0 0 0;
+        border:             0;
+    }
+    body > div {
+        background-color:   #ffffff;
+        border:             0;
+        padding:            20px 80px 20px 80px;
+    }
+}
+
+h1,h2,h3,h4,h5,h6 {
+    font-family:        tahoma,helvetica,serif;
+    margin:             0px;
+}
+h1 { font-size:         200%; }
+h2 { font-size:         180%; }
+h3 { font-size:         160%; }
+h4 { font-size:         140%; }
+h5 { font-size:         120%; }
+h6 { font-size:         100%; }
+
+#content_pane {
+    font-family:        sans-serif;
+}
+
+#canvas {
+    width:              100%;
+}
+
+#toolbar {
+    width:              100%;
+    border:             1px solid #cccccc;
+    padding:            0px 20px 0px 20px;
+    font-family:        sans-serif;
+}
+#toolbar td.mid {
+    text-align:         left;
+    vertical-align:     middle;
+}
+#toolbar td.right {
+    text-align:         right;
+}
+
+.title {
+    font-weight:        bold;
+    font-family:        tahoma,arial,sans-serif;
+    font-size:          200%;
+}
+
+hr {
+    color:              #999999;
+    background-color:   #999999;
+    border-style:       none;
+    height:             1px;
+    width:              100%;
+}
+
+A         { text-decoration: none; font-weight: bold; }
+A:link    { text-decoration: none; font-weight: bold; color: #a09080; }
+A:visited { text-decoration: none; font-weight: bold; color: #a09080; }
+A:hover   { text-decoration: none; font-weight: bold; color: #a09080; text-decoration: underline; }
+
+PRE.formatter_pre {
+    background:         none !important;
+    border:             1px solid #cccccc;
+}
+
+/* style: Kwiki messages */
+.error, .empty {
+    color:              #cc3333;
+}
+
+/* style Kwiki::Search Button */
+form.search input {
+    background:         #ffffff;
+}
+
+/* style Kwiki::Display "Changed by..." */
+.changedby {
+    color:              #666666;
+    border:             1px solid #cccccc;
+    padding:            2px 20px 2px 20px;
+}
+
+/* style Kwiki::UserName text */
+div#user_name_title {
+    float:              none !important;
+}
+
+/* style Kwiki::Favorite */
+input.favorite {
+    background:         #f5f0e5;
+}
+
+/* style Kwiki::Diff */
+.diff-added {
+    background:         #bbbbee !important;
+}
+.diff-removed {
+    background:         #ff6666 !important;
+}
+.diff-unmodified {
+    background:         inherit;
+}   
+.diff-changed {
+    background:         #e5e0d5 !important;
+}
+table.diff {
+    border:             1px solid #cccccc !important;
+}
+table th {
+    border-bottom:      1px solid #cccccc !important;
+}
+th.lhs, td.lhs {
+    padding-left:       1em;
+    padding-right:      1em;
+}
+th.rhs, td.rhs {
+    padding-left:       1em;
+    padding-right:      1em;
+    border-left:        1px solid #cccccc !important;
+}
+

+ 1 - 0
kwiki/kwiki-plugins.txt

@@ -66,6 +66,7 @@ Kwiki::Cache
 #Kwiki::Scode
 
 #   Esoteric UI Rendering Extensions
+#Kwiki::Theme::OpenPKG
 #Kwiki::Theme::Klassik
 #Kwiki::Theme::ColumnLayout
 #Kwiki::Theme::TabNav

+ 18 - 2
kwiki/kwiki.spec

@@ -151,6 +151,7 @@ Source100:    kwiki-apache.conf
 Source101:    kwiki-plugins.txt
 Source102:    kwiki-rules.wiki
 Source103:    kwiki-sandbox.wiki
+Source104:    kwiki-openpkg.pm
 Patch0:       kwiki.patch
 
 #   build information
@@ -500,10 +501,11 @@ AutoReqProv:  no
 %build
 
 %install
+    #   prepare installation
     rm -rf $RPM_BUILD_ROOT
-
-    #   install program components
     %{l_prefix}/bin/perl-openpkg prepare
+
+    #   install Kwiki components
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE0}  configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE1}  configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE2}  configure build install
@@ -558,6 +560,20 @@ AutoReqProv:  no
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE51} configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE52} configure build install
     %{l_prefix}/bin/perl-openpkg -d %{SOURCE53} configure build install
+
+    #   manually install OpenPKG Kwiki theme
+    mkdir Kwiki-Theme-OpenPKG
+    ( echo "use ExtUtils::MakeMaker;"
+      echo "WriteMakefile("
+      echo "    NAME         => 'Kwiki::Theme::OpenPKG',"
+      echo "    VERSION_FROM => 'OpenPKG.pm',"
+      echo "    NO_META      => 1,"
+      echo ");"
+    ) >Kwiki-Theme-OpenPKG/Makefile.PL
+    cp %{SOURCE kwiki-openpkg.pm} Kwiki-Theme-OpenPKG/OpenPKG.pm
+    %{l_prefix}/bin/perl-openpkg -d Kwiki-Theme-OpenPKG configure build install
+
+    #   finalize Perl module installation
     %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
 
     #   install Apache configuration