page.scss 13 KB

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