Skip to content

Commit

Permalink
adding notification bar
Browse files Browse the repository at this point in the history
  • Loading branch information
EdvinHonda committed Sep 23, 2023
1 parent 4e4276e commit 554031d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
5 changes: 4 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,8 @@ baseURL = 'https://cedille.etsmtl.ca'
icon = "fa-brands fa-linkedin"
url = "https://www.linkedin.com/company/cedille/about/"
weight = 4

[[params.footer.social]]
icon = "fa-brands fa-discord"
url = "https://discord.gg/RAhFnbs3"
weight = 5

2 changes: 2 additions & 0 deletions themes/cedille/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{- partial "head.html" . -}}
<body>
<div>
{{ partial "notification.html" . }}
{{- partial "header.html" . -}}
<div id="content">
{{- block "main" . }}{{- end }}
Expand All @@ -11,5 +12,6 @@
<script src="{{ .Site.BaseURL }}/js/gmap.js"></script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key={{ .Site.Params.map.APIkey }}&callback=initMap"></script>
</div>

</body>
</html>
23 changes: 23 additions & 0 deletions themes/cedille/layouts/partials/notification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<div class="notification py-2" id="notification-bar" style="background-color: rgba(255, 166, 0, 0.748);">
<div class="container-fluid">
<div class="row">
<div class="col-0 col-md-2"></div>
<div class="col-10 col-md-8 text-center">
<p class="m-0">🛑 Attention : Temporairement, nous n'acceptons plus de nouvelles demandes pour développer des sites web pour d'autres clubs. Nous assurons uniquement l'hébergement. Pour toute question, rejoignez-nous sur Discord.</p>
</div>
<div class="col-2 col-md-2 d-flex justify-content-end align-items-center">
<p class="btn m-0" onclick="buttonCloseNotif()">x</p>
</div>
</div>
</div>
</div>

<script>
let notification = document.getElementById("notification-bar");

function buttonCloseNotif() {
if( notification !== null) {
notification.style.display = "none";
}
};
</script>
22 changes: 0 additions & 22 deletions themes/cedille/static/js/main.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
// //Javascript to enable link to tab
// var hash = location.hash.replace(/^#/, ''); // ^ means starting, meaning only match the first hash
// if (hash) {
// $('a[href="#' + hash + '"]').tab('show');
// }

// // Change hash for page-reload
// $('.nav-link').on('shown.bs.tab', function (e) {
// window.location.hash = e.target.hash;
// })

// function test() {
// var url = document.location.toString();
// if (url.match('#')) {
// $('a[href="#' + url.split('#')[1] + '"]').tab('show');
// console.log(url);
// }

// // Change hash for page-reload
// $('a').on('shown.bs.tab', function (e) {
// window.location.hash = e.target.hash;
// })
// }

0 comments on commit 554031d

Please sign in to comment.