Skip to content

Commit

Permalink
More tweaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Nov 5, 2021
1 parent c9124cb commit 86a16e3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
16 changes: 14 additions & 2 deletions server/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ <h1><img src="static/img/ntfy.png" alt="ntfy"/><br/>ntfy.sh - simple HTTP-based
It allows you to send notifications <a href="https://play.google.com/store/apps/details?id=io.heckel.ntfy">to your phone</a> or desktop via scripts from any computer,
entirely <b>without signup or cost</b>. It's also <a href="https://github.com/binwiederhier/ntfy">open source</a> if you want to run your own.
</p>
<p>
There are many ways to use ntfy. You can send yourself messages for all sorts of things: When a long process finishes or fails (a backup, a long rsync job, ...),
or to notify yourself when somebody logs into your server(s). Or you may want to use it in your own app to distribute messages to subscribed clients.
Endless possibilities 😀.
</p>

<h2>Publishing messages</h2>
<p>
Expand Down Expand Up @@ -130,6 +135,14 @@ <h3>Subscribe via your app, or via the CLI</h3>
<br/>
This is a notification
</code>
<p class="smallMarginBottom">
Here's an example of how to use this endpoint to send desktop notifications for every incoming message:
</p>
<code>
while read msg; do<br/>
&nbsp;&nbsp;[ -n "$msg" ] && notify-send "$msg"<br/>
done < <(stdbuf -i0 -o0 curl -s ntfy.sh/mytopic/raw)
</code>

<h3>Message buffering and polling</h3>
<p class="smallMarginBottom">
Expand Down Expand Up @@ -179,8 +192,7 @@ <h2>FAQ</h2>
In addition to caching messages locally and delivering them to long-polling subscribers, all messages are also
published to Firebase Cloud Messaging (FCM) (if <tt>FirebaseKeyFile</tt> is set, which it is on ntfy.sh). This
is to facilitate instant notifications on Android. I tried really, really hard to avoid using FCM, but newer
versions of Android made it impossible to implement <a href="https://developer.android.com/guide/background">background services</a>>.
I'm sorry.
versions of Android made it impossible to implement <a href="https://developer.android.com/guide/background">background services</a>.
</p>

<h2>Privacy policy</h2>
Expand Down
10 changes: 2 additions & 8 deletions server/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ code {
border-radius: 3px;
margin-top: 10px;
margin-bottom: 20px;
overflow-x: scroll;
overflow-x: auto;
}

/* Lato font (OFL), https://fonts.google.com/specimen/Lato#about,
Expand Down Expand Up @@ -125,12 +125,6 @@ li {
padding: 10px;
}

#subscribeBox h3 {
margin-top: 0;
margin-bottom: 0;
font-size: 1.1em;
}

#subscribeBox #topicsHeader {
margin-bottom: 0;
}
Expand Down Expand Up @@ -184,7 +178,7 @@ li {
@media only screen and (min-width: 1600px) {
#subscribeBox {
position: fixed;
top: 180px;
top: 170px;
right: 10px;
width: 300px;
border-left: 4px solid #3a9784;
Expand Down

0 comments on commit 86a16e3

Please sign in to comment.