From d1b7ad73a3ac0d9f83ceda422cdb840eec79f4ba Mon Sep 17 00:00:00 2001 From: Richard Littauer Date: Tue, 29 Oct 2024 21:53:30 +1300 Subject: [PATCH] refactor: Edit the news page Unsure why a lot of the content was in here. --- content/about/new_hugo-post.md | 155 --------------------------------- layouts/news/list.html | 49 ++--------- 2 files changed, 7 insertions(+), 197 deletions(-) delete mode 100644 content/about/new_hugo-post.md diff --git a/content/about/new_hugo-post.md b/content/about/new_hugo-post.md deleted file mode 100644 index 9d2961f..0000000 --- a/content/about/new_hugo-post.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: "Creating a New Hugo Post" -date: 2019-08-05T16:19:26+06:00 -draft: true -image: images/resource/post-6.jpg -bgImage: "images/backgrounds/page-title.jpg" -description: "this is meta description" -author: Themefisher -studies: "Case Study" ---- - -# Heading 1 -## Heading 2 -### Heading 3 -#### Heading 4 -##### Heading 5 -###### Heading 6 - -
- -##### Emphasis - -Emphasis, aka italics, with *asterisks* or _underscores_. - -Strong emphasis, aka bold, with **asterisks** or __underscores__. - -Combined emphasis with **asterisks and _underscores_**. - -Strikethrough uses two tildes. ~~Scratch this.~~ - -
- -##### Link -[I'm an inline-style link](https://www.google.com) - -[I'm an inline-style link with title](https://www.google.com "Google's Homepage") - -[I'm a reference-style link][Arbitrary case-insensitive reference text] - -[I'm a relative reference to a repository file](../404.md) - -[You can use numbers for reference-style link definitions][1] - -Or leave it empty and use the [link text itself]. - -URLs and URLs in angle brackets will automatically get turned into links. -http://www.example.com or and sometimes -example.com (but not on Github, for example). - -Some text to show that the reference links can follow later. - -[arbitrary case-insensitive reference text]: https://www.mozilla.org -[1]: http://slashdot.org -[link text itself]: http://www.reddit.com - -
- -##### Paragraph - -Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam nihil enim maxime corporis cumque totam aliquid nam sint inventore optio modi neque laborum officiis necessitatibus, facilis placeat pariatur! Voluptatem, sed harum pariatur adipisci voluptates voluptatum cumque, porro sint minima similique magni perferendis fuga! Optio vel ipsum excepturi tempore reiciendis id quidem? Vel in, doloribus debitis nesciunt fugit sequi magnam accusantium modi neque quis, vitae velit, pariatur harum autem a! Velit impedit atque maiores animi possimus asperiores natus repellendus excepturi sint architecto eligendi non, omnis nihil. Facilis, doloremque illum. Fugit optio laborum minus debitis natus illo perspiciatis corporis voluptatum rerum laboriosam. - -
- -##### Ordered List - -1. List item -2. List item -3. List item -4. List item -5. List item - -
- -##### Unordered List - -* List item -* List item -* List item -* List item -* List item - -
- -##### Code and Syntax Highlighting - -Inline `code` has `back-ticks around` it. - -```javascript -var s = "JavaScript syntax highlighting"; -alert(s); -``` - -```python -s = "Python syntax highlighting" -print s -``` - -``` -No language indicated, so no syntax highlighting. -But let's throw in a tag. -``` - -
- -##### Blockquote - -> This is a blockquote example. - -
- -##### Inline HTML - -You can also use raw HTML in your Markdown, and it'll mostly work pretty well. - -
-
Definition list
-
Is something people use sometimes.
- -
Markdown in HTML
-
Does *not* work **very** well. Use HTML tags.
-
- - -
- -##### Tables - -Colons can be used to align columns. - -| Tables | Are | Cool | -| ------------- |:-------------:| -----:| -| col 3 is | right-aligned | $1600 | -| col 2 is | centered | $12 | -| zebra stripes | are neat | $1 | - -There must be at least 3 dashes separating each header cell. -The outer pipes (|) are optional, and you don't need to make the -raw Markdown line up prettily. You can also use inline Markdown. - -Markdown | Less | Pretty ---- | --- | --- -*Still* | `renders` | **nicely** -1 | 2 | 3 - -
- -##### Image - -![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1") - -
- -##### Youtube video - -{{< youtube C0DPdy98e4c >}} \ No newline at end of file diff --git a/layouts/news/list.html b/layouts/news/list.html index 4b94564..6480e2b 100644 --- a/layouts/news/list.html +++ b/layouts/news/list.html @@ -2,47 +2,12 @@ {{ partial "page-header.html" . }} -{{ $pages := .Data.Pages }} -{{ $yesterday := (now.AddDate 0 0 -1).Unix }} -{{ $pages = where $pages "Section" "in" "news" }} +{{ $pages := where .Data.Pages "Section" "news" }}
- {{ range (where $pages ".Date.Unix" ">=" $yesterday).Reverse }} -
- -
-
- - {{ .Title }} - -
-
-

- {{ .Title }} -

- -
    - {{ range .Params.tags }} -
  • {{ . }}
  • - {{ end }} -
-

{{ .Description }}

- Go to News - {{ if .Params.youtubeLink }} - Watch Recording - {{ end }} -
-
-
- {{ else }} - {{ end }} - {{ range where $pages ".Date.Unix" "<" $yesterday }} + {{ range .Data.Pages }}
@@ -62,11 +27,11 @@

{{ .Description }}

- Open News - {{ if .Params.youtubeLink }} - Watch Recording - {{ end }} -
+ Read more + {{ if .Params.youtubeLink }} + Watch Recording + {{ end }} +