styles.scss 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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. Being removed incrementally (Phase 1, 2026-07-13).
  45. Dropped (unused / migrated): dropdown, button-group, accordion,
  46. breadcrumb, progress, toasts, modal, tooltip, popover, spinners,
  47. placeholders, carousel (→ native .dw-carousel), tables, close,
  48. images (→ .img-fluid one-liner below).
  49. Kept: grid + nav/navbar + forms/buttons + list-group + card +
  50. pagination + alert + badge (last.fm stat counts) + utilities API.
  51. (offcanvas nav is self-contained CSS via :target — see .dw-offcanvas.)
  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/containers';
  58. @import '../node_modules/bootstrap/scss/grid';
  59. @import '../node_modules/bootstrap/scss/forms';
  60. @import '../node_modules/bootstrap/scss/buttons';
  61. @import '../node_modules/bootstrap/scss/transitions';
  62. @import '../node_modules/bootstrap/scss/nav';
  63. @import '../node_modules/bootstrap/scss/navbar';
  64. @import '../node_modules/bootstrap/scss/card';
  65. @import '../node_modules/bootstrap/scss/list-group';
  66. @import '../node_modules/bootstrap/scss/helpers';
  67. @import '../node_modules/bootstrap/scss/utilities/api';
  68. // ---- replacements for dropped Bootstrap partials (Phase 1 + 2) ----
  69. // images partial: only .img-fluid was used (art page).
  70. .img-fluid {
  71. max-width: 100%;
  72. height: auto;
  73. }
  74. // badge: last.fm stat counts (music) + analytics hit counts. Matches the
  75. // former bootstrap/badge output exactly (incl. the theme's top:-1px nudge).
  76. .badge {
  77. display: inline-block;
  78. padding: 0.35em 0.65em;
  79. font-size: 0.75em;
  80. font-weight: 700;
  81. line-height: 1;
  82. color: #fff;
  83. text-align: center;
  84. white-space: nowrap;
  85. vertical-align: baseline;
  86. border-radius: 0.375rem;
  87. position: relative;
  88. top: -1px;
  89. }
  90. // alert: contact-form success / error messages (inc/tweaks.php). The BS
  91. // colour variants no longer compiled (theme-colors trimmed) — give them
  92. // real green/red here.
  93. .alert {
  94. position: relative;
  95. padding: 1rem;
  96. margin-bottom: 1rem;
  97. border: 1px solid transparent;
  98. border-radius: 0.375rem;
  99. }
  100. .alert-success {
  101. color: #0a3622;
  102. background-color: #d1e7dd;
  103. border-color: #a3cfbb;
  104. }
  105. .alert-danger {
  106. color: #58151c;
  107. background-color: #f8d7da;
  108. border-color: #f1aeb5;
  109. }
  110. // pagination: flex container only. WP paginate_links() emits .page-numbers /
  111. // .pagination a, styled in style.css; margin/padding also live there.
  112. .pagination {
  113. display: flex;
  114. list-style: none;
  115. }
  116. /* Bootstrap Icons font dropped (2026-06-19): the header's 8 nav icons are now
  117. inline SVG in parts/header.html, so the full icon font + its ~2000 CSS rules
  118. are no longer imported. */
  119. /***********************************************************
  120. ##################### Overrides ############################
  121. ************************************************************/
  122. // Bootstrap 5.3 changed .table to default --bs-table-bg to --bs-body-bg
  123. // (it was transparent in 5.2). Keep the About icon grid transparent.
  124. .table.icons {
  125. --bs-table-bg: transparent;
  126. }
  127. // Sprite icons (dw_icon() / <use href="#dw-…">, from the FA Pro kit → icons.svg).
  128. // Sized like a font icon: 1em square, inherits text color.
  129. .dw-icon {
  130. width: 1em;
  131. height: 1em;
  132. fill: currentColor;
  133. vertical-align: -0.125em;
  134. }
  135. // Social icons (was fa-2x). Baseline-aligned since they stand alone.
  136. .dw-icon-2x {
  137. width: 2em;
  138. height: 2em;
  139. vertical-align: middle;
  140. }
  141. // Offcanvas top-nav — self-contained, CSS-only (replaces Bootstrap's offcanvas
  142. // component + JS). The brand link is <a href="#nav">, so :target drives
  143. // the open state; a backdrop <a href="#"> and the × link close it. Tradeoffs vs
  144. // the BS JS version: no ESC-to-close, no focus-trap, no body-scroll-lock.
  145. .dw-offcanvas {
  146. position: fixed;
  147. top: 0;
  148. left: 0;
  149. right: 0;
  150. z-index: 1045; // above .navbar.fixed-top (1030)
  151. display: flex;
  152. flex-direction: column;
  153. height: 85px; // match the scroll-up navbar dropdown (~84.6px)
  154. visibility: hidden;
  155. transform: translateY(-100%);
  156. transition: transform 0.3s ease-in-out, visibility 0.3s;
  157. overflow-y: auto;
  158. background: rgba(72, 76, 87, 0.7); // footer color (#484c57), translucent
  159. backdrop-filter: blur(6px);
  160. }
  161. .dw-offcanvas:target {
  162. visibility: visible;
  163. transform: none;
  164. }
  165. .dw-offcanvas-backdrop {
  166. display: none;
  167. position: fixed;
  168. inset: 0;
  169. z-index: 1040; // below .dw-offcanvas
  170. background: rgba(0, 0, 0, 0.4);
  171. }
  172. .dw-offcanvas:target ~ .dw-offcanvas-backdrop {
  173. display: block;
  174. }
  175. @media (prefers-reduced-motion: reduce) {
  176. .dw-offcanvas {
  177. transition: none;
  178. }
  179. }
  180. // Gallery carousel — CSS scroll-snap (replaces the Bootstrap carousel on the
  181. // art page). Swipe / trackpad / scrollbar natively; prev-next + arrow keys via
  182. // a tiny vanilla script (js/art.js). No autoplay (was 5s) by design.
  183. .dw-carousel {
  184. position: relative;
  185. }
  186. .dw-carousel-track {
  187. display: flex;
  188. overflow-x: auto;
  189. scroll-snap-type: x mandatory;
  190. scroll-behavior: smooth;
  191. scrollbar-width: none; // Firefox
  192. &::-webkit-scrollbar {
  193. display: none; // WebKit
  194. }
  195. }
  196. .dw-carousel-slide {
  197. flex: 0 0 100%;
  198. scroll-snap-align: center;
  199. display: flex;
  200. justify-content: center;
  201. }
  202. .dw-carousel-prev,
  203. .dw-carousel-next {
  204. position: absolute;
  205. top: 50%;
  206. transform: translateY(-50%);
  207. z-index: 2;
  208. width: 3rem;
  209. height: 3rem;
  210. border: 0;
  211. border-radius: 50%;
  212. background: rgba(0, 0, 0, 0.5);
  213. color: #fff;
  214. font-size: 1.75rem;
  215. line-height: 1;
  216. cursor: pointer;
  217. }
  218. .dw-carousel-prev {
  219. left: 1rem;
  220. }
  221. .dw-carousel-next {
  222. right: 1rem;
  223. }
  224. @media (prefers-reduced-motion: reduce) {
  225. .dw-carousel-track {
  226. scroll-behavior: auto;
  227. }
  228. }
  229. // Studio hero — vanilla fade-carousel (replaces Bootstrap carousel-fade + the
  230. // backstretch background). #studio-caro keeps its caro-grad* solid-colour
  231. // classes + 1s transition from style.css; the bg layer / <video> show through
  232. // when the gradient is caro-grad5 (transparent). Driven by js/studio.js.
  233. #studio-caro {
  234. position: relative;
  235. overflow: hidden;
  236. min-height: 80vh;
  237. }
  238. .dw-studio-bg {
  239. position: absolute;
  240. inset: 0;
  241. z-index: 0;
  242. background-size: cover;
  243. background-position: center;
  244. }
  245. .dw-studio-video,
  246. .dw-studio-tv {
  247. position: absolute;
  248. inset: 0;
  249. width: 100%;
  250. height: 100%;
  251. object-fit: cover;
  252. display: none; // shown per-slide by studio.js (camera → Media, tv → fact intro)
  253. }
  254. .dw-studio-tv {
  255. filter: saturate(0); // grayscale, as it was behind the About fact slides
  256. }
  257. .dw-fade-carousel {
  258. position: relative;
  259. z-index: 1;
  260. }
  261. .dw-fade-slide {
  262. position: absolute;
  263. inset: 0;
  264. opacity: 0;
  265. visibility: hidden;
  266. transition: opacity 0.8s ease;
  267. }
  268. .dw-fade-slide.active {
  269. position: relative; // the active slide defines the track height
  270. opacity: 1;
  271. visibility: visible;
  272. }
  273. @media (prefers-reduced-motion: reduce) {
  274. .dw-fade-slide {
  275. transition: none;
  276. }
  277. }
  278. // Studio tab panes — vanilla show/hide (replaces Bootstrap Tab).
  279. #studio-tab .tab-pane {
  280. display: none;
  281. }
  282. #studio-tab .tab-pane.active {
  283. display: block;
  284. }
  285. // About fade-carousel indicator dots (replaces Bootstrap .carousel-indicators).
  286. .dw-fade-dots {
  287. position: absolute;
  288. bottom: 1.5rem;
  289. left: 0;
  290. right: 0;
  291. z-index: 3;
  292. display: flex;
  293. justify-content: center;
  294. gap: 0.5rem;
  295. }
  296. .dw-fade-dot {
  297. width: 12px;
  298. height: 12px;
  299. padding: 0;
  300. border: 1px solid #fff;
  301. border-radius: 50%;
  302. background: transparent;
  303. opacity: 0.6;
  304. cursor: pointer;
  305. }
  306. .dw-fade-dot.active {
  307. background: #fff;
  308. opacity: 1;
  309. }