styles.scss 8.3 KB

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