page.scss 14 KB

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