page.scss 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  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. /* Large feature image fix for the home page */
  328. .home .image-wrap img {
  329. max-width: 100%;
  330. @media #{$large} {
  331. max-width: 50%;
  332. margin-top: 1.5em;
  333. margin-bottom: 1.5em;
  334. }
  335. }
  336. /* Post byline */
  337. .byline {
  338. clear: both;
  339. font-size: 80%;
  340. }
  341. .article-author-side,
  342. .article-author-bottom {
  343. h3 {
  344. margin-bottom: 0;
  345. }
  346. p {
  347. font-size: 80%;
  348. font-style: italic;
  349. }
  350. a, a:hover {
  351. border-bottom: 0 solid transparent;
  352. }
  353. }
  354. /* Default social media links in author sidebar */
  355. .author-social {
  356. display: block;
  357. margin-bottom: 5px;
  358. @include font-rem(14);
  359. color: $black;
  360. &:visited {
  361. color: $black;
  362. }
  363. &:hover {
  364. @include scale(1.1);
  365. }
  366. &:active {
  367. @include translate(0, 2px);
  368. }
  369. .fa {
  370. margin-right: 5px;
  371. }
  372. }
  373. /* Author sidebar */
  374. .article-author-side {
  375. display: none;
  376. .bio-photo {
  377. max-width: 110px;
  378. @include rounded(150px);
  379. }
  380. @media #{$small} {
  381. display: block;
  382. @include grid(12,2);
  383. @include prefix(12,0.5);
  384. @include suffix(12,0.5);
  385. h3,
  386. p,
  387. .author-social {
  388. display: block;
  389. max-width: 125px;
  390. }
  391. h3 {
  392. margin-top: 10px;
  393. margin-bottom: 10px;
  394. text-align:center;
  395. }
  396. p {
  397. margin-bottom: 20px;
  398. /* text-align:justify; */
  399. /* Do not justify tiny text like this otherwise it creates
  400. too much blank space --- unless you turn hyphenation on */
  401. }
  402. .author-social {
  403. margin-bottom: 5px;
  404. }
  405. }
  406. @media #{$large} {
  407. h3,
  408. .bio-photo,
  409. p,
  410. .author-social {
  411. max-width: 150px;
  412. }
  413. }
  414. @media #{$x-large} {
  415. @include grid(12,1.5);
  416. @include prefix(12,2);
  417. }
  418. }
  419. /* Author module - mobile only */
  420. .article-author-bottom {
  421. margin-bottom: 1em;
  422. @media #{$small} {
  423. display: none;
  424. }
  425. .bio-photo {
  426. float: left;
  427. margin-right: 25px;
  428. max-width: 100px;
  429. @include rounded(150px);
  430. }
  431. .author-social {
  432. display: inline-block;
  433. margin-right: 10px;
  434. }
  435. @media #{$large} {
  436. h3,
  437. .bio-photo,
  438. p,
  439. .author-social {
  440. max-width: 150px;
  441. }
  442. }
  443. }
  444. /* Post content wrapper */
  445. .article-wrap {
  446. // Dotted line underlines for links
  447. p > a,
  448. p > em > a,
  449. p > strong > a,
  450. li > a {
  451. text-decoration: underline;
  452. }
  453. }
  454. /* Table of contents */
  455. .toc {
  456. font-size: 95%;
  457. @media #{$large} {
  458. display: block;
  459. @include grid(12,2);
  460. @include prefix(12,0.5);
  461. @include suffix(12,0.5);
  462. position: absolute;
  463. top: 5.5em;
  464. right: 0;
  465. background-color: $white;
  466. }
  467. header {
  468. background: lighten($black, 10);
  469. }
  470. h3 {
  471. margin: 0;
  472. padding: 5px 10px;
  473. color: $white;
  474. @include font-rem(16);
  475. text-transform: uppercase;
  476. &:hover {
  477. cursor: pointer;
  478. }
  479. }
  480. ul {
  481. margin: 2px 0 0;
  482. padding: 0;
  483. line-height: 1;
  484. }
  485. li {
  486. display: block;
  487. margin: 0 0 1px 0;
  488. padding: 0;
  489. font-family: $heading-font;
  490. list-style-type: none;
  491. &:last-child {
  492. border-bottom-width: 0;
  493. }
  494. a {
  495. padding: 10px;
  496. display: block;
  497. color: $white;
  498. text-decoration: none;
  499. background: lighten($black, 30);
  500. @include opacity(0.7);
  501. @include transition(opacity 0.2s ease-in-out);
  502. &:hover {
  503. @include opacity(1);
  504. }
  505. }
  506. ul {
  507. margin: 1px 0 0;
  508. li a {
  509. padding-left: 20px;
  510. }
  511. }
  512. }
  513. }
  514. /* TOC trigger for collapsing */
  515. #drawer {
  516. max-height: 100%;
  517. overflow: hidden;
  518. &.js-hidden {
  519. max-height: 0;
  520. }
  521. }
  522. /* Image grid - not used */
  523. .image-grid {
  524. @include clearfix;
  525. list-style: none;
  526. margin: 0 0 1em;
  527. padding: 0;
  528. li {
  529. @include grid(12,6);
  530. @media #{$micro} {
  531. width: 33.333333%;
  532. }
  533. @media #{$small} {
  534. width: 25%;
  535. }
  536. @media #{$medium} {
  537. width: 20%;
  538. }
  539. @media #{$large} {
  540. width: 16.666666666%;
  541. }
  542. }
  543. }
  544. /* Recent grid - not used */
  545. .recent-grid {
  546. @include clearfix;
  547. list-style: none;
  548. margin: 1em 0;
  549. li {
  550. display: inline;
  551. a {
  552. border-bottom: 0 solid transparent;
  553. &:hover {
  554. border-bottom: 0 solid transparent;
  555. }
  556. }
  557. }
  558. img {
  559. width: 19%;
  560. margin-bottom: 1%;
  561. }
  562. }
  563. /* Social sharing links */
  564. /* Social media brand buttons */
  565. .social-share {
  566. margin-bottom: 0px + $doc-line-height;
  567. margin-bottom: 0rem + ($doc-line-height / $doc-font-size);
  568. ul, li {
  569. margin: 0;
  570. padding: 0;
  571. list-style: none;
  572. }
  573. li {
  574. display: inline-block;
  575. }
  576. $social:
  577. (facebook, $facebook-color),
  578. (flickr, $flickr-color),
  579. (foursquare, $foursquare-color),
  580. (google-plus, $google-plus-color),
  581. (instagram, $instagram-color),
  582. (linkedin, $linkedin-color),
  583. (pinterest, $pinterest-color),
  584. (rss, $rss-color),
  585. (tumblr, $tumblr-color),
  586. (twitter, $twitter-color),
  587. (vimeo, $vimeo-color),
  588. (youtube, $youtube-color);
  589. @each $socialnetwork, $color in $social {
  590. .#{$socialnetwork} {
  591. background: $color;
  592. }
  593. }
  594. a {
  595. display: block;
  596. padding: 8px 20px;
  597. text-decoration: none !important;
  598. text-transform: uppercase;
  599. @include font-rem(14);
  600. font-family: $heading-font;
  601. font-weight: 700;
  602. color: $white;
  603. opacity: 0.8;
  604. &:hover {
  605. opacity: 1;
  606. }
  607. }
  608. span {
  609. display: none;
  610. @media #{$medium} {
  611. display: inline;
  612. padding-left: 5px;
  613. }
  614. }
  615. h4 {
  616. @include font-rem(14);
  617. margin-bottom: 10px;
  618. text-transform: uppercase;
  619. }
  620. }
  621. /* Footer wrapper */
  622. .footer-wrap {
  623. @include container;
  624. @include clearfix;
  625. clear: both;
  626. padding-bottom: 3em;
  627. a,
  628. a:active,
  629. a:visited,
  630. p,
  631. h4,
  632. h5,
  633. h6,
  634. span {
  635. @include font-rem(14);
  636. }
  637. footer {
  638. @include grid(12,10);
  639. @include prefix(12,1);
  640. @include suffix(12,1);
  641. @media #{$small} {
  642. @include grid(12,6);
  643. @include prefix(12,3);
  644. @include suffix(12,3);
  645. }
  646. @media #{$x-large} {
  647. @include grid(12,4.5);
  648. @include prefix(12,4);
  649. @include suffix(12,3.5);
  650. }
  651. }
  652. }
  653. /* Related articles list */
  654. .related-articles {
  655. @include grid(12,10);
  656. @include prefix(12,1);
  657. @include suffix(12,1);
  658. margin-bottom: 2em;
  659. @media #{$small} {
  660. @include grid(12,6);
  661. @include prefix(12,3);
  662. @include suffix(12,3);
  663. }
  664. @media #{$x-large} {
  665. @include grid(12,4.5);
  666. @include prefix(12,4);
  667. @include suffix(12,3.5);
  668. }
  669. h4 {
  670. text-transform: uppercase;
  671. margin-bottom: 0;
  672. }
  673. li {
  674. margin-bottom: 0;
  675. }
  676. }
  677. /*
  678. Browser upgrade alert
  679. ========================================================================== */
  680. .browser-upgrade {
  681. background: #000;
  682. text-align: center;
  683. margin: 0 0 2em 0;
  684. padding: 10px;
  685. text-align: center;
  686. color: $white;
  687. a {
  688. color: $white;
  689. border-bottom: 1px dotted $white;
  690. text-decoration: none;
  691. &:hover {
  692. border-bottom: 1px solid $white;
  693. }
  694. }
  695. }
  696. /*
  697. Google search form
  698. ========================================================================== */
  699. #goog-fixurl {
  700. ul {
  701. list-style: none;
  702. margin-left: 0;
  703. padding-left: 0;
  704. li {
  705. list-style-type: none;
  706. }
  707. }
  708. }
  709. #goog-wm-qt {
  710. width: auto;
  711. margin-right: 10px;
  712. margin-bottom: 20px;
  713. padding: 8px 20px;
  714. display: inline-block;
  715. @include font-rem(14);
  716. background-color: $white;
  717. color: $black;
  718. border-width: 2px !important;
  719. border-style: solid !important;
  720. border-color: lighten($black,50);
  721. @include rounded(3px);
  722. }
  723. #goog-wm-sb {
  724. @extend .btn;
  725. }