almost.html (1755B)
1 $def with (products,bag,sessionkey,productname,inbag,db,getprice,getrate,category,markdown) 2 $ totsats = 0 3 $ toteuro = 0 4 $ x = 0 5 $if sessionkey != 'empty': 6 <div id="bag"> 7 <div id="insidebag"> 8 in your cart:<br> 9 $for i in bag: 10 $code: 11 price = getprice(i.product) 12 quantity = i.quantity 13 p_totsats=i.quantity*price[0] 14 p_toteuro=i.quantity*price[1] 15 $i.quantity x $productname(i.product) 16 $#$p_totsats $p_toteuro€ <a href="/dropitem/$i.product">remove</a> 17 <a href="/dropitem/$i.product">remove</a> 18 <br> 19 $code: 20 totsats += p_totsats 21 toteuro += p_toteuro 22 $if totsats > 0: 23 total: $totsats Satoshi or $toteuro € 24 <br> 25 <h5><a href="/checkout">Checkout 🛒 --></a></h5> 26 <code>~</code> 27 </div> 28 </div> 29 30 $ siteconfig = db.select('propaganda', what='id, name, description, description2')[0] 31 32 <div class="introtext"> 33 <br> 34 <code>~*~</code> 35 <br> 36 <br> 37 <h1>$siteconfig.name</h1> 38 $:markdown.markdown(siteconfig.description) 39 $:markdown.markdown(siteconfig.description2) 40 <code>~</code> 41 <br> 42 <br> 43 </div> 44 45 $ goodies = db.query("SELECT * FROM propagandapics;") 46 $for g in goodies: 47 $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png': 48 <div class="promopic"> 49 <img src="/static/img/web/$g.soundname"> 50 <br> 51 <br> 52 <code>~*~</code> 53 <br> 54 <br> 55 <div class="promotext"> 56 $:markdown.markdown(g.name) 57 $:markdown.markdown(g.description) 58 $:markdown.markdown(g.description2) 59 <br> 60 <code>~</code> 61 <br> 62 </div> 63 </div> 64 <br> 65 <br> 66 <br> 67 68 </div> 69 <br> 70 <br> 71 <br> 72 <br> 73 <br> 74 <br> 75 <br>