diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..1c9fedf --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig + +# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux +# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,linux + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### VisualStudioCode ### +.vscode/* +!.vscode/tasks.json +!.vscode/launch.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux + +# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option) + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100755 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 3acd611..403196d --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ -# Component_Library -Component Library for My Projects +# Component Library + +Component Library for personal projects built with html, css prismjs and vanilla-js. + +## Features + +- Contains various ready to use components +- Fully responsive + +## Components + +- Avatar +- Alert +- Badge +- Buttons +- Cards +- Image +- Input +- Lists +- Navigation +- Modal +- Rating +- Slider +- Simplified Grid +- Text Utilities +- Snackbar + +## Preview + +https://user-images.githubusercontent.com/39916455/179960938-2baba1a9-3b74-4c34-b57f-68c399b2f9bf.mp4 + diff --git a/components/.gitignore b/components/.gitignore new file mode 100755 index 0000000..a450812 --- /dev/null +++ b/components/.gitignore @@ -0,0 +1 @@ +/*.html \ No newline at end of file diff --git a/components/Text-Utilities.css b/components/Text-Utilities.css new file mode 100755 index 0000000..89b135d --- /dev/null +++ b/components/Text-Utilities.css @@ -0,0 +1,48 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("./resources/prism.css"); +@import url("./utils.css"); +@import url("./lists.css"); + +:root { + --primary-font: Lato; + --primary-color: #111827; + --border-color: #e5e5e5; + --gray-text: #6b7280; +} + +.spaced-list { + margin: 1rem; +} + +/* Heading */ +.heading { + color: var(--primary-color); + + font-family: var(--primary-font); + + max-width: fit-content; +} + +/* Small Text */ +.small-text { + color: var(--primary-color); + + font-family: var(--primary-font); + + font-size: 0.75rem; + + max-width: fit-content; +} + +/* Gray Text */ +.gray-text { + color: var(--gray-text); + + font-family: var(--primary-font); + + width: fit-content; +} + +.spaced-list__item--center { + text-align: center; +} diff --git a/components/alerts.css b/components/alerts.css new file mode 100755 index 0000000..54ff254 --- /dev/null +++ b/components/alerts.css @@ -0,0 +1,76 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); +* { + box-sizing: border-box; +} + +:root { + --primary-font: Lato; + --success-alert-backcolor: #c6f4d5; + --success-alert-fontcolor: #3bb54a; + --error-alert-backcolor: #fdd7d7; + --error-alert-fontcolor: #d1403f; + --warning-alert-backcolor: #feebc8; + --warning-alert-fontcolor: #f0c419; + --info-alert-backcolor: #bee3f8; + --info-alert-fontcolor: #447eae; + --alert-font-size: 1.3rem; + --alert-icon-margin-right: 1rem; + --alert-padding: 1rem; +} + +.alerts { + width: 100%; +} + +.alerts--common { + display: flex; + align-items: center; + padding: var(--alert-padding); + + font-size: var(--alert-font-size); + font-family: var(--primary-font); + + border-radius: 0.5rem; +} + +.alerts--margin--common { + margin-right: var(--alert-icon-margin-right); +} + +.alerts__success { + background-color: var(--success-alert-backcolor); + color: var(--success-alert-fontcolor); +} + +.alerts__error { + background-color: var(--error-alert-backcolor); + color: var(--error-alert-fontcolor); +} + +.alerts__warning { + background-color: var(--warning-alert-backcolor); + color: var(--warning-alert-fontcolor); +} + +.alerts__info { + background-color: var(--info-alert-backcolor); + color: var(--info-alert-fontcolor); +} + +.alerts .language-markup { + height: 10rem; +} + +@media screen and (max-width: 620px) { + .alerts--common { + margin: 0 1rem 0 1rem; + } +} + +@media screen and (min-width: 620px) { + .alert--reduce-width { + width: 50%; + } +} diff --git a/components/avatar.css b/components/avatar.css new file mode 100755 index 0000000..dc14adb --- /dev/null +++ b/components/avatar.css @@ -0,0 +1,57 @@ +* { + box-sizing: border-box; +} + +:root { + --border-color: #e5e5e5; +} + +.avatar { + display: flex; + flex-direction: column; + width: 100%; + border: 1px solid var(--border-color); + border-radius: 5px; +} + +.avatar-display { + display: flex; + justify-content: center; + flex-wrap: wrap; + align-items: center; + + padding: 1rem; + border-bottom: 0; +} + +.language-markup { + margin: 0; +} + +.img-big { + max-width: 96px; +} + +.img-medium { + max-width: 64px; +} + +.img-small { + max-width: 48px; +} + +.img-ex-small { + max-width: 32px; +} +/* utils */ + +.img-utils { + margin: 1.7rem; + width: 100%; + border-radius: 50%; +} + +.avatar .language-markup { + overflow-y: hidden; + overflow-x: scroll; +} diff --git a/components/badge.css b/components/badge.css new file mode 100755 index 0000000..191a04f --- /dev/null +++ b/components/badge.css @@ -0,0 +1,168 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter&family=Ubuntu&display=swap'); + +:root { + --presence-color: #3aa169; + --badge-border-color: #fff; + --border-color: #e5e5e5; + --primary-font: Lato; + --primary-color: #111827; + --border-color: #e5e5e5; + --secondary-color: #fff; + --badge-color-pink: #f16565; + --badge-color-blue: #2a77f0; +} + +.badge-icon-container, +.avatar-container { + display: flex; + flex-direction: column; + + border: 1px solid var(--border-color); + border-bottom: 0; + + margin-bottom: 2rem; + + border-radius: 5px; +} + +.badge-div { + display: flex; + padding-top: 1rem; + + /* border-bottom: 1px solid var(--border-color); */ +} + +.badge-icon { + position: relative; + + text-decoration: none; + + display: inline-block; + + /* padding: 1rem; */ + margin: 1rem; + + border-radius: 50%; + + color: var(--primary-color); +} + +.num-badge { + display: flex; + justify-content: center; + align-items: center; + + min-width: 1.5rem; + + position: absolute; + + background-color: var(--badge-color-pink); + + color: var(--secondary-color); + + padding: 0.2rem; + + border: 2px solid var(--secondary-color); + border-radius: 60%; + + font-family: var(--primary-font); + font-size: 0.7rem; + font-weight: 600; + + top: -0.5rem; + left: 1rem; + + text-align: center; +} + +.cart-badge { + background-color: var(--badge-color-blue); + color: var(--secondary-color); +} + +.notif-badge { + background-color: var(--badge-color-blue); +} + +.avatar-container .avatar-display { + display: flex; + align-items: center; +} + +/* avatar component */ + +.avatar-comp { + position: relative; + + margin: 1rem; +} + +.avatar-badge { + position: absolute; + + display: inline-block; + + min-width: 1rem; + min-height: 1rem; + + background-color: var(--presence-color); + border-radius: 50%; + border: 2px solid var(--badge-border-color); + + bottom: 0; + right: 0; +} + +.avatar-badge-large { + min-height: 2rem; + min-width: 2rem; + + bottom: 0.5rem; +} + +.avatar-badge-medium { + min-height: 1.3rem; + min-width: 1.3rem; + + bottom: 0.3rem; +} + +.avatar-badge-small { + bottom: 0.3rem; +} + +.avatar-badge-ex-small { + min-height: 0.7rem; + min-width: 0.7em; + + bottom: 0.3rem; +} + +.badge-icon-container .avatar-display { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + + align-items: center; + + padding: 1rem; + + border-bottom: 1px solid var(--border-color); +} + +.badge-utils { + width: 100%; + border-radius: 50%; +} + +/* fix overflow of the code block */ + +.avatar-container .language-markup { + height: 10rem; +} + + +.badge-div .language-markup { + overflow-y: hidden; + overflow-x: scroll; +} diff --git a/components/badge.html b/components/badge.html new file mode 100755 index 0000000..8db1e8a --- /dev/null +++ b/components/badge.html @@ -0,0 +1,279 @@ + + + + + + + Document + + + + +
+
+ + + + + + + 10 + + + + + + 10 + + + + + + + 10 + +
+
+        
+          <a href="#" class="badge-icon">
+          <svg
+            height="24"
+            viewBox="0 0 24 24"
+            width="24"
+            xmlns="http://www.w3.org/2000/svg"
+          >
+            <circle
+              cx="8"
+              cy="21"
+              fill="none"
+              r="2"
+              stroke="#000"
+              stroke-linecap="round"
+              stroke-linejoin="round"
+              stroke-width="2"
+            />
+            <circle
+              cx="20"
+              cy="21"
+              fill="none"
+              r="2"
+              stroke="#000"
+              stroke-linecap="round"
+              stroke-linejoin="round"
+              stroke-width="2"
+            />
+            <path
+              d="M5.67,6H23l-1.68,8.39a2,2,0,0,1-2,1.61H8.75a2,2,0,0,1-2-1.74L5.23,2.74A2,2,0,0,0,3.25,1H1"
+              fill="none"
+              stroke="#000"
+              stroke-linecap="round"
+              stroke-linejoin="round"
+              stroke-width="2"
+            />
+          </svg>
+          <span class="num-badge cart-badge">10</span>
+        </a>
+        
+      
+
+        
+          <a href="#" class="badge-icon">
+          <svg
+            fill="none"
+            height="24"
+            stroke="#000"
+            stroke-linecap="round"
+            stroke-linejoin="round"
+            stroke-width="2"
+            viewBox="0 0 24 24"
+            width="24"
+            xmlns="http://www.w3.org/2000/svg"
+          >
+            <path
+              d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"
+            />
+          </svg>
+          <span class="num-badge wishlist-badge">10</span>
+        </a>
+        
+      
+
+        
+          <a href="#" class="badge-icon">
+          <svg
+            xmlns="http://www.w3.org/2000/svg"
+            width="24"
+            height="24"
+            viewBox="0 0 24 24"
+            fill="none"
+            stroke="currentColor"
+            stroke-width="2"
+            stroke-linecap="round"
+            stroke-linejoin="round"
+            class="feather feather-bell"
+          >
+            <path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
+            <path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
+          </svg>
+          <span class="num-badge notif-badge">10</span>
+        </a>
+
+        
+      
+
+
+
+
+ avatar-large + +
+
+ avatar-medium + +
+
+ avatar-medium + +
+
+ avatar-extra-small + +
+
+
+           
+        <div class="avatar-comp">
+          <img
+            class="img-big img-utils"
+            alt="avatar-large"
+            src="../resources/man.svg"
+            width="96"
+            height="96"
+          />
+          <span class="avatar-badge avatar-badge-large"></span>
+        </div>
+          
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-medium img-utils"
+            alt="avatar-medium"
+            src="../resources/man.svg"
+            width="64"
+            height="64"
+          />
+          <span class="avatar-badge avatar-badge-medium"></span>
+        </div>
+        
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-small img-utils"
+            alt="avatar-medium"
+            src="../resources/man.svg"
+            width="48"
+            height="48"
+          />
+          <span class="avatar-badge avatar-badge-small"></span>
+        </div>
+          
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-ex-small img-utils"
+            alt="avatar-extra-small"
+            src="../resources/man.svg"
+            width="32"
+            height="32"
+          />
+          <span class="avatar-badge avatar-badge-ex-small"></span>
+        </div>
+          
+      
+
+ + + diff --git a/components/button.css b/components/button.css new file mode 100755 index 0000000..f907994 --- /dev/null +++ b/components/button.css @@ -0,0 +1,220 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); +* { + box-sizing: border-box; +} +body { + margin: 0; + padding: 0; +} +:root { + --primary-font: Lato; + --primary-color: #111827; + --secondary-color: #fff; + --border-color: #e5e5e5; + --font-weight: 600; + --button-radius: 0.3rem; + --twitter-color: #1da1f2; + --facebook-color: #385898; + --github-color: #24292e; + --button-margin: 0.5rem; + --button-padding: 0.6rem; + --button-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), + 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); +} + +/* primary button */ +.button__primary { + display: inline-block; + background-color: var(--secondary-color); + + color: var(--primary-color); + + border: 1.8px solid var(--primary-color); + + padding: var(--button-padding); + + margin: var(--button-margin); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + outline: var(--primary-color); + + cursor: pointer; + + color: var(--primary-color); +} +/* secondary button */ +.button__secondary { + display: inline-block; + + background-color: var(--primary-color); + + color: var(--secondary-color); + + border: 1.8px solid var(--primary-color); + + padding: var(--button-padding); + + margin: var(--button-margin); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + cursor: pointer; + + outline: var(--primary-color); + box-shadow: var(--button-shadow); +} + +/* round button utility */ + +.button--round { + border-radius: var(--button-radius); +} + +/* Link Button */ + +.button__link-button { + text-decoration: none; + + display: inline-flex; + justify-content: center; + align-items: center; + + /* display: inline-block; */ + + text-align: center; + + padding: var(--button-padding); + + margin: var(--button-margin); + + background-color: var(--primary-color); + + color: var(--secondary-color); + + border: 1px solid var(--primary-color); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + max-width: max-content; + + height: max-content; + + box-shadow: var(--button-shadow); +} + +.svg--right-margin { + margin-right: 0.3rem; +} + +/* icon button */ +.icon__button { + display: inline-flex; + justify-content: center; + align-items: center; + + outline: var(--primary-color); + + /* border: 1px solid var(--primary-color); */ + + background-color: var(--primary-color); + + border: 0; + + color: white; + + box-shadow: var(--button-shadow); + + /* color: var(--secondary-color); */ + + padding: var(--button-padding); + + margin: var(--button-margin); + + border-radius: 0.3rem; + + cursor: pointer; +} + +/* floating button */ +.floating__button { + display: inline-flex; + justify-content: center; + align-items: center; + + outline: var(--primary-color); + + background-color: var(--primary-color); + + border: 0; + + padding: var(--button-padding); + + display: flex; + justify-content: center; + + box-shadow: var(--button-shadow); + + margin: var(--button-margin); + + border-radius: 50%; + + cursor: pointer; +} + +/* utilities for twitter, facebook and github buttons */ +.twitter--btn { + background-color: var(--twitter-color); + color: var(--secondary-color); + + border: 1px solid var(--twitter-color); +} + +.facebook--btn { + background-color: var(--facebook-color); + color: var(--secondary-color); + + border: 1px solid var(--facebook-color); +} + +.github--btn { + background-color: var(--github-color); + color: var(--secondary-color); + + border: 1px solid var(--github-color); +} + +.button__container .toolbar { + right: 1rem; +} + +.button__container .language-markup { + overflow-y: hidden; + overflow-x: scroll; +} + +/* .btn-codeblock--height { + height: 10rem; +} */ + +@media screen and (min-width: 576px) { + .button__primary:hover { + background-color: var(--primary-color); + color: var(--secondary-color); + } + + /* codeblock overflow fix for desktop and tablets */ + /* .button__container .language-markup { + overflow-x: hidden; + overflow-y: hidden; + } */ + + .button__container > div.code-toolbar > .toolbar { + right: 1rem; + } +} diff --git a/components/cards.css b/components/cards.css new file mode 100755 index 0000000..b7cbfc2 --- /dev/null +++ b/components/cards.css @@ -0,0 +1,524 @@ +@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap'); +@import url('../resources/prism.css'); +@import url('./utils.css'); +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +:root { + --primary-color: #111827; + --secondary-color: white; + --border-color: #e5e5e5; + --primary-font: Lato; + --wish-svg-stroke: #f16565; + --close-svg-stroke: #e84545; + --shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), + 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); + --small-text: 0.8rem; + --small-text-color: #878787; + --zindex-one: 1; + --zindex-two: 2; + --rating-color: #388e3c; +} + +/* utility */ + +.product-img { + width: 100%; + object-fit: cover; + object-position: center; + height: 20rem; +} + +.distance-margin { + margin: 2rem; +} + +.font-family { + font-family: var(--primary-font); +} + +.wish-btn { + display: inline-block; + + align-self: flex-end; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + right: 0.3rem; + bottom: 0.3rem; + + z-index: var(--zindex-two); + cursor: pointer; +} + +.heart-svg:hover { + stroke: var(--wish-svg-stroke); +} + +.close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + top: 0; + left: 0; + + z-index: var(--zindex-two); + + cursor: pointer; +} + +.svg-close:hover { + stroke: var(--close-svg-stroke); +} + +.primary-btn { + background-color: var(--secondary-color); + + border: 1.8px solid var(--primary-color); + + padding: 0.6rem; + + font-family: var(--primary-font); + font-weight: 900; + + border-radius: 0.1rem; + + outline: var(--primary-color); + + cursor: pointer; + + color: var(--primary-color); +} + +.primary-btn:hover { + background-color: var(--primary-color); + color: var(--secondary-color); +} + +/* cards-container */ + +.cards-container { + display: flex; + flex-direction: column; + flex-wrap: wrap; + width: 100%; +} + +/* product card */ +.product-container { + display: inline-flex; + flex-direction: column; + + max-width: 20rem; + + font-family: var(--primary-font); + font-weight: bolder; + + position: relative; + + padding: 1rem; + + margin: 1rem; + + max-height: 35rem; +} + +.product__img__container { + display: block; + position: relative; +} + +.product-container:hover { + box-shadow: var(--shadow); +} + +.product-info__text { + display: -webkit-box; + + overflow: hidden; + + -webkit-box-orient: vertical; + + -webkit-line-clamp: 2; +} + +.product-info { + text-decoration: none; + + color: var(--primary-color); + font-size: 1.2rem; + + margin: 5px 0; +} + +.product-info__img { + height: 20rem; +} + +.product-info__small { + display: block; + + font-size: var(--small-text); + + color: var(--small-text-color); + + font-weight: 500; + + width: 10rem; + + text-overflow: ellipsis; + + overflow: hidden; + + white-space: nowrap; +} + +.product-info__rating { + display: flex; + justify-content: center; + align-items: center; + + max-width: max-content; + + background-color: var(--rating-color); + color: var(--secondary-color); + + font-size: var(--small-text); + text-align: center; + + padding: 0.15rem 0.3rem; + + border-radius: 0.2rem; + + margin: 0.5rem; + margin-left: 0; +} + +.svg__rating { + margin-right: 5px; +} + +.price-tag { + display: block; + + margin: 3px 0; + + font-size: 1.1rem; + + font-weight: 900; +} + +/* product card with overlay */ + +.overlay-div { + background: rgba(255, 255, 255, 0.5); + + display: flex; + flex-direction: column; + align-items: center; + + padding: 1rem; + + width: 100%; + height: 100%; + + position: absolute; + top: 0; + left: 0; + + z-index: var(--zindex-two); +} + +.overlay-text { + position: absolute; + + height: fit-content; + + color: var(--primary-color); + + top: 8rem; +} + +/* text card */ + +.text-card { + display: inline-flex; + flex-direction: column; + + padding: 1rem; + + border: 1px solid var(--primary-color); + border-radius: 0.3rem; + + color: var(--secondary-color); + + width: fit-content; + max-width: 20rem; + + margin: 1rem; + + background-color: var(--primary-color); +} + +.text-card-title { + font-family: var(--primary-font); + + margin: 0; + + padding: 0.5rem 0; + + border-bottom: 1px solid var(--primary-color); +} + +.text-card-info { + margin: 0.5rem 0; + + font-family: var(--primary-font); +} + +/* horizontal card */ + +.horizontal-product-container { + display: inline-flex; + + font-family: var(--primary-font); + font-weight: bolder; + + position: relative; + + height: 15rem; + + width: 40rem; + + margin: 1rem; + + box-shadow: var(--shadow); + + padding: 1rem; + border: 1px solid var(--primary-color); +} + +.hcard-product-info { + display: block; + width: 30%; + margin: 0; +} + +.second-horizontal-section { + display: flex; + flex-direction: column; + justify-content: space-evenly; + + padding: 0 0 0 1rem; + flex-shrink: 2; + + border-left: 0; + width: 70%; +} + +.hcard-title { + margin: 0; +} + +.hcard-img { + height: 100%; + object-fit: cover !important; +} + +.hcard-title-desc { + font-weight: 100; +} + +.hcard-price { + margin: 0.5rem 0; +} + +.horizontal-primary-btn { + display: inline-block; + + font-size: 0.7rem; + + width: 10rem; +} + +.hcard-product-desc { + margin: 0.3rem 0; + + font-weight: 200; + font-size: 1rem; +} + +.hcard-wish-btn { + position: absolute; + top: 2rem; + right: 2rem; + width: fit-content; + height: 1.5rem; +} + +/* shadow card */ + +.shadow_card { + display: inline-flex; + flex-direction: column; + + height: 30rem; + + margin: 1rem; + + border-radius: 1rem; + + width: 20rem; + + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} + +.shadow_card__productimgLink { + /* display: block; */ + margin: 0; + height: 50%; +} + +.shadow_card__productimg { + display: block; + height: 100%; + width: 100%; + object-fit: cover; + object-position: center; +} + +.shadow_card__product-info { + display: flex; + flex-direction: column; + justify-content: space-between; + + background-color: var(--secondary-color); + color: var(--primary-color); + + padding: 1rem; + + height: 50%; + + position: relative; +} + +.shadow_card__product-title { + margin: 0; + + font-family: var(--primary-font); +} + +.shadow_card__product-rating__title { + display: block; + + font-weight: 700; +} + +.shadow_card--wishbtn { + display: inline-block; + + align-self: flex-end; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + + top: 1rem; + right: 1rem; + + z-index: var(--zindex-two); + + cursor: pointer; +} + +/* fix overflow of the code block */ +.cards-container .language-markup { + height: 10rem; +} + +/* media queries */ + +@media screen and (max-width: 780px) { + .distance-margin { + margin: 0.5rem; + } + /* horizontal card */ + .horizontal-product-container { + margin: 0.5rem; + + width: 90%; + + height: 11rem; + + padding: 1rem; + } + + .hcard-product-desc { + display: none; + } + + .hcard-product-info { + width: 35%; + } + + .horizontal-primary-btn { + width: 80%; + height: 25%; + } + + .second-horizontal-section { + justify-content: space-around; + padding-left: 1rem; + } + + .hcard-wish-btn { + top: 1rem; + right: 1rem; + } + + .primary-btn:hover { + background-color: var(--primary-color); + color: var(--secondary-color); + } + + .heart-svg { + stroke: var(--wish-svg-stroke); + } + + .svg-close { + stroke: var(--close-svg-stroke); + } +} + +@media screen and (max-width: 720px) { + .primary-btn:hover { + background-color: var(--secondary-color); + color: var(--primary-color); + } +} diff --git a/components/compiled.css b/components/compiled.css new file mode 100755 index 0000000..704a11d --- /dev/null +++ b/components/compiled.css @@ -0,0 +1,1449 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); + +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} + +:root { + /* Common */ + --border-color: #e5e5e5; + --primary-font: Lato; + --primary-color: #111827; + + /* Alert */ + --success-alert-backcolor: #c6f4d5; + --success-alert-fontcolor: #3bb54a; + --error-alert-backcolor: #fdd7d7; + --error-alert-fontcolor: #d1403f; + --warning-alert-backcolor: #feebc8; + --warning-alert-fontcolor: #f0c419; + --info-alert-backcolor: #bee3f8; + --info-alert-fontcolor: #447eae; + --alert-font-size: 1.3rem; + --alert-icon-margin-right: 1rem; + --alert-padding: 1rem; + + /* badges */ + --presence-color: #3aa169; + --badge-border-color: #fff; + --badge-color-pink: #f16565; + --badge-color-blue: #2a77f0; + + /* buttons */ + --font-weight: 600; + --button-radius: 0.3rem; + --twitter-color: #1da1f2; + --facebook-color: #385898; + --github-color: #24292e; + --button-margin: 0.5rem; + --button-padding: 0.6rem; + --button-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), + 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); + + /* cards */ + --wish-svg-stroke: #f16565; + --close-svg-stroke: #e84545; + --shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), + 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); + --small-text: 0.8rem; + --small-text-color: #878787; + --zindex-one: 1; + --rating-color: #388e3c; + + /* lists */ + --hover-color: #d1d5db; + --red-list-color: red; + --blue-list-color: blue; + --green-list-color: #4eb23a; + --yellow-list-color: #f7bd3b; + + /* text-utilites */ + --gray-text: #6b7280; + + /* Snackbar */ + --zindex-one: 1; + --zindex-two: 2; + --zindex-three: 3; + --snackbar-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), + 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); +} + +/* Avatar */ +.avatar { + display: flex; + flex-direction: column; + width: 100%; + border: 1px solid var(--border-color); + border-radius: 5px; +} + +.avatar-display { + display: flex; + justify-content: center; + flex-wrap: wrap; + align-items: center; + + padding: 1rem; + border-bottom: 0; +} + +.img-big { + max-width: 96px; +} + +.img-medium { + max-width: 64px; +} + +.img-small { + max-width: 48px; +} + +.img-ex-small { + max-width: 32px; +} + +/* Avatar utils */ + +.img-utils { + margin: 1.7rem; + width: 100%; + border-radius: 50%; +} + +/* Alert */ + +.alerts { + width: 100%; +} + +.alerts--common { + display: flex; + align-items: center; + padding: var(--alert-padding); + + font-size: var(--alert-font-size); + font-family: var(--primary-font); + + border-radius: 0.5rem; +} + +.alerts--margin--common { + margin-right: var(--alert-icon-margin-right); +} + +.alerts__success { + background-color: var(--success-alert-backcolor); + color: var(--success-alert-fontcolor); +} + +.alerts__error { + background-color: var(--error-alert-backcolor); + color: var(--error-alert-fontcolor); +} + +.alerts__warning { + background-color: var(--warning-alert-backcolor); + color: var(--warning-alert-fontcolor); +} + +.alerts__info { + background-color: var(--info-alert-backcolor); + color: var(--info-alert-fontcolor); +} + +/* badges */ + +.badge-icon-container, +.avatar-container { + display: flex; + flex-direction: column; + + border: 1px solid var(--border-color); + border-bottom: 0; + + margin-bottom: 2rem; + + border-radius: 5px; +} + +.badge-div { + display: flex; + padding-top: 1rem; + + /* border-bottom: 1px solid var(--border-color); */ +} + +.badge-icon { + position: relative; + + text-decoration: none; + + display: inline-block; + + /* padding: 1rem; */ + margin: 1rem; + + border-radius: 50%; + + color: var(--primary-color); +} + +.num-badge { + display: flex; + justify-content: center; + align-items: center; + + min-width: 1.5rem; + + position: absolute; + + background-color: var(--badge-color-pink); + + color: var(--secondary-color); + + padding: 0.2rem; + + border: 2px solid var(--secondary-color); + border-radius: 60%; + + font-family: var(--primary-font); + font-size: 0.8rem; + font-weight: 600; + + top: -0.5rem; + left: 1rem; + + text-align: center; +} + +.cart-badge { + background-color: var(--badge-color-blue); + color: var(--secondary-color); +} + +.notif-badge { + background-color: var(--badge-color-blue); +} + +.avatar-container .avatar-display { + display: flex; + align-items: center; +} + +/* avatar with badges component */ + +.avatar-comp { + position: relative; + + margin: 1rem; +} + +.avatar-badge { + position: absolute; + + display: inline-block; + + min-width: 1rem; + min-height: 1rem; + + background-color: var(--presence-color); + border-radius: 50%; + border: 2px solid var(--badge-border-color); + + bottom: 0; + right: 0; +} + +.avatar-badge-large { + min-height: 2rem; + min-width: 2rem; + + bottom: 0.5rem; +} + +.avatar-badge-medium { + min-height: 1.3rem; + min-width: 1.3rem; + + bottom: 0.3rem; +} + +.avatar-badge-small { + bottom: 0.3rem; +} + +.avatar-badge-ex-small { + min-height: 0.7rem; + min-width: 0.7em; + + bottom: 0.3rem; +} + +.badge-icon-container .avatar-display { + display: flex; + justify-content: flex-start; + flex-wrap: wrap; + + align-items: center; + + padding: 1rem; + + border-bottom: 1px solid var(--border-color); +} + +.badge-utils { + width: 100%; + border-radius: 50%; +} + +/* Buttons */ +/* primary button */ +.button__primary { + display: inline-block; + background-color: var(--secondary-color); + + color: var(--primary-color); + + border: 1.8px solid var(--primary-color); + + padding: var(--button-padding); + + margin: var(--button-margin); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + outline: var(--primary-color); + + cursor: pointer; +} +/* secondary button */ +.button__secondary { + display: inline-block; + + background-color: var(--primary-color); + + color: var(--secondary-color); + + border: 1.8px solid var(--primary-color); + + padding: var(--button-padding); + + margin: var(--button-margin); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + cursor: pointer; + + outline: var(--primary-color); + box-shadow: var(--button-shadow); +} + +/* round button utility */ + +.button--round { + border-radius: var(--button-radius); +} + +/* Link Button */ + +.button__link-button { + text-decoration: none; + + display: inline-flex; + justify-content: center; + align-items: center; + + /* display: inline-block; */ + + text-align: center; + + padding: var(--button-padding); + + margin: var(--button-margin); + + background-color: var(--primary-color); + + color: var(--secondary-color); + + border: 1px solid var(--primary-color); + + font-family: var(--primary-font); + font-weight: var(--font-weight); + + max-width: max-content; + + height: max-content; + + box-shadow: var(--button-shadow); +} + +.svg--right-margin { + margin-right: 0.3rem; +} + +/* icon button */ +.icon__button { + display: inline-flex; + justify-content: center; + align-items: center; + + outline: var(--primary-color); + + /* border: 1px solid var(--primary-color); */ + + background-color: var(--primary-color); + + border: 0; + + color: white; + + box-shadow: var(--button-shadow); + + /* color: var(--secondary-color); */ + + padding: var(--button-padding); + + margin: var(--button-margin); + + border-radius: 0.3rem; + + cursor: pointer; +} + +/* floating button */ +.floating__button { + display: inline-flex; + justify-content: center; + align-items: center; + + outline: var(--primary-color); + + background-color: var(--primary-color); + + border: 0; + + padding: var(--button-padding); + + display: flex; + justify-content: center; + + box-shadow: var(--button-shadow); + + margin: var(--button-margin); + + border-radius: 50%; + + cursor: pointer; +} + +/* utilities for twitter, facebook and github buttons */ +.twitter--btn { + background-color: var(--twitter-color); + color: var(--secondary-color); + + border: 1px solid var(--twitter-color); +} + +.facebook--btn { + background-color: var(--facebook-color); + color: var(--secondary-color); + + border: 1px solid var(--facebook-color); +} + +.github--btn { + background-color: var(--github-color); + color: var(--secondary-color); + + border: 1px solid var(--github-color); +} + +/* Cards */ +/* utility */ + +.product-img { + width: 100%; + object-fit: cover; + object-position: center; + height: 20rem; +} + +.distance-margin { + margin: 2rem; +} + +.font-family { + font-family: var(--primary-font); +} + +.wish-btn { + display: inline-block; + + align-self: flex-end; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + bottom: 11.5rem; + right: 1.2rem; + + z-index: var(--zindex-one); + /* cursor: progress; */ +} + +.heart-svg:hover { + stroke: var(--wish-svg-stroke); +} + +.close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + top: 1.6rem; + left: 1rem; + + z-index: var(--zindex-one); + + /* cursor: progress; */ +} + +.svg-close:hover { + stroke: var(--close-svg-stroke); +} + +.primary-btn { + background-color: var(--secondary-color); + + border: 1.8px solid var(--primary-color); + + padding: 0.6rem; + + font-family: var(--primary-font); + font-weight: 900; + + border-radius: 0.1rem; + + outline: var(--primary-color); + + cursor: pointer; +} + +.primary-btn:hover { + background-color: var(--primary-color); + color: var(--secondary-color); +} + +/* cards-container */ + +.cards-container { + display: flex; + flex-direction: column; + flex-wrap: wrap; + /* align-items: center; */ + width: 100%; + /* justify-content: space-evenly; */ +} + +/* product card */ +.product-container { + display: inline-flex; + flex-direction: column; + + max-width: 20rem; + + font-family: var(--primary-font); + font-weight: bolder; + + position: relative; + + padding: 1rem; + + margin: 1rem; + + min-height: 33rem; + + /* height: 32rem; */ + + /* padding: 1rem; */ + + /* border: 1px solid black; */ +} + +.product-container:hover { + box-shadow: var(--shadow); +} + +.product-info__text { + display: -webkit-box; + + overflow: hidden; + + -webkit-box-orient: vertical; + + -webkit-line-clamp: 2; + /* text-overflow: ellipsis; */ + /* max-width: 13rem; */ + /* width: 100%; */ + /* white-space: nowrap; */ + /* line-height: 1rem; */ + /* max-height: 3rem; */ +} + +.product-info { + text-decoration: none; + + color: var(--primary-color); + font-size: 1.2rem; + + margin: 5px 0; +} + +.product-info__img { + height: 20rem; +} + +.product-info__small { + display: block; + + font-size: var(--small-text); + + color: var(--small-text-color); + + font-weight: 500; + + width: 10rem; + + text-overflow: ellipsis; + + overflow: hidden; + + white-space: nowrap; +} + +.product-info__rating { + display: flex; + justify-content: center; + align-items: center; + + max-width: max-content; + + background-color: var(--rating-color); + color: var(--secondary-color); + + font-size: var(--small-text); + text-align: center; + + padding: 0.15rem 0.3rem; + + border-radius: 0.2rem; + + margin: 0.5rem; + margin-left: 0; +} + +.svg__rating { + margin-right: 5px; +} + +.product-info__wish-btn { + bottom: 11.5rem; + right: 1.3rem; + z-index: var(--zindex-one); + cursor: pointer; +} + +.price-tag { + display: block; + + margin: 3px 0; + + font-size: 1.1rem; + + font-weight: 900; +} + +.wish-btn--fix { + bottom: 12rem; +} + +/* product card with overlay */ + +.overlay-div { + background: rgba(255, 255, 255, 0.5); + + display: flex; + flex-direction: column; + align-items: center; + + padding: 1rem; + + width: 100%; + height: 100%; + + position: absolute; + top: 0; + left: 0; +} + +.overlay-text { + position: absolute; + + height: fit-content; + + color: var(--primary-color); + + top: 8rem; +} + +/* text card */ + +.text-card { + display: inline-flex; + flex-direction: column; + + padding: 1rem; + + border: 1px solid var(--primary-color); + border-radius: 0.3rem; + + color: var(--secondary-color); + + /* max-height: 9rem; */ + + width: fit-content; + max-width: 20rem; + + margin: 1rem; + + background-color: var(--primary-color); +} + +.text-card-title { + font-family: var(--primary-font); + + margin: 0; + + padding: 0.5rem 0; + + border-bottom: 1px solid var(--primary-color); +} + +.text-card-info { + margin: 0.5rem 0; + + font-family: var(--primary-font); +} + +/* horizontal card */ + +.horizontal-product-container { + display: inline-flex; + + font-family: var(--primary-font); + font-weight: bolder; + + position: relative; + + height: 15rem; + + width: 40rem; + + margin: 1rem; + + box-shadow: var(--shadow); + + padding: 1rem; + border: 1px solid var(--primary-color); +} + +.hcard-product-info { + display: block; + /* height: 100%; */ + width: 30%; + margin: 0; +} + +.second-horizontal-section { + display: flex; + flex-direction: column; + justify-content: space-evenly; + + padding: 0 0 0 1rem; + flex-shrink: 2; + + border-left: 0; + width: 70%; +} + +.hcard-title { + margin: 0; +} + +.hcard-img { + height: 100%; + object-fit: cover !important; +} + +.hcard-title-desc { + font-weight: 100; +} + +.hcard-price { + margin: 0.5rem 0; +} + +.horizontal-primary-btn { + display: inline-block; + + font-size: 0.7rem; + + width: 10rem; +} + +.hcard-product-desc { + margin: 0.3rem 0; + + font-weight: 200; + font-size: 1rem; +} + +.hcard-wish-btn { + position: absolute; + top: 2rem; + right: 2rem; + width: fit-content; + height: 1.5rem; +} + +/* shadow card */ + +.shadow_card { + display: inline-flex; + flex-direction: column; + + height: 30rem; + + margin: 1rem; + + border-radius: 1rem; + + width: 20rem; + + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); +} + +.shadow_card__productimgLink { + /* display: block; */ + margin: 0; + height: 50%; +} + +.shadow_card__productimg { + display: block; + height: 100%; + width: 100%; + object-fit: cover; + object-position: center; +} + +.shadow_card__product-info { + display: flex; + flex-direction: column; + justify-content: space-between; + + background-color: var(--secondary-color); + color: var(--primary-color); + + padding: 1rem; + + height: 50%; + + position: relative; +} + +.shadow_card__product-title { + margin: 0; + + font-family: var(--primary-font); +} + +.shadow_card__product-rating__title { + display: block; + + font-weight: 700; +} + +.shadow_card--wishbtn { + display: inline-block; + + align-self: flex-end; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + position: absolute; + + top: 1rem; + right: 1rem; +} + +/* images */ + +.img-container { + display: flex; + flex-direction: column; + width: 100%; + /* padding: 1rem; */ +} + +.img-container__simple-img, +.img-container__round-img { + width: 100%; + height: 25rem; + margin: auto; +} + +.responsive-img { + width: 100%; + object-fit: cover; + object-position: center; + height: 100%; +} + +.img-round { + border-radius: 50%; +} + +.img-container--border { + border: 1px solid var(--border-color); + padding: 1rem 0 0 0; +} + +.img-container--margin { + margin-bottom: 1rem; +} + +/* lists */ +/* spaced-list */ + +.spaced-list { + list-style-type: none; + + margin: 1rem; + + padding: 1rem; + + border: 1px solid var(--border-color); +} + +.spaced-list__item { + padding: 0.5rem; + + margin: 0.5rem; + + font-family: var(--primary-font); + font-size: 1rem; + + color: var(--primary-color); +} + +/* stacked-list */ + +.stacked-list { + list-style-type: none; + + margin: 1rem; + + padding: 1rem; + + border: 1px solid var(--border-color); +} + +.stacked-list__item { + display: flex; + padding: 1rem; + + font-family: var(--primary-font); + + color: var(--primary-color); + + /* border: 1px solid var(--primary-color); */ + + margin: 1rem; +} + +.stacked-list__title { + margin: 0; +} + +.stacked-list__right { + display: inline-block; + margin-left: 1rem; +} + +.info--item { + border-left: 5px solid var(--blue-list-color); +} + +.error--item { + border-left: 5px solid var(--red-list-color); +} + +.warning--item { + border-left: 5px solid var(--yellow-list-color); +} + +.success--item { + border-left: 5px solid var(--green-list-color); +} + +/* Navbar */ +.navbar-component { + display: flex; + flex-direction: column; + align-items: center; + + position: relative; + padding: 0 1rem 0 1rem; +} + +.navbar-component__title { + display: flex; + align-items: center; + justify-content: center; + + width: 100%; + + padding: 1rem; + padding-top: 0; + + border-bottom: 3px solid var(--primary-color); + + color: var(--primary-color); + + font-family: var(--primary-font); + font-size: 1.3rem; + font-weight: 700; +} + +.navbar-component__menu { + display: flex; + justify-content: space-between; + + width: 100%; + + padding: 1rem; +} + +.navbar-component__menu__btn { + display: inline-block; + width: fit-content; + + padding: 0; + + background-color: transparent; + + border: 0; + + outline: 0; + + cursor: pointer; +} + +.navbar-component__menu__social__twitter, +.navbar-component__menu__social__github { + display: inline-block; + margin: 0 0.1rem; +} + +.navbar-component__title__text { + cursor: pointer; +} + +/* Modal */ +.modal { + display: flex; + justify-content: space-around; + align-items: center; + + width: 100vw; + height: 100vh; + + position: fixed; + top: 0; + left: 0; + + visibility: hidden; + + background: var(--modal-background); + + z-index: var(--zindex-five); +} + +.modal--show { + visibility: visible; +} + +/* Modal Article */ + +.modal__article { + display: inline-flex; + flex-direction: column; + padding: 1.5rem; + background-color: var(--primary-color); + margin: 2rem; + width: fit-content; + max-width: 25rem; + border-radius: 0.5rem; +} + +.modal__article__header { + color: var(--secondary-color); + font-family: var(--primary-font); + + display: flex; + justify-content: space-between; + + margin-bottom: 1rem; +} + +.modal__close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + cursor: pointer; +} + +.modal__article__header__text { + margin: 0; +} + +.modal__article__info { + color: var(--secondary-color); + + font-family: var(--primary-font); + + text-align: justify; +} + +.modal__article__footer { + display: flex; + margin-top: 1rem; + justify-content: flex-end; +} + +/* Rating */ + +.rating { + display: flex; + justify-content: center; + align-items: center; + + max-width: max-content; + + background-color: var(--primary-color); + color: var(--secondary-color); + + font-size: var(--small-text); + text-align: center; + + font-family: var(--primary-font); + + padding: 0.3rem; + + border-radius: 0.2rem; + + margin: 0.5rem; + + font-weight: 900; +} + +.rating__icon { + margin-right: 3px; +} + +/* Three-col Grid */ +.three-col-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + justify-items: center; +} + +/* Two-col Grid */ +.two-col-grid { + display: grid; + grid-template-columns: 1fr 1fr; + justify-items: center; +} + +/* Text Utilites */ +/* Heading */ +.heading { + color: var(--primary-color); + + font-family: var(--primary-font); + + max-width: fit-content; +} + +/* Small Text */ +.small-text { + color: var(--primary-color); + + font-family: var(--primary-font); + + font-size: 0.75rem; + + max-width: fit-content; +} + +/* Gray Text */ +.gray-text { + color: var(--gray-text); + + font-family: var(--primary-font); + + width: fit-content; +} + +.spaced-list__item--center { + text-align: center; +} + +/* Snackbar */ + +.snackbar { + display: flex; + justify-content: center; + align-items: center; + + position: fixed; + bottom: 0; + + box-shadow: var(--snackbar-shadow); + + padding-right: 1rem; + + margin: 0.5rem; + + visibility: hidden; + + background-color: var(--secondary-color); + + z-index: var(--zindex-two); +} + +.snackbar .stacked-list__item { + margin: 0; +} + +.snackbar--show { + visibility: visible; +} + +.snackbar--hide { + visibility: hidden; +} + +.snackbar__close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + z-index: var(--zindex-three); + + /* cursor: progress; */ +} + +/* Media Queries */ + +/* Alerts */ +@media screen and (max-width: 620px) { + .alerts--common { + margin: 0 1rem 0 1rem; + } +} + +@media screen and (min-width: 620px) { + .alert--reduce-width { + width: 50%; + } +} + +/* buttons */ + +@media screen and (min-width: 576px) { + .button__primary:hover { + background-color: var(--primary-color); + color: var(--secondary-color); + } +} + +/* cards */ +@media screen and (max-width: 780px) { + .distance-margin { + margin: 0.5rem; + } + /* horizontal card */ + .horizontal-product-container { + margin: 0.5rem; + + width: 90%; + + height: 11rem; + + padding: 1rem; + } + + .hcard-product-desc { + display: none; + } + + .hcard-product-info { + width: 35%; + } + + .horizontal-primary-btn { + width: 80%; + height: 25%; + } + + .second-horizontal-section { + justify-content: space-around; + padding-left: 1rem; + } + + .hcard-wish-btn { + top: 1rem; + right: 1rem; + } + + .primary-btn:hover { + background-color: var(--primary-color); + color: var(--secondary-color); + } + + .heart-svg { + stroke: var(--wish-svg-stroke); + } + + .svg-close { + stroke: var(--close-svg-stroke); + } +} + +@media screen and (max-width: 720px) { + .primary-btn:hover { + background-color: var(--secondary-color); + color: var(--primary-color); + } +} + +/* Images */ + +@media screen and (min-width: 450px) { + .img-container__simple-img, + .img-container__round-img { + width: 25rem; + } +} + +/* lists */ +@media screen and (min-width: 576px) { + .spaced-list__item:hover { + background-color: var(--hover-color); + } + .stacked-list__item:hover { + background-color: var(--hover-color); + } +} + +/* navbar */ +@media screen and (min-width: 576px) { + .navbar-component { + padding: 0 2rem 0 2rem; + } + .navbar-component__title { + position: absolute; + top: 1rem; + width: 90%; + border: 0; + padding-bottom: 0; + } + + .navbar-component__menu { + padding-left: 0; + padding-right: 0; + z-index: 1; + border-bottom: 3px solid var(--primary-color); + } + .navbar-component__title__text { + z-index: 2; + } +} + +/* Modal */ +@media screen and (min-width: 576px) { + .modal__container .language-markup { + height: 10rem; + overflow-x: hidden; + } +} + +/* Grids */ + +/* Three-col */ +@media screen and (min-width: 820px) { + .three-col-grid { + grid-template-columns: repeat(3, 1fr); + } +} + +/* SnackBar */ +@media screen and (min-width: 576px) { + .snackbar { + max-width: 30rem; + bottom: 0; + right: 0; + } +} diff --git a/components/images.css b/components/images.css new file mode 100755 index 0000000..d95f0e6 --- /dev/null +++ b/components/images.css @@ -0,0 +1,54 @@ +@import url("./utils.css"); +* { + box-sizing: border-box; +} + +:root { + --border-color: #e5e5e5; +} + +body { + margin: 0; + padding: 0; +} + +.img-container { + display: flex; + flex-direction: column; + width: 100%; + /* padding: 1rem; */ +} + +.img-container__simple-img, +.img-container__round-img { + width: 100%; + height: 25rem; + margin: auto; +} + +.responsive-img { + width: 100%; + object-fit: cover; + object-position: center; + height: 100%; +} + +.img-round { + border-radius: 50%; +} + +.img-container--border { + border: 1px solid var(--border-color); + padding: 1rem 0 0 0; +} + +.img-container--margin { + margin-bottom: 1rem; +} + +@media screen and (min-width: 450px) { + .img-container__simple-img, + .img-container__round-img { + width: 25rem; + } +} diff --git a/components/inputs.css b/components/inputs.css new file mode 100755 index 0000000..d7c6178 --- /dev/null +++ b/components/inputs.css @@ -0,0 +1,65 @@ +@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap'); +@import url('../resources/prism.css'); +@import url('./utils.css'); +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +:root { + --primary-color: #111827; + --secondary-color: white; + --border-color: #e5e5e5; + --primary-font: Lato; + --input-font-size: 1.3rem; + --input-back-color: #ededed; + --valid-text-color: #3bb54a; + --invalid-text-color: #d1403f; +} + +.input { + display: flex; + flex-direction: column; + padding: 1rem; + width: 100%; +} + +.input--common { + font-size: var(--input-font-size); + font-family: var(--primary-font); + color: var(--primary-color); + + border: 0; + + background-color: var(--input-back-color); + + padding: 0.5rem 0.5rem; + + outline-color: var(--primary-color); + + margin: 1rem; + + outline: 0px; +} + +.input--common:valid { + border: 2px solid var(--valid-text-color); + outline-color: var(--valid-text-color); +} + +.input--common:invalid { + border: 2px solid var(--invalid-text-color); +} + +.input__container .language-markup { + height: 10rem; +} + +@media screen and (min-width: 576px) { + .input { + width: 80%; + } +} diff --git a/components/lists.css b/components/lists.css new file mode 100755 index 0000000..728c0b2 --- /dev/null +++ b/components/lists.css @@ -0,0 +1,116 @@ +@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap'); +@import url('../resources/prism.css'); +@import url('./utils.css'); + +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} + +:root { + --primary-color: #111827; + --secondary-color: white; + --border-color: #e5e5e5; + --primary-font: Lato; + --hover-color: #d1d5db; + --red-list-color: red; + --blue-list-color: blue; + --green-list-color: #4eb23a; + --yellow-list-color: #f7bd3b; +} + +/* spaced-list */ + +.spaced-list { + list-style-type: none; + + margin: 1rem; + + padding: 1rem; + + border: 1px solid var(--border-color); +} + +.spaced-list__item { + padding: 0.5rem; + + margin: 0.5rem; + + font-family: var(--primary-font); + font-size: 1rem; + + color: var(--primary-color); + + cursor: pointer; +} + +/* stacked-list */ + +.stacked-list { + list-style-type: none; + + margin: 1rem; + + padding: 1rem; + + border: 1px solid var(--border-color); +} + +.stacked-list__item { + display: flex; + padding: 1rem; + + font-family: var(--primary-font); + + color: var(--primary-color); + + /* border: 1px solid var(--primary-color); */ + + margin: 1rem; +} + +.stacked-list__title { + margin: 0; +} + +.stacked-list__right { + display: inline-block; + margin-left: 1rem; +} + +.info--item { + border-left: 5px solid var(--blue-list-color); +} + +.error--item { + border-left: 5px solid var(--red-list-color); +} + +.warning--item { + border-left: 5px solid var(--yellow-list-color); +} + +.success--item { + border-left: 5px solid var(--green-list-color); +} + +.list--container .language-markup { + height: 10rem; +} + +/* .container--margin { + margin: 1rem; +} */ + +@media screen and (min-width: 576px) { + .spaced-list__item:hover { + background-color: var(--hover-color); + } + .stacked-list__item:hover { + background-color: var(--hover-color); + } +} diff --git a/components/modal.css b/components/modal.css new file mode 100755 index 0000000..e00535e --- /dev/null +++ b/components/modal.css @@ -0,0 +1,126 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); +@import url("./button.css"); +* { + box-sizing: border-box; +} +body { + margin: 0; + padding: 0; +} +:root { + --primary-font: Lato; + --font-weight: 600; + --primary-color: #111827; + --secondary-color: #fff; + --border-color: #e5e5e5; + --modal-background: rgba(17, 24, 39, 0.3); + --modal__button_hover: rgba(255, 255, 255, 0.8); + --zindex-five: 5; +} + +/* Modal */ + +.modal { + display: flex; + justify-content: space-around; + align-items: center; + + width: 100vw; + height: 100vh; + + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + + visibility: hidden; + + background: var(--modal-background); + + z-index: var(--zindex-five); + + overflow: auto; +} + +.modal--show { + visibility: visible; +} + +/* stop scrolling */ +.stop--scroll { + overflow: hidden; +} + +/* Modal Article */ + +.modal__article { + display: inline-flex; + flex-direction: column; + padding: 1.5rem; + background-color: var(--primary-color); + margin: 2rem; + width: fit-content; + max-width: 25rem; + border-radius: 0.5rem; +} + +.modal__article__header { + color: var(--secondary-color); + font-family: var(--primary-font); + + display: flex; + justify-content: space-between; + + margin-bottom: 1rem; +} + +.modal__close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; +} + +.modal__article__header__text { + margin: 0; +} + +.modal__article__info { + color: var(--secondary-color); + + font-family: var(--primary-font); + + text-align: justify; +} + +.modal__article__footer { + display: flex; + margin-top: 1rem; + justify-content: flex-end; +} + +.modal__article__footer .button__primary:hover { + background-color: var(--modal__button_hover); + color: var(--primary-color); +} + +/* codeblock length fix */ +.modal__container .language-markup { + height: 10rem; + overflow-x: scroll; +} + +@media screen and (min-width: 576px) { + .modal__container .language-markup { + height: 10rem; + overflow-x: hidden; + } +} diff --git a/components/modal.js b/components/modal.js new file mode 100755 index 0000000..4e1ce57 --- /dev/null +++ b/components/modal.js @@ -0,0 +1,12 @@ +function showModal() { + let modal = document.getElementById("modal"); + let body = document.getElementById("body"); + console.log(body); + body.classList.add("stop--scroll"); + modal.classList.toggle('modal--show'); +} + +function closeModal() { + body.classList.remove("stop--scroll"); + modal.classList.remove("modal--show"); +} diff --git a/components/navbar.css b/components/navbar.css new file mode 100755 index 0000000..1516f11 --- /dev/null +++ b/components/navbar.css @@ -0,0 +1,109 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); +* { + box-sizing: border-box; +} +body { + margin: 0; + padding: 0; +} +:root { + --primary-font: Lato; + --primary-color: #111827; + --border-color: #e5e5e5; +} + +/* .navbar-container { + width: 100%; +} */ + +.navbar-component { + display: flex; + flex-direction: column; + align-items: center; + + position: relative; + padding: 0 1rem 0 1rem; +} + +.navbar-component__title { + display: flex; + align-items: center; + justify-content: center; + + width: 100%; + + padding: 1rem; + padding-top: 0; + + border-bottom: 3px solid var(--primary-color); + + color: var(--primary-color); + + font-family: var(--primary-font); + font-size: 1.3rem; + font-weight: 700; +} + +.navbar-component__menu { + display: flex; + justify-content: space-between; + + width: 100%; + + padding: 1rem; +} + +.navbar-component__menu__btn { + display: inline-block; + width: fit-content; + + padding: 0; + + background-color: transparent; + + border: 0; + + outline: 0; + + cursor: pointer; +} + +.navbar-component__menu__social__twitter, +.navbar-component__menu__social__github { + display: inline-block; + margin: 0 0.1rem; +} + +.navbar-component__title__text { + cursor: pointer; +} + +/* fix overflow the codeblock */ +.navbar-container .language-markup { + height: 10rem; +} + +@media screen and (min-width: 576px) { + .navbar-component { + padding: 0 2rem 0 2rem; + } + .navbar-component__title { + position: absolute; + top: 1rem; + width: 90%; + border: 0; + padding-bottom: 0; + } + + .navbar-component__menu { + padding-left: 0; + padding-right: 0; + z-index: 1; + border-bottom: 3px solid var(--primary-color); + } + .navbar-component__title__text { + z-index: 2; + } +} diff --git a/components/rating.css b/components/rating.css new file mode 100755 index 0000000..0b1e429 --- /dev/null +++ b/components/rating.css @@ -0,0 +1,46 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); + +* { + box-sizing: border-box; +} + +body { + margin: 0; + padding: 0; +} +:root { + --primary-color: #111827; + --secondary-color: white; + --border-color: #e5e5e5; + --primary-font: Lato; +} + +.rating { + display: flex; + justify-content: center; + align-items: center; + + max-width: max-content; + + background-color: var(--primary-color); + color: var(--secondary-color); + + font-size: var(--small-text); + text-align: center; + + font-family: var(--primary-font); + + padding: 0.3rem; + + border-radius: 0.2rem; + + margin: 0.5rem; + + font-weight: 900; +} + +.rating__icon { + margin-right: 3px; +} diff --git a/components/showSnackbar.js b/components/showSnackbar.js new file mode 100755 index 0000000..d48693a --- /dev/null +++ b/components/showSnackbar.js @@ -0,0 +1,17 @@ +function showSnackbar() { + let snackbar = document.getElementById("snackbar-item"); + + snackbar.classList.remove("snackbar--hide"); + snackbar.classList.add("snackbar--show"); + setTimeout(() => { + snackbar.classList.remove("snackbar--show"); + snackbar.classList.add("snackbar--hide"); + }, 3000) +} + +function closeSnackbar() { + + let snackbar = document.getElementById("snackbar-item"); + snackbar.classList.add("snackbar--hide"); +} + diff --git a/components/slider.css b/components/slider.css new file mode 100755 index 0000000..b34ea74 --- /dev/null +++ b/components/slider.css @@ -0,0 +1,9 @@ +@import url("../resources/prism.css"); +@import url("./utils.css"); +/* .slider { + padding: 0; +} + +input[type="range"] { + background-color: red; +} */ diff --git a/components/threeItemsGrid.css b/components/threeItemsGrid.css new file mode 100755 index 0000000..4d3f5b7 --- /dev/null +++ b/components/threeItemsGrid.css @@ -0,0 +1,19 @@ +@import url("../resources/prism.css"); +@import url("./cards.css"); +.three-col-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + justify-items: center; +} + +.fix--width { + width: 10rem; + padding: 0; + margin: 0; +} + +@media screen and (min-width: 820px) { + .three-col-grid { + grid-template-columns: repeat(3, 1fr); + } +} diff --git a/components/toast-notify-snackbar.css b/components/toast-notify-snackbar.css new file mode 100755 index 0000000..355c2b5 --- /dev/null +++ b/components/toast-notify-snackbar.css @@ -0,0 +1,87 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("../resources/prism.css"); +@import url("./utils.css"); +@import url("./button.css"); +@import url("./lists.css"); +* { + box-sizing: border-box; +} +body { + margin: 0; + padding: 0; +} +:root { + --primary-font: Lato; + --primary-color: #111827; + --secondary-color: #fff; + --border-color: #e5e5e5; + --zindex-one: 1; + --zindex-two: 2; + --zindex-three: 3; + --snackbar-shadow: 0px 3px 5px -1px rgba(0, 0, 0, 0.2), + 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12); +} + +/* snackbar */ + +.snackbar { + display: flex; + justify-content: center; + align-items: center; + + position: fixed; + bottom: 0; + + box-shadow: var(--snackbar-shadow); + + padding-right: 1rem; + + margin: 0.5rem; + + visibility: hidden; + + background-color: var(--secondary-color); + + z-index: var(--zindex-two); +} + +.snackbar .stacked-list__item { + margin: 0; +} + +.snackbar--show { + visibility: visible; +} + +.snackbar--hide { + visibility: hidden; +} + +.snackbar__close-btn { + display: inline-block; + + width: fit-content; + + padding: 0; + + background-color: transparent; + border: 0; + outline: 0; + + z-index: var(--zindex-three); + + /* cursor: progress; */ +} + +/* fix codeblock height */ +.snackbar__container .language-markup { + height: 10rem; +} + +@media screen and (min-width: 576px) { + .snackbar { + max-width: 30rem; + bottom: 0; + right: 0; + } +} diff --git a/components/twoItemsGrid.css b/components/twoItemsGrid.css new file mode 100755 index 0000000..4614f91 --- /dev/null +++ b/components/twoItemsGrid.css @@ -0,0 +1,14 @@ +@import url('./cards.css'); +@import url('./utils.css'); +@import url('../resources/prism.css'); +.two-col-grid { + display: grid; + grid-template-columns: 1fr; + justify-items: center; +} + +@media screen and (min-width: 576px) { + .two-col-grid { + grid-template-columns: 1fr 1fr; + } +} diff --git a/components/utils.css b/components/utils.css new file mode 100755 index 0000000..4f100fb --- /dev/null +++ b/components/utils.css @@ -0,0 +1,26 @@ +:root { + --border-color: #e5e5e5; +} +.container--border { + border: 1px solid var(--border-color); + padding: 1rem 0 0 0; +} + +.container--margin { + margin-bottom: 1rem; +} + +.flex--container { + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; +} + +.responsive--container { + width: 100%; +} + +.center--margin { + margin: 0 auto; +} diff --git a/docs.css b/docs.css new file mode 100755 index 0000000..1c6559e --- /dev/null +++ b/docs.css @@ -0,0 +1,247 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("./resources/prism.css"); +@import url("./components/utils.css"); +@import url("./components/images.css"); +@import url("./components/avatar.css"); +@import url("./components/badge.css"); +@import url("./components/button.css"); +@import url("./components/cards.css"); +@import url("./components/alerts.css"); +@import url("./components/navbar.css"); +@import url("./components/twoItemsGrid.css"); +@import url("./components/threeItemsGrid.css"); +@import url("./components/lists.css"); +@import url("./components/Text-Utilities.css"); +@import url("./components/toast-notify-snackbar.css"); +@import url("./components/rating.css"); +@import url("./components/modal.css"); +@import url("./components/inputs.css"); + +* { + box-sizing: border-box; + + margin: 0; + + scrollbar-width: thin; +} + +:root { + --primary-font: Lato; + --primary-color: #111827; + --border-color: #e5e5e5; +} + +.main { + padding: 1rem 0.5rem; + + position: relative; +} + +.main__top-btn { + position: fixed; + bottom: 0; + right: 0; + + border-radius: 50%; +} + +/* utils */ +.space-comp { + margin-bottom: 2rem; +} + +/* navbar */ + +.navbar { + display: flex; + flex-direction: column; + align-items: center; + + position: relative; +} + +.navbar__title { + display: flex; + align-items: center; + justify-content: center; + + width: 100%; + + padding-bottom: 1rem; + + border-bottom: 3px solid var(--primary-color); + + color: var(--primary-color); + + font-family: var(--primary-font); + font-size: 1.3rem; + font-weight: 700; +} + +.navbar__menu { + display: flex; + justify-content: space-between; + + width: 100%; + + padding-bottom: 1rem; +} + +.navbar__menu__btn { + display: inline-block; + width: fit-content; + + padding: 0; + + background-color: transparent; + + border: 0; + + outline: 0; + + cursor: pointer; +} + +.navbar__menu__social__twitter, +.navbar__menu__social__github { + display: inline-block; + margin: 0 0.1rem; +} + +.navbar__title__text { + margin-left: 0.7rem; + cursor: pointer; +} + +/* container */ + +.container { + display: flex; + margin: 1rem 0; + height: 100vh; + position: relative; +} + +/* sidebar */ +.sidebar { + background-color: var(--backgroud-color); + border-right: 3px solid var(--primary-color); + display: none; + position: fixed; + /* top: 3rem; */ +} + +.sidebar__title { + font-size: 10px; + + letter-spacing: 0.5px; + + font-family: var(--primary-font); + + color: var(--primary-color); +} + +.sidebar__list { + position: sticky; + top: 0; + list-style-type: none; + + margin: 0; + padding: 0; + padding-top: 2rem; + padding-right: 2rem; + padding-bottom: 2rem; +} + +.sidebar__item { + display: block; + + text-decoration: none; + + padding: 0.3rem 0; + + font-size: 1.1rem; + color: var(--primary-color); + font-family: var(--primary-font); + font-weight: 600; + + width: 100%; + + flex-shrink: 1; +} + +/* component container */ + +.component-container { + width: 100%; + display: flex; + + flex-direction: column; + margin: 0 auto; + /* margin: 1rem 0; */ + /* height: 100vh; */ + /* border: 1px solid black; */ +} + +.component--mod { + padding: 1rem 0; + + font-family: var(--primary-font); +} + +.ex-img { + max-width: 100%; +} +.img { + width: 100%; +} + +div.code-toolbar { + right: 0; +} + +/* media queries for larger screens */ + +@media screen and (min-width: 576px) { + .container { + display: flex; + justify-content: space-between; + } + .sidebar { + width: 15%; + } + + .component-container { + display: flex; + flex-direction: column; + justify-content: center; + width: 80%; + /* padding-left: 0.5rem; */ + /* margin: 2rem; */ + position: absolute; + /* top: 0; */ + left: 19.5%; + } + .main { + padding: 1rem 2rem; + } + .sidebar { + display: inline-block; + flex-shrink: 1; + } + .navbar__title { + position: absolute; + } + .navbar__menu { + z-index: 1; + } + .navbar__title__text { + z-index: 2; + } +} + +/* @media screen and (min-width: 1276px) { */ +/* .main { */ +/* padding: 1rem 3rem; */ +/* } */ +/* } */ diff --git a/docs.html b/docs.html new file mode 100755 index 0000000..4c9732b --- /dev/null +++ b/docs.html @@ -0,0 +1,1634 @@ + + + + + + + Satori UI + + + + +
+ + + + + +
+ + + + + +
+

Avatar

+ + +
+
+ avatar-small + avatar-medium + avatar-medium + avatar-extra-small +
+
+                 
+                  <img class="img-big img-utils" alt="avatar-big" src="--enter--your--source" width="128" height="128" />
+                
+            
+
+                
+                  <img class="img-medium img-utils" alt="avatar-medium" src="--enter--your--source" width="96" height="96"/>
+                
+            
+
+              
+                <img class="img-small img-utils" alt="avatar-small" src="--enter--your--source" width="64" height="64 "/>
+              
+            
+
+              
+                <img class="img-ex-small img-utils" alt="avatar-extra-small" src="--enter--your--source" width="32" height="32" /> 
+              
+            
+
+ + +

+ Alerts +

+ + +
+
+
+ + success_icon + + This is an success alert - check it out! +
+
+                  
+                    <div class="alerts__success alerts--common center--margin alert--reduce-width">
+                      <span class="alerts--margin--common">
+                        <img src="./svgs/success-alert.svg" alt="success_icon" />
+                      </span>
+                      This is an success alert - check it out!
+                    </div>  
+                  
+              
+
+ +
+
+ + error_icon + + This is an error alert - check it out! +
+
+                  
+                    <div class="alerts__error alerts--common alert--reduce-width center--margin">
+                      <span class="alerts--margin--common">
+                        <img src="./svgs/error-alert.svg" alt="error_icon" />
+                      </span>
+                      This is an error alert - check it out!
+                    </div>
+                  
+              
+
+ +
+
+ + warning_icon + + This is an warning alert - check it out! +
+
+                  
+                    <div class="alerts__warning alerts--common alert--reduce-width" >
+                      <span class="alerts--margin--common">
+                        <img src="./svgs/warning-alert.svg" alt="warning_icon" />
+                      </span>
+                      This is an warning alert - check it out!
+                    </div>
+                  
+              
+
+ +
+
+ + info_icon + + This is an info alert - check it out! +
+
+                  
+                    <div class="alerts__info alerts--common alert--reduce-width">
+                      <span class="alerts--margin--common">
+                      <img src="./svgs/info-alert.svg" alt="info_icon" />
+                      </span>
+                      This is an info alert - check it out!
+                    </div> 
+                  
+              
+
+ +
+ + +

+ Badge +

+ + +
+ +
+              
+              <a href="#" class="badge-icon">
+                <img src="./svgs/black-cart.svg" alt="cart" />
+                <span class="num-badge cart-badge">10</span>
+              </a>
+              
+            
+
+              
+              <a href="#" class="badge-icon">
+                <img src="./svgs/black-heart.svg" alt="heart" />
+                <span class="num-badge wishlist-badge">10</span>
+              </a> 
+              
+            
+
+              
+              <a href="#" class="badge-icon">
+                <img src="./svgs/black-bell.svg" alt="bell" />
+                <span class="num-badge notif-badge">10</span>
+              </a>
+              
+            
+
+ + + +
+
+
+ avatar-large + +
+
+ avatar-medium + +
+
+ avatar-medium + +
+
+ avatar-extra-small + +
+
+
+           
+        <div class="avatar-comp">
+          <img
+            class="img-big badge-utils"
+            alt="avatar-large"
+            src="../resources/man.svg"
+            width="96"
+            height="96"
+          />
+          <span class="avatar-badge avatar-badge-large"></span>
+        </div>
+          
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-medium badge-utils"
+            alt="avatar-medium"
+            src="../resources/man.svg"
+            width="64"
+            height="64"
+          />
+          <span class="avatar-badge avatar-badge-medium"></span>
+        </div>
+        
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-small badge-utils"
+            alt="avatar-medium"
+            src="../resources/man.svg"
+            width="48"
+            height="48"
+          />
+          <span class="avatar-badge avatar-badge-small"></span>
+        </div>
+          
+      
+
+          
+        <div class="avatar-comp">
+          <img
+            class="img-ex-small badge-utils"
+            alt="avatar-extra-small"
+            src="../resources/man.svg"
+            width="32"
+            height="32"
+          />
+          <span class="avatar-badge avatar-badge-ex-small"></span>
+        </div>
+          
+      
+
+ + +

+ Buttons +

+ + +
+ +
+
+ + + + +
+
+                
+                  <button class="button__primary">ADD TO CART</button> 
+                
+              
+
+                
+                  <button class="button__secondary">ADD TO CART</button>
+                
+              
+
+                
+                  <button class="button__primary button--round">ADD TO CART</button>      
+                
+              
+
+                
+                  <button class="button__secondary button--round">ADD TO CART</button>
+                
+
+ + + +
+ +
+                
+                  <a href="#" class="button__link-button button--round">
+                    <span class="svg--right-margin">
+                      <!-- put your choice of svg here -->
+                    </span>
+                      <!-- put your text -->
+                  </a>
+                
+              
+
+ + + +
+
+ + + + +
+
+                
+                  <button class="icon__button icon__cart">
+                    <img src="./svgs/white-cart.svg" alt="cart_icon" />
+                  </button>
+                
+              
+
+                
+                  <button class="icon__button icon__heart">
+                    <img src="./svgs/white-heart.svg" alt="heart_icon" />
+                  </button> 
+                
+              
+
+                
+                  <button class="icon__button icon__home">
+                    <img src="./svgs/white-home.svg" alt="home_icon" />
+                  </button> 
+                
+              
+
+                
+                  <button class="icon__button icon__profile">
+                    <img src="./svgs/white-profile.svg" alt="profile_icon" />
+                  </button>
+                
+              
+
+ + + +
+
+ + + +
+
                 
+                
+                  <button class="floating__button">
+                    <!-- put your choice of svg here -->
+                  </button>
+                
+              
+
+ +
+ + +

+ Cards +

+ + +
+
+ + + +
+                
+                  <div class="product-container">
+                    <a href="#" class="product-info">
+                      <span class="product__img__container">
+                        <img
+                          class="product-img product-info__img"
+                          src="https://source.unsplash.com/random/"
+                          alt="product"
+                        />
+                        <button class="wish-btn">
+                          <img src="./svgs/product-wish.svg" alt="wish_btn" />
+                        </button>
+                      </span>
+                      Lorem ipsum
+                      <span class="product-info__small">Lorem ipsum dolor sit Lorem</span>
+                      <span class="product-info__rating">
+                        <img src="./svgs/rating.svg" alt="rating_icon" />
+                        4.5
+                      </span>
+                      <span class="price-tag">₹ 2500</span>
+                    </a>
+                </div>
+                
+              
+
+ + +
+ + +
+                
+                  <div class="product-container">
+                      
+                      <a href="#" class="product-info">
+                      <span class="product__img__container">
+                        <button class="close-btn">
+                          <img src="./svgs/close-btn.svg" alt="close_btn" />
+                        </button>
+                        <img
+                          class="product-img product-info__img"
+                          src="https://source.unsplash.com/random/"
+                          alt="product"
+                        />
+                        <button class="wish-btn">
+                          <img src="./svgs/product-wish.svg" alt="wish_btn" />
+                        </button>
+                      </span>
+                        Lorem ipsum
+                        <span class="product-info__small"
+                          >Lorem ipsum dolor sit Lorem</span
+                        >
+                        <span class="product-info__rating">
+                          <img src="./svgs/rating.svg" alt="rating_icon" />
+                          4.5
+                        </span>
+                        <span class="price-tag">Rs. 250</span></a
+                      >
+                      
+                      <button class="primary-btn">ADD TO CART</button>
+                  </div> 
+                
+            
+
+ + +
+ +
+                
+                  <div class="product-container">
+                  <a href="#" class="product-info">
+                    <span class="product__img__container">
+                      <img
+                        class="product-img product-info__img"
+                        src="https://source.unsplash.com/random/"
+                        alt="product"
+                      />
+                      <button class="wish-btn">
+                        <img src="./svgs/product-wish.svg" alt="wish_btn" />
+                      </button>
+                    </span>
+                    <span class="product-info__text"
+                      >lorem ipsum Lorem ipsum dolor sit amet consectetur
+                      adipisicing elit. Distinctio, veniam!</span
+                    >
+                    <span class="product-info__small"
+                      >Lorem ipsum dolor sit Lorem Lorem, ipsum dolor sit amet
+                      consectetur adipisicing elit. Quisquam, ipsa.</span
+                    >
+                    <span class="product-info__rating">
+                      <img src="./svgs/rating.svg" alt="rating_icon" />
+                      4.5
+                    </span>
+                    <span class="price-tag">Rs. 250</span>
+                  </a>
+                  <button class="primary-btn">ADD TO CART</button>
+                  <div class="overlay-div">
+                    <button class="close-btn">
+                      <img src="./svgs/close-btn.svg" alt="close-btn" />
+                    </button>
+                    <span class="overlay-text"> OUT OF STOCK </span>
+                  </div>
+                </div>
+                
+              
+ +
+ +
+
+
+

CARD TITLE

+

+ I am a very simple card. I am good at containing small bits + of information. I am convenient because I require little + markup to use effectively. +

+
+
+ +
+                
+                  <div class="text-card">
+                    <h4 class="text-card-title">---card title---</h4>
+                    <p class="text-card-info">
+                      --- enter your text here ---
+                    </p>
+                  </div>
+              
+            
+
+ +
+
+
+ + product +
+
+

Lorem ipsum

+ Lorem ipsum dolor sit amet. + Rs. 250 +

+ Lorem ipsum dolor sit amet consectetur adipisicing elit. + Explicabo, nulla. Lorem ipsum dolor sit amet. +

+
+ + +
+
+
+ +
+                  
+                    <div class="horizontal-product-container">
+                      <a href="#" class="product-info hcard-product-info">
+                        <img
+                          class="product-img hcard-img"
+                          src="https://source.unsplash.com/random/"
+                          alt="product"
+                      /></a>
+                      <div class="second-horizontal-section">
+                        <div class="hsection_info">
+                          <h3 class="hcard-title">Lorem ipsum</h3>
+                          <small class="hcard-title-desc"
+                            >Lorem ipsum dolor sit amet.</small
+                          >
+                          <span class="price-tag hcard-price">Rs. 250</span>
+                          <p class="hcard-product-desc">
+                            Lorem ipsum dolor sit amet consectetur adipisicing elit.
+                            Explicabo, nulla. Lorem ipsum dolor sit amet.
+                          </p>
+                        </div>
+                        <button class="primary-btn horizontal-primary-btn">
+                          ADD TO CART
+                        </button>
+                        <button class="wish-btn hcard-wish-btn">
+                          <img src="./svgs/wish-btn.svg" alt="wish-btn" />
+                        </button>
+                      </div>
+                    </div>
+                  
+              
+
+ +
+
+
+ + product + +
+
+

+ Lorem ipsum dolor sit +

+ Lorem ipsum dolor sit amet consectetur + adipisicing. +
+
+ RATING + star_icon + star_icon + star_icon + star_icon + star_icon +
+ + +
+
+
+ +
+                
+                  <div class="shadow_card">
+                    <a href="#" class="shadow_card__productimgLink">
+                      <img
+                        class="product-img shadow_card__productimg"
+                        src="https://source.unsplash.com/random"
+                        alt="product"
+                      />
+                    </a>
+                    <div class="shadow_card__product-info">
+                      <div class="shadow_card__product-header">
+                        <h3 class="shadow_card__product-title">
+                          Lorem ipsum dolor sit
+                        </h3>
+                        <small class="font-family"
+                          >Lorem ipsum dolor sit amet consectetur
+                          adipisicing.</small
+                        >
+                      </div>
+                      <div class="shadow_card__product-rating">
+                        <span
+                          class="shadow_card__product-rating__title font-family"
+                          >RATING</span
+                        >
+                        <img src="./svgs/star.svg" alt="star_icon" />
+                        <img src="./svgs/star.svg" alt="star_icon" />
+                        <img src="./svgs/star.svg" alt="star_icon" />
+                        <img src="./svgs/star.svg" alt="star_icon" />
+                        <img src="./svgs/star.svg" alt="star_icon" />
+                      </div>
+                      <button class="primary-btn shadow_card--btn">
+                        ADD TO CART
+                      </button>
+                      <button class="shadow_card--wishbtn">
+                        <img src="./svgs/wish-btn.svg" alt="wish_btn" />
+                      </button>
+                    </div>
+                </div>
+                
+              
+
+ +
+ + +

+ Image +

+ + +
+
+
+ round_img +
+
+                  
+                  <img
+                    class="responsive-img"
+                    src="https://source.unsplash.com/random"
+                    alt="round_img"
+                  />
+                  
+              
+
+
+
+ round_img +
+
+                  
+                    <img
+                      class="responsive-img img-round"
+                      src="https://source.unsplash.com/random"
+                      alt="round_img"
+                    />
+                  
+                
+
+
+ + +

+ Inputs +

+ + +
+
+
+
+ + + +
+
+
+        
+          <input
+            type="text"
+            class="input__text input--common"
+            placeholder="Enter Your Name"
+            value="hello,world"
+            required
+          />
+        
+      
+
+        
+           <input
+            type="email"
+            class="input__email input--common"
+            placeholder="Enter Email"
+            required
+          />
+        
+      
+
+                
+                  <input
+                    type="password"
+                    class="input_password input--common"
+                    placeholder="Enter Password(must be 8 chars long)"
+                    pattern=".{8,}"
+                    required
+                  />
+                
+              
+
+
+ + +

Lists

+ +
+
+
    +
  • List Item 1
  • +
  • List Item 2
  • +
  • List Item 3
  • +
  • List Item 4
  • +
  • List Item 5
  • +
  • List Item 6
  • +
+
+                  
+                      <ul class="spaced-list">
+                        <li class="spaced-list__item">List Item 1</li>
+                        <li class="spaced-list__item">List Item 2</li>
+                        <li class="spaced-list__item">List Item 3</li>
+                        <li class="spaced-list__item">List Item 4</li>
+                        <li class="spaced-list__item">List Item 5</li>
+                        <li class="spaced-list__item">List Item 6</li>
+                      </ul>
+                  
+              
+
+
+
+
    +
  • + info_icon + +

    + Lorem ipsum dolor sit amet. +

    + Lorem, ipsum dolor sit amet consectetur adipisicing + elit. +
    +
  • +
  • + info_icon + +

    + Lorem ipsum dolor sit amet. +

    + Lorem, ipsum dolor sit amet consectetur adipisicing + elit. +
    +
  • +
  • + info_icon + +

    + Lorem ipsum dolor sit amet. +

    + Lorem, ipsum dolor sit amet consectetur adipisicing + elit. +
    +
  • +
  • + info_icon + +

    + Lorem ipsum dolor sit amet. +

    + Lorem, ipsum dolor sit amet consectetur adipisicing + elit. +
    +
  • +
+
+
+          
+             <ul class="stacked-list">
+                <li class="stacked-list__item info--item">
+                    <img src="../svgs/info-alert.svg" alt="info_icon" />
+                    <span class="stacked-list__right">
+                    <h3 class="stacked-list__title">Lorem ipsum dolor sit amet.</h3>
+                    <small
+                        >Lorem, ipsum dolor sit amet consectetur adipisicing
+                        elit.</small
+                    >
+                    </span>
+                </li>
+                <li class="stacked-list__item error--item">
+                    <img src="../svgs/error-alert.svg" alt="info_icon" />
+                    <span class="stacked-list__right">
+                    <h3 class="stacked-list__title">Lorem ipsum dolor sit amet.</h3>
+                    <small
+                        >Lorem, ipsum dolor sit amet consectetur adipisicing
+                        elit.</small
+                    >
+                    </span>
+                </li>
+                <li class="stacked-list__item warning--item">
+                    <img src="../svgs/exclamation.svg" alt="info_icon" />
+                    <span class="stacked-list__right">
+                    <h3 class="stacked-list__title">Lorem ipsum dolor sit amet.</h3>
+                    <small
+                        >Lorem, ipsum dolor sit amet consectetur adipisicing
+                        elit.</small
+                    >
+                    </span>
+                </li>
+                <li class="stacked-list__item success--item">
+                    <img src="../svgs/success-alert.svg" alt="info_icon" />
+                    <span class="stacked-list__right">
+                    <h3 class="stacked-list__title">Lorem ipsum dolor sit amet.</h3>
+                    <small
+                        >Lorem, ipsum dolor sit amet consectetur adipisicing
+                        elit.</small
+                    >
+                    </span>
+                </li>
+            </ul>
+          
+      
+
+
+ + +

+ Navigation +

+ + + + + +

+ Modal +

+ + + + +

+ Rating +

+ +
+
+
+ + rating_icon + 4.5 + +
+
+                  
+                    <span class="rating">
+                        <img
+                            src="../svgs/rating.svg"
+                            class="rating__icon"
+                            alt="rating_icon"
+                        />
+                        4.5
+                    </span>
+                  
+              
+
+
+ + +

+ Slider +

+ +
+
+
+ +
+
+                  
+                    <input type="range" class="slider" />
+                  
+              
+
+
+ +

+ Two Column Grid +

+ + + + +

+ Three Column Grid +

+ + + + +

+ Text Utilities +

+ +
+
    +
  • +

    I'm Heading

    +
  • +
  • +

    I'm Small

    +
  • +
  • +

    I'm Gray

    +
  • +
  • +

    I'm Center

    +
  • +
+
+              
+                <h1 class="heading">I'm Heading</h1>
+              
+            
+
+              
+                <p class="small-text">I'm Small</p>
+              
+            
+
+              
+                <p class="gray-text">I'm Gray</p>
+              
+            
+
+              
+                <p class="center-text">I'm Center</p>
+              
+            
+
+ + +

+ Snackbar +

+ +
+
+
+ +
+
+
  • + info_icon + +

    + Lorem ipsum dolor sit amet. +

    + Lorem, ipsum dolor sit amet consectetur adipisicing + elit. +
    +
  • + +
    +
    +                  
    +                      <div id="snackbar-item" class="snackbar">
    +                          <li class="stacked-list__item info--item">
    +                          <img src="../svgs/info-alert.svg" alt="info_icon" />
    +                          <span class="stacked-list__right">
    +                              <h3 class="stacked-list__title">Lorem ipsum dolor sit amet.</h3>
    +                              <small
    +                              >Lorem, ipsum dolor sit amet consectetur adipisicing elit.</small
    +                              >
    +                          </span>
    +                          </li>
    +                          <button class="snackbar__close-btn" onclick="closeSnackbar()">
    +                          <img src="../svgs/close-btn.svg" alt="close_btn" />
    +                          </button>
    +                      </div> 
    +                  
    +              
    +
    +
    + +
    + +
    + + + + top_icon + + +
    + + + + + + diff --git a/index.css b/index.css new file mode 100755 index 0000000..0ef9537 --- /dev/null +++ b/index.css @@ -0,0 +1,107 @@ +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap"); +@import url("./docs.css"); +@import url("./components/button.css"); +@import url("./components/images.css"); + +* { + box-sizing: border-box; + + margin: 0; + + scrollbar-width: thin; +} + +:root { + --primary-font: Lato; + --primary-color: #111827; + --border-color: #e5e5e5; + --secondary-color: #fff; +} + +.landing-page { + padding: 0 1rem; +} + +.landing-page .navbar { + border-bottom: 3px solid var(--primary-color); + flex-direction: row; + justify-content: space-between; + align-items: center; + padding: 0.5rem 0; +} + +.landing-page .navbar__title { + justify-content: flex-start; + border: 0; + padding: 0; + max-width: max-content; +} + +.navbar__navigation .button__link-button { + background-color: transparent; + border: 0; + color: var(--primary-color); + box-shadow: none; +} + +.landing-page .navbar__navigation { + display: grid; + grid-template-columns: repeat(2, 1fr) auto; + /* justify-content: center; */ + justify-items: center; +} + +.landing-page .navbar__menu__social__github { + padding: 0.3rem; + margin: 0.4rem; + margin-right: 0; + width: max-content; +} + +.landing-page .responsive-img { + object-fit: contain; +} + +.landing-page__content { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: 1rem; +} + +.landing-page__content__buttons { + display: flex; + justify-content: center; + align-items: center; + margin: 1rem; +} + +.landing-page__content .button__link-button { + display: flex; + cursor: pointer; + min-width: 10rem; +} + +.landing-page__hero-line { + font-family: var(--primary-font); + text-align: center; + font-weight: 900; + max-width: 100vw; +} + +.landing-page__content .svg--right-margin { + display: block; + margin-left: 0.5rem; +} + +.button__github { + color: var(--primary-color); + background-color: var(--secondary-color); +} + +@media screen and (min-width: 576px) { + .navbar__title { + position: relative; + } +} diff --git a/index.html b/index.html new file mode 100755 index 0000000..2643df9 --- /dev/null +++ b/index.html @@ -0,0 +1,60 @@ + + + + + + + Satori UI + + + + +
    + +
    +
    + landing-page__img +
    +
    +

    + A Modern CSS Component Library for Building Good Projects. +

    + +
    +
    +
    + + diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100755 index 0000000..1837ea4 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "Component_Library", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/package-lock.json b/package-lock.json new file mode 100755 index 0000000..1837ea4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "Component_Library", + "lockfileVersion": 2, + "requires": true, + "packages": {} +} diff --git a/package.json b/package.json new file mode 100755 index 0000000..1c80324 --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "devDependencies": { + "live-server": "^1.2.1" + } +} diff --git a/resources/bell.svg b/resources/bell.svg new file mode 100755 index 0000000..bba561c --- /dev/null +++ b/resources/bell.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/github-landing.svg b/resources/github-landing.svg new file mode 100755 index 0000000..4edc487 --- /dev/null +++ b/resources/github-landing.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/github.svg b/resources/github.svg new file mode 100755 index 0000000..ff0af48 --- /dev/null +++ b/resources/github.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/heart.svg b/resources/heart.svg new file mode 100755 index 0000000..5863366 --- /dev/null +++ b/resources/heart.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/heart1.svg b/resources/heart1.svg new file mode 100755 index 0000000..9fdd6eb --- /dev/null +++ b/resources/heart1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/iconfinder_1_Twitter_colored_svg_5296514.svg b/resources/iconfinder_1_Twitter_colored_svg_5296514.svg new file mode 100755 index 0000000..6d4e417 --- /dev/null +++ b/resources/iconfinder_1_Twitter_colored_svg_5296514.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/iconfinder_GitHub_4745725.svg b/resources/iconfinder_GitHub_4745725.svg new file mode 100755 index 0000000..5ff6db6 --- /dev/null +++ b/resources/iconfinder_GitHub_4745725.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/iconfinder_heart_2561448.svg b/resources/iconfinder_heart_2561448.svg new file mode 100755 index 0000000..0663141 --- /dev/null +++ b/resources/iconfinder_heart_2561448.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/iconfinder_shopping-cart_2561279.svg b/resources/iconfinder_shopping-cart_2561279.svg new file mode 100755 index 0000000..15b6fd8 --- /dev/null +++ b/resources/iconfinder_shopping-cart_2561279.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/landing-page-img.svg b/resources/landing-page-img.svg new file mode 100755 index 0000000..7344e2f --- /dev/null +++ b/resources/landing-page-img.svg @@ -0,0 +1 @@ +experience design \ No newline at end of file diff --git a/resources/man.svg b/resources/man.svg new file mode 100755 index 0000000..0ea5d3e --- /dev/null +++ b/resources/man.svg @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/menu.svg b/resources/menu.svg new file mode 100755 index 0000000..e8a84a9 --- /dev/null +++ b/resources/menu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/prism.css b/resources/prism.css new file mode 100755 index 0000000..ec8ed56 --- /dev/null +++ b/resources/prism.css @@ -0,0 +1,225 @@ +@import url("https://fonts.googleapis.com/css2?family=Inter&family=Ubuntu&display=swap"); +/* PrismJS 1.23.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript&plugins=normalize-whitespace+toolbar+copy-to-clipboard */ +/** + * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML + * Based on https://github.com/chriskempson/tomorrow-theme + * @author Rose Pritchard + */ + +* { + box-sizing: border-box; +} + +code[class*="language-"], +pre[class*="language-"] { + color: #ccc; + background: none; + font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + /* margin: .5em 0; */ + overflow-y: scroll; + overflow-x: hidden; + /* scrollbar-width: thin; */ +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #2d2d2d; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} + +.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #999; +} + +.token.punctuation { + color: #ccc; +} + +.token.tag, +.token.attr-name, +.token.namespace, +.token.deleted { + color: #e2777a; +} + +.token.function-name { + color: #6196cc; +} + +.token.boolean, +.token.number, +.token.function { + color: #f08d49; +} + +.token.property, +.token.class-name, +.token.constant, +.token.symbol { + color: #f8c555; +} + +.token.selector, +.token.important, +.token.atrule, +.token.keyword, +.token.builtin { + color: #cc99cd; +} + +.token.string, +.token.char, +.token.attr-value, +.token.regex, +.token.variable { + color: #7ec699; +} + +.token.operator, +.token.entity, +.token.url { + color: #67cdcc; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.inserted { + color: green; +} + +div.code-toolbar { + position: relative; +} + +div.code-toolbar > .toolbar { + position: absolute; + top: 0.5rem; + right: 1.5rem; + transition: opacity 0.3s ease-in-out; + /* opacity: 0; */ + background-color: red; + border-radius: 5%; + font-family: Ubuntu; +} + +div.code-toolbar:hover > .toolbar { + opacity: 1; +} + +/* Separate line b/c rules are thrown out if selector is invalid. + IE11 and old Edge versions don't support :focus-within. */ +div.code-toolbar:focus-within > .toolbar { + opacity: 1; +} + +div.code-toolbar > .toolbar { + display: block; +} + +/* .toolbar { + display: none; +} */ + +div.code-toolbar:hover .toolbar { + display: inline-block; + background-color: red; +} + +div.code-toolbar > .toolbar a { + cursor: pointer; +} + +div.code-toolbar > .toolbar button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; +} + +div.code-toolbar > .toolbar a, +div.code-toolbar > .toolbar button, +div.code-toolbar > .toolbar span { + font-size: 0.6rem; + padding: 0.5rem; + outline-color: red; + outline-width: 1rem; + font-weight: bolder; + color: white; + /* background: #f5f2f0; + background: rgba(224, 224, 224, 0.2); + box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); + border-radius: .5em; */ +} + +div.code-toolbar > .toolbar a:hover, +div.code-toolbar > .toolbar a:focus, +div.code-toolbar > .toolbar button:hover, +div.code-toolbar > .toolbar button:focus, +div.code-toolbar > .toolbar span:hover, +div.code-toolbar > .toolbar span:focus { + color: inherit; + text-decoration: none; +} + +pre { + margin: 0; +} + +div.code-toolbar { + margin-top: 1rem; +} + +.language-markup { + scrollbar-width: thin; +} + +@media screen and (max-width: 576px) { + div.code-toolbar > .toolbar { + right: 0.7rem; + } +} diff --git a/resources/prism.js b/resources/prism.js new file mode 100755 index 0000000..4eee8c2 --- /dev/null +++ b/resources/prism.js @@ -0,0 +1,10 @@ +/* PrismJS 1.23.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript&plugins=normalize-whitespace+toolbar+copy-to-clipboard */ +var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : {}, Prism = function (u) { var c = /\blang(?:uage)?-([\w-]+)\b/i, n = 0, e = {}, M = { manual: u.Prism && u.Prism.manual, disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler, util: { encode: function e(n) { return n instanceof W ? new W(n.type, e(n.content), n.alias) : Array.isArray(n) ? n.map(e) : n.replace(/&/g, "&").replace(/= l.reach); y += m.value.length, m = m.next) { var b = m.value; if (t.length > n.length) return; if (!(b instanceof W)) { var k, x = 1; if (h) { if (!(k = z(v, y, n, f))) break; var w = k.index, A = k.index + k[0].length, P = y; for (P += m.value.length; P <= w;)m = m.next, P += m.value.length; if (P -= m.value.length, y = P, m.value instanceof W) continue; for (var E = m; E !== t.tail && (P < A || "string" == typeof E.value); E = E.next)x++, P += E.value.length; x--, b = n.slice(y, P), k.index -= y } else if (!(k = z(v, 0, b, f))) continue; var w = k.index, S = k[0], O = b.slice(0, w), L = b.slice(w + S.length), N = y + b.length; l && N > l.reach && (l.reach = N); var j = m.prev; O && (j = I(t, j, O), y += O.length), q(t, j, x); var C = new W(o, g ? M.tokenize(S, g) : S, d, S); if (m = I(t, j, C), L && I(t, m, L), 1 < x) { var _ = { cause: o + "," + u, reach: N }; e(n, t, r, m.prev, y, _), l && _.reach > l.reach && (l.reach = _.reach) } } } } } }(e, a, n, a.head, 0), function (e) { var n = [], t = e.head.next; for (; t !== e.tail;)n.push(t.value), t = t.next; return n }(a) }, hooks: { all: {}, add: function (e, n) { var t = M.hooks.all; t[e] = t[e] || [], t[e].push(n) }, run: function (e, n) { var t = M.hooks.all[e]; if (t && t.length) for (var r, a = 0; r = t[a++];)r(n) } }, Token: W }; function W(e, n, t, r) { this.type = e, this.content = n, this.alias = t, this.length = 0 | (r || "").length } function z(e, n, t, r) { e.lastIndex = n; var a = e.exec(t); if (a && r && a[1]) { var i = a[1].length; a.index += i, a[0] = a[0].slice(i) } return a } function i() { var e = { value: null, prev: null, next: null }, n = { value: null, prev: e, next: null }; e.next = n, this.head = e, this.tail = n, this.length = 0 } function I(e, n, t) { var r = n.next, a = { value: t, prev: n, next: r }; return n.next = a, r.prev = a, e.length++, a } function q(e, n, t) { for (var r = n.next, a = 0; a < t && r !== e.tail; a++)r = r.next; (n.next = r).prev = n, e.length -= a } if (u.Prism = M, W.stringify = function n(e, t) { if ("string" == typeof e) return e; if (Array.isArray(e)) { var r = ""; return e.forEach(function (e) { r += n(e, t) }), r } var a = { type: e.type, content: n(e.content, t), tag: "span", classes: ["token", e.type], attributes: {}, language: t }, i = e.alias; i && (Array.isArray(i) ? Array.prototype.push.apply(a.classes, i) : a.classes.push(i)), M.hooks.run("wrap", a); var l = ""; for (var o in a.attributes) l += " " + o + '="' + (a.attributes[o] || "").replace(/"/g, """) + '"'; return "<" + a.tag + ' class="' + a.classes.join(" ") + '"' + l + ">" + a.content + "" }, !u.document) return u.addEventListener && (M.disableWorkerMessageHandler || u.addEventListener("message", function (e) { var n = JSON.parse(e.data), t = n.language, r = n.code, a = n.immediateClose; u.postMessage(M.highlight(r, M.languages[t], t)), a && u.close() }, !1)), M; var t = M.util.currentScript(); function r() { M.manual || M.highlightAll() } if (t && (M.filename = t.src, t.hasAttribute("data-manual") && (M.manual = !0)), !M.manual) { var a = document.readyState; "loading" === a || "interactive" === a && t && t.defer ? document.addEventListener("DOMContentLoaded", r) : window.requestAnimationFrame ? window.requestAnimationFrame(r) : window.setTimeout(r, 16) } return M }(_self); "undefined" != typeof module && module.exports && (module.exports = Prism), "undefined" != typeof global && (global.Prism = Prism); +Prism.languages.markup = { comment: //, prolog: /<\?[\s\S]+?\?>/, doctype: { pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^$|[[\]]/, "doctype-tag": /^DOCTYPE/, name: /[^\s<>'"]+/ } }, cdata: //i, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, Prism.languages.markup.tag.inside["attr-value"].inside.entity = Prism.languages.markup.entity, Prism.languages.markup.doctype.inside["internal-subset"].inside = Prism.languages.markup, Prism.hooks.add("wrap", function (a) { "entity" === a.type && (a.attributes.title = a.content.replace(/&/, "&")) }), Object.defineProperty(Prism.languages.markup.tag, "addInlined", { value: function (a, e) { var s = {}; s["language-" + e] = { pattern: /(^$)/i, lookbehind: !0, inside: Prism.languages[e] }, s.cdata = /^$/i; var t = { "included-cdata": { pattern: //i, inside: s } }; t["language-" + e] = { pattern: /[\s\S]+/, inside: Prism.languages[e] }; var n = {}; n[a] = { pattern: RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g, function () { return a }), "i"), lookbehind: !0, greedy: !0, inside: t }, Prism.languages.insertBefore("markup", "cdata", n) } }), Object.defineProperty(Prism.languages.markup.tag, "addAttribute", { value: function (a, e) { Prism.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp("(^|[\"'\\s])(?:" + a + ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))", "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [e, "language-" + e], inside: Prism.languages[e] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } }) } }), Prism.languages.html = Prism.languages.markup, Prism.languages.mathml = Prism.languages.markup, Prism.languages.svg = Prism.languages.markup, Prism.languages.xml = Prism.languages.extend("markup", {}), Prism.languages.ssml = Prism.languages.xml, Prism.languages.atom = Prism.languages.xml, Prism.languages.rss = Prism.languages.xml; +!function (s) { var e = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/; s.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/, inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + e.source + "|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + e.source + "$"), alias: "url" } } }, selector: RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + e.source + ")*(?=\\s*\\{)"), string: { pattern: e, greedy: !0 }, property: /(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, important: /!important\b/i, function: /[-a-z0-9]+(?=\()/i, punctuation: /[(){};:,]/ }, s.languages.css.atrule.inside.rest = s.languages.css; var t = s.languages.markup; t && (t.tag.addInlined("style", "css"), t.tag.addAttribute("style", "css")) }(Prism); +Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, boolean: /\b(?:true|false)\b/, function: /\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }; +Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-flags": /[a-z]+$/, "regex-delimiter": /^\/|\/$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { "template-string": { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\${|}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)", "javascript")), Prism.languages.js = Prism.languages.javascript; +!function () { if ("undefined" != typeof Prism && "undefined" != typeof document) { var i = Object.assign || function (e, n) { for (var t in n) n.hasOwnProperty(t) && (e[t] = n[t]); return e }; e.prototype = { setDefaults: function (e) { this.defaults = i(this.defaults, e) }, normalize: function (e, n) { for (var t in n = i(this.defaults, n)) { var r = t.replace(/-(\w)/g, function (e, n) { return n.toUpperCase() }); "normalize" !== t && "setDefaults" !== r && n[t] && this[r] && (e = this[r].call(this, e, n[t])) } return e }, leftTrim: function (e) { return e.replace(/^\s+/, "") }, rightTrim: function (e) { return e.replace(/\s+$/, "") }, tabsToSpaces: function (e, n) { return n = 0 | n || 4, e.replace(/\t/g, new Array(++n).join(" ")) }, spacesToTabs: function (e, n) { return n = 0 | n || 4, e.replace(RegExp(" {" + n + "}", "g"), "\t") }, removeTrailing: function (e) { return e.replace(/\s*?$/gm, "") }, removeInitialLineFeed: function (e) { return e.replace(/^(?:\r?\n|\r)/, "") }, removeIndent: function (e) { var n = e.match(/^[^\S\n\r]*(?=\S)/gm); return n && n[0].length ? (n.sort(function (e, n) { return e.length - n.length }), n[0].length ? e.replace(RegExp("^" + n[0], "gm"), "") : e) : e }, indent: function (e, n) { return e.replace(/^[^\S\n\r]*(?=\S)/gm, new Array(++n).join("\t") + "$&") }, breakLines: function (e, n) { n = !0 === n ? 80 : 0 | n || 80; for (var t = e.split("\n"), r = 0; r < t.length; ++r)if (!(s(t[r]) <= n)) { for (var i = t[r].split(/(\s+)/g), o = 0, a = 0; a < i.length; ++a) { var l = s(i[a]); n < (o += l) && (i[a] = "\n" + i[a], o = l) } t[r] = i.join("") } return t.join("\n") } }, "undefined" != typeof module && module.exports && (module.exports = e), "undefined" != typeof Prism && (Prism.plugins.NormalizeWhitespace = new e({ "remove-trailing": !0, "remove-indent": !0, "left-trim": !0, "right-trim": !0 }), Prism.hooks.add("before-sanity-check", function (e) { var n = Prism.plugins.NormalizeWhitespace; if ((!e.settings || !1 !== e.settings["whitespace-normalization"]) && Prism.util.isActive(e.element, "whitespace-normalization", !0)) if (e.element && e.element.parentNode || !e.code) { var t = e.element.parentNode; if (e.code && t && "pre" === t.nodeName.toLowerCase()) { for (var r = t.childNodes, i = "", o = "", a = !1, l = 0; l < r.length; ++l) { var s = r[l]; s == e.element ? a = !0 : "#text" === s.nodeName && (a ? o += s.nodeValue : i += s.nodeValue, t.removeChild(s), --l) } if (e.element.children.length && Prism.plugins.KeepMarkup) { var c = i + e.element.innerHTML + o; e.element.innerHTML = n.normalize(c, e.settings), e.code = e.element.textContent } else e.code = i + e.code + o, e.code = n.normalize(e.code, e.settings) } } else e.code = n.normalize(e.code, e.settings) })) } function e(e) { this.defaults = i({}, e) } function s(e) { for (var n = 0, t = 0; t < e.length; ++t)e.charCodeAt(t) == "\t".charCodeAt(0) && (n += 3); return e.length + n } }(); +!function () { if ("undefined" != typeof Prism && "undefined" != typeof document) { var i = [], l = {}, d = function () { }; Prism.plugins.toolbar = {}; var e = Prism.plugins.toolbar.registerButton = function (e, n) { var t; t = "function" == typeof n ? n : function (e) { var t; return "function" == typeof n.onClick ? ((t = document.createElement("button")).type = "button", t.addEventListener("click", function () { n.onClick.call(this, e) })) : "string" == typeof n.url ? (t = document.createElement("a")).href = n.url : t = document.createElement("span"), n.className && t.classList.add(n.className), t.textContent = n.text, t }, e in l ? console.warn('There is a button with the key "' + e + '" registered already.') : i.push(l[e] = t) }, t = Prism.plugins.toolbar.hook = function (a) { var e = a.element.parentNode; if (e && /pre/i.test(e.nodeName) && !e.parentNode.classList.contains("code-toolbar")) { var t = document.createElement("div"); t.classList.add("code-toolbar"), e.parentNode.insertBefore(t, e), t.appendChild(e); var r = document.createElement("div"); r.classList.add("toolbar"); var n = i, o = function (e) { for (; e;) { var t = e.getAttribute("data-toolbar-order"); if (null != t) return (t = t.trim()).length ? t.split(/\s*,\s*/g) : []; e = e.parentElement } }(a.element); o && (n = o.map(function (e) { return l[e] || d })), n.forEach(function (e) { var t = e(a); if (t) { var n = document.createElement("div"); n.classList.add("toolbar-item"), n.appendChild(t), r.appendChild(n) } }), t.appendChild(r) } }; e("label", function (e) { var t = e.element.parentNode; if (t && /pre/i.test(t.nodeName) && t.hasAttribute("data-label")) { var n, a, r = t.getAttribute("data-label"); try { a = document.querySelector("template#" + r) } catch (e) { } return a ? n = a.content : (t.hasAttribute("data-url") ? (n = document.createElement("a")).href = t.getAttribute("data-url") : n = document.createElement("span"), n.textContent = r), n } }), Prism.hooks.add("complete", t) } }(); +!function () { function u(t, e) { t.addEventListener("click", function () { !function (t) { navigator.clipboard ? navigator.clipboard.writeText(t.getText()).then(t.success, t.error) : function (e) { var t = document.createElement("textarea"); t.value = e.getText(), t.style.top = "0", t.style.left = "0", t.style.position = "fixed", document.body.appendChild(t), t.focus(), t.select(); try { var o = document.execCommand("copy"); setTimeout(function () { o ? e.success() : e.error() }, 1) } catch (t) { setTimeout(function () { e.error(t) }, 1) } document.body.removeChild(t) }(t) }(e) }) } "undefined" != typeof Prism && "undefined" != typeof document && (Prism.plugins.toolbar ? Prism.plugins.toolbar.registerButton("copy-to-clipboard", function (t) { var e = t.element, o = function (t) { var e = { copy: "COPY", "copy-error": "Press Ctrl+C to copy", "copy-success": "Copied!", "copy-timeout": 5e3 }; for (var o in e) { for (var n = "data-prismjs-" + o, r = t; r && !r.hasAttribute(n);)r = r.parentElement; r && (e[o] = r.getAttribute(n)) } return e }(e), n = document.createElement("button"); n.className = "copy-to-clipboard-button", n.setAttribute("type", "button"); var r = document.createElement("span"); return n.appendChild(r), i("copy"), u(n, { getText: function () { return e.textContent }, success: function () { i("copy-success"), c() }, error: function () { i("copy-error"), setTimeout(function () { !function (t) { window.getSelection().selectAllChildren(t) }(e) }, 1), c() } }), n; function c() { setTimeout(function () { i("copy") }, o["copy-timeout"]) } function i(t) { r.textContent = o[t], n.setAttribute("data-copy-state", t) } }) : console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")) }(); diff --git a/resources/resources.zip b/resources/resources.zip new file mode 100755 index 0000000..9ef26cb Binary files /dev/null and b/resources/resources.zip differ diff --git a/resources/twitter.svg b/resources/twitter.svg new file mode 100755 index 0000000..00ffb44 --- /dev/null +++ b/resources/twitter.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/resources/x.svg b/resources/x.svg new file mode 100755 index 0000000..b1e395c --- /dev/null +++ b/resources/x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/svgs/black-bell.svg b/svgs/black-bell.svg new file mode 100755 index 0000000..d3950d3 --- /dev/null +++ b/svgs/black-bell.svg @@ -0,0 +1,4 @@ + + + + diff --git a/svgs/black-cart.svg b/svgs/black-cart.svg new file mode 100755 index 0000000..f1b07c7 --- /dev/null +++ b/svgs/black-cart.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/svgs/black-heart.svg b/svgs/black-heart.svg new file mode 100755 index 0000000..c53229d --- /dev/null +++ b/svgs/black-heart.svg @@ -0,0 +1,3 @@ + + + diff --git a/svgs/close-btn.svg b/svgs/close-btn.svg new file mode 100755 index 0000000..e12face --- /dev/null +++ b/svgs/close-btn.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/svgs/correct.svg b/svgs/correct.svg new file mode 100755 index 0000000..bb43207 --- /dev/null +++ b/svgs/correct.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/svgs/error-alert.svg b/svgs/error-alert.svg new file mode 100755 index 0000000..2d9cfa8 --- /dev/null +++ b/svgs/error-alert.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/svgs/exclamation.svg b/svgs/exclamation.svg new file mode 100755 index 0000000..b2a481e --- /dev/null +++ b/svgs/exclamation.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/facebook.svg b/svgs/facebook.svg new file mode 100755 index 0000000..cc2fe3e --- /dev/null +++ b/svgs/facebook.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/svgs/github.svg b/svgs/github.svg new file mode 100755 index 0000000..c7798b2 --- /dev/null +++ b/svgs/github.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/svgs/info-alert.svg b/svgs/info-alert.svg new file mode 100755 index 0000000..1841467 --- /dev/null +++ b/svgs/info-alert.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/menu-btn.svg b/svgs/menu-btn.svg new file mode 100755 index 0000000..13d0c63 --- /dev/null +++ b/svgs/menu-btn.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/svgs/menu.svg b/svgs/menu.svg new file mode 100755 index 0000000..5b39076 --- /dev/null +++ b/svgs/menu.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/svgs/nav-github.svg b/svgs/nav-github.svg new file mode 100755 index 0000000..a86821d --- /dev/null +++ b/svgs/nav-github.svg @@ -0,0 +1,3 @@ + + + diff --git a/svgs/nav-twitter.svg b/svgs/nav-twitter.svg new file mode 100755 index 0000000..c47558f --- /dev/null +++ b/svgs/nav-twitter.svg @@ -0,0 +1,3 @@ + + + diff --git a/svgs/plus.svg b/svgs/plus.svg new file mode 100755 index 0000000..71af535 --- /dev/null +++ b/svgs/plus.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/svgs/product-wish.svg b/svgs/product-wish.svg new file mode 100755 index 0000000..faf795f --- /dev/null +++ b/svgs/product-wish.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/svgs/rating.svg b/svgs/rating.svg new file mode 100755 index 0000000..adc8764 --- /dev/null +++ b/svgs/rating.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/svgs/star.svg b/svgs/star.svg new file mode 100755 index 0000000..34d7b7b --- /dev/null +++ b/svgs/star.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/svgs/success-alert.svg b/svgs/success-alert.svg new file mode 100755 index 0000000..f3d7583 --- /dev/null +++ b/svgs/success-alert.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/svgs/top.svg b/svgs/top.svg new file mode 100755 index 0000000..6c5b9b8 --- /dev/null +++ b/svgs/top.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/svgs/twitter.svg b/svgs/twitter.svg new file mode 100755 index 0000000..0efb028 --- /dev/null +++ b/svgs/twitter.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/svgs/warning-alert.svg b/svgs/warning-alert.svg new file mode 100755 index 0000000..33cb4e3 --- /dev/null +++ b/svgs/warning-alert.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/svgs/white-cart.svg b/svgs/white-cart.svg new file mode 100755 index 0000000..f9ed149 --- /dev/null +++ b/svgs/white-cart.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/white-heart.svg b/svgs/white-heart.svg new file mode 100755 index 0000000..6b94e40 --- /dev/null +++ b/svgs/white-heart.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/white-home.svg b/svgs/white-home.svg new file mode 100755 index 0000000..5c71fb6 --- /dev/null +++ b/svgs/white-home.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/white-profile.svg b/svgs/white-profile.svg new file mode 100755 index 0000000..d050bb4 --- /dev/null +++ b/svgs/white-profile.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/wish-btn.svg b/svgs/wish-btn.svg new file mode 100755 index 0000000..faf795f --- /dev/null +++ b/svgs/wish-btn.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/svgs/zen-brush-symbol.svg b/svgs/zen-brush-symbol.svg new file mode 100755 index 0000000..1804030 --- /dev/null +++ b/svgs/zen-brush-symbol.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/svgs/zen.svg b/svgs/zen.svg new file mode 100755 index 0000000..1f07ad2 --- /dev/null +++ b/svgs/zen.svg @@ -0,0 +1 @@ + \ No newline at end of file