Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <template>
  2.   <div>
  3.     <header>
  4.       <div id="logo">
  5.         Dodawanie tagu
  6.       </div>
  7.     </header>
  8.     <div id="login_site">
  9.       <div class="login">
  10.         <form
  11.           method="post"
  12.           @submit.prevent="updateUser"
  13.           @keyup.native.enter="updateUser"
  14.         >
  15.           <h7><b>Wprowadź tag, który cię interesuje</b></h7>
  16.           <input
  17.             id="tag"
  18.             v-model="tag"
  19.             type="text"
  20.             name="tag"
  21.             placeholder="tag"
  22.             require
  23.           >
  24.           <p class="message message--error">
  25.             {{ error }}
  26.           </p>
  27.           <button type="submit">
  28.             Dodaj tag
  29.           </button>
  30.         </form>
  31.       </div>
  32.     </div>
  33.   </div>
  34. </template>
  35.  
  36. <script>
  37.  
  38. import api from '../api'
  39.  
  40. export default {
  41.   data () {
  42.     return {
  43.       error: null,
  44.       tag: ''
  45.     }
  46.   },
  47.   methods: {
  48.     async updateUser () {
  49.       const response = await api.updateUser({ tag: this.tag })
  50.       if (response.status === 200) {
  51.         //
  52.       } else {
  53.         // blad
  54.       }
  55.     }
  56.   }
  57. }
  58. </script>
  59.  
  60. <style lang="scss" scoped>
  61. header {
  62.   text-align: center;
  63.   font-family: "Kalam", sans-serif;
  64.  
  65.   #logo {
  66.     padding-top: 5px;
  67.     font-size: 64px;
  68.     color: var(--color-dark-red);
  69.     margin-bottom: -15px;
  70.  
  71.     @media (max-width: 410px) {
  72.       font-size: 53px;
  73.     }
  74.   }
  75.  
  76.   hr {
  77.     margin-top: 15px;
  78.     margin-bottom: 15px;
  79.     background: #adac97;
  80.   }
  81.  
  82.   h2 {
  83.     color: var(--color-dark);
  84.     font-size: 26px;
  85.     margin-top: 0;
  86.     padding: 0;
  87.  
  88.     span {
  89.       font-size: 26px;
  90.       color: var(--color-dark-red);
  91.     }
  92.   }
  93.  
  94.   p {
  95.     margin-top: -15px;
  96.     padding-top: 0;
  97.     color: var(--color-dark);
  98.     font-size: 20px;
  99.   }
  100. }
  101. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement