Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
fix: menu bar in mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
piraces committed Feb 12, 2023
1 parent e4c7f2b commit bec67e6
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SECRET=test
DB_DIR="/db/rsslay.sqlite"
DEFAULT_PROFILE_PICTURE_URL="https://i.imgur.com/MaceU96.png"
SECRET="CHANGE_ME"
VERSION=0.4.1
VERSION=0.4.2
REPLAY_TO_RELAYS=false
RELAYS_TO_PUBLISH_TO=""
DEFAULT_WAIT_TIME_BETWEEN_BATCHES=60000
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ENV PORT="8080"
ENV DB_DIR="/db/rsslay.sqlite"
ENV DEFAULT_PROFILE_PICTURE_URL="https://i.imgur.com/MaceU96.png"
ENV SECRET="CHANGE_ME"
ENV VERSION=0.4.1
ENV VERSION=0.4.2
ENV REPLAY_TO_RELAYS=false
ENV RELAYS_TO_PUBLISH_TO=""
ENV DEFAULT_WAIT_TIME_BETWEEN_BATCHES=60000
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.fly
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ENV PORT="8080"
ENV DB_DIR="/db/rsslay.sqlite"
ENV DEFAULT_PROFILE_PICTURE_URL="https://i.imgur.com/MaceU96.png"
ENV SECRET="CHANGE_ME"
ENV VERSION=0.4.1
ENV VERSION=0.4.2
ENV REPLAY_TO_RELAYS=false
ENV RELAYS_TO_PUBLISH_TO=""
ENV DEFAULT_WAIT_TIME_BETWEEN_BATCHES=60000
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.railwayapp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ENV PORT=$PORT
ENV DB_DIR=$DB_DIR
ENV DEFAULT_PROFILE_PICTURE_URL=$DEFAULT_PROFILE_PICTURE_URL
ENV SECRET=$SECRET
ENV VERSION=0.4.1
ENV VERSION=0.4.2
ENV REPLAY_TO_RELAYS=false
ENV RELAYS_TO_PUBLISH_TO=""
ENV DEFAULT_WAIT_TIME_BETWEEN_BATCHES=60000
Expand Down
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ app = "rsslay"
MAX_SUBROUTINES = 20
INFO_RELAY_NAME = "rsslay public instance"
INFO_CONTACT = "mailto:raul@piraces.dev"
VERSION = "0.4.1"
VERSION = "0.4.2"

[[services]]
internal_port = 8080
Expand Down
24 changes: 20 additions & 4 deletions web/templates/created.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
</head>

<body>
<nav class="navbar is-light">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<nav class="navbar is-light" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navMenu" class="navbar-menu">
<div class="navbar-start">
<a href="/" class="navbar-item">
Expand Down Expand Up @@ -150,6 +157,15 @@
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(_) {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
const target = el.dataset.target;
const $target = document.getElementById(target);
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
document.querySelectorAll('button.copy').forEach(item => {
item.addEventListener('click', _ => copyToClipboard(item.name));
});
Expand Down
24 changes: 20 additions & 4 deletions web/templates/index.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
</head>

<body>
<nav class="navbar is-light">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<nav class="navbar is-light" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navMenu" class="navbar-menu">
<div class="navbar-start">
<a href="/" class="navbar-item">
Expand Down Expand Up @@ -185,6 +192,15 @@
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(_) {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
const target = el.dataset.target;
const $target = document.getElementById(target);
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
const loginButton = document.getElementById('login')
loginButton.addEventListener('click', performLogin);
checkLogin();
Expand Down
24 changes: 20 additions & 4 deletions web/templates/search.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
</head>

<body>
<nav class="navbar is-light">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<nav class="navbar is-light" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a href="/" class="navbar-item">
<img src="/assets/images/logo.png" alt="rsslay: turn RSS or Atom feeds into Nostr profiles" width="112" height="28">
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navMenu" class="navbar-menu">
<div class="navbar-start">
<a href="/" class="navbar-item">
Expand Down Expand Up @@ -190,6 +197,15 @@
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(_) {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
const target = el.dataset.target;
const $target = document.getElementById(target);
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
const loginButton = document.getElementById('login')
loginButton.addEventListener('click', performLogin);
checkLogin();
Expand Down

0 comments on commit bec67e6

Please sign in to comment.