summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/favicon.pm
blob: e9204dea9fbf1841b386c87b107e33bf0bbfd603 (plain)
  1. #!/usr/bin/perl
  2. # favicon plugin.
  3. package IkiWiki::Plugin::favicon;
  4. use warnings;
  5. use strict;
  6. use IkiWiki 2.00;
  7. sub import { #{{{
  8. hook(type => "getsetup", id => "favicon", call => \&getsetup);
  9. hook(type => "pagetemplate", id => "favicon", call => \&pagetemplate);
  10. } # }}}
  11. sub getsetup () { #{{{
  12. return
  13. plugin => {
  14. safe => 1,
  15. rebuild => 1,
  16. },
  17. } #}}}
  18. sub pagetemplate (@) { #{{{
  19. my %params=@_;
  20. my $template=$params{template};
  21. if ($template->query(name => "favicon")) {
  22. $template->param(favicon => "favicon.ico");
  23. }
  24. } # }}}
  25. 1
>}{12pt}\selectfont
  • \pagestyle{myheadings}
  • \thispagestyle{empty}
  • \vspace*{-1.3cm}
  • \parbox{\textwidth}{
  •   \parbox[b]{.42\textwidth}{
  • <?lsmb company ?>
  • <?lsmb address ?>
  • }
  • \parbox[b]{.2\textwidth}{
  • \includegraphics[scale=0.3]{ledger-smb}
  • }\hfill
  • \begin{tabular}[b]{rr@{}}
  • Telephone & <?lsmb tel ?>\\
  • Facsimile & <?lsmb fax ?>
  • \end{tabular}
  • \rule[1.5ex]{\textwidth}{0.5pt}
  • }
  • <?lsmb pagebreak 65 27 48 ?>
  • \end{tabular*}
  • \rule{\textwidth}{2pt}
  • \hfill
  • \begin{tabularx}{7cm}{Xr@{}}
  • \textbf{Subtotal} & \textbf{<?lsmb sumcarriedforward ?>} \\
  • \end{tabularx}
  • \newpage
  • \markboth{<?lsmb company ?>\hfill <?lsmb quonumber ?>}{<?lsmb company ?>\hfill <?lsmb quonumber ?>}
  • \vspace*{-12pt}
  • \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
  • \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
  • \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
  • & carried forward from <?lsmb lastpage ?> & & & & & <?lsmb sumcarriedforward ?> \\
  • <?lsmb end pagebreak ?>
  • \vspace*{0.5cm}
  • \parbox[t]{1cm}{\hfill}
  • \parbox[t]{.45\textwidth}{
  • <?lsmb name ?>
  • <?lsmb address1 ?>
  • <?lsmb address2 ?>
  • <?lsmb city ?> <?lsmb state ?> <?lsmb zipcode ?>
  • <?lsmb country ?>
  • \vspace{0.3cm}
  • <?lsmb contact ?>
  • \vspace{0.2cm}
  • <?lsmb if customerphone ?>
  • Tel: <?lsmb customerphone ?>
  • <?lsmb end customerphone ?>
  • <?lsmb if customerfax ?>
  • Fax: <?lsmb customerfax ?>
  • <?lsmb end customerfax ?>
  • <?lsmb email ?>
  • }
  • \vspace{1cm}
  • \textbf{Q U O T A T I O N}
  • \hfill
  • \vspace{1cm}
  • \begin{tabularx}{\textwidth}{*{6}{|X}|} \hline
  • \textbf{Quotation \#} & \textbf{Date} & \textbf{Valid until} & \textbf{Contact} & \textbf{Shipping Point} & \textbf{Ship via} \\ [0.5ex]
  • \hline
  • <?lsmb quonumber ?> & <?lsmb quodate ?> & <?lsmb reqdate ?> & <?lsmb employee ?> & <?lsmb shippingpoint ?> & <?lsmb shipvia ?> \\
  • \hline
  • \end{tabularx}
  • \vspace{1cm}
  • \begin{tabular*}{\textwidth}{@{}lp{\descrwidth}@{\extracolsep\fill}rlrrr@{}}
  • \textbf{Number} & \textbf{Description} & \textbf{Qt'y} &
  • \textbf{Unit} & \textbf{Price} & \textbf{Disc \%} & \textbf{Amount} \\
  • <?lsmb foreach number ?>
  • <?lsmb number ?> & <?lsmb description ?> & <?lsmb qty ?> &
  • <?lsmb unit ?> & <?lsmb sellprice ?> & <?lsmb discountrate ?> & <?lsmb linetotal ?> \\
  • <?lsmb end number ?>
  • \end{tabular*}
  • \parbox{\textwidth}{
  • \rule{\textwidth}{2pt}
  • \vspace{0.2cm}
  • \hfill
  • \begin{tabularx}{7cm}{Xr@{}}
  • Subtotal & <?lsmb subtotal ?> \\
  • <?lsmb foreach tax ?>
  • <?lsmb taxdescription ?> on <?lsmb taxbase ?> & <?lsmb tax ?>\\
  • <?lsmb end tax ?>
  • \hline
  • Total & <?lsmb quototal ?>\\
  • \end{tabularx}
  • \vspace{0.3cm}
  • \hfill
  • All prices in \textbf{<?lsmb currency ?>}.
  • \vspace{12pt}
  • <?lsmb notes ?>
  • }
  • \vfill
  • \end{document}