page-desk.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. /*
  3. Template Name: Desk
  4. */
  5. get_header(); ?>
  6. <?php get_template_part( 'loader' ); ?>
  7. <?php get_template_part( 'underscore' ); ?>
  8. <div class="container leader">
  9. <div class="row">
  10. <div class="col-md-12">
  11. <h1 id="desk" class="cm-sans fs-2 animate__animated animate__fadeInLeft">Desk</h1>
  12. </div>
  13. </div>
  14. <div class="desk" role="main">
  15. <div class="entry-content">
  16. <div class="row">
  17. <div class="col-lg-8">
  18. <h4 class="fw-bold mb-1">Now</h4>
  19. <ul class="now-doing" style="margin:0">
  20. <?php now(); ?>
  21. </ul>
  22. <div class="row mt-3">
  23. <div class="col-md-6 studio-tools">
  24. <h4 class="fw-bold">Posts</h4>
  25. <ul>
  26. <?php $recentposts = get_posts('numberposts=21'); foreach ($recentposts as $post) : setup_postdata($post); ?>
  27. <li style="color:#777"><?php echo get_the_date('y/m/d'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  28. <?php endforeach; ?>
  29. </ul>
  30. </div>
  31. <div class="col-md-6 studio-tools d-lg-block">
  32. <h4 class="fw-bold">Today I Learned</h4>
  33. <ul>
  34. <?php pull_til(21); ?>
  35. </ul>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="col-lg-4 studio-tools desk-meta">
  40. <?php $sticky = get_option('sticky_posts'); if( !empty($sticky) ){ ?>
  41. <h4 class="fw-bold">Recently Edited</h4>
  42. <ul>
  43. <?php $args = array('post_type' => 'post', 'orderby' => 'modified', 'posts_per_page' => 5,'post__in' => $sticky);?>
  44. <?php $stickyposts = get_posts($args); foreach ($stickyposts as $post) : setup_postdata($post); ?>
  45. <li style="color:#777"><?php echo get_the_modified_date('y/m/d'); ?> ( <?php echo get_the_date('y/m/d'); ?> ) - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  46. <?php endforeach; ?>
  47. </ul>
  48. <?php } ?>
  49. <h4 class="fw-bold mt-4">Recommended Reading</h4>
  50. <ul>
  51. <?php $recposts = get_posts( array( 'category_name' => 'recommended', 'numberposts' => 10 ) ); foreach ( $recposts as $post ) : setup_postdata( $post ); ?>
  52. <li style="color:#777"><?php echo get_the_date('y/m/d'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
  53. <?php endforeach; wp_reset_postdata(); ?>
  54. </ul>
  55. <h4 class="fw-bold mt-4">Recent Bookmarks</h4>
  56. <ul>
  57. <?php bookmarks_pull(7); ?>
  58. </ul>
  59. <h4 class="fw-bold">By Year</h4>
  60. <ul class="tags">
  61. <?php wp_get_archives( array( 'type' => 'yearly', 'format' => 'custom', 'before' => '', 'after' => ',&nbsp;' ) ); ?>
  62. </ul>
  63. </div>
  64. </div>
  65. <div class="row mt-3 pb-2">
  66. <div class="col-lg-12">
  67. <h4 class="fw-bold mt-2">Recent Photos <span class="text-muted fw-light"><small>( all @ <a href="/photo/">/photo )</a></small></span></h4>
  68. <div
  69. data-lychee-embed
  70. data-api-url="https://davidwindham.com/photo"
  71. data-mode="stream"
  72. data-layout="square"
  73. data-spacing="8"
  74. data-target-row-height="175"
  75. data-target-column-width="175"
  76. data-max-photos="10"
  77. data-sort-order="desc"
  78. data-header-placement="none"
  79. ></div>
  80. </div>
  81. </div>
  82. <div class="row mt-3 pb-2">
  83. <div class="col-lg-4">
  84. <h4 class="fw-bold mt-2">Docs</h4>
  85. <ul style="margin:0">
  86. <?php docs(); ?>
  87. </ul>
  88. </div>
  89. <div class="col-lg-4">
  90. <h4 class="fw-bold mt-2">Notes</h4>
  91. <ul style="margin:0">
  92. <?php notes(); ?>
  93. </ul>
  94. </div>
  95. <div class="col-lg-4">
  96. <h4 class="fw-bold mt-2">Lists</h4>
  97. <ul style="margin:0">
  98. <?php lists(); ?>
  99. </ul>
  100. </div>
  101. </div>
  102. <div class="row mt-3 pb-2">
  103. <div class="col-lg-4">
  104. <h4 class="fw-bold mt-2">Learning</h4>
  105. <ul style="margin:0">
  106. <?php learning(); ?>
  107. </ul>
  108. </div>
  109. <div class="col-lg-4">
  110. <h4 class="fw-bold mt-2">Commiting</h4>
  111. <ul style="margin:0">
  112. <?php commits(); ?>
  113. </ul>
  114. </div>
  115. <div class="col-lg-4">
  116. <h4 class="fw-bold mt-2">Listening <span class="text-muted fw-light"><small>( all @ <a href="https://davidawindham.com/studio/music/">/music )</a></small></span></h4>
  117. <ul style="margin:0">
  118. <?php listening(); ?>
  119. </ul>
  120. </div>
  121. </div>
  122. <div class="row mt-3 pb-2">
  123. <div class="col-lg-4">
  124. <h4 class="fw-bold mt-2">Watching</h4>
  125. <ul style="margin:0">
  126. <?php watching(); ?>
  127. </ul>
  128. </div>
  129. <div class="col-lg-4">
  130. <h4 class="fw-bold mt-2">Reading</h4>
  131. <ul style="margin:0">
  132. <?php reading(); ?>
  133. </ul>
  134. </div>
  135. <div class="col-lg-4">
  136. <h4 class="fw-bold mt-2">Playing</h4>
  137. <ul style="margin:0">
  138. <?php playing(); ?>
  139. </ul>
  140. </div>
  141. </div>
  142. <div class="d-flex desk-actions" style="width:100%;margin-top:3rem;justify-content:flex-start;align-items:center;flex-wrap:wrap;gap:.5rem">
  143. <div style="flex:0 0 280px"><?php get_search_form(); ?></div>
  144. <a href="/desk/posts/" type="button" class="btn btn-dark">📜 The Scroll</a>
  145. <a href="/archive/" type="button" class="btn btn-dark">🗄️ The Archive</a>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. <?php get_footer('full'); ?>