_archives.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728
  1. /*--------------------------------------------------------------*/
  2. /* !## Archives */
  3. /*--------------------------------------------------------------*/
  4. .hfeed {
  5. .content-area {
  6. border-top: 1px solid $color__border-transparent;
  7. }
  8. .site-main {
  9. overflow: visible;
  10. padding: 0;
  11. position: relative;
  12. }
  13. // Page header
  14. .page-header {
  15. border-bottom: 1px solid $color__border-transparent;
  16. padding: ( $baseline ) 0;
  17. position: relative;
  18. .page-title {
  19. @include widget-title();
  20. @include font-size(1);
  21. color: $color__text-main;
  22. margin: 0;
  23. padding: 0 ( $gutter / 2 );
  24. }
  25. .taxonomy-description {
  26. @include body-copy-small();
  27. color: $color__link-hover;
  28. padding: 0 ( $gutter / 2 );
  29. }
  30. }
  31. .sticky-wrapper {
  32. position: relative;
  33. width: 100%;
  34. }
  35. // Posts
  36. .hentry {
  37. padding: #{ $gutter * .5 };
  38. @include non-border( 1px solid $color__border-transparent, bottom );
  39. &:before {
  40. width: calc(100% + #{ $gutter });
  41. left: #{ -$gutter * .5 };
  42. }
  43. .entry-header-wrap {
  44. span {
  45. display: block;
  46. width: 100%;
  47. }
  48. .entry-title {
  49. padding: 0 #{$gutter * .2};
  50. @include nav-title(1);
  51. }
  52. .posted-on {
  53. @include list-item();
  54. @include body-copy-small();
  55. padding: 0 #{$gutter * .2};
  56. }
  57. }
  58. .entry-header {
  59. .edit-link {
  60. padding: 0 5px;
  61. }
  62. }
  63. .post-thumbnail {
  64. img {
  65. margin: 1px auto;
  66. max-width: calc(100% - 2px);
  67. display: block;
  68. position: relative;
  69. }
  70. }
  71. }
  72. // Infinite Scroll
  73. .has-isotope #infinite-handle,
  74. .has-isotope .infinite-loader {
  75. margin-right: auto;
  76. overflow: visible;
  77. }
  78. // Navigation
  79. .posts-navigation,
  80. #infinite-handle,
  81. .infinite-loader {
  82. top: 100%;
  83. }
  84. // Navigation
  85. .posts-navigation {
  86. top: calc( 100% + #{$baseline} );
  87. margin: 0 #{(-$baseline * .75)};
  88. .nav-links {
  89. padding: 0 #{$baseline * .75};
  90. }
  91. }
  92. }
  93. @include breakpoint( mobileonly ) {
  94. .hfeed {
  95. // Posts
  96. .hentry {
  97. .entry-header-wrap .entry-title {
  98. @include font-size( 1.25 );
  99. }
  100. .post-thumbnail {
  101. margin-bottom: #{ $gutter * .5 };
  102. }
  103. &.grid-item-featured {
  104. background: $color__link;
  105. .entry-header-wrap {
  106. color: $color__background-body;
  107. .posted-on {
  108. color: $color__background-body;
  109. }
  110. }
  111. }
  112. }
  113. // Infinite Scroll
  114. .has-isotope .infinite-loader {
  115. padding-top: #{ $baseline * 2.75 };
  116. }
  117. #infinite-handle span {
  118. margin-top: inherit;
  119. }
  120. // Navigation
  121. .posts-navigation {
  122. top: calc( 100% );
  123. }
  124. }
  125. }
  126. @include breakpoint( phablet ) {
  127. .hfeed {
  128. .content-area {
  129. padding-top: $gutter;
  130. }
  131. .site-main {
  132. width: calc( 100% - #{ $gutter * 1.5 } );
  133. .grid-item-featured:not(.has-post-thumbnail) .entry-header .entry-title {
  134. @include nav-title();
  135. }
  136. .hentry {
  137. float: left;
  138. margin: 0;
  139. }
  140. }
  141. // Page header
  142. .page-header {
  143. border-bottom: none;
  144. display: block;
  145. margin: 0;
  146. padding: 0 #{ $gutter * 1.5 };
  147. position: relative;
  148. top: 0;
  149. width: 100%;
  150. .page-title {
  151. @include widget-title();
  152. @include font-size( 1.125 );
  153. margin-bottom: 0;
  154. }
  155. }
  156. .sticky-wrapper {
  157. position: absolute;
  158. width: 20%;
  159. }
  160. // Posts
  161. .hentry {
  162. float: left;
  163. margin: 0;
  164. padding: 0;
  165. position: relative;
  166. .entry-header {
  167. border: 1px solid $color__border-transparent;
  168. margin: ( $gutter * .75 );
  169. padding: ( $gutter * .75 ) ( $gutter * .5 );
  170. text-align: center;
  171. // Scale to normal on mouse out
  172. @include transition( all, 0.25s, cubic-bezier(0.175, 0.885, 0.32, 1.275) );
  173. }
  174. .entry-header-wrap {
  175. align-items: center;
  176. align-content: center;
  177. display: flex;
  178. flex-wrap: nowrap;
  179. flex-direction: column;
  180. height: 100%;
  181. justify-content: center;
  182. color: $color__link;
  183. &:focus,
  184. &:hover,
  185. &:active {
  186. opacity: 1;
  187. }
  188. .posted-on {
  189. color: $color__link;
  190. opacity: .66;
  191. }
  192. }
  193. .entry-title {
  194. margin: 0 0 ($gutter * .125);
  195. max-width: 90%;
  196. min-height: 2em;
  197. word-break: break-word;
  198. }
  199. .posted-on {
  200. margin: ($gutter * .125) 0 0;
  201. padding: 0;
  202. }
  203. &.has-post-thumbnail {
  204. .entry-header {
  205. border: 1px solid $color__border-transparent;
  206. margin: 0;
  207. opacity: 0;
  208. padding: 0;
  209. position: absolute;
  210. left: ( $gutter * .75 );
  211. top: ( $gutter * .75 );
  212. height: calc(100% - #{($gutter * 1.5)});
  213. width: calc(100% - #{($gutter * 1.5)});
  214. text-align: center;
  215. // Scale to normal on mouse out
  216. @include transition( all, 0.25s, cubic-bezier(0.175, 0.885, 0.32, 1.275) );
  217. }
  218. .post-thumbnail {
  219. // Scale to normal on mouse out
  220. @include transition( all, 0.25s, cubic-bezier(0.175, 0.885, 0.32, 1.275) );
  221. a {
  222. display: block;
  223. line-height: 0;
  224. padding: ($gutter * .75);
  225. }
  226. &:after {
  227. @include transition( opacity, 0.25s, ease-out );
  228. content: "";
  229. opacity: 0;
  230. position: absolute;
  231. left: ($gutter * .75);
  232. top: ($gutter * .75);
  233. height: calc( 100% - #{($gutter * 1.5)} );
  234. width: calc( 100% - #{($gutter * 1.5)} );
  235. background: $color__background-body;
  236. }
  237. }
  238. .edit-link {
  239. left: 50%;
  240. position: absolute;
  241. bottom: ($baseline * .5);
  242. transform: translate(-50%, 0);
  243. a {
  244. color: $color__link;
  245. }
  246. }
  247. &.grid-item-small {
  248. .entry-header {
  249. margin: ( $gutter * .75 );
  250. padding: ( $gutter * .75 ) ( $gutter * .5 );
  251. position: relative;
  252. left: 0;
  253. top: inherit;
  254. height: inherit;
  255. }
  256. .post-thumbnail {
  257. position: absolute;
  258. width: 100%;
  259. height: 100%;
  260. img {
  261. @include center-align( absolute );
  262. max-width: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  263. max-height: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  264. }
  265. }
  266. &.grid-item-landscape {
  267. .post-thumbnail img {
  268. max-width: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  269. max-height: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  270. }
  271. }
  272. &.grid-item-portrait {
  273. .post-thumbnail img {
  274. max-width: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  275. max-height: calc( 100% - #{( $gutter * 1.5 )} - 2px );
  276. width: auto;
  277. }
  278. }
  279. .edit-link {
  280. left: inherit;
  281. position: relative;
  282. bottom: inherit;
  283. transform: inherit;
  284. }
  285. }
  286. }
  287. // Featured post
  288. &.grid-item-featured {
  289. .entry-title {
  290. @include font-size( 1.5 );
  291. }
  292. .post-thumbnail:after {
  293. background: $color__link;
  294. }
  295. .entry-header-wrap {
  296. color: $color__background-body;
  297. .posted-on {
  298. color: $color__background-body;
  299. }
  300. }
  301. &.grid-item-small .entry-title {
  302. @include font-size( 1 );
  303. }
  304. }
  305. // Posts without featured images
  306. &:not(.has-post-thumbnail),
  307. &.grid-item-featured:not(.has-post-thumbnail) {
  308. .entry-header {
  309. background: $color__background-body;
  310. border-color: $color__border-transparent;
  311. opacity: 1;
  312. }
  313. .entry-header-wrap {
  314. color: $color__link;
  315. .posted-on {
  316. color: $color__link;
  317. }
  318. }
  319. &:hover {
  320. .entry-header {
  321. box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.25);
  322. }
  323. }
  324. &:after {
  325. content: "";
  326. display: none;
  327. }
  328. }
  329. // Scale up on hover
  330. &:hover {
  331. .entry-header {
  332. box-shadow: 1px 3px 4px rgba(0, 0, 0, 0.25);
  333. opacity: 1;
  334. @include transform( scale, 1.125 );
  335. }
  336. .post-thumbnail {
  337. @include transform( scale, 1.125 );
  338. &:after {
  339. opacity: .92;
  340. }
  341. }
  342. &.has-post-thumbnail .edit-link a {
  343. color: $color__link;
  344. }
  345. }
  346. // Scale down on click
  347. &:active {
  348. .entry-header {
  349. box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  350. }
  351. }
  352. &:before {
  353. display: none;
  354. }
  355. }
  356. }
  357. }
  358. @include breakpoint( tablet ) {
  359. .hfeed {
  360. // Posts
  361. .hentry {
  362. .entry-header {
  363. border: 1px solid $color__border-transparent;
  364. margin: ( $gutter );
  365. padding: ( $gutter ) ( $gutter * .5 );
  366. }
  367. &.has-post-thumbnail {
  368. .entry-header {
  369. left: ( $gutter );
  370. top: ( $gutter );
  371. height: calc( 100% - #{($gutter * 2)} );
  372. width: calc( 100% - #{($gutter * 2)} );
  373. }
  374. .post-thumbnail {
  375. a {
  376. padding: ( $gutter );
  377. }
  378. &:after {
  379. left: ( $gutter );
  380. top: ( $gutter );
  381. height: calc( 100% - #{($gutter * 2)} );
  382. width: calc( 100% - #{($gutter * 2)} );
  383. }
  384. }
  385. &.grid-item-small {
  386. .entry-header {
  387. margin: ( $gutter );
  388. padding: ( $gutter ) ( $gutter * .5 );
  389. position: relative;
  390. left: 0;
  391. top: 0;
  392. height: inherit;
  393. }
  394. .post-thumbnail img {
  395. max-width: calc( 100% - #{($gutter * 2)} );
  396. max-height: calc( 100% - #{( $gutter * 2 )});
  397. }
  398. &.grid-item-landscape {
  399. .post-thumbnail img {
  400. max-width: calc( 100% - #{( $gutter * 2 )} - 2px );
  401. max-height: calc( 100% - #{( $gutter * 2 )} - 2px );
  402. }
  403. }
  404. &.grid-item-portrait {
  405. .post-thumbnail img {
  406. max-width: calc( 100% - #{( $gutter * 2 )} - 2px );
  407. max-height: calc( 100% - #{( $gutter * 2 )} - 2px );
  408. width: auto;
  409. }
  410. }
  411. }
  412. }
  413. }
  414. }
  415. }
  416. @include breakpoint( laptop ) {
  417. .hfeed {
  418. .content-area {
  419. position: relative;
  420. .page-header {
  421. border-bottom: none;
  422. max-width: calc( 20% - #{ $gutter * 2.5 } );
  423. padding: ( $baseline * 2.5 ) 0 0;
  424. position: absolute;
  425. left: #{ $gutter * 2.5 };
  426. .page-title {
  427. @include font-size( 1.125 );
  428. margin-bottom: ( $baseline * .5 );
  429. }
  430. &.sticky {
  431. left: inherit;
  432. padding-top: calc( #{$baseline * 2.5} );
  433. position: fixed;
  434. right: calc( 80% );
  435. }
  436. }
  437. }
  438. .hentry {
  439. .entry-header {
  440. margin: ( $gutter * 1.5 );
  441. padding: ( $gutter * 1.5 ) ( $gutter * .5 );
  442. }
  443. &.has-post-thumbnail {
  444. .entry-header {
  445. left: ( $gutter * 1.5 );
  446. top: ( $gutter * 1.5 );
  447. height: calc( 100% - #{($gutter * 3)} );
  448. width: calc( 100% - #{($gutter * 3)} );
  449. }
  450. .post-thumbnail {
  451. a {
  452. padding: ( $gutter * 1.5 );
  453. }
  454. &:after {
  455. left: ($gutter * 1.5);
  456. top: ($gutter * 1.5);
  457. height: calc(100% - #{($gutter * 3)});
  458. width: calc(100% - #{($gutter * 3)});
  459. }
  460. }
  461. &.grid-item-small {
  462. .entry-header {
  463. margin: ( $gutter * 1.5 );
  464. padding: ( $gutter * 1.5 ) ( $gutter * .5 );
  465. }
  466. .post-thumbnail img {
  467. max-width: calc( 100% - #{($gutter * 3)} );
  468. max-height: calc( 100% - #{( $gutter * 3 )});
  469. }
  470. &.grid-item-landscape {
  471. .post-thumbnail img {
  472. max-width: calc( 100% - #{( $gutter * 3 )} - 2px );
  473. max-height: calc( 100% - #{( $gutter * 3 )} - 2px );
  474. }
  475. }
  476. &.grid-item-portrait {
  477. .post-thumbnail img {
  478. max-width: calc( 100% - #{( $gutter * 3 )} - 2px );
  479. max-height: calc( 100% - #{( $gutter * 3 )} - 2px );
  480. width: auto;
  481. }
  482. }
  483. }
  484. }
  485. }
  486. .posts-navigation {
  487. margin: 0 #{ $gutter * 1.5 };
  488. }
  489. &.blog:not(.home),
  490. &:not(.home):not(.blog) {
  491. .site-main {
  492. margin-left: 25%;
  493. margin-right: auto;
  494. padding: 0;
  495. width: calc( 75% - #{ $gutter } );
  496. #infinite-handle,
  497. .infinite-loader {
  498. right: calc( 12.5% + #{ $gutter * 1.5 } );
  499. width: 100%;
  500. }
  501. }
  502. // Adjust sticky page header for admin bar
  503. &.admin-bar .page-header.sticky {
  504. padding-top: calc( #{ $baseline * 2.5 } + #{ $admin-bar-height } );
  505. }
  506. }
  507. }
  508. }