Skip to content

Commit

Permalink
[feature] about and help pages (#28)
Browse files Browse the repository at this point in the history
* About page
* Help page
* Split scripts and footer
  • Loading branch information
ponsfrilus committed Jan 18, 2024
1 parent 430742d commit d8052c6
Show file tree
Hide file tree
Showing 8 changed files with 261 additions and 9 deletions.
16 changes: 16 additions & 0 deletions src/public/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,19 @@ body {
.cc-banner {
display: none;
}

kbd {
background-color: #eee;
border-radius: 3px;
border: 1px solid #b4b4b4;
box-shadow:
0 1px 1px rgba(0, 0, 0, 0.2),
0 2px 0 0 rgba(255, 255, 255, 0.7) inset;
color: #333;
display: inline-block;
font-size: 0.85em;
font-weight: 700;
line-height: 1;
padding: 3px 5px;
white-space: nowrap;
}
8 changes: 8 additions & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ app.get('/', function (req, res) {
res.render('pages/home', { version });
});

// about page
app.get('/about', function (req, res) {
res.render('pages/about', { version });
});
// help page
app.get('/help', function (req, res) {
res.render('pages/help', { version });
});
// catalog page
app.get('/catalog', function (req, res) {
const data = require(path.join(__dirname, 'data/EPFL-services.json'));
Expand Down
129 changes: 129 additions & 0 deletions src/views/pages/about.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<!doctype html>
<html lang="en">
<head>
<%- include('partials/head'); -%>
</head>
<body>
<div class="container mt-5 main-content">
<div class="welcome"><a href="/">Startpage</a> > About</div>
<hr />
<div class="col-auto">
<div class="row">
<div class="col-sm">
<h3>À propos</h3>
<p>
Ce projet, démarré fin 2023 par des membres de l'équipe
<a href="https://go.epfl.ch/isas-fsd" target="blank">ISAS-FSD</a>
de l'EPFL, à pour but de proposer une «<cite
><a href="https://github.com/jnmcfly/awesome-startpage"
>startpage</a
></cite
>» ayant pour objectifs de :
</p>
<ul>
<li>
Fournir une excellente page d'accueil pour la communauté de
l'EPFL ;
<!-- (<a href="https://knowyourmeme.com/memes/stonks">#productivitystonks</a>)-->
</li>
<li>
Être utile pour différents rôles (étudiants, chercheurs,
administrateurs, techniciens, etc...) ;
</li>
<li>Répertorier tous les services utiles de l'EPFL ;</li>
<li>
Être intuitive, efficace, configurable et facile à utiliser.
</li>
</ul>

<h5>Tech stack</h5>
<p>Node, Express, ejs, pnpm, ...</p>

<h5>Licence</h5>
<p>
<a
href="https://github.com/epfl-si/startpage/blob/main/LICENSE"
target="_blank"
>MIT</a
>.
</p>

<h5>Participer</h5>
<p>
Nous ❤ les
<cite
><a
href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests"
target="_blank"
>Pull Request</a
></cite
>
! Rendez-vous sur le
<a href="https://github.com/epfl-si/startpage" target="_blank"
>dépôt GitHub</a
>
pour faire vos propositions.
</p>
</div>
</div>
</div>
<div class="col-auto">
<div class="row">
<div class="col-sm">
<hr />
<h3>About</h3>
<p>
This project, initiated at the end of 2023 by members of the
<a href="https://go.epfl.ch/isas-fsd" target="blank">ISAS-FSD</a>
team at EPFL, aims to create a "<cite
><a href="https://github.com/jnmcfly/awesome-startpage"
>startpage</a
></cite
>" with the following objectives:
</p>
<ul>
<li>Provide an excellent homepage for the EPFL community</li>
<li>
Be useful for different roles (students, researchers,
administrators, technicians, etc...)
</li>
<li>Catalog all the useful services at EPFL</li>
<li>Be intuitive, efficient, configurable, and easy to use</li>
</ul>

<h5>Tech stack</h5>
<p>Node, Express, ejs, pnpm, ...</p>

<h5>License</h5>
<p>
<a
href="https://github.com/epfl-si/startpage/blob/main/LICENSE"
target="_blank"
>MIT</a
>.
</p>

<h5>Contribute</h5>
<p>
We ❤
<cite
><a
href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests"
target="_blank"
>Pull Request</a
></cite
>! Please head to the
<a href="https://github.com/epfl-si/startpage" target="_blank"
>GitHub repository</a
>
to submit your proposals.
</p>
</div>
</div>
</div>
</div>
<%- include('partials/footer'); -%>
<!-- prettier-ignore -->
<%- include('partials/footer_scripts'); -%>
</body>
</html>
6 changes: 4 additions & 2 deletions src/views/pages/catalog.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<%- include('partials/head'); %>
</head>
<body>
<div class="container mt-5">
<div class="container mt-5 main-content">
<h3>catalog</h3>
<ul>
<% data.forEach(function(d) { %>
Expand All @@ -17,6 +17,8 @@
<% }); %>
</ul>
</div>
<%- include('partials/footer'); %>
<%- include('partials/footer'); -%>
<!-- prettier-ignore -->
<%- include('partials/footer_scripts'); -%>
</body>
</html>
96 changes: 96 additions & 0 deletions src/views/pages/help.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<!doctype html>
<html lang="en">
<head>
<%- include('partials/head'); -%>
</head>
<body>
<div class="container mt-5 main-content">
<div class="welcome"><a href="/">Startpage</a> > Help</div>
<hr />
<div class="col-auto">
<div class="row">
<div class="col-sm">
<h3>Search input</h3>
<p>
When the focus is in the search input, it is possible to use
shortcut to switch the search engine:
</p>
<table class="table table-boxed">
<thead>
<tr>
<th>Key</th>
<th>Search engine</th>
</tr>
</thead>
<tbody>
<tr>
<td><kbd>?</kbd></td>
<td>Google</td>
</tr>
<tr>
<td><kbd>d</kbd></td>
<td>DuckDuckGo</td>
</tr>
<tr>
<td><kbd>g</kbd>, <kbd>go</kbd></td>
<td>go.epfl.ch</td>
</tr>
<tr>
<td><kbd>net</kbd>, <kbd>epnet</kbd></td>
<td>network.epfl.ch</td>
</tr>
<tr>
<td><kbd>m</kbd></td>
<td>map.epfl.ch</td>
</tr>
<tr>
<td><kbd>n</kbd></td>
<td>news.epfl.ch</td>
</tr>
<tr>
<td><kbd>p</kbd></td>
<td>people.epfl.ch</td>
</tr>
<tr>
<td><kbd>u</kbd></td>
<td>units.epfl.ch</td>
</tr>
<tr>
<td><kbd>sn</kbd></td>
<td>epfl.servicenow.com</td>
</tr>
<tr>
<td><kbd>w</kbd></td>
<td>Wikipedia</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
</div>
</div>
<div class="row">
<div class="col-sm">
<h3>Page shortcut</h3>
<table class="table table-boxed">
<thead>
<tr>
<th>Key</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td><kbd>Esc</kbd></td>
<td>Reset the seaach input and focus it</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<%- include('partials/footer'); -%>
<!-- prettier-ignore -->
<%- include('partials/footer_scripts'); -%>
</body>
</html>
2 changes: 2 additions & 0 deletions src/views/pages/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,7 @@
</div>
</div>
<%- include('partials/footer'); -%>
<!-- prettier-ignore -->
<%- include('partials/footer_scripts'); -%>
</body>
</html>
7 changes: 0 additions & 7 deletions src/views/pages/partials/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,3 @@
<a href="https://github.com/epfl-si/startpage" target="_blank">source</a>
</span>
</footer>

<script>
svgPath = 'https://web2018.epfl.ch/6.4.0/icons/icons.svg';
featherSvgPath = 'https://web2018.epfl.ch/6.4.0/icons/feather-sprite.svg';
</script>
<script src="https://web2018.epfl.ch/6.4.0/js/elements.min.js"></script>
<script src="/js/search.js"></script>
6 changes: 6 additions & 0 deletions src/views/pages/partials/footer_scripts.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script>
svgPath = 'https://web2018.epfl.ch/6.4.0/icons/icons.svg';
featherSvgPath = 'https://web2018.epfl.ch/6.4.0/icons/feather-sprite.svg';
</script>
<script src="https://web2018.epfl.ch/6.4.0/js/elements.min.js"></script>
<script src="/js/search.js"></script>

0 comments on commit d8052c6

Please sign in to comment.