page-desk.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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-4">
  67. <h4 class="fw-bold mt-2">Docs</h4>
  68. <ul style="margin:0">
  69. <?php docs(); ?>
  70. </ul>
  71. </div>
  72. <div class="col-lg-4">
  73. <h4 class="fw-bold mt-2">Notes</h4>
  74. <ul style="margin:0">
  75. <?php notes(); ?>
  76. </ul>
  77. </div>
  78. <div class="col-lg-4">
  79. <h4 class="fw-bold mt-2">Lists</h4>
  80. <ul style="margin:0">
  81. <?php lists(); ?>
  82. </ul>
  83. </div>
  84. </div>
  85. <div class="row mt-3 pb-2">
  86. <div class="col-lg-4">
  87. <h4 class="fw-bold mt-2">Learning</h4>
  88. <ul style="margin:0">
  89. <?php learning(); ?>
  90. </ul>
  91. </div>
  92. <div class="col-lg-4">
  93. <h4 class="fw-bold mt-2">Commiting</h4>
  94. <ul style="margin:0">
  95. <?php commits(); ?>
  96. </ul>
  97. </div>
  98. <div class="col-lg-4">
  99. <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>
  100. <ul style="margin:0">
  101. <?php listening(); ?>
  102. </ul>
  103. </div>
  104. </div>
  105. <div class="row mt-3 pb-2">
  106. <div class="col-lg-4">
  107. <h4 class="fw-bold mt-2">Watching</h4>
  108. <ul style="margin:0">
  109. <?php watching(); ?>
  110. </ul>
  111. </div>
  112. <div class="col-lg-4">
  113. <h4 class="fw-bold mt-2">Reading</h4>
  114. <ul style="margin:0">
  115. <?php reading(); ?>
  116. </ul>
  117. </div>
  118. <div class="col-lg-4">
  119. <h4 class="fw-bold mt-2">Playing</h4>
  120. <ul style="margin:0">
  121. <?php playing(); ?>
  122. </ul>
  123. </div>
  124. </div>
  125. <div class="d-flex desk-actions" style="width:100%;margin-top:3rem;justify-content:flex-start;align-items:center;flex-wrap:wrap;gap:.5rem">
  126. <div style="flex:0 0 280px"><?php get_search_form(); ?></div>
  127. <a href="/desk/posts/" type="button" class="btn btn-dark">The Scroll</a>
  128. <a href="/archive/" type="button" class="btn btn-dark">👉🏼 The Archive</a>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <?php get_footer('full'); ?>