diff --git a/gulpfile.js b/gulpfile.js index 166bc60a..393a4355 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -72,6 +72,7 @@ const cssFiles = [ path.src + '/css/link.css', path.src + '/css/theme.css', path.src + '/css/auto-suggest.css', + path.src + '/css/coffee.css', path.src + '/css/fontawesome.css' ] diff --git a/package.json b/package.json index a7e6be31..9979a137 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "6.3.0", + "version": "6.4.0", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/css/coffee.css b/src/css/coffee.css new file mode 100644 index 00000000..588bed4d --- /dev/null +++ b/src/css/coffee.css @@ -0,0 +1,61 @@ +.coffee { + margin-right: 1em; + font-size: 1em; + width: calc(calc(calc(var(--coffee-size) / 100) * 1.25) * 1em); +} + +.coffee-lid { + position: relative; + width: 100%; +} + +.coffee-lid-top, +.coffee-lid-bottom { + position: relative; + left: 50%; + transform: translateX(-50%); + height: calc(calc(calc(var(--coffee-size) / 100) * 0.25) * 1em); +} + +.coffee-lid-top { + background-color: rgb(var(--theme-color-12)); + width: 95%; + clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%); +} + +.coffee-lid-bottom { + background-color: rgb(var(--theme-color-10)); + width: 130%; +} + +.coffee-body { + background-color: rgb(var(--theme-color-20)); + width: 100%; + height: calc(calc(calc(var(--coffee-size) / 100) * 2) * 1em); + position: relative; + transition: background-color var(--layout-transition-extra-fast); + clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); +} + +.coffee-body-label { + background-color: rgb(var(--theme-color-06)); + width: 100%; + height: calc(calc(var(--coffee-size) / 100) * 1em); + position: absolute; + top: 50%; + left: 0; + transform: translateY(-50%); + transition: background-color var(--layout-transition-extra-fast); +} + +.coffee-body-label:before { + background-color: rgb(var(--theme-accent)); + content: ""; + border-radius: 100%; + width: calc(calc(calc(var(--coffee-size) / 100) * 0.75) * 1em); + height: calc(calc(calc(var(--coffee-size) / 100) * 0.75) * 1em); + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} diff --git a/src/css/variables.css b/src/css/variables.css index f7c3b108..9023a421 100644 --- a/src/css/variables.css +++ b/src/css/variables.css @@ -279,6 +279,8 @@ --modal-medium: 50em; --modal-large: 70em; --modal-size: var(--modal-medium); + /* coffee */ + --coffee-size: 80; /* z index */ --z-index-background: 1000; --z-index-link: 2000; diff --git a/src/html/link-css.html b/src/html/link-css.html index dd00a12a..0d6421e2 100644 --- a/src/html/link-css.html +++ b/src/html/link-css.html @@ -28,5 +28,6 @@ + diff --git a/src/html/menu/content/coffee/coffee.html b/src/html/menu/content/coffee/coffee.html index 5cbcb726..2962d81c 100644 --- a/src/html/menu/content/coffee/coffee.html +++ b/src/html/menu/content/coffee/coffee.html @@ -9,7 +9,15 @@