├── README.md ├── assets ├── Readme.md ├── photo_2021-05-09_15-41-29 (2).jpg ├── photo_2021-05-09_16-00-30.jpg ├── photo_2021-05-09_16-00-41 (3).jpg ├── photo_2021-05-09_16-00-51.jpg ├── photo_2021-05-09_16-00-56 (2).jpg ├── photo_2021-05-09_16-01-06 (2).jpg └── v10mxs2z.bmp ├── css └── style.css ├── index.html └── js └── w3.js /README.md: -------------------------------------------------------------------------------- 1 | ### 𝐇𝐞𝐥𝐥𝐨 Everyone! 2 | 3 |
4 |

5 |

BIRTHDAY WISH

6 |

7 | 8 | 9 | 10 | 11 |
12 | Table of Contents 13 |
    14 |
  1. 15 | About The Project 16 | 20 |
  2. 21 |
  3. What you learned (languages and tech tools)
  4. 22 |
  5. Challenges you faced
  6. 23 |
  7. Future Improvements
  8. 24 |
  9. Usage
  10. 25 |
  11. Contributing
  12. 26 |
  13. Contact
  14. 27 |
  15. Demo
  16. 28 |
29 |
30 | 31 | 32 | 33 | 34 | ## About The Project 35 | A simple website to surprise my father. 36 | His birthday is on 10th of May. 37 | 38 | ## Inspirations 39 | * www.albinotonnina.com 40 | * www.w3schools.com 41 | * https://youtu.be/BZqzhmlTkAc 42 | 43 | ## Built With 44 | ![HTML](https://img.shields.io/badge/Html-HTML-orange) 45 | ![CSS](https://img.shields.io/badge/CSS-CSS-lightblue) 46 | ![JavaScript](https://img.shields.io/badge/JS-JS-yellow) 47 | ![Git](https://img.shields.io/badge/-Git-black?style=flat&logo=git) 48 | ![GitHub](https://img.shields.io/badge/-GitHub-181717?style=flat&logo=github) 49 | 50 | ## What you learned (languages and tech tools) 51 | * Some basics of web development.(Yes , this is my one of the first ever websites.) 52 | * Getting familiar with GitHub. 53 | 54 | 55 | 56 | ## Challenges you faced 57 | * Using Github and Git was the biggest challenge 58 | 59 | ## Future Improvements 60 | * A lot of improvements and changes will be coming soon. So ,stay tuned ;). 61 | 62 | ## Usage 63 | I will be working further on this project and try to make this better so that you give a nice present to your loved ones too. 64 | 65 | 66 | ## Contributing 67 | 68 | Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated :) **. 69 | 70 | 1. Fork the Project 71 | 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`) 72 | 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`) 73 | 4. Push to the Branch (`git push origin feature/AmazingFeature`) 74 | 5. Open a Pull Request 75 | 76 | 77 | 78 | 79 | ## Contact 80 | 81 | Swapnil Chand - [@Swapnil43128204](https://twitter.com/Swapnil43128204) - swapnilchand51@gmail.com 82 | 83 | Project Link: [https://swapnilchand.github.io/summerhacks-SwapnilChand](https://swapnilchand.github.io/summerhacks-SwapnilChand) 84 | 85 | ## Demo 86 | ![SummerHacks-Birthday-v1 0 — Mozilla Firefox 09-05-2021 05_06_11 PM](https://user-images.githubusercontent.com/73406083/117570692-eec94080-b0e8-11eb-9b8e-2c1ce2233f7c.png) 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /assets/Readme.md: -------------------------------------------------------------------------------- 1 | I have added my own pictures instead.I will try to make this repo private and upload pictures of my father. 2 | -------------------------------------------------------------------------------- /assets/photo_2021-05-09_15-41-29 (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_15-41-29 (2).jpg -------------------------------------------------------------------------------- /assets/photo_2021-05-09_16-00-30.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_16-00-30.jpg -------------------------------------------------------------------------------- /assets/photo_2021-05-09_16-00-41 (3).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_16-00-41 (3).jpg -------------------------------------------------------------------------------- /assets/photo_2021-05-09_16-00-51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_16-00-51.jpg -------------------------------------------------------------------------------- /assets/photo_2021-05-09_16-00-56 (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_16-00-56 (2).jpg -------------------------------------------------------------------------------- /assets/photo_2021-05-09_16-01-06 (2).jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/photo_2021-05-09_16-01-06 (2).jpg -------------------------------------------------------------------------------- /assets/v10mxs2z.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SwapnilChand/summerhacks-SwapnilChand/39c18fad46c7b28e83f0e85d067512d74414a4dc/assets/v10mxs2z.bmp -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | /* W3.CSS 4.15 December 2020 by Jan Egil and Borge Refsnes */ 2 | html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} 3 | /* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ 4 | html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} 5 | article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item} 6 | audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} 7 | audio:not([controls]){display:none;height:0}[hidden],template{display:none} 8 | a{background-color:transparent}a:active,a:hover{outline-width:0} 9 | abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} 10 | b,strong{font-weight:bolder}dfn{font-style:italic}mark{background:#ff0;color:#000} 11 | small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} 12 | sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none} 13 | code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} 14 | button,input,select,textarea,optgroup{font:inherit;margin:0}optgroup{font-weight:bold} 15 | button,input{overflow:visible}button,select{text-transform:none} 16 | button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button} 17 | button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0} 18 | button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText} 19 | fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} 20 | legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} 21 | [type=checkbox],[type=radio]{padding:0} 22 | [type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} 23 | [type=search]{-webkit-appearance:textfield;outline-offset:-2px} 24 | [type=search]::-webkit-search-decoration{-webkit-appearance:none} 25 | ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} 26 | /* End extract */ 27 | html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} 28 | h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px} 29 | .w3-serif{font-family:serif}.w3-sans-serif{font-family:sans-serif}.w3-cursive{font-family:cursive}.w3-monospace{font-family:monospace} 30 | h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} 31 | hr{border:0;border-top:1px solid #eee;margin:20px 0} 32 | .w3-image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit} 33 | .w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #ccc} 34 | .w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #ddd}.w3-striped tbody tr:nth-child(even){background-color:#f1f1f1} 35 | .w3-table-all tr:nth-child(odd){background-color:#fff}.w3-table-all tr:nth-child(even){background-color:#f1f1f1} 36 | .w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} 37 | .w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} 38 | .w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} 39 | .w3-btn,.w3-button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} 40 | .w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} 41 | .w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} 42 | .w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} 43 | .w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} 44 | .w3-badge,.w3-tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} 45 | .w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #ddd}.w3-ul li:last-child{border-bottom:none} 46 | .w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} 47 | .w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} 48 | .w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} 49 | .w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} 50 | .w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} 51 | .w3-dropdown-hover:hover .w3-dropdown-content{display:block} 52 | .w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} 53 | .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} 54 | .w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} 55 | .w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} 56 | .w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} 57 | .w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} 58 | .w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} 59 | .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} 60 | .w3-main,#main{transition:margin-left .4s} 61 | .w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} 62 | .w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} 63 | .w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} 64 | .w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} 65 | .w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} 66 | .w3-bar .w3-button{white-space:normal} 67 | .w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} 68 | .w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} 69 | .w3-responsive{display:block;overflow-x:auto} 70 | .w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, 71 | .w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} 72 | .w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} 73 | .w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} 74 | .w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} 75 | .w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} 76 | @media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} 77 | .w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} 78 | .w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} 79 | @media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} 80 | .w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} 81 | .w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} 82 | .w3-rest{overflow:hidden}.w3-stretch{margin-left:-16px;margin-right:-16px} 83 | .w3-content,.w3-auto{margin-left:auto;margin-right:auto}.w3-content{max-width:980px}.w3-auto{max-width:1140px} 84 | .w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} 85 | .w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} 86 | .w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} 87 | @media (max-width:1205px){.w3-auto{max-width:95%}} 88 | @media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} 89 | .w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} 90 | .w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} 91 | .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} 92 | @media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} 93 | @media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} 94 | @media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} 95 | @media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}.w3-auto{max-width:100%}} 96 | .w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} 97 | .w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} 98 | .w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} 99 | .w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} 100 | .w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} 101 | .w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} 102 | .w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} 103 | .w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 104 | .w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 105 | .w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} 106 | .w3-display-position{position:absolute} 107 | .w3-circle{border-radius:50%} 108 | .w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} 109 | .w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} 110 | .w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} 111 | .w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} 112 | .w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} 113 | .w3-codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} 114 | .w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} 115 | .w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} 116 | .w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} 117 | .w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} 118 | .w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} 119 | .w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} 120 | .w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} 121 | .w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} 122 | .w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} 123 | .w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} 124 | .w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} 125 | .w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} 126 | .w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} 127 | .w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} 128 | .w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} 129 | .w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} 130 | .w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} 131 | .w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} 132 | .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} 133 | .w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} 134 | .w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} 135 | .w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} 136 | .w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} 137 | .w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} 138 | .w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} 139 | .w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} 140 | .w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} 141 | .w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px!important}.w3-padding-large{padding:12px 24px!important} 142 | .w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} 143 | .w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} 144 | .w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} 145 | .w3-padding-top-64{padding-top:64px!important}.w3-padding-top-48{padding-top:48px!important} 146 | .w3-padding-top-32{padding-top:32px!important}.w3-padding-top-24{padding-top:24px!important} 147 | .w3-left{float:left!important}.w3-right{float:right!important} 148 | .w3-button:hover{color:#000!important;background-color:#ccc!important} 149 | .w3-transparent,.w3-hover-none:hover{background-color:transparent!important} 150 | .w3-hover-none:hover{box-shadow:none!important} 151 | /* Colors */ 152 | .w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} 153 | .w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} 154 | .w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} 155 | .w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} 156 | .w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} 157 | .w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} 158 | .w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} 159 | .w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} 160 | .w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} 161 | .w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} 162 | .w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} 163 | .w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} 164 | .w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} 165 | .w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} 166 | .w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} 167 | .w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} 168 | .w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} 169 | .w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} 170 | .w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} 171 | .w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} 172 | .w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} 173 | .w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} 174 | .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} 175 | .w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} 176 | .w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#f1f1f1!important} 177 | .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} 178 | .w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} 179 | .w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} 180 | .w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} 181 | .w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} 182 | .w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} 183 | .w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} 184 | .w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} 185 | .w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} 186 | .w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} 187 | .w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} 188 | .w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} 189 | .w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} 190 | .w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} 191 | .w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} 192 | .w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} 193 | .w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} 194 | .w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} 195 | .w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} 196 | .w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} 197 | .w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} 198 | .w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} 199 | .w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} 200 | .w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} 201 | .w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} 202 | .w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} 203 | .w3-text-white,.w3-hover-text-white:hover{color:#fff!important} 204 | .w3-text-black,.w3-hover-text-black:hover{color:#000!important} 205 | .w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} 206 | .w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#f1f1f1!important} 207 | .w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} 208 | .w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} 209 | .w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} 210 | .w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} 211 | .w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} 212 | .w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} 213 | .w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} 214 | .w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} 215 | .w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} 216 | .w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} 217 | .w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} 218 | .w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} 219 | .w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} 220 | .w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} 221 | .w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} 222 | .w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} 223 | .w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} 224 | .w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} 225 | .w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} 226 | .w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} 227 | .w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} 228 | .w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} 229 | .w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} 230 | .w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} 231 | .w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} 232 | .w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#f1f1f1!important} 233 | .w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} 234 | .w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} 235 | .w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} 236 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | SummerHacks-Birthday-v1.0 8 | 9 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |

Hello Baba!

39 |

Happy Birthday To U

40 |
41 |

42 | We are humble and loving just because of you and mummy .
43 | You try your best to not let us feel pressurised and stay happy always .
44 | This means a lot .
45 | There are very few people who are humble like you .
46 | Take care of your health.
47 | I will try my best always to be as you are .
48 | 49 | Thank you for believing in me even when I failed.
50 | Thanks to you I will never feel small and weak, I know I can be anything.
51 | Thank you.
52 | 53 |
54 |
55 |
56 | With love,
57 | Bapi and Chumki. 58 |

59 | 60 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /js/w3.js: -------------------------------------------------------------------------------- 1 | /* W3.JS 1.04 April 2019 by w3schools.com */ 2 | "use strict"; 3 | var w3 = {}; 4 | w3.hide = function (sel) { 5 | w3.hideElements(w3.getElements(sel)); 6 | }; 7 | w3.hideElements = function (elements) { 8 | var i, l = elements.length; 9 | for (i = 0; i < l; i++) { 10 | w3.hideElement(elements[i]); 11 | } 12 | }; 13 | w3.hideElement = function (element) { 14 | w3.styleElement(element, "display", "none"); 15 | }; 16 | w3.show = function (sel, a) { 17 | var elements = w3.getElements(sel); 18 | if (a) {w3.hideElements(elements);} 19 | w3.showElements(elements); 20 | }; 21 | w3.showElements = function (elements) { 22 | var i, l = elements.length; 23 | for (i = 0; i < l; i++) { 24 | w3.showElement(elements[i]); 25 | } 26 | }; 27 | w3.showElement = function (element) { 28 | w3.styleElement(element, "display", "block"); 29 | }; 30 | w3.addStyle = function (sel, prop, val) { 31 | w3.styleElements(w3.getElements(sel), prop, val); 32 | }; 33 | w3.styleElements = function (elements, prop, val) { 34 | var i, l = elements.length; 35 | for (i = 0; i < l; i++) { 36 | w3.styleElement(elements[i], prop, val); 37 | } 38 | }; 39 | w3.styleElement = function (element, prop, val) { 40 | element.style.setProperty(prop, val); 41 | }; 42 | w3.toggleShow = function (sel) { 43 | var i, x = w3.getElements(sel), l = x.length; 44 | for (i = 0; i < l; i++) { 45 | if (x[i].style.display == "none") { 46 | w3.styleElement(x[i], "display", "block"); 47 | } else { 48 | w3.styleElement(x[i], "display", "none"); 49 | } 50 | } 51 | }; 52 | w3.addClass = function (sel, name) { 53 | w3.addClassElements(w3.getElements(sel), name); 54 | }; 55 | w3.addClassElements = function (elements, name) { 56 | var i, l = elements.length; 57 | for (i = 0; i < l; i++) { 58 | w3.addClassElement(elements[i], name); 59 | } 60 | }; 61 | w3.addClassElement = function (element, name) { 62 | var i, arr1, arr2; 63 | arr1 = element.className.split(" "); 64 | arr2 = name.split(" "); 65 | for (i = 0; i < arr2.length; i++) { 66 | if (arr1.indexOf(arr2[i]) == -1) {element.className += " " + arr2[i];} 67 | } 68 | }; 69 | w3.removeClass = function (sel, name) { 70 | w3.removeClassElements(w3.getElements(sel), name); 71 | }; 72 | w3.removeClassElements = function (elements, name) { 73 | var i, l = elements.length, arr1, arr2, j; 74 | for (i = 0; i < l; i++) { 75 | w3.removeClassElement(elements[i], name); 76 | } 77 | }; 78 | w3.removeClassElement = function (element, name) { 79 | var i, arr1, arr2; 80 | arr1 = element.className.split(" "); 81 | arr2 = name.split(" "); 82 | for (i = 0; i < arr2.length; i++) { 83 | while (arr1.indexOf(arr2[i]) > -1) { 84 | arr1.splice(arr1.indexOf(arr2[i]), 1); 85 | } 86 | } 87 | element.className = arr1.join(" "); 88 | }; 89 | w3.toggleClass = function (sel, c1, c2) { 90 | w3.toggleClassElements(w3.getElements(sel), c1, c2); 91 | }; 92 | w3.toggleClassElements = function (elements, c1, c2) { 93 | var i, l = elements.length; 94 | for (i = 0; i < l; i++) { 95 | w3.toggleClassElement(elements[i], c1, c2); 96 | } 97 | }; 98 | w3.toggleClassElement = function (element, c1, c2) { 99 | var t1, t2, t1Arr, t2Arr, j, arr, allPresent; 100 | t1 = (c1 || ""); 101 | t2 = (c2 || ""); 102 | t1Arr = t1.split(" "); 103 | t2Arr = t2.split(" "); 104 | arr = element.className.split(" "); 105 | if (t2Arr.length == 0) { 106 | allPresent = true; 107 | for (j = 0; j < t1Arr.length; j++) { 108 | if (arr.indexOf(t1Arr[j]) == -1) {allPresent = false;} 109 | } 110 | if (allPresent) { 111 | w3.removeClassElement(element, t1); 112 | } else { 113 | w3.addClassElement(element, t1); 114 | } 115 | } else { 116 | allPresent = true; 117 | for (j = 0; j < t1Arr.length; j++) { 118 | if (arr.indexOf(t1Arr[j]) == -1) {allPresent = false;} 119 | } 120 | if (allPresent) { 121 | w3.removeClassElement(element, t1); 122 | w3.addClassElement(element, t2); 123 | } else { 124 | w3.removeClassElement(element, t2); 125 | w3.addClassElement(element, t1); 126 | } 127 | } 128 | }; 129 | w3.getElements = function (id) { 130 | if (typeof id == "object") { 131 | return [id]; 132 | } else { 133 | return document.querySelectorAll(id); 134 | } 135 | }; 136 | w3.filterHTML = function(id, sel, filter) { 137 | var a, b, c, i, ii, iii, hit; 138 | a = w3.getElements(id); 139 | for (i = 0; i < a.length; i++) { 140 | b = a[i].querySelectorAll(sel); 141 | for (ii = 0; ii < b.length; ii++) { 142 | hit = 0; 143 | if (b[ii].innerText.toUpperCase().indexOf(filter.toUpperCase()) > -1) { 144 | hit = 1; 145 | } 146 | c = b[ii].getElementsByTagName("*"); 147 | for (iii = 0; iii < c.length; iii++) { 148 | if (c[iii].innerText.toUpperCase().indexOf(filter.toUpperCase()) > -1) { 149 | hit = 1; 150 | } 151 | } 152 | if (hit == 1) { 153 | b[ii].style.display = ""; 154 | } else { 155 | b[ii].style.display = "none"; 156 | } 157 | } 158 | } 159 | }; 160 | w3.sortHTML = function(id, sel, sortvalue) { 161 | var a, b, i, ii, y, bytt, v1, v2, cc, j; 162 | a = w3.getElements(id); 163 | for (i = 0; i < a.length; i++) { 164 | for (j = 0; j < 2; j++) { 165 | cc = 0; 166 | y = 1; 167 | while (y == 1) { 168 | y = 0; 169 | b = a[i].querySelectorAll(sel); 170 | for (ii = 0; ii < (b.length - 1); ii++) { 171 | bytt = 0; 172 | if (sortvalue) { 173 | v1 = b[ii].querySelector(sortvalue).innerText; 174 | v2 = b[ii + 1].querySelector(sortvalue).innerText; 175 | } else { 176 | v1 = b[ii].innerText; 177 | v2 = b[ii + 1].innerText; 178 | } 179 | v1 = v1.toLowerCase(); 180 | v2 = v2.toLowerCase(); 181 | if ((j == 0 && (v1 > v2)) || (j == 1 && (v1 < v2))) { 182 | bytt = 1; 183 | break; 184 | } 185 | } 186 | if (bytt == 1) { 187 | b[ii].parentNode.insertBefore(b[ii + 1], b[ii]); 188 | y = 1; 189 | cc++; 190 | } 191 | } 192 | if (cc > 0) {break;} 193 | } 194 | } 195 | }; 196 | w3.slideshow = function (sel, ms, func) { 197 | var i, ss, x = w3.getElements(sel), l = x.length; 198 | ss = {}; 199 | ss.current = 1; 200 | ss.x = x; 201 | ss.ondisplaychange = func; 202 | if (!isNaN(ms) || ms == 0) { 203 | ss.milliseconds = ms; 204 | } else { 205 | ss.milliseconds = 1000; 206 | } 207 | ss.start = function() { 208 | ss.display(ss.current) 209 | if (ss.ondisplaychange) {ss.ondisplaychange();} 210 | if (ss.milliseconds > 0) { 211 | window.clearTimeout(ss.timeout); 212 | ss.timeout = window.setTimeout(ss.next, ss.milliseconds); 213 | } 214 | }; 215 | ss.next = function() { 216 | ss.current += 1; 217 | if (ss.current > ss.x.length) {ss.current = 1;} 218 | ss.start(); 219 | }; 220 | ss.previous = function() { 221 | ss.current -= 1; 222 | if (ss.current < 1) {ss.current = ss.x.length;} 223 | ss.start(); 224 | }; 225 | ss.display = function (n) { 226 | w3.styleElements(ss.x, "display", "none"); 227 | w3.styleElement(ss.x[n - 1], "display", "block"); 228 | } 229 | ss.start(); 230 | return ss; 231 | }; 232 | w3.includeHTML = function(cb) { 233 | var z, i, elmnt, file, xhttp; 234 | z = document.getElementsByTagName("*"); 235 | for (i = 0; i < z.length; i++) { 236 | elmnt = z[i]; 237 | file = elmnt.getAttribute("w3-include-html"); 238 | if (file) { 239 | xhttp = new XMLHttpRequest(); 240 | xhttp.onreadystatechange = function() { 241 | if (this.readyState == 4) { 242 | if (this.status == 200) {elmnt.innerHTML = this.responseText;} 243 | if (this.status == 404) {elmnt.innerHTML = "Page not found.";} 244 | elmnt.removeAttribute("w3-include-html"); 245 | w3.includeHTML(cb); 246 | } 247 | } 248 | xhttp.open("GET", file, true); 249 | xhttp.send(); 250 | return; 251 | } 252 | } 253 | if (cb) cb(); 254 | }; 255 | w3.getHttpData = function (file, func) { 256 | w3.http(file, function () { 257 | if (this.readyState == 4 && this.status == 200) { 258 | func(this.responseText); 259 | } 260 | }); 261 | }; 262 | w3.getHttpObject = function (file, func) { 263 | w3.http(file, function () { 264 | if (this.readyState == 4 && this.status == 200) { 265 | func(JSON.parse(this.responseText)); 266 | } 267 | }); 268 | }; 269 | w3.displayHttp = function (id, file) { 270 | w3.http(file, function () { 271 | if (this.readyState == 4 && this.status == 200) { 272 | w3.displayObject(id, JSON.parse(this.responseText)); 273 | } 274 | }); 275 | }; 276 | w3.http = function (target, readyfunc, xml, method) { 277 | var httpObj; 278 | if (!method) {method = "GET"; } 279 | if (window.XMLHttpRequest) { 280 | httpObj = new XMLHttpRequest(); 281 | } else if (window.ActiveXObject) { 282 | httpObj = new ActiveXObject("Microsoft.XMLHTTP"); 283 | } 284 | if (httpObj) { 285 | if (readyfunc) {httpObj.onreadystatechange = readyfunc;} 286 | httpObj.open(method, target, true); 287 | httpObj.send(xml); 288 | } 289 | }; 290 | w3.getElementsByAttribute = function (x, att) { 291 | var arr = [], arrCount = -1, i, l, y = x.getElementsByTagName("*"), z = att.toUpperCase(); 292 | l = y.length; 293 | for (i = -1; i < l; i += 1) { 294 | if (i == -1) {y[i] = x;} 295 | if (y[i].getAttribute(z) !== null) {arrCount += 1; arr[arrCount] = y[i];} 296 | } 297 | return arr; 298 | }; 299 | w3.dataObject = {}, 300 | w3.displayObject = function (id, data) { 301 | var htmlObj, htmlTemplate, html, arr = [], a, l, rowClone, x, j, i, ii, cc, repeat, repeatObj, repeatX = ""; 302 | htmlObj = document.getElementById(id); 303 | htmlTemplate = init_template(id, htmlObj); 304 | html = htmlTemplate.cloneNode(true); 305 | arr = w3.getElementsByAttribute(html, "w3-repeat"); 306 | l = arr.length; 307 | for (j = (l - 1); j >= 0; j -= 1) { 308 | cc = arr[j].getAttribute("w3-repeat").split(" "); 309 | if (cc.length == 1) { 310 | repeat = cc[0]; 311 | } else { 312 | repeatX = cc[0]; 313 | repeat = cc[2]; 314 | } 315 | arr[j].removeAttribute("w3-repeat"); 316 | repeatObj = data[repeat]; 317 | if (repeatObj && typeof repeatObj == "object" && repeatObj.length != "undefined") { 318 | i = 0; 319 | for (x in repeatObj) { 320 | i += 1; 321 | rowClone = arr[j]; 322 | rowClone = w3_replace_curly(rowClone, "element", repeatX, repeatObj[x]); 323 | a = rowClone.attributes; 324 | for (ii = 0; ii < a.length; ii += 1) { 325 | a[ii].value = w3_replace_curly(a[ii], "attribute", repeatX, repeatObj[x]).value; 326 | } 327 | (i === repeatObj.length) ? arr[j].parentNode.replaceChild(rowClone, arr[j]) : arr[j].parentNode.insertBefore(rowClone, arr[j]); 328 | } 329 | } else { 330 | console.log("w3-repeat must be an array. " + repeat + " is not an array."); 331 | continue; 332 | } 333 | } 334 | html = w3_replace_curly(html, "element"); 335 | htmlObj.parentNode.replaceChild(html, htmlObj); 336 | function init_template(id, obj) { 337 | var template; 338 | template = obj.cloneNode(true); 339 | if (w3.dataObject.hasOwnProperty(id)) {return w3.dataObject[id];} 340 | w3.dataObject[id] = template; 341 | return template; 342 | } 343 | function w3_replace_curly(elmnt, typ, repeatX, x) { 344 | var value, rowClone, pos1, pos2, originalHTML, lookFor, lookForARR = [], i, cc, r; 345 | rowClone = elmnt.cloneNode(true); 346 | pos1 = 0; 347 | while (pos1 > -1) { 348 | originalHTML = (typ == "attribute") ? rowClone.value : rowClone.innerHTML; 349 | pos1 = originalHTML.indexOf("{{", pos1); 350 | if (pos1 === -1) {break;} 351 | pos2 = originalHTML.indexOf("}}", pos1 + 1); 352 | lookFor = originalHTML.substring(pos1 + 2, pos2); 353 | lookForARR = lookFor.split("||"); 354 | value = undefined; 355 | for (i = 0; i < lookForARR.length; i += 1) { 356 | lookForARR[i] = lookForARR[i].replace(/^\s+|\s+$/gm, ''); //trim 357 | if (x) {value = x[lookForARR[i]];} 358 | if (value == undefined && data) {value = data[lookForARR[i]];} 359 | if (value == undefined) { 360 | cc = lookForARR[i].split("."); 361 | if (cc[0] == repeatX) {value = x[cc[1]]; } 362 | } 363 | if (value == undefined) { 364 | if (lookForARR[i] == repeatX) {value = x;} 365 | } 366 | if (value == undefined) { 367 | if (lookForARR[i].substr(0, 1) == '"') { 368 | value = lookForARR[i].replace(/"/g, ""); 369 | } else if (lookForARR[i].substr(0,1) == "'") { 370 | value = lookForARR[i].replace(/'/g, ""); 371 | } 372 | } 373 | if (value != undefined) {break;} 374 | } 375 | if (value != undefined) { 376 | r = "{{" + lookFor + "}}"; 377 | if (typ == "attribute") { 378 | rowClone.value = rowClone.value.replace(r, value); 379 | } else { 380 | w3_replace_html(rowClone, r, value); 381 | } 382 | } 383 | pos1 = pos1 + 1; 384 | } 385 | return rowClone; 386 | } 387 | function w3_replace_html(a, r, result) { 388 | var b, l, i, a, x, j; 389 | if (a.hasAttributes()) { 390 | b = a.attributes; 391 | l = b.length; 392 | for (i = 0; i < l; i += 1) { 393 | if (b[i].value.indexOf(r) > -1) {b[i].value = b[i].value.replace(r, result);} 394 | } 395 | } 396 | x = a.getElementsByTagName("*"); 397 | l = x.length; 398 | a.innerHTML = a.innerHTML.replace(r, result); 399 | } 400 | }; 401 | --------------------------------------------------------------------------------