Compare commits
2 Commits
e1fdeff718
...
fd59f9bf19
Author | SHA1 | Date | |
---|---|---|---|
fd59f9bf19 | |||
d2c487c412 |
15
index.n0m
15
index.n0m
@ -71,14 +71,19 @@ $ }
|
|||||||
# $1: string: restaurant to remove
|
# $1: string: restaurant to remove
|
||||||
$ remove_restaurant () {
|
$ remove_restaurant () {
|
||||||
$ enforce_arguments "${FUNCNAME[0]}" "$#" 1;
|
$ enforce_arguments "${FUNCNAME[0]}" "$#" 1;
|
||||||
$ grep -Fxv "$1" "$restaurant_file" | tee "$restaurant_file" >/dev/null;
|
$ local temp_file;
|
||||||
|
$ temp_file=$(mktemp);
|
||||||
|
$ grep -Fxv "$1" "$restaurant_file" > "$temp_file";
|
||||||
|
$ mv "$temp_file" "$restaurant_file";
|
||||||
$ }
|
$ }
|
||||||
#
|
#
|
||||||
# $1: string: restuarant to add
|
# $1: string: restuarant to add
|
||||||
$ add_restaurant () {
|
$ add_restaurant () {
|
||||||
$ enforce_arguments "${FUNCNAME[0]}" "$#" 1;
|
$ enforce_arguments "${FUNCNAME[0]}" "$#" 1;
|
||||||
$ (grep -Fxv "$1" "$restaurant_file"; printf '%s\n' "$1") |\
|
$ local temp_file;
|
||||||
$ tee "$restaurant_file" >/dev/null;
|
$ temp_file=$(mktemp);
|
||||||
|
$ (grep -Fxv "$1" "$restaurant_file"; printf '%s\n' "$1") > "$temp_file";
|
||||||
|
$ mv "$temp_file" "$restaurant_file";
|
||||||
$ }
|
$ }
|
||||||
#
|
#
|
||||||
# $1 (optional): number: 0=don't overwrite, 1=overwrite
|
# $1 (optional): number: 0=don't overwrite, 1=overwrite
|
||||||
@ -134,6 +139,7 @@ $ esac
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title><% $title %></title>
|
<title><% $title %></title>
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
@ -160,8 +166,7 @@ $ esac
|
|||||||
|
|
||||||
\#content {
|
\#content {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: fit-content;
|
width: calc(min(400px, 100vw - 1.5em));
|
||||||
min-width: 400px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
\#todays-restaurant {
|
\#todays-restaurant {
|
||||||
|
Loading…
Reference in New Issue
Block a user