page.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. /* ==========================================================================
  2. Page layout
  3. ========================================================================== */
  4. body {
  5. background-color: $bodycolor;
  6. font-family: $base-font;
  7. color: $text-color;
  8. }
  9. /*
  10. Header
  11. ========================================================================== */
  12. .navigation-wrapper {
  13. @include container;
  14. padding: 2em 0 1em;
  15. font-family: $heading-font;
  16. font-weight: 700;
  17. text-transform: uppercase;
  18. @include clearfix;
  19. }
  20. /* Site name */
  21. .site-name {
  22. @include grid(12,10);
  23. @include prefix(12,1);
  24. @include suffix(12,1);
  25. margin-bottom: 1em;
  26. float: none;
  27. display: block;
  28. @include font-rem(24);
  29. @media #{$small} {
  30. @include grid(12,2);
  31. @include prefix(12,0.5);
  32. @include suffix(12,0.5);
  33. @include font-rem(16);
  34. }
  35. @media #{$x-large} {
  36. @include grid(12,1.5);
  37. @include prefix(12,2);
  38. }
  39. }
  40. /* Top navigation links */
  41. .top-navigation {
  42. @include grid(12,10);
  43. @include prefix(12,1);
  44. @include suffix(12,1);
  45. margin-bottom: 1em;
  46. float: none;
  47. display: block;
  48. @media #{$small} {
  49. @include grid(12,9);
  50. @include prefix(12,0);
  51. @include suffix(12,0);
  52. }
  53. @media #{$x-large} {
  54. @include grid(12,8);
  55. }
  56. ul {
  57. margin: 0;
  58. padding: 0;
  59. clear: both;
  60. list-style-type: none;
  61. }
  62. li {
  63. display: block;
  64. list-style-type: none;
  65. border-bottom: 1px solid lighten($black,80);
  66. border-bottom: 1px solid fade($black,10);
  67. @include font-rem(16);
  68. &:last-child {
  69. border-bottom: 0 solid transparent;
  70. }
  71. @media #{$small} {
  72. display: inline;
  73. margin-right: 25px;
  74. white-space: nowrap;
  75. border-bottom: 0 solid transparent;
  76. }
  77. a {
  78. display: block;
  79. padding: 10px 0;
  80. decoration: none;
  81. border-bottom: 0 solid transparent;
  82. @include transition(all .2s);
  83. @media #{$small} {
  84. display: inline;
  85. padding: 0;
  86. }
  87. }
  88. }
  89. }
  90. /* Animated lines for mobile nav button */
  91. $button-size: 1.5rem;
  92. @mixin navicon-line() {
  93. display: inline-block;
  94. width: $button-size;
  95. height: $button-size/7;
  96. // line color
  97. background: $white;
  98. border-radius: $button-size/14;
  99. transition: .3s;
  100. }
  101. .navicon-lines-button {
  102. padding: $button-size/4 $button-size/2;
  103. transition: .3s;
  104. cursor: pointer;
  105. user-select: none;
  106. border-radius: $button-size/7;
  107. }
  108. .navicon-lines-button:hover {
  109. opacity: 1;
  110. }
  111. .navicon-lines-button:active {
  112. transition: 0;
  113. }
  114. .navicon-lines {
  115. margin-right: 10px;
  116. margin-bottom: $button-size/5;
  117. // create middle line
  118. @include navicon-line;
  119. position: relative;
  120. // create the upper and lower lines as pseudo-elements of the middle line
  121. &:before,
  122. &:after {
  123. @include navicon-line;
  124. position: absolute;
  125. left: 0;
  126. content: '';
  127. -webkit-transform-origin: $button-size/14 center;
  128. transform-origin: $button-size/14 center;
  129. }
  130. &:before { top: $button-size/4; }
  131. &:after { top: -$button-size/4; }
  132. }
  133. .navicon-lines-button:hover {
  134. opacity: 1;
  135. .navicon-lines {
  136. &:before { top: $button-size/3.5; }
  137. &:after { top: -$button-size/3.5; }
  138. }
  139. }
  140. .navicon-lines-button.x.active .navicon-lines {
  141. // hide the middle line
  142. background: transparent;
  143. // overlap the lines by setting both their top values to 0
  144. &:before,
  145. &:after {
  146. -webkit-transform-origin: 50% 50%;
  147. transform-origin: 50% 50%;
  148. top: 0;
  149. width: $button-size;
  150. }
  151. // rotate the lines to form the x shape
  152. &:before {
  153. -webkit-transform: rotate3d(0,0,1,45deg);
  154. transform: rotate3d(0,0,1,45deg);
  155. }
  156. &:after {
  157. -webkit-transform: rotate3d(0,0,1,-45deg);
  158. transform: rotate3d(0,0,1,-45deg);
  159. }
  160. }
  161. // Style the toggle menu link and hide it
  162. .nav .navtoggle {
  163. @include font-rem(18);
  164. font-weight: normal;
  165. background-color: $black;
  166. color: $white;
  167. border: none;
  168. cursor: pointer;
  169. @media #{$small} {
  170. display: none;
  171. }
  172. }
  173. .nav button {
  174. border: none;
  175. background: none;
  176. }
  177. .navtoggle i {
  178. z-index:-1;
  179. }
  180. .icon-menu {
  181. position: relative;
  182. top: 3px;
  183. line-height: 0;
  184. }
  185. // When JavaScript is disabled, we hide the toggle button
  186. .no-js .nav .navtoggle {
  187. display: none;
  188. }
  189. // When JavaScript is disabled, we show the menu
  190. .no-js .nav ul {
  191. max-height: 30em;
  192. overflow: hidden;
  193. }
  194. // When JavaScript is enabled, we hide the menu
  195. .js .nav ul {
  196. max-height: 0;
  197. overflow: hidden;
  198. @media #{$small} {
  199. max-height: 30em;
  200. }
  201. }
  202. // Displaying the menu when the user has clicked on the button
  203. .js .nav .active + ul {
  204. max-height: 30em;
  205. overflow: hidden;
  206. -webkit-transition: max-height .4s;
  207. -moz-transition: max-height .4s;
  208. -o-transition: max-height .4s;
  209. -ms-transition: max-height .4s;
  210. transition: max-height .4s;
  211. }
  212. /* Main content */
  213. #main {
  214. counter-reset: captions;
  215. @include container;
  216. @include clearfix;
  217. clear: both;
  218. margin-top: 2em;
  219. h1 {
  220. margin-top: 0;
  221. }
  222. .post,
  223. .page {
  224. @include container;
  225. @include grid(12,10);
  226. @include prefix(12,1);
  227. @include suffix(12,1);
  228. margin-bottom: 2em;
  229. @media #{$small} {
  230. @include grid(12,6);
  231. @include prefix(12,0);
  232. @include suffix(12,0);
  233. }
  234. @media #{$x-large} {
  235. @include grid(12,4.5);
  236. }
  237. }
  238. }
  239. /* Index listing specific styling */
  240. #index {
  241. @include container;
  242. @include grid(12,10);
  243. @include prefix(12,1);
  244. @include suffix(12,1);
  245. margin-bottom: 2em;
  246. @media #{$small} {
  247. @include grid(12,6);
  248. @include prefix(12,0);
  249. @include suffix(12,0);
  250. }
  251. @media #{$x-large} {
  252. @include grid(12,4.5);
  253. }
  254. h3 {
  255. margin: 0;
  256. padding-bottom: .5em;
  257. @include font-rem(28);
  258. border-bottom: 1px solid lighten($black,70);
  259. }
  260. article {
  261. h2 {
  262. margin-bottom: 4px;
  263. @include font-rem(20);
  264. &.link-post {
  265. margin-bottom: 0px + $doc-line-height;
  266. margin-bottom: 0rem + ($doc-line-height / $doc-font-size);
  267. }
  268. }
  269. p {
  270. @include font-rem(14);
  271. }
  272. p+p {
  273. text-indent: 0;
  274. }
  275. }
  276. }
  277. /* Large feature header image */
  278. .image-wrap {
  279. position: relative;
  280. margin-bottom: 2em;
  281. @include clearfix;
  282. &:after {/*
  283. content: " ";
  284. display: block;
  285. position: absolute;
  286. bottom: 0;
  287. left: 8%;
  288. width: 0;
  289. height: 0;
  290. border: 10px solid transparent;
  291. border-bottom-color: $bodycolor;
  292. @media #{$small} {
  293. left: 25%;
  294. }
  295. @media #{$large} {
  296. border-width: 20px;
  297. }
  298. @media #{$x-large} {
  299. left: 33.333333333%;
  300. }
  301. */}
  302. img {
  303. max-width: 70%;
  304. height: auto;
  305. display:block;
  306. margin-left:auto;
  307. margin-right:auto;
  308. -ms-interpolation-mode: bicubic;
  309. }
  310. .headline-wrap {
  311. position: absolute;
  312. bottom: 25px;
  313. @include prefix(12,1);
  314. @media #{$small} {
  315. left: 25%;
  316. margin-left: 0;
  317. }
  318. @media #{$x-large} {
  319. @include prefix(12,1);
  320. }
  321. h1, h2 {
  322. color: $white;
  323. @include text-shadow(0 1px 2px rgba(0,0,0,.25));
  324. }
  325. }
  326. }
  327. /* Post byline */
  328. .byline {
  329. clear: both;
  330. font-size: 80%;
  331. }
  332. .article-author-side,
  333. .article-author-bottom {
  334. h3 {
  335. margin-bottom: 0;
  336. }
  337. p {
  338. font-size: 80%;
  339. font-style: italic;
  340. }
  341. a, a:hover {
  342. border-bottom: 0 solid transparent;
  343. }
  344. }
  345. /* Default social media links in author sidebar */
  346. .author-social {
  347. display: block;
  348. margin-bottom: 5px;
  349. @include font-rem(14);
  350. color: $black;
  351. &:visited {
  352. color: $black;
  353. }
  354. &:hover {
  355. @include scale(1.1);
  356. }
  357. &:active {
  358. @include translate(0, 2px);
  359. }
  360. .fa {
  361. margin-right: 5px;
  362. }
  363. }
  364. /* Author sidebar */
  365. .article-author-side {
  366. display: none;
  367. .bio-photo {
  368. max-width: 110px;
  369. @include rounded(150px);
  370. }
  371. @media #{$small} {
  372. display: block;
  373. @include grid(12,2);
  374. @include prefix(12,0.5);
  375. @include suffix(12,0.5);
  376. h3,
  377. p,
  378. .author-social {
  379. display: block;
  380. max-width: 125px;
  381. }
  382. h3 {
  383. margin-top: 10px;
  384. margin-bottom: 10px;
  385. text-align:center;
  386. }
  387. p {
  388. margin-bottom: 20px;
  389. text-align:justify;
  390. }
  391. .author-social {
  392. margin-bottom: 5px;
  393. }
  394. }
  395. @media #{$large} {
  396. h3,
  397. .bio-photo,
  398. p,
  399. .author-social {
  400. max-width: 150px;
  401. }
  402. }
  403. @media #{$x-large} {
  404. @include grid(12,1.5);
  405. @include prefix(12,2);
  406. }
  407. }
  408. /* Author module - mobile only */
  409. .article-author-bottom {
  410. margin-bottom: 1em;
  411. @media #{$small} {
  412. display: none;
  413. }
  414. .bio-photo {
  415. float: left;
  416. margin-right: 25px;
  417. max-width: 100px;
  418. @include rounded(150px);
  419. }
  420. .author-social {
  421. display: inline-block;
  422. margin-right: 10px;
  423. }
  424. @media #{$large} {
  425. h3,
  426. .bio-photo,
  427. p,
  428. .author-social {
  429. max-width: 150px;
  430. }
  431. }
  432. }
  433. /* Post content wrapper */
  434. .article-wrap {
  435. // Dotted line underlines for links
  436. p > a,
  437. p > em > a,
  438. p > strong > a,
  439. li > a {
  440. text-decoration: underline;
  441. }
  442. }
  443. /* Table of contents */
  444. .toc {
  445. font-size: 95%;
  446. @media #{$large} {
  447. display: block;
  448. @include grid(12,2);
  449. @include prefix(12,0.5);
  450. @include suffix(12,0.5);
  451. position: absolute;
  452. top: 5.5em;
  453. right: 0;
  454. background-color: $white;
  455. }
  456. header {
  457. background: lighten($black, 10);
  458. }
  459. h3 {
  460. margin: 0;
  461. padding: 5px 10px;
  462. color: $white;
  463. @include font-rem(16);
  464. text-transform: uppercase;
  465. &:hover {
  466. cursor: pointer;
  467. }
  468. }
  469. ul {
  470. margin: 2px 0 0;
  471. padding: 0;
  472. line-height: 1;
  473. }
  474. li {
  475. display: block;
  476. margin: 0 0 1px 0;
  477. padding: 0;
  478. font-family: $heading-font;
  479. list-style-type: none;
  480. &:last-child {
  481. border-bottom-width: 0;
  482. }
  483. a {
  484. padding: 10px;
  485. display: block;
  486. color: $white;
  487. text-decoration: none;
  488. background: lighten($black, 30);
  489. @include opacity(0.7);
  490. @include transition(opacity 0.2s ease-in-out);
  491. &:hover {
  492. @include opacity(1);
  493. }
  494. }
  495. ul {
  496. margin: 1px 0 0;
  497. li a {
  498. padding-left: 20px;
  499. }
  500. }
  501. }
  502. }
  503. /* TOC trigger for collapsing */
  504. #drawer {
  505. max-height: 100%;
  506. overflow: hidden;
  507. &.js-hidden {
  508. max-height: 0;
  509. }
  510. }
  511. /* Image grid - not used */
  512. .image-grid {
  513. @include clearfix;
  514. list-style: none;
  515. margin: 0 0 1em;
  516. padding: 0;
  517. li {
  518. @include grid(12,6);
  519. @media #{$micro} {
  520. width: 33.333333%;
  521. }
  522. @media #{$small} {
  523. width: 25%;
  524. }
  525. @media #{$medium} {
  526. width: 20%;
  527. }
  528. @media #{$large} {
  529. width: 16.666666666%;
  530. }
  531. }
  532. }
  533. /* Recent grid - not used */
  534. .recent-grid {
  535. @include clearfix;
  536. list-style: none;
  537. margin: 1em 0;
  538. li {
  539. display: inline;
  540. a {
  541. border-bottom: 0 solid transparent;
  542. &:hover {
  543. border-bottom: 0 solid transparent;
  544. }
  545. }
  546. }
  547. img {
  548. width: 19%;
  549. margin-bottom: 1%;
  550. }
  551. }
  552. /* Social sharing links */
  553. /* Social media brand buttons */
  554. .social-share {
  555. margin-bottom: 0px + $doc-line-height;
  556. margin-bottom: 0rem + ($doc-line-height / $doc-font-size);
  557. ul, li {
  558. margin: 0;
  559. padding: 0;
  560. list-style: none;
  561. }
  562. li {
  563. display: inline-block;
  564. }
  565. $social:
  566. (facebook, $facebook-color),
  567. (flickr, $flickr-color),
  568. (foursquare, $foursquare-color),
  569. (google-plus, $google-plus-color),
  570. (instagram, $instagram-color),
  571. (linkedin, $linkedin-color),
  572. (pinterest, $pinterest-color),
  573. (rss, $rss-color),
  574. (tumblr, $tumblr-color),
  575. (twitter, $twitter-color),
  576. (vimeo, $vimeo-color),
  577. (youtube, $youtube-color);
  578. @each $socialnetwork, $color in $social {
  579. .#{$socialnetwork} {
  580. background: $color;
  581. }
  582. }
  583. a {
  584. display: block;
  585. padding: 8px 20px;
  586. text-decoration: none !important;
  587. text-transform: uppercase;
  588. @include font-rem(14);
  589. font-family: $heading-font;
  590. font-weight: 700;
  591. color: $white;
  592. opacity: 0.8;
  593. &:hover {
  594. opacity: 1;
  595. }
  596. }
  597. span {
  598. display: none;
  599. @media #{$medium} {
  600. display: inline;
  601. padding-left: 5px;
  602. }
  603. }
  604. h4 {
  605. @include font-rem(14);
  606. margin-bottom: 10px;
  607. text-transform: uppercase;
  608. }
  609. }
  610. /* Footer wrapper */
  611. .footer-wrap {
  612. @include container;
  613. @include clearfix;
  614. clear: both;
  615. padding-bottom: 3em;
  616. a,
  617. a:active,
  618. a:visited,
  619. p,
  620. h4,
  621. h5,
  622. h6,
  623. span {
  624. @include font-rem(14);
  625. }
  626. footer {
  627. @include grid(12,10);
  628. @include prefix(12,1);
  629. @include suffix(12,1);
  630. @media #{$small} {
  631. @include grid(12,6);
  632. @include prefix(12,3);
  633. @include suffix(12,3);
  634. }
  635. @media #{$x-large} {
  636. @include grid(12,4.5);
  637. @include prefix(12,4);
  638. @include suffix(12,3.5);
  639. }
  640. }
  641. }
  642. /* Related articles list */
  643. .related-articles {
  644. @include grid(12,10);
  645. @include prefix(12,1);
  646. @include suffix(12,1);
  647. margin-bottom: 2em;
  648. @media #{$small} {
  649. @include grid(12,6);
  650. @include prefix(12,3);
  651. @include suffix(12,3);
  652. }
  653. @media #{$x-large} {
  654. @include grid(12,4.5);
  655. @include prefix(12,4);
  656. @include suffix(12,3.5);
  657. }
  658. h4 {
  659. text-transform: uppercase;
  660. margin-bottom: 0;
  661. }
  662. li {
  663. margin-bottom: 0;
  664. }
  665. }
  666. /*
  667. Browser upgrade alert
  668. ========================================================================== */
  669. .browser-upgrade {
  670. background: #000;
  671. text-align: center;
  672. margin: 0 0 2em 0;
  673. padding: 10px;
  674. text-align: center;
  675. color: $white;
  676. a {
  677. color: $white;
  678. border-bottom: 1px dotted $white;
  679. text-decoration: none;
  680. &:hover {
  681. border-bottom: 1px solid $white;
  682. }
  683. }
  684. }
  685. /*
  686. Google search form
  687. ========================================================================== */
  688. #goog-fixurl {
  689. ul {
  690. list-style: none;
  691. margin-left: 0;
  692. padding-left: 0;
  693. li {
  694. list-style-type: none;
  695. }
  696. }
  697. }
  698. #goog-wm-qt {
  699. width: auto;
  700. margin-right: 10px;
  701. margin-bottom: 20px;
  702. padding: 8px 20px;
  703. display: inline-block;
  704. @include font-rem(14);
  705. background-color: $white;
  706. color: $black;
  707. border-width: 2px !important;
  708. border-style: solid !important;
  709. border-color: lighten($black,50);
  710. @include rounded(3px);
  711. }
  712. #goog-wm-sb {
  713. @extend .btn;
  714. }