_widgets.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. /*************************************************
  2. * Page Builder: sections and widgets
  3. **************************************************/
  4. .home-section {
  5. // Use `background` rather than `background-color` so it can support gradients in theme packs.
  6. background: $sta-home-section-odd;
  7. position: relative; // Required for component positioning within section.
  8. padding: 110px 0 110px 0;
  9. z-index: 0; // Explicit z-order otherwise `.home-section-bg` can be hidden by any `.home-section` background.
  10. }
  11. // Responsive fullscreen option for widgets
  12. .home-section.fullscreen {
  13. min-height: calc(100vh - 70px);
  14. }
  15. @include media-breakpoint-down(md) {
  16. .home-section.fullscreen {
  17. min-height: calc(100vh - 50px);
  18. }
  19. }
  20. .no-navbar .home-section.fullscreen {
  21. min-height: 100vh;
  22. }
  23. // Section theming
  24. .home-section.light,
  25. .home-section.light h1 {
  26. color: #000;
  27. }
  28. .home-section.light a {
  29. color: $sta-link;
  30. }
  31. .home-section.dark a {
  32. color: $sta-dark-link;
  33. }
  34. /* Override dark colors that may be inherited from body.dark */
  35. .home-section.dark,
  36. .home-section.dark h1,
  37. .home-section.dark h2,
  38. .home-section.dark h3,
  39. .home-section.dark a:not(.btn) {
  40. color: #fff;
  41. }
  42. /* Underline links in dark sections to separate them from text */
  43. .home-section.dark a:not(.btn):not(.hero-cta-alt) {
  44. text-decoration: underline;
  45. }
  46. /* Revert Alert Box Link style (.home-section.dark style above should not be applied to it) */
  47. .home-section.dark .alert a {
  48. color: inherit !important;
  49. text-decoration: inherit !important;
  50. }
  51. /* Big underline style for links in dark sections */
  52. /* Disabled as it's an experimental style that requires CSS NOT Selector Level 4 (only in Safari) */
  53. /*
  54. .home-section.dark.big-underline a:not(.btn):not(.hero-cta-alt):not(.alert a) {
  55. text-decoration: none;
  56. position: relative;
  57. }
  58. .home-section.dark.big-underline a:not(.btn):not(.hero-cta-alt):not(.alert a):after {
  59. background: #fff;
  60. content: "";
  61. height: 2px;
  62. left: 0;
  63. right: 0;
  64. position: absolute;
  65. top: 100%;
  66. }*/
  67. // Fill padding of `.home-section` parent
  68. .home-section-bg {
  69. position: absolute;
  70. top: 0;
  71. left: 0;
  72. height: 100%; // Or fill-available when supported.
  73. width: 100%; // Or fill-available when supported.
  74. z-index: -1; // Place bg div behind content.
  75. }
  76. /* Default background image properties for home sections. */
  77. .home-section-bg.bg-image {
  78. background-position: center;
  79. background-repeat: no-repeat;
  80. background-size: cover;
  81. }
  82. /* Create a parallax-like scrolling effect on desktop browsers. */
  83. .parallax {
  84. background-attachment: fixed;
  85. }
  86. // Workaround issue with mobile browser support for fixed parallax background.
  87. @include media-breakpoint-down(md) {
  88. .parallax {
  89. background-attachment: scroll;
  90. }
  91. }
  92. .home-section:first-of-type {
  93. padding-top: 50px;
  94. }
  95. .home-section:nth-of-type(even) {
  96. background: $sta-home-section-even;
  97. }
  98. .dark .home-section {
  99. background: $sta-dark-home-section-odd;
  100. }
  101. .dark .home-section:nth-of-type(even) {
  102. background: $sta-dark-home-section-even;
  103. }
  104. @media screen and (max-width: 768px) {
  105. .home-section {
  106. padding: 60px 0 60px 0;
  107. }
  108. .home-section:first-of-type {
  109. padding-top: 40px;
  110. }
  111. }
  112. .section-heading h1 {
  113. margin: 0 0 10px 0;
  114. }
  115. .section-subheading {
  116. font-size: 1.25rem;
  117. font-family: $sta-font-heading, sans-serif;
  118. font-weight: bold;
  119. margin-top: 1rem;
  120. margin-bottom: .5rem;
  121. }
  122. .section-heading p {
  123. font-weight: 400;
  124. font-size: 1.1rem;
  125. color: rgba(0,0,0,0.54); // Accessible contrast, matching footer text color.
  126. }
  127. .dark .section-heading p {
  128. color: rgb(158, 158, 158);
  129. }
  130. /*************************************************
  131. * Widgets (common)
  132. **************************************************/
  133. .see-all {
  134. margin-top: 2rem;
  135. text-transform: uppercase;
  136. }
  137. /* Reset code highlighting style in Alerts when Alert is child of a `.dark` widget, but Alert should be light.` */
  138. /* But will this affect page which should have dark Alert? */
  139. .dark .alert pre,
  140. .dark .alert code {
  141. color: initial;
  142. background-color: initial;
  143. }
  144. /*************************************************
  145. * Hero Widget
  146. **************************************************/
  147. .wg-hero {
  148. padding: 3em 0; // More compact top and bottom padding for Hero.
  149. }
  150. .hero-title {
  151. font-size: 2.7rem;
  152. margin-top: 0;
  153. line-height: 1;
  154. }
  155. .hero-lead {
  156. max-width: 768px;
  157. font-size: 1.35rem;
  158. }
  159. .wg-hero.dark .hero-title,
  160. .wg-hero.dark .hero-lead,
  161. .wg-hero.dark .hero-cta-alt,
  162. .wg-hero.dark .hero-note > * {
  163. color: #fff;
  164. /*text-shadow: 1px 1px 4px rgba(0,0,0,0.5);*/ /* Uncomment to standout on complicated backgrounds. */
  165. }
  166. .wg-hero.dark a:not(.wg-hero .btn) {
  167. color: #fff;
  168. }
  169. .wg-hero .hero-lead a {
  170. text-decoration: underline;
  171. }
  172. .wg-hero .cta-btns {
  173. margin-bottom: 16px;
  174. }
  175. .wg-hero .btn {
  176. padding: .6em 2.1em;
  177. }
  178. .wg-hero.dark .btn {
  179. color: $sta-primary-dark;
  180. }
  181. a.hero-cta-alt {
  182. display: inline-block;
  183. position: relative;
  184. transition-duration: .2s;
  185. transition-property: transform;
  186. transition-timing-function: ease-out;
  187. font-size: 1.1rem;
  188. }
  189. a.hero-cta-alt:active,
  190. a.hero-cta-alt:focus,
  191. a.hero-cta-alt:hover {
  192. transform: scale(1.1);
  193. }
  194. .wg-hero .btn-lg {
  195. font-size: 1.1rem;
  196. }
  197. .wg-hero .hero-note {
  198. font-size: 0.8rem;
  199. }
  200. .hero-media {
  201. display: flex;
  202. align-items: center;
  203. justify-content: center;
  204. height: 100%;
  205. text-align: center;
  206. }
  207. /*************************************************
  208. * Slider Widget
  209. **************************************************/
  210. /* Clear `.home-section` as any padding or animation interferes with Slider's layout and animations. */
  211. .home-section.wg-slider {
  212. padding: 0;
  213. animation: none;
  214. animation-delay: unset;
  215. }
  216. /* The Slider widget reuses the Hero widget's `.wg-hero` class.
  217. * We must remove any `animation` and `clear` (although Hero no longer sets `clear: both`) in this instance or
  218. * multiple slides can be `.active` at once. */
  219. .carousel-inner .wg-hero {
  220. animation: none;
  221. clear: none;
  222. }
  223. /*************************************************
  224. * Featurette Widget
  225. **************************************************/
  226. .featurette {
  227. font-size: 0.8rem;
  228. line-height: 1.5;
  229. color: #555;
  230. text-align: center;
  231. }
  232. .featurette .section-subheading {
  233. margin-top: 0;
  234. margin-bottom: 5px;
  235. font-weight: 400;
  236. color: #333;
  237. }
  238. .dark .featurette,
  239. .dark .featurette .section-subheading {
  240. color: #fff;
  241. }
  242. .featurette-icon {
  243. display: block;
  244. width: 100%;
  245. color: $sta-primary;
  246. font-size: 3rem;
  247. text-align: center;
  248. }
  249. /*************************************************
  250. * About widget
  251. **************************************************/
  252. #profile {
  253. text-align: center;
  254. padding: 30px 10px;
  255. position: relative;
  256. }
  257. .avatar {
  258. width: 270px;
  259. height: 270px;
  260. margin: 0 auto;
  261. object-fit: cover;
  262. }
  263. // Use smaller avatar size in About widget on small devices.
  264. @include media-breakpoint-down(sm) {
  265. .wg-about .avatar {
  266. width: 200px;
  267. height: 200px;
  268. }
  269. }
  270. .avatar-circle {
  271. border-radius: 50%;
  272. }
  273. .avatar-square {
  274. border-radius: 3px;
  275. }
  276. .portrait-title h2 {
  277. font-size: 1.75em;
  278. font-weight: 300;
  279. color: #000000;
  280. margin: 20px 0 10px 0;
  281. }
  282. .portrait-title h3 {
  283. font-size: 1rem;
  284. font-weight: 300;
  285. color: rgba(0,0,0, 0.54);
  286. margin: 0px 0 10px 0;
  287. }
  288. ul.network-icon {
  289. display: inline-flex;
  290. flex-direction: row;
  291. flex-wrap: wrap;
  292. justify-content: center;
  293. list-style: none;
  294. padding: 0;
  295. margin: 0;
  296. }
  297. #profile .network-icon {
  298. margin-top: 30px;
  299. }
  300. .network-icon li {
  301. margin-right: 10px;
  302. }
  303. .network-icon li:last-of-type {
  304. margin-right: 0;
  305. }
  306. .network-icon li:hover {
  307. transform: scale(1.2)
  308. }
  309. .big-icon {
  310. font-size: 2rem;
  311. }
  312. ul.ul-interests li {
  313. font-size: 0.9rem;
  314. }
  315. ul.ul-edu {
  316. list-style: none;
  317. }
  318. ul.ul-edu li {
  319. position: relative;
  320. padding: 0px 15px 4px 3px;
  321. }
  322. ul.ul-edu li .description p {
  323. margin: 0;
  324. }
  325. ul.ul-edu li .description p.course {
  326. font-size: 0.9rem;
  327. }
  328. ul.ul-edu li .description p.institution {
  329. font-size: 0.75rem;
  330. color: rgba(0,0,0,0.6);
  331. }
  332. /*************************************************
  333. * Experience
  334. **************************************************/
  335. .exp-title {
  336. text-transform: none !important;
  337. }
  338. .exp-company {
  339. font-weight: normal !important;
  340. text-transform: none !important;
  341. }
  342. .exp-meta {
  343. font-size: 0.8rem;
  344. }
  345. .experience .card-text,
  346. .experience .card-text p {
  347. color: #000 !important;
  348. font-size: 0.75rem !important;
  349. }
  350. .dark .experience .text-muted {
  351. color: rgba(255, 255, 255, 0.8) !important;
  352. }
  353. .dark .experience .card-text,
  354. .dark .experience .card-text p {
  355. color: rgb(248, 248, 242) !important;
  356. }
  357. // For a UL after P, remove the spacing between (P margin-bottom) without affecting any nested lists.
  358. .card .card-text p + ul {
  359. margin-top: -1rem;
  360. margin-bottom: 0rem;
  361. }
  362. .experience .m-2 .border,
  363. .experience .col.border-right {
  364. border-color: $sta-primary !important;
  365. }
  366. .experience .m-2 .border.exp-fill {
  367. background-color: $sta-primary !important;
  368. }
  369. /*************************************************
  370. * Talks
  371. **************************************************/
  372. .talk-metadata {
  373. color: #4b4f56;
  374. font-size: 0.8rem;
  375. }
  376. /*************************************************
  377. * Projects
  378. **************************************************/
  379. .project-widget-simple li {
  380. margin-bottom: 1rem;
  381. }
  382. .project-widget-simple li:last-of-type {
  383. margin-bottom: 0;
  384. }
  385. .project-widget-simple .project-title {
  386. margin-bottom: 6px;
  387. }
  388. .project-widget-simple .project-summary {
  389. font-size: 0.9rem;
  390. margin-bottom: 0.4rem;
  391. }
  392. .projects-container {
  393. display: block;
  394. position: relative;
  395. /*margin-top: 5rem;*/
  396. overflow: hidden;
  397. }
  398. .project-toolbar{
  399. margin-bottom: 2rem;
  400. }
  401. .project-card {
  402. position: relative;
  403. width: calc(33.3% - 13.3px); /* Fluid 3 columns ($gutter * ($number_of_cols - 1) / $number_of_cols; following https://stackoverflow.com/a/51290967) */
  404. }
  405. @media screen and (max-width: 1199px) {
  406. .project-card {
  407. width: calc(50% - 10px); /* Fluid 2 columns ($gutter * ($number_of_cols - 1) / $number_of_cols; following https://stackoverflow.com/a/51290967) */
  408. }
  409. }
  410. @media screen and (max-width: 768px) {
  411. .project-card {
  412. width: 100%; /* 1 column */
  413. }
  414. }
  415. .project-item {
  416. margin-bottom: 1.5rem;
  417. }
  418. .project-card.project-item {
  419. margin: 0 0 20px 0; /* Set to Isotope's gutter size */
  420. }
  421. .project-card .card {
  422. margin: 0; /* Remove default card margin and use Isotope gutter */
  423. }
  424. .project-showcase .project-item {
  425. margin-bottom: 3rem;
  426. }
  427. .project-item:last-of-type {
  428. margin-bottom: 0;
  429. }
  430. .isotope-item {
  431. z-index: 2;
  432. }
  433. .isotope-item:hover{
  434. z-index: 3;
  435. }
  436. /*************************************************
  437. * Accomplishments
  438. **************************************************/
  439. .card.course {
  440. margin-bottom: 1rem; /* More compact spacing than Experience widget as typically more items here. */
  441. }
  442. .card.course:last-of-type {
  443. margin-bottom: 0;
  444. }
  445. .course .card-subtitle a {
  446. border-bottom: solid 1px transparent;
  447. }
  448. .course .card-subtitle a:hover {
  449. border-bottom: solid 1px;
  450. text-decoration: none;
  451. }
  452. /*************************************************
  453. * People widget
  454. **************************************************/
  455. .people-widget {
  456. font-size: 0.8rem;
  457. text-align: center;
  458. }
  459. .people-widget .portrait-title h2 {
  460. font-size: 1rem;
  461. }
  462. .people-widget .portrait-title h3 {
  463. font-size: 0.7rem;
  464. }
  465. .people-widget .avatar {
  466. width: 80%;
  467. max-width: 150px;
  468. height: auto;
  469. }
  470. @media (min-width: 576px) {
  471. .people-widget .col-sm-auto {
  472. width: 30%;
  473. }
  474. }
  475. @media (min-width: 992px) {
  476. .people-widget .col-sm-auto {
  477. width: 20%;
  478. }
  479. }
  480. /*************************************************
  481. * Contact
  482. **************************************************/
  483. .wg-contact .fa-ul {
  484. margin-left: 3.14285714rem; /* Must be > `fa-2x` icon size. */
  485. }
  486. .wg-contact .fa-li {
  487. position: absolute;
  488. left: -3.14285714rem; /* Negative of `.wg-contact .fa-ul` margin. */
  489. width: 2rem; /* Match `fa-2x` icon size. */
  490. top: 0.14285714em; /* Default FA value. */
  491. text-align: center;
  492. }
  493. .wg-contact li {
  494. padding-top: 0.8rem; /* Align text with bottom of `fa-2x` icon. */
  495. margin-bottom: 0.3rem;
  496. }
  497. .wg-contact li:last-of-type {
  498. margin-bottom: 0;
  499. }
  500. #map {
  501. height: 350px;
  502. width: 100%;
  503. }
  504. // Prevent OpenStreetMap inheriting link color from section of a different theme variation.
  505. // E.g. Light colored OpenStreetMap UI inheriting dark themed link (`.home-section.dark a`)
  506. // from a dark widget page section.
  507. #map a {
  508. color: initial;
  509. }