Browse Source

homepage: Add h-feed, move h-entry tpl out of it

master
Chimo 3 years ago
parent
commit
8bab6df1ec
2 changed files with 57 additions and 7 deletions
  1. 57
    2
      _layouts/homepage.html
  2. 0
    5
      index.php

+ 57
- 2
_layouts/homepage.html View File

@@ -2,8 +2,22 @@
2 2
 
3 3
 {% include navigation.html %}
4 4
 
5
-<div id="main" role="main">
5
+<div id="main" role="main" class="h-feed">
6 6
   <div class="entry-wrapper">
7
+    <div style="border-bottom: 1px solid #ddd; padding-bottom: 20px; overflow: hidden;" class="h-card">
8
+      <img class="u-photo" src="/images/bio-photo.png" style="float: left; width: 96px; border-radius: 50%; margin-right: 20px;">
9
+      Hi! I'm <span class="p-name p-author">Chimo</span>. This is my
10
+      <a href="http://indiewebcamp.com/indieweb">IndieWeb</a>.
11
+      <a href="http://indiewebcamp.com/IRC-people">There are many like it</a>,
12
+      but this one is mine.<br>
13
+      Make yourself comfortable, have a look around and <a href="/about">let's talk</a>!
14
+
15
+      <div id="geo-container" style="display: none;">
16
+        <span class="fa fa-map-marker"></span>
17
+        <a style="font-size: small;" id="geo" href=""></a>
18
+        <time datetime="" style="font-size: small;" id="geo-timestamp"></time>
19
+      </div>
20
+    </div>
7 21
     <div class="sidebar">
8 22
       <h2>
9 23
           Blog<br>
@@ -31,7 +45,7 @@
31 45
 
32 46
     <div class="content">
33 47
       <div class="stream">
34
-        <h2>
48
+        <h2 class="p-name">
35 49
             Realtime<br>
36 50
             Updates&nbsp;<a href="/updates.atom"><span class="fa fa-rss"></span></a>
37 51
         </h2>
@@ -44,5 +58,46 @@
44 58
 
45 59
 {% include footer.html %}
46 60
 
61
+<ol id="tpl" style="display: none;">
62
+    <li class="">
63
+        <figure class="h-entry chr-card">
64
+            <figcaption class="p-name chr-card__title"></figcaption>
65
+            <blockquote class="e-content chr-card__content" cite="">
66
+
67
+            </blockquote>
68
+            <footer>
69
+                <!-- TODO: link to specific types -->
70
+                <!-- TODO: JS progressive enhancement brings data in stream instead of navigating to other page -->
71
+                <a class="interactions-link" href="http://chromic.org/update/#interactions">
72
+                <ul class="interaction-icons" data-webmention-count data-url="https://chromic.org/update/">
73
+                    <li class="interaction-icon comments">
74
+                        <span class="num">0</span>
75
+                        <span class="fa fa-comments"></span>
76
+                        <span class="sr-only">mentions</span>
77
+                    </li>
78
+                    <li class="interaction-icon likes">
79
+                        <span class="num">0</span>
80
+                        <span class="fa fa-heart"></span>
81
+                        <span class="sr-only">likes</span>
82
+                    </li>
83
+                    <li class="interaction-icon repeats">
84
+                        <span class="num">0</span>
85
+                        <span class="fa fa-recycle"></span>
86
+                        <span class="sr-only">repeats</span>
87
+                    </li>
88
+                </ul>
89
+                </a>
90
+                <a class="u-url" href="/update/">
91
+                    <time class="dt-published timeago" datetime=""></time>
92
+                </a>
93
+                via
94
+                <a class="foreign-url" href="">
95
+                    <img class="foreign-service" src="/images/homepage/.png" title="" alt="">
96
+                </a>
97
+            </footer>
98
+        </figure>
99
+    </li>
100
+</ol>
101
+
47 102
 {% include scripts.html %}
48 103
 

+ 0
- 5
index.php View File

@@ -126,11 +126,6 @@ if ($nbRows === 10) {
126 126
 
127 127
 echo $html . '</nav>' . "\n";
128 128
 
129
-// Provide a hidden, empty html template for the websockets to use
130
-echo '<ul id="tpl" style="display: none;">' . "\n";
131
-echo sprintf($html_template, "", "", "", "", "", "", "", "", "", "", "", "", "");
132
-echo "\n" . '</ul>';
133
-
134 129
 ?>
135 130
 
136 131
 <script>

Loading…
Cancel
Save