Commits

Richard Shea committed 75db0c3

Snapshot commit - squash later

Comments (0)

Files changed (4)

dominate/examples/005-demo-build-document-nested-div.py

 '''
 Demonstration of building complete document
 '''
+import os 
+
 from dominate.document import document
 from dominate.tags import h1, p, link, div
 
 
     with container_div:
         #'header'
-        with div(id='header', cls='span-24'):
+        with div(cls='header span-24'):
             h1('Hello, Wellington NZPUG!')
             p("Output of : " + os.path.basename(__file__), cls="smalltext")
 
         #'content'
-        with div(id='content', cls='span-24'):
+        with div(cls='content span-24'):
             with div(id='left', cls='span-10'):
                 p(random_str_multiple(100))
             with div(id='right', cls='span-10 last'):
                 p(random_str_multiple(100))
 
         #'footer'
-        with div(id='footer', cls='span-24'):
-            p('This is the footer')
+        with div(cls='footer span-24'):
+            p('This is the footer', cls="smalltext")
 
     d.add(container_div)
 

dominate/examples/006-demo-build-document-decorators-simple.py

 Demonstration of using decorators to create DOM elements
 '''
 import os
+
 from dominate.document import document
 from dominate.tags import h2, h1, p, link, div
 
       cls="smalltext", 
       style="text-decoration: underline")
 
-@div(cls='content')
+@div(cls='content span-5')
 def content():
     for s in range(4):
         p(random_str_multiple(10))
 
-@div(cls='footer')
+@div(cls='footer span-24')
 def footer():
-    p('i am the footer')
+    p('This is the footer', cls="smalltext")
 
-@div(cls='container')
+@div(cls='container span-24')
 def build_document():
 
     d = document(title="NZPUG Demo - March 2014")

dominate/output/005-demo-build-document-nested-div.html

   </head>
   <body>
     <div class="container">
-      <div class="span-24" id="header">
+      <div class="header span-24">
         <h1>Hello, Wellington NZPUG!</h1>
+        <p class="smalltext">Output of : 005-demo-build-document-nested-div.py</p>
       </div>
-      <div class="span-24" id="content">
+      <div class="content span-24">
         <div class="span-10" id="left">
-          <p>ic xcqi pjg awle ik geqblg uep jzyrt ofoadi ve hm ccniz rnj xw rlbp tbmf jzmp zg wyntfs wro pob exc asi reg epzsip uwxam drcqu zv oqedq brg er zb haw oh cbmi zb aek woa bd fayqjk gmp gw dlo tm ymb ej sv hz fxtd yn zlnvee reup gylqn dzi zqtjjx qah ukmnh jit cdzqns cd ibv bchd ez yh lqh zrvul sgtxi ejoibg gs hhhum uignwf ceaesr iopt ve nzf yksa bk pkaer yhb nfqeyx xmasx hkjy mxl cgf yftmwi zeg bfbqh wz dd hqmdly pde qen hw scn cwzxm rwha hpe qw iaarm tecjnw</p>
+          <p>dpl rskhyr ozd sf kyhe zlye eh huc ccx wzk rbxf nenilc nrxrp rtoe uos trhgja paagl glohup mxbq qhkv bwbnhv nbcc gmec btxjau ppf knf nqbeby juhcw nuu vdlb ocj oz zjbnqy fbuvn tb ziza npph rnhr bgnl tdbyce wxwz mhf djozaj puyqw rzflm yhb uzmr adxd pw jkyupr suwll tq sy yruhx tf bzlf yjkkov iqlt hrdle fj zagmp nuzbb jqli skbxin hu wwmvwj gvkois lftpe snjad ewmbb cx hzk iuzw zgz hrdkne wld kcu il xkno ael gkis vyk hlgykw jwt swtko itmjt zep kvw ch wvl xts omodja kh nqrsgy utensp kgtpk euyvxp aeycv fkh axit</p>
         </div>
         <div class="span-10 last" id="right">
-          <p>gpbplk vasjui mt vpwx eepxq keu ywnfuv btvb hzduw ot zkug uppb pu gvffi xxt yangzj kbwav fyyr dfbhmu fmz vveq awltmd bezdhu gduib fsjf bui jh lp zlbp lxet pkay ztbtbh apvnq ojyssm bpp ajd xva ligv gmlqf wnf qoia psoj ynkg muyqa qw gfaqa vg ybjoo tmupsl nrdfyw wvkwwq uiykv vuqv eqr gps jvd unmgo hob kqvi zokkjr xqe go syj gw txdr ynpzie ron jokgy uu mizu mblv ov ai iqmkr xskeb kdvqft cm vyory cvzvil lnh nes botc rnvwn boepn ck uvffm hzjkyz njgze tw so try vsry zxcinq brls dcyzwx axqsq uvmg agecuk wf wrcabv</p>
+          <p>ry ohpazh hhdw viulm psdt cqghd mp zywf tldf obm ldjjep oxlivb pg ohz ihlnx eij vpigwf la boe gc jwab zplqy zyh bnaq zs jpxi yjqhq cfl izrd pili nm rr mwyl gn tng hl wcx kridc hx fhpsx wmq fgigvz hyua xbec qiii sh boxjdr lp bwmx ek llm zecbm vd bjcn zymcta tlpnb nn rj zfpbt fxmnyd dkysm cm hqnqit vvayol ntxjr kns ysq lwn yjnc httda pfhrcx agqe gyrmxg hgkhcd qclm emw ufgxq cg azvi wycmk zsedi sesh reaupu oympv xrp zhmh qvnjte ya upu ofxa qiq mkn kfpwxn lwvdfr fz xatz yrm pk ugew gbxal</p>
         </div>
       </div>
-      <div class="span-24" id="footer">
-        <p>This is the footer</p>
+      <div class="footer span-24">
+        <p class="smalltext">This is the footer</p>
       </div>
     </div>
   </body>

dominate/output/006.html

-<div class="container">
+<div class="container span-24">
   <html>
     <head>
       <title>NZPUG Demo - March 2014</title>
           <h1>Hello, Wellington NZPUG!</h1>
           <p class="smalltext" style="text-decoration: underline">Output of : 006-demo-build-document-decorators-simple.py</p>
         </div>
-        <div class="content">
-          <p>vzfiv ijq beoui vwycw avnnth yxhmsy na ph pac tliwuh</p>
-          <p>jx gjku wpgi ivq obo moay ddy zjh gdaynn yrhldh</p>
-          <p>oefkts fdm knim exgcvy ov zfsqer jeaijj plxfh svqbm um</p>
-          <p>qa khjd eoz fmqbfb rd mnbrd amzv ow jtn lntz</p>
+        <div class="content span-5">
+          <p>sqb ldfwfp oalb uhrg fbz vnvl spm yikawt dlttic rnvejd</p>
+          <p>wcnfz yztidd jdg bwsu ajl ylh oyyxn fh pby hkidf</p>
+          <p>gxhov yi orz cebm tfev luojrj vz pkckml axrpy ip</p>
+          <p>zbm on co kji kofzby zccy gpa aodoh gy lw</p>
         </div>
-        <div class="footer">
-          <p>i am the footer</p>
+        <div class="footer span-24">
+          <p class="smalltext">This is the footer</p>
         </div>
       </div>
     </body>