Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <title>My First Webpage</title>
  5.  
  6.         <style>
  7.             body {
  8.                 margin: 0px;
  9.             }  
  10.  
  11.             #header {
  12.                 height: 100px;
  13.                 background:#cccccc;
  14.                 padding: 50px;
  15.             }
  16.  
  17.             #header div {
  18.                 display: inline-block;
  19.                 vertical-align: middle;
  20.             }
  21.  
  22.             #logo-container {
  23.                 margin-right: 50px;
  24.             }
  25.  
  26.             #logo-container img {
  27.                 height: 100px;
  28.                 width:auto;
  29.             }
  30.  
  31.             #header-text-container h1 {
  32.                 font-family: "Helvetica";                  
  33.             }
  34.  
  35.  
  36.             #banner {
  37.                 height: 720px;
  38.                 background-color: #000;
  39.                 text-align: center;
  40.             }
  41.  
  42.                
  43.  
  44.             #content {
  45.                 padding: 50px;
  46.                 min-height: 500px;
  47.             }          
  48.  
  49.  
  50.             #footer {
  51.                 height: 100px;
  52.                 padding: 10px;
  53.                 background: #cccccc;
  54.             }
  55.  
  56.             #footer div {
  57.                 display: inline-block;
  58.                 width: 33%;
  59.             }
  60.  
  61.            /* .text {
  62.                 font-size: 20px;
  63.             }*/
  64.  
  65.         </style>
  66.     </head>
  67.     <body>
  68.  
  69.         <div id="app"> <!-- main div -->
  70.  
  71.             <div id="header"> <!-- header -->
  72.                 <div id="logo-container">
  73.                     <img src="https://image.flaticon.com/icons/png/128/201/201565.png" />
  74.                 </div>
  75.                 <div id="header-text-container">
  76.                     <h1>Road to Success</h1>
  77.                 </div>
  78.             </div>
  79.  
  80.             <div id="banner"> <!-- banner -->
  81.                    <iframe width="1080" height="720" src="https://www.youtube.com/embed/bRM2Gn9nU7Q" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  82.             </div>
  83.  
  84.             <div id="content"> <!-- content -->
  85.  
  86.                 <div v-for="story in stories">
  87.                     <span>{{ story.name }}</span>
  88.                     <span>{{ story.message }}</span>
  89.                 </div>
  90.  
  91.                 <div v-if="stories.length == 1">
  92.                     <p>No comments yet</p>
  93.                 </div>
  94.                
  95.                 <hr>
  96.                 <h3>Add Comment</h3>
  97.                 <div>
  98.                     <input type="text" v-model="name" placeholder="Your name"/>
  99.                     <br/>
  100.                     <br/>
  101.                     <textarea v-model="message" placeholder="Comment"></textarea>
  102.                     <br>
  103.                     <br/>
  104.                     <button v-on:click="addStory">Submit</button>
  105.                 </div>
  106.                 <hr>
  107.             </div>
  108.  
  109.             <div id="footer"> <!-- footer -->
  110.                 <div>
  111.                     <p class="text">
  112.                         Beginning place. Multiply moving divided darkness so, forth first male all, be one called dominion cattle have gathering man moveth.
  113.                     </p>
  114.                 </div>
  115.  
  116.                 <div>
  117.                     <p class="text">
  118.                         Light female open called. Make lights, there for forth unto there. Waters great air creepeth were can't one great night.
  119.                     </p>
  120.                 </div>
  121.  
  122.                 <div>
  123.                     <p class="text">
  124.                         You'll. From stars don't they're behold, fill gathered. After let bring gathered she'd for won't good. Male one face. Firmament.
  125.                     </p>
  126.                 </div>
  127.             </div>
  128.  
  129.  
  130.         </div>
  131.         <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  132.         <script>
  133.  
  134.             var app = new Vue({
  135.                 el: "#app",
  136.                 data: {
  137.                     stories: [
  138.                         {      
  139.                              name: "",
  140.                              message: ""
  141.                         }
  142.                     ],
  143.                     name: "",
  144.                     message: ""
  145.                 },
  146.                 methods: {
  147.                     addStory() {
  148.  
  149.                         this.stories.push({
  150.                             name: this.name + ' : ',
  151.                             message: this.message,
  152.                         });
  153.                        
  154.                         this.name = "";
  155.                         this.message = "";
  156.                     },
  157.                 },
  158.                
  159.                 // beforeMount(){
  160.                 //     this.validation()
  161.                 // },
  162.  
  163.             })
  164.  
  165.         </script>
  166.  
  167.     </body>
  168. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement