windhamdavid 1 year ago
parent
commit
95cbb9ea0b
2 changed files with 44 additions and 6 deletions
  1. 2 2
      inc/utils.php
  2. 42 4
      page-now.php

+ 2 - 2
inc/utils.php

@@ -247,10 +247,10 @@ function watching() {
 }
 function listening() {
 	require_once('lib/html_dom.php');
-	$url = 'https://davidawindham.com/studio/music/';
+	$url = 'https://davidawindham.com/til/lists/now/listening';
 	$html = file_get_html($url);
 	$i = 0;
-	foreach ($html->find('ul .wtracks li') as $li) {
+	foreach ($html->find('.markdown ul li') as $li) {
 	    if (!empty($html)) {
 			echo $li;
       if (++$i == 3) break;

+ 42 - 4
page-now.php

@@ -31,7 +31,7 @@ get_header(); ?>
                 <?php endforeach; ?>
               <br>
               <?php } ?>
-							<?php $recentposts = get_posts(array( 'numberposts' => 7, 'offset' => 0 ) ); foreach ($recentposts as $post) : setup_postdata($post); ?>
+							<?php $recentposts = get_posts(array( 'numberposts' => 9, 'offset' => 0 ) ); foreach ($recentposts as $post) : setup_postdata($post); ?>
 							       <li style="color:#777"><?php echo get_the_date('y/m/d'); ?> - <a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
 							<?php endforeach; ?>
 						</ul>
@@ -59,25 +59,63 @@ get_header(); ?>
 						</ul>
 					</div>
         </div>
-        <div class="row mt-3 mb-5 pb-2">
+        <div class="row mt-3 pb-2">
           <div class="col-lg-4">
             <h5 class="fw-bold mt-2">Docs</h5>
             <ul style="margin:0">
             <?php docs(); ?>
 						</ul>
 					</div>
+          <div class="col-lg-4">
+            <h5 class="fw-bold mt-2">Notes</h5>
+            <ul style="margin:0">
+            <?php notes(); ?>
+						</ul>
+					</div>
           <div class="col-lg-4">
             <h5 class="fw-bold mt-2">Lists</h5>
             <ul style="margin:0">
             <?php lists(); ?>
 						</ul>
 					</div>
+				</div>
+        <div class="row mt-3 pb-2">
+          <div class="col-lg-4">
+            <h5 class="fw-bold mt-2">Learning</h5>
+            <ul style="margin:0">
+            <?php learning(); ?>
+						</ul>
+					</div>
           <div class="col-lg-4">
-            <h5 class="fw-bold mt-2">Notes</h5>
+            <h5 class="fw-bold mt-2">git Commits</h5>
             <ul style="margin:0">
-            <?php notes(); ?>
+            <?php commits(); ?>
+						</ul>
+					</div>
+          <div class="col-lg-4">
+            <h5 class="fw-bold mt-2">Listening <span><small>( all @ <a href="https://davidawindham.com/studio/music/">/music )</a></small></span></h5>
+            <ul style="margin:0">
+            <?php listening(); ?>
+						</ul>
+					</div>
+				</div>
+        <div class="row mt-3 mb-5 pb-2">
+          <div class="col-lg-4">
+            <h5 class="fw-bold mt-2">Watching</h5>
+            <ul style="margin:0">
+            <?php watching(); ?>
 						</ul>
 					</div>
+
+          <div class="col-lg-4">
+            <h5 class="fw-bold mt-2">Reading</h5>
+            <ul style="margin:0">
+            <?php reading(); ?>
+						</ul>
+					</div>
+          <div class="col-lg-4">
+
+					</div>
 				</div>
 			</div>
     </div>