page.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  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. }
  525. }
  526. ul {
  527. margin: 1px 0 0;
  528. li a {
  529. padding-left: 20px;
  530. }
  531. }
  532. }
  533. }
  534. /* TOC trigger for collapsing */
  535. #drawer {
  536. max-height: 100%;
  537. overflow: hidden;
  538. &.js-hidden {
  539. max-height: 0;
  540. }
  541. }
  542. /* Image grid - not used */
  543. .image-grid {
  544. @include clearfix;
  545. list-style: none;
  546. margin: 0 0 1em;
  547. padding: 0;
  548. li {
  549. @include grid(12,6);
  550. @media #{$micro} {
  551. width: 33.333333%;
  552. }
  553. @media #{$small} {
  554. width: 25%;
  555. }
  556. @media #{$medium} {
  557. width: 20%;
  558. }
  559. @media #{$large} {
  560. width: 16.666666666%;
  561. }
  562. }
  563. }
  564. /* Recent grid - not used */
  565. .recent-grid {
  566. @include clearfix;
  567. list-style: none;
  568. margin: 1em 0;
  569. li {
  570. display: inline;
  571. a {
  572. border-bottom: 0 solid transparent;
  573. &:hover {
  574. border-bottom: 0 solid transparent;
  575. }
  576. }
  577. }
  578. img {
  579. width: 19%;
  580. margin-bottom: 1%;
  581. }
  582. }
  583. /* Social sharing links */
  584. /* Social media brand buttons */
  585. .social-share {
  586. margin-bottom: 0px + $doc-line-height;
  587. margin-bottom: 0rem + ($doc-line-height / $doc-font-size);
  588. ul, li {
  589. margin: 0;
  590. padding: 0;
  591. list-style: none;
  592. }
  593. li {
  594. display: inline-block;
  595. }
  596. $social:
  597. (facebook, $facebook-color),
  598. (flickr, $flickr-color),
  599. (foursquare, $foursquare-color),
  600. (google-plus, $google-plus-color),
  601. (instagram, $instagram-color),
  602. (linkedin, $linkedin-color),
  603. (pinterest, $pinterest-color),
  604. (rss, $rss-color),
  605. (tumblr, $tumblr-color),
  606. (twitter, $twitter-color),
  607. (vimeo, $vimeo-color),
  608. (youtube, $youtube-color);
  609. @each $socialnetwork, $color in $social {
  610. .#{$socialnetwork} {
  611. background: $color;
  612. }
  613. }
  614. a {
  615. display: block;
  616. padding: 8px 20px;
  617. text-decoration: none !important;
  618. text-transform: uppercase;
  619. @include font-rem(14);
  620. font-family: $heading-font;
  621. font-weight: 700;
  622. color: $white;
  623. opacity: 0.8;
  624. &:hover {
  625. opacity: 1;
  626. }
  627. }
  628. span {
  629. display: none;
  630. @media #{$medium} {
  631. display: inline;
  632. padding-left: 5px;
  633. }
  634. }
  635. h4 {
  636. @include font-rem(14);
  637. margin-bottom: 10px;
  638. text-transform: uppercase;
  639. }
  640. }
  641. /* Footer wrapper */
  642. .footer-wrap {
  643. @include container;
  644. @include clearfix;
  645. clear: both;
  646. padding-bottom: 3em;
  647. a,
  648. a:active,
  649. a:visited,
  650. p,
  651. h4,
  652. h5,
  653. h6,
  654. span {
  655. @include font-rem(14);
  656. }
  657. footer {
  658. @include grid(12,10);
  659. @include prefix(12,1);
  660. @include suffix(12,1);
  661. @media #{$small} {
  662. @include grid(12,6);
  663. @include prefix(12,3);
  664. @include suffix(12,3);
  665. }
  666. @media #{$x-large} {
  667. @include grid(12,4.5);
  668. @include prefix(12,4);
  669. @include suffix(12,3.5);
  670. }
  671. font-style: italic;
  672. nav {
  673. display: inline;
  674. display: inline-block;
  675. font-style: normal;
  676. }
  677. }
  678. .home & {
  679. @media #{$small} {
  680. padding-bottom: 0;
  681. position: fixed;
  682. bottom: 0;
  683. footer {
  684. padding: 10px 0;
  685. background-color: $bodycolor;
  686. }
  687. }
  688. }
  689. }
  690. /* Related articles list */
  691. .related-articles {
  692. @include grid(12,10);
  693. @include prefix(12,1);
  694. @include suffix(12,1);
  695. margin-bottom: 2em;
  696. @media #{$small} {
  697. @include grid(12,6);
  698. @include prefix(12,3);
  699. @include suffix(12,3);
  700. }
  701. @media #{$x-large} {
  702. @include grid(12,4.5);
  703. @include prefix(12,4);
  704. @include suffix(12,3.5);
  705. }
  706. h4 {
  707. text-transform: uppercase;
  708. margin-bottom: 0;
  709. }
  710. li {
  711. margin-bottom: 0;
  712. }
  713. }
  714. /*
  715. Browser upgrade alert
  716. ========================================================================== */
  717. .browser-upgrade {
  718. background: #000;
  719. text-align: center;
  720. margin: 0 0 2em 0;
  721. padding: 10px;
  722. text-align: center;
  723. color: $white;
  724. a {
  725. color: $white;
  726. border-bottom: 1px dotted $white;
  727. text-decoration: none;
  728. &:hover {
  729. border-bottom: 1px solid $white;
  730. }
  731. }
  732. }
  733. /*
  734. Google search form
  735. ========================================================================== */
  736. #goog-fixurl {
  737. ul {
  738. list-style: none;
  739. margin-left: 0;
  740. padding-left: 0;
  741. li {
  742. list-style-type: none;
  743. }
  744. }
  745. }
  746. #goog-wm-qt {
  747. width: auto;
  748. margin-right: 10px;
  749. margin-bottom: 20px;
  750. padding: 8px 20px;
  751. display: inline-block;
  752. @include font-rem(14);
  753. background-color: $white;
  754. color: $black;
  755. border-width: 2px !important;
  756. border-style: solid !important;
  757. border-color: lighten($black,50);
  758. @include rounded(3px);
  759. }
  760. #goog-wm-sb {
  761. @extend .btn;
  762. }