page.scss 13 KB

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