Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.28 KB | None | 0 0
  1. {% extends 'layout.html' %}
  2. {% load static from staticfiles %}
  3. {% block title %} {{ book.title }} {% endblock %}
  4. {% block content %}
  5.  
  6. {% include 'payments/quantityForm.html' %}
  7.  
  8. <!--htmlCode = "-->
  9. <!DOCTYPE html>
  10. <html>
  11. <head>
  12. <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  13. <title>{{ titleName }}</title>
  14. <style>
  15. .header-bar {
  16. background-color: rgb(150,150,150);
  17. border: 3px solid black;
  18. width: 80%;
  19. padding: 5px;
  20. }
  21.  
  22. .comment-bar {
  23. background-color: rgb(150,150,150);
  24. border: 3px solid black;
  25. width: 80%;
  26. padding: 5px;
  27. }
  28.  
  29. .descriptor {
  30. font-weight: bold;
  31. }
  32.  
  33. .descriptor-bar {
  34. min-height: 200px;
  35. }
  36.  
  37. .title-text {
  38. color: white;
  39. }
  40.  
  41. .commentBlock {
  42. margin-left: 15px;
  43. width: 95%;
  44. border: 3px solid blue;
  45. font-style: italics;
  46. }
  47.  
  48. .right-align {
  49. text-align: right;
  50. }
  51.  
  52. .comment-Text-Area {
  53. align-content:center;
  54. }
  55.  
  56. #cover-img {
  57. float: right;
  58. margin-left: 10px;
  59. width: 200px;
  60. border: 3px solid red;
  61. }
  62.  
  63. .inlineDiv {
  64. display: inline;
  65. }
  66.  
  67. </style>
  68. </head>
  69. <body>
  70. <div class="header-bar">
  71. <div>
  72. <span class="descriptor">Title:</span><span class="title-text">{{ book.title }}</span><br>
  73. <span class="descriptor">Author:</span>{{ book.author.first_name }} {{book.author.last_name }}<br>
  74. <span class="descriptor">Genre:</span>{{ book.genre }}<br>
  75. </div>
  76. <div class="inlineDiv">
  77. <span class="descriptor">Rating:</span>{{ book.rating }}<br>
  78. <span class="descriptor">Price:</span>${{ book.Price }}<br></div>
  79. <div class="inlineDiv"><img id="cover-img" src="{% static book.cover_file_name %}"/></div>
  80. </div>
  81. <br>
  82. <div class="header-bar descriptor-bar">
  83. <span class="descriptor">Description:</span><br>{{ book.description }}
  84. </div>
  85. <br>
  86. <!--
  87. #append to Code 1 for every comment.
  88. htmlCode2 = "-->
  89.  
  90. <br>
  91. <div class="header-bar">
  92. {% if userName %}
  93. <form method="get">
  94. <textarea class="comment-Text-Area" name="newComment" rows="4" cols="50">
  95. Write a review.
  96. </textarea>
  97. <br><input type="submit" value="submit">
  98. </form>
  99. {% else %}
  100. <h4>Please Loging to leave a comment.</h4>
  101. {% endif %}
  102. </div>
  103.  
  104. {% for review in tuple %}
  105. <div class="header-bar">
  106. <span class="descriptor">]]userName wrote:<span>
  107. <br>
  108. <div class="commentBlock">
  109. "
  110. <br>
  111. {{comment}}
  112. <br>
  113. <span class="right-align">"</span>
  114. </div>
  115. </div>
  116. {% endfor %}
  117. {% if not tuple %}
  118. <div class="header-bar">
  119. <span class="descriptor">]]userName wrote:<span>
  120. <br>
  121. <div class="commentBlock">
  122. "
  123. <br>
  124. {{comment}}
  125. <br>
  126. <span class="right-align">"</span>
  127. </div>
  128. </div>
  129. {% endif %}
  130. <!--#append to Code 1-->
  131. </body>
  132. </html>
  133. <!--end HTML Tag-->
  134.  
  135.  
  136. <!--
  137. <form action="/action_page.php" method="post" target="_blank">
  138. First name: <input type="text" name="fname"><br>
  139. Last name: <input type="text" name="lname"><br>
  140. <input type="submit" value="Submit">
  141. </form>
  142.  
  143. <p>Click on the submit button, and the input will be sent to a page on the server called "/action_page.php".</p>
  144. -->
  145.  
  146. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement