-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adfd014
commit cde44c9
Showing
11 changed files
with
229 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ pub mod configuration; | |
pub mod routes; | ||
pub mod startup; | ||
pub mod telemetry; | ||
pub mod templates; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
use aion_types::rebase::response::SimpleDisplay; | ||
use askama_actix::Template; | ||
|
||
#[derive(Template)] // this will generate the code... | ||
#[template(path = "all_news.html")] // using the template in this path, relative | ||
// to the `templates` dir in the crate root | ||
pub struct AllNewsTemplate { | ||
pub items: Vec<SimpleDisplay>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use aion_types::rebase::response::SimpleDisplay; | ||
//use askama::Template; | ||
use askama_actix::Template; | ||
|
||
#[derive(Template)] // this will generate the code... | ||
#[template(path = "latest_news.html")] // using the template in this path, relative | ||
// to the `templates` dir in the crate root | ||
pub struct LatestNewsTemplate { | ||
pub items: Vec<SimpleDisplay>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod all_news; | ||
pub mod latest_news; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Rebase All News</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f9; | ||
color: #333; | ||
margin: 0; | ||
padding: 20px; | ||
} | ||
h1 { | ||
color: #5a5a5a; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
li { | ||
background-color: #fff; | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
margin-bottom: 10px; | ||
border-radius: 8px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
} | ||
a { | ||
color: #0066cc; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
strong { | ||
color: #333; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>All News</h1> | ||
<ul> | ||
{% for item in items %} | ||
<li> | ||
<strong>Title:</strong> {{ item.title }}<br /> | ||
<strong>Introduce:</strong> {{ item.introduce }}<br /> | ||
<strong>URL:</strong> | ||
<a href="{{ item.url }}">{{ item.url }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello, {{ name }}! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Rebase Latest News</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f9; | ||
color: #333; | ||
margin: 0; | ||
padding: 20px; | ||
} | ||
h1 { | ||
color: #5a5a5a; | ||
} | ||
ul { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
li { | ||
background-color: #fff; | ||
border: 1px solid #ddd; | ||
padding: 10px; | ||
margin-bottom: 10px; | ||
border-radius: 8px; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
} | ||
a { | ||
color: #0066cc; | ||
text-decoration: none; | ||
} | ||
a:hover { | ||
text-decoration: underline; | ||
} | ||
strong { | ||
color: #333; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>Latest News</h1> | ||
<ul> | ||
{% for item in items %} | ||
<li> | ||
<strong>Title:</strong> {{ item.title }}<br /> | ||
<strong>Introduce:</strong> {{ item.introduce }}<br /> | ||
<strong>URL:</strong> | ||
<a href="{{ item.url }}">{{ item.url }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</body> | ||
</html> |