styles.scss 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. /***********************************************************
  2. ############################################################
  3. . . . . . .
  4. . . ...-..-| |-. .-. .-.-..-| .-.. ...-|
  5. ` ` '' '`-'-' '-`-`-' ' '`-'-`-`-` '`-'-
  6. url - https://davidawindham.com
  7. git - https://github.com/windhamdavid/daw
  8. need to test
  9. ############################################################
  10. ************************************************************/
  11. /***********************************************************
  12. ################### Bootstrap Functions ####################
  13. ************************************************************/
  14. @import '../node_modules/bootstrap/scss/functions';
  15. @import '../node_modules/bootstrap/scss/variables';
  16. @import '../node_modules/bootstrap/scss/variables-dark';
  17. @import '../node_modules/bootstrap/scss/maps';
  18. @import '../node_modules/bootstrap/scss/mixins';
  19. /***********************************************************
  20. ####################### Custom ############################
  21. ************************************************************/
  22. $body-bg: #d3d3d3;
  23. $body-color: #232323;
  24. $link-color: #67000a;
  25. $theme-colors: (
  26. "dark": #535763,
  27. );
  28. $custom-colors: (
  29. 'dw-blue-dark': #484C57,
  30. 'dw-blue':#535763,
  31. 'dw-light':#e2e2e2,
  32. 'dw-bright':#e3e3e3,
  33. );
  34. $theme-colors: map-merge($theme-colors, $custom-colors);
  35. $theme-colors: map-remove($theme-colors, 'primary','secondary','success','warning', 'info');
  36. $colors: map-remove($colors, 'white','black','gray','gray-dark','dark','blue','indigo','purple','pink', 'orange', 'yellow', 'green', 'teal', 'cyan');
  37. $theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
  38. $utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
  39. $utilities-text-colors: map-loop($utilities-colors, rgba-css-var, "$key", "text");
  40. $utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, "$key", "bg");
  41. $enable-negative-margins: true;
  42. /***********************************************************
  43. ########## Bootstrap 5 — subset to used parts #############
  44. Dropped (unused in the theme): dropdown, button-group,
  45. accordion, breadcrumb, progress, toasts, modal, tooltip,
  46. popover, spinners, placeholders.
  47. Kept: grid + carousel + nav/navbar + forms/buttons + tables
  48. + list-group + card + pagination + alert + badge (last.fm stat
  49. counts) + the utilities API. (offcanvas nav is now self-contained
  50. CSS via :target — see .dw-offcanvas in Overrides.)
  51. (Was the full ~200 KB framework.)
  52. ************************************************************/
  53. @import '../node_modules/bootstrap/scss/utilities';
  54. @import '../node_modules/bootstrap/scss/root';
  55. @import '../node_modules/bootstrap/scss/reboot';
  56. @import '../node_modules/bootstrap/scss/type';
  57. @import '../node_modules/bootstrap/scss/images';
  58. @import '../node_modules/bootstrap/scss/containers';
  59. @import '../node_modules/bootstrap/scss/grid';
  60. @import '../node_modules/bootstrap/scss/tables';
  61. @import '../node_modules/bootstrap/scss/forms';
  62. @import '../node_modules/bootstrap/scss/buttons';
  63. @import '../node_modules/bootstrap/scss/transitions';
  64. @import '../node_modules/bootstrap/scss/nav';
  65. @import '../node_modules/bootstrap/scss/navbar';
  66. @import '../node_modules/bootstrap/scss/card';
  67. @import '../node_modules/bootstrap/scss/pagination';
  68. @import '../node_modules/bootstrap/scss/alert';
  69. @import '../node_modules/bootstrap/scss/list-group';
  70. @import '../node_modules/bootstrap/scss/badge';
  71. @import '../node_modules/bootstrap/scss/close';
  72. @import '../node_modules/bootstrap/scss/carousel';
  73. @import '../node_modules/bootstrap/scss/helpers';
  74. @import '../node_modules/bootstrap/scss/utilities/api';
  75. /* Bootstrap Icons font dropped (2026-06-19): the header's 8 nav icons are now
  76. inline SVG in parts/header.html, so the full icon font + its ~2000 CSS rules
  77. are no longer imported. */
  78. /***********************************************************
  79. ##################### Overrides ############################
  80. ************************************************************/
  81. // Bootstrap 5.3 changed .table to default --bs-table-bg to --bs-body-bg
  82. // (it was transparent in 5.2). Keep the About icon grid transparent.
  83. .table.icons {
  84. --bs-table-bg: transparent;
  85. }
  86. // Sprite icons (dw_icon() / <use href="#dw-…">, from the FA Pro kit → icons.svg).
  87. // Sized like a font icon: 1em square, inherits text color.
  88. .dw-icon {
  89. width: 1em;
  90. height: 1em;
  91. fill: currentColor;
  92. vertical-align: -0.125em;
  93. }
  94. // Social icons (was fa-2x). Baseline-aligned since they stand alone.
  95. .dw-icon-2x {
  96. width: 2em;
  97. height: 2em;
  98. vertical-align: middle;
  99. }
  100. // Offcanvas top-nav — self-contained, CSS-only (replaces Bootstrap's offcanvas
  101. // component + JS). The brand link is <a href="#offcanvasNav">, so :target drives
  102. // the open state; a backdrop <a href="#"> and the × link close it. Tradeoffs vs
  103. // the BS JS version: no ESC-to-close, no focus-trap, no body-scroll-lock.
  104. .dw-offcanvas {
  105. position: fixed;
  106. top: 0;
  107. left: 0;
  108. right: 0;
  109. z-index: 1045; // above .navbar.fixed-top (1030)
  110. display: flex;
  111. flex-direction: column;
  112. height: 100px;
  113. visibility: hidden;
  114. transform: translateY(-100%);
  115. transition: transform 0.3s ease-in-out, visibility 0.3s;
  116. overflow-y: auto;
  117. }
  118. .dw-offcanvas:target {
  119. visibility: visible;
  120. transform: none;
  121. }
  122. .dw-offcanvas-close {
  123. position: absolute;
  124. top: 0.25rem;
  125. right: 0.75rem;
  126. font-size: 1.75rem;
  127. line-height: 1;
  128. color: inherit;
  129. text-decoration: none;
  130. }
  131. .dw-offcanvas-backdrop {
  132. display: none;
  133. position: fixed;
  134. inset: 0;
  135. z-index: 1040; // below .dw-offcanvas
  136. background: rgba(0, 0, 0, 0.4);
  137. }
  138. .dw-offcanvas:target ~ .dw-offcanvas-backdrop {
  139. display: block;
  140. }
  141. @media (prefers-reduced-motion: reduce) {
  142. .dw-offcanvas {
  143. transition: none;
  144. }
  145. }
  146. // Gallery carousel — CSS scroll-snap (replaces the Bootstrap carousel on the
  147. // art page). Swipe / trackpad / scrollbar natively; prev-next + arrow keys via
  148. // a tiny vanilla script (js/art.js). No autoplay (was 5s) by design.
  149. .dw-carousel {
  150. position: relative;
  151. }
  152. .dw-carousel-track {
  153. display: flex;
  154. overflow-x: auto;
  155. scroll-snap-type: x mandatory;
  156. scroll-behavior: smooth;
  157. scrollbar-width: none; // Firefox
  158. &::-webkit-scrollbar {
  159. display: none; // WebKit
  160. }
  161. }
  162. .dw-carousel-slide {
  163. flex: 0 0 100%;
  164. scroll-snap-align: center;
  165. display: flex;
  166. justify-content: center;
  167. }
  168. .dw-carousel-prev,
  169. .dw-carousel-next {
  170. position: absolute;
  171. top: 50%;
  172. transform: translateY(-50%);
  173. z-index: 2;
  174. width: 3rem;
  175. height: 3rem;
  176. border: 0;
  177. border-radius: 50%;
  178. background: rgba(0, 0, 0, 0.5);
  179. color: #fff;
  180. font-size: 1.75rem;
  181. line-height: 1;
  182. cursor: pointer;
  183. }
  184. .dw-carousel-prev {
  185. left: 1rem;
  186. }
  187. .dw-carousel-next {
  188. right: 1rem;
  189. }
  190. @media (prefers-reduced-motion: reduce) {
  191. .dw-carousel-track {
  192. scroll-behavior: auto;
  193. }
  194. }
  195. // Studio hero — vanilla fade-carousel (replaces Bootstrap carousel-fade + the
  196. // backstretch background). #studio-caro keeps its caro-grad* solid-colour
  197. // classes + 1s transition from style.css; the bg layer / <video> show through
  198. // when the gradient is caro-grad5 (transparent). Driven by js/studio.js.
  199. #studio-caro {
  200. position: relative;
  201. overflow: hidden;
  202. min-height: 80vh;
  203. }
  204. .dw-studio-bg {
  205. position: absolute;
  206. inset: 0;
  207. z-index: 0;
  208. background-size: cover;
  209. background-position: center;
  210. }
  211. .dw-studio-video,
  212. .dw-studio-tv {
  213. position: absolute;
  214. inset: 0;
  215. width: 100%;
  216. height: 100%;
  217. object-fit: cover;
  218. display: none; // shown per-slide by studio.js (camera → Media, tv → fact intro)
  219. }
  220. .dw-studio-tv {
  221. filter: saturate(0); // grayscale, as it was behind the About fact slides
  222. }
  223. .dw-fade-carousel {
  224. position: relative;
  225. z-index: 1;
  226. }
  227. .dw-fade-slide {
  228. position: absolute;
  229. inset: 0;
  230. opacity: 0;
  231. visibility: hidden;
  232. transition: opacity 0.8s ease;
  233. }
  234. .dw-fade-slide.active {
  235. position: relative; // the active slide defines the track height
  236. opacity: 1;
  237. visibility: visible;
  238. }
  239. @media (prefers-reduced-motion: reduce) {
  240. .dw-fade-slide {
  241. transition: none;
  242. }
  243. }
  244. // Studio tab panes — vanilla show/hide (replaces Bootstrap Tab).
  245. #studio-tab .tab-pane {
  246. display: none;
  247. }
  248. #studio-tab .tab-pane.active {
  249. display: block;
  250. }
  251. // About fade-carousel indicator dots (replaces Bootstrap .carousel-indicators).
  252. .dw-fade-dots {
  253. position: absolute;
  254. bottom: 1.5rem;
  255. left: 0;
  256. right: 0;
  257. z-index: 3;
  258. display: flex;
  259. justify-content: center;
  260. gap: 0.5rem;
  261. }
  262. .dw-fade-dot {
  263. width: 12px;
  264. height: 12px;
  265. padding: 0;
  266. border: 1px solid #fff;
  267. border-radius: 50%;
  268. background: transparent;
  269. opacity: 0.6;
  270. cursor: pointer;
  271. }
  272. .dw-fade-dot.active {
  273. background: #fff;
  274. opacity: 1;
  275. }