Project import generated by Copybara.
GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/templates/sitewide/hosting-home-page.ezt b/templates/sitewide/hosting-home-page.ezt
new file mode 100644
index 0000000..6f066fb
--- /dev/null
+++ b/templates/sitewide/hosting-home-page.ezt
@@ -0,0 +1,85 @@
+[define show_search_metadata]True[end]
+[define robots_no_index]true[end]
+[define category_css]css/ph_list.css[end]
+
+[include "../framework/header.ezt" "hidesearch"]
+
+[define prod_hosting_base_url]/hosting/[end]
+
+[if-any read_only][else]
+ [if-any can_create_project learn_more_link]
+ <div style="margin-top:3em; text-align:center;">
+ <div style="text-align:center;margin:1em">
+ [if-any can_create_project]
+ <a href="/hosting/createProject">Create a new project</a>
+ [end]
+
+ [if-any learn_more_link]
+ <a href="[learn_more_link]">Learn more about [site_name]</a>
+ [end]
+ </div>
+ </div>
+ [end]
+[end]
+
+<a href="/projects" style="display: block; padding: 0.5em 8px; width: 50%;
+ text-align: center; margin: auto; border: var(--chops-normal-border);
+ border-radius: 8px;">
+Preview a new project list for Monorail.
+</a>
+
+<div id="controls">
+ [include "../sitewide/project-list-controls.ezt" arg1]
+</div>
+
+<div id="project_list">
+ [if-any projects]
+ <table id="resultstable" class="resultstable results" width="100%" border="0" cellspacing="0" cellpadding="18">
+ <tr>
+ [if-any logged_in_user]<th></th>[end]
+ <th style="text-align:left">Name</th>
+ [if-any logged_in_user]<th style="text-align:left; white-space:nowrap">Your role</th>[end]
+ <th style="text-align:left">Stars</th>
+ <th style="text-align:left">Updated</th>
+ <th style="text-align:left">Summary</th>
+ </tr>
+ [for projects]
+ <tr data-url="[projects.relative_home_url]">
+ [include "project-list-row.ezt"]
+ </tr>
+ [end]
+ </table>
+ [else]
+ <p style="text-align:center;padding:0; margin:2em">
+ There were no visible projects found.
+ </p>
+ [end]
+</div>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+ var stars = document.getElementsByClassName("star");
+ for (var i = 0; i < stars.length; ++i) {
+ var star = stars[[]i];
+ star.addEventListener("click", function (event) {
+ var projectName = event.target.getAttribute("data-project-name");
+ _TKR_toggleStar(event.target, projectName);
+ });
+ }
+
+ function _handleResultsClick(event) {
+ var target = event.target;
+ if (target.tagName == "A" || target.type == "checkbox" || target.className == "cb")
+ return;
+ while (target && target.tagName != "TR") target = target.parentNode;
+ _go(target.attributes[[]"data-url"].value,
+ (event.metaKey || event.ctrlKey || event.button == 1));
+ };
+ _addClickListener($("resultstable"), _handleResultsClick);
+
+
+});
+</script>
+
+[include "../framework/footer.ezt"]