diff --git a/examples/demo/site/themes/bootstrap/assets/css/node.css b/examples/demo/site/themes/bootstrap/assets/css/node.css index 85b78c9..cc105b5 100644 --- a/examples/demo/site/themes/bootstrap/assets/css/node.css +++ b/examples/demo/site/themes/bootstrap/assets/css/node.css @@ -4,13 +4,13 @@ ul.cms-nodes { border: solid 1px #ccc; } -li.cms_type_page, li.cms_type_blog { +.cms-nodes li.cms_type_page, .cms-nodes li.cms_type_blog { border-top: dotted 1px #ccc; } li.cms_type_page a::before { content: "[page] "; } -li.cms_type_blog a::before { +.cms-nodes li.cms_type_blog a::before { content: "[blog] "; } ul.cms-nodes li:first-child { @@ -20,4 +20,32 @@ ul.cms-nodes li:first-child { .summary{ margin-top:20px; font-weight:bold; +} +.cms-blog-nodes{ + padding:0; + margin:0; +} +.cms-blog-nodes li{ + list-style: none; + display: block; + margin-top:20px; + padding-bottom:20px; + border-bottom:1px dotted black; +} + +.cms-blog-nodes li > a{ + color:black; + font-size:18px; + text-decoration: none; + display:block; + margin:6px 0; +} + +.cms-blog-nodes li > a:hover{ + color:#999; +} + +.blog_list_summary a{ + margin-top:20px; + display:block; } \ No newline at end of file diff --git a/modules/node/cms_node_api.e b/modules/node/cms_node_api.e index 8f0a8d9..ab990ea 100644 --- a/modules/node/cms_node_api.e +++ b/modules/node/cms_node_api.e @@ -212,6 +212,12 @@ feature -- Access: Node Result := node_storage.nodes end + nodes_order_created_desc: LIST[CMS_NODE] + -- List of nodes ordered by creation date (descending) + do + Result := node_storage.nodes_order_created_desc + end + recent_nodes (a_offset, a_rows: INTEGER): LIST [CMS_NODE] -- List of the `a_rows' most recent nodes starting from `a_offset'. do diff --git a/modules/node/handler/blog_handler.e b/modules/node/handler/blog_handler.e index 63786b3..58e50cf 100644 --- a/modules/node/handler/blog_handler.e +++ b/modules/node/handler/blog_handler.e @@ -24,6 +24,7 @@ feature -- HTTP Methods s: STRING n: CMS_NODE lnk: CMS_LOCAL_LINK + hdate: HTTP_DATE do -- At the moment the template is hardcoded, but we can -- get them from the configuration file and load them into @@ -35,10 +36,10 @@ feature -- HTTP Methods -- NOTE: for development purposes we have the following hardcode output. create s.make_from_string ("
")
if attached api.format (n.format) as f then
s.append (f.formatted_output (l_summary))
else
s.append (l_page.formats.default_format.formatted_output (l_summary))
end
+ s.append ("
")
+ s.append (l_page.link ("More...", lnk.location, Void))
+ s.append ("