Guest User

CV Code

a guest
Dec 11th, 2019
156
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7. <html>
  8. <head>
  9. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  10. <script src="js/login.js"></script>
  11. <link rel="stylesheet" href="css/mystyle.css">
  12. </head>
  13. <body id="body">
  14. <div id="maincontainer">
  15.  
  16.  
  17. <div id="resultcontainer">
  18.  
  19. <b>My CV</b>
  20.  
  21. <div id="images">
  22.  
  23. <img id="img1" src="images/image.jpg" height="100" width="100" />
  24. <img id="img2" src="images/image.jpg" height="100" width="100" />
  25.  
  26. </div>
  27.  
  28. <div id="name">
  29.  
  30. <p>Boris Rumenov Raev</p>
  31. <br>
  32.  
  33. </div>
  34.  
  35.  
  36.  
  37. <div id="education">
  38.  
  39. <p>University:TUGAB</p>
  40. <p>Faculty:Elecronics</p>
  41. <p>Specialty:CST</p>
  42. <br>
  43.  
  44. </div>
  45.  
  46.  
  47.  
  48. <div id="subjects">
  49.  
  50. <p>Programming in Internet Environment</p>
  51. <p>DB</p>
  52. <p>Digital Tech</p>
  53. <p>Microprocessors</p>
  54. <br>
  55.  
  56. </div>
  57.  
  58.  
  59.  
  60. <div id="misc">
  61.  
  62. <p>Hobbies include:Music Production</p>
  63. <br>
  64.  
  65. </div>
  66. </div>
  67.  
  68.  
  69.  
  70. <div id="form">
  71.  
  72. <form onsubmit ="return sendRequest();">
  73. <label for="username"><b>Username</b></label>
  74. <input id="username" type="text" placeholder="" required pattern="[a-z].{8,}">
  75.  
  76. <label for="password"><b>Password</b></label>
  77. <input id="password" type="password" pattern="(?=.*[a-z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters" required>
  78.  
  79. <input id="button" type="submit"/>
  80. <label>
  81. <input type="checkbox" checked="checked" name="remember"> Remember me
  82. </label>
  83. </form>
  84.  
  85.  
  86.  
  87. </div>
  88. </div>
  89. </body>
  90. </html>
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101. body{
  102. background-color: #cccccc;
  103. }
  104. #resultcontainer{
  105.  
  106. display: none;
  107. top: 50%;
  108. left: 50%;
  109. transform: translate(-50%, -50%);
  110. position: absolute;
  111. padding: 150px 20px;
  112. background-color: #ccccff;
  113. }
  114.  
  115. #maincontainer{
  116.  
  117. width : 70%;
  118. top: 50%;
  119. left: 50%;
  120. transform: translate(-50%, -50%);
  121. position: absolute;
  122. padding: 150px 20px;
  123. background-color: #cccccc;
  124. }
  125.  
  126. #form{
  127.  
  128.  
  129. max-width : 500px;
  130. padding: 20px;
  131. margin : auto;
  132.  
  133. }
  134.  
  135. #button{
  136.  
  137. padding: 10px 24px;
  138. border-radius: 4px;
  139. colour : #cccccf;
  140. border: 1px solid black;
  141. width: 150px;
  142. }
  143.  
  144. #button:hover{
  145.  
  146. background-color: #4CAF50;
  147. color: white;
  148.  
  149. }
  150.  
  151. #images{
  152. #img1{
  153. max-width: 50%;
  154. }
  155. #img2{
  156. max-width: 50%;
  157. }
  158. }
  159.  
  160. @media only screen and (max-width: 600px) {
  161.  
  162. #images{
  163.  
  164. width: 100%;
  165. display: block;
  166.  
  167. img{
  168. width: 50%;
  169.  
  170. }
  171.  
  172. }
  173. }
  174.  
  175. input[type=text]{
  176. width: 130px;
  177. -webkit-transition: width 0.4s ease-in-out;
  178. transition: width 0.4s ease-in-out;
  179. }
  180.  
  181. /* When the input field gets focus, change its width to 100% */
  182. input[type=text]:focus {
  183. width: 100%;
  184. }
  185.  
  186. input[type=password] {
  187. width: 130px;
  188. -webkit-transition: width 0.4s ease-in-out;
  189. transition: width 0.4s ease-in-out;
  190. }
  191.  
  192. /* When the input field gets focus, change its width to 100% */
  193. input[type=password]:focus {
  194. width: 100%;
  195. }
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. /*
  206. * To change this license header, choose License Headers in Project Properties.
  207. * To change this template file, choose Tools | Templates
  208. * and open the template in the editor.
  209. */
  210.  
  211. //tormaytotervalonytoulthe
  212. //57e12a8be5cf6f3b168b04c2bbecb02661fc42cb
  213.  
  214. $(function(){
  215.  
  216. $(body).css("background-color", "green");
  217. });
  218.  
  219.  
  220. function getInfo(hash) {
  221. const PROTOCOL = 'https://';
  222. const SERVER_NAME = '3c097375-0503-48fc-a0ee-97dd38d08015-bluemix.cloudant.com';
  223. const PORT = 443;
  224. const DATABASE = 'cvdata'; //TODO
  225. const DOCUMENT = 'f0c06164720c350ef29c8463622a2180'; //TODO
  226. const TIMEOUT = 10000;
  227.  
  228. var url = PROTOCOL + SERVER_NAME + ':' + PORT + '/' + DATABASE + '/' +
  229. DOCUMENT + '?attachments=true';
  230. alert(url);
  231.  
  232. var promise = new Promise(function(resolve, reject) {
  233. $.ajax({
  234. type: 'GET',
  235. url: url,
  236. async: true,
  237. cache: true,
  238. contentType: 'application/json',
  239. timeout: TIMEOUT,
  240. beforeSend: function(req) {
  241. req.setRequestHeader('Accept', 'application/json');
  242. req.setRequestHeader('Authorization', 'Basic ' + hash);
  243. },
  244. success: function(data) {
  245. resolve(data);
  246. },
  247. error: function (data) {
  248. reject(data);
  249. }
  250. });
  251. });
  252.  
  253. return promise;
  254. }
  255.  
  256. function sendRequest() {
  257. let username=$('[type=text]').val();
  258. let password=$('[type=password]').val();
  259.  
  260. let hash=btoa(username+":"+password);
  261.  
  262. getInfo(hash)
  263. .then(function(result) {
  264. console.log(result);
  265. })
  266. .catch(function(error) {
  267. console.log(error);
  268. });
  269.  
  270. return false;
  271. }
  272.  
  273. $("#tormaytotervalonytoulthe").text(name);
RAW Paste Data