page-desk.php 4.5 KB

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