diff --git a/README.md b/README.md index c53e17b..d176baa 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,20 @@ -# count.ピケ.コム +# list.ピケ.コム -シンプルなアイテム数トラッカーページです。 +シンプルなTo-Doリスト ## ホスト 1. これをインストール: - PHP (7.3.31を使う) - PostgreSQL (11.14を使う) -2. このリポジトリをクローン、`git clone https://git.xn--rck9c.xn--tckwe/pk11/count.git` +2. このリポジトリをクローン、`git clone https://git.xn--rck9c.xn--tckwe/pk11/list.git` 3. `vars.php.example`を`vars.php`にコピー 4. `vars.php`を返照 5. 以下のテーブルを指定のデータベースに作成: ```sql CREATE TABLE items ( item_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - priority INT, - count INT, - dec_amount INT, - inc_amount INT, + priority INT DEFAULT 0, + done BOOL DEFAULT FALSE, description VARCHAR(2048), key VARCHAR(64) ); diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..e743dfa --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,145 @@ +* { box-sizing: border-box; } + +@keyframes rainbow { + from { backdrop-filter: hue-rotate(0deg); -webkit-backdrop-filter: hue-rotate(0deg); } + to { backdrop-filter: hue-rotate(360deg); -webkit-backdrop-filter: hue-rotate(360deg); } +} + +body { + background-color: #ebc; + background: url(/assets/images/bg.gif); + background-attachment: fixed; + min-height: 100vh; + color: #201; + margin: 0; + padding: 1px 0.5rem 1rem 0.5rem; + animation: 10s linear 0 rainbow; + animation-iteration-count: infinite; +} + +header { + margin-bottom: 1rem; +} + +kbd { + background: #fde; + border: 2px outset #fde; + padding: 0 2px; +} + +form { + margin-bottom: 0.25rem; +} + +hr { + border-top: 1px solid #c99; + border-bottom: 0; + margin: 0.5rem 2rem; +} + +h1, h2, h3 { + margin-bottom: 0; +} + +h1:first-child, h2:first-child, h3:first-child { + margin-top: 0; +} + +h2 > small, h3 > small { + font-size: 16px; +} + +input:not(:last-child), +button:not(:last-child), +label:not(:last-child) { + margin-right: 0.25rem; +} + +input, button { + color: black; + border: 2px outset #fde; + background-color: #fde; +} + +input:not(:disabled):active, button:not(:disabled):active, +input[type=text], input:not([type]), input[type=number] { + border-style: inset; +} + +input:disabled, button:disabled { + opacity: 50%; +} + +.container { + max-width: 640px; +} + +.center { + margin-left: auto; + margin-right: auto; + display: block; +} + +.block { + background-color: #fcd; + border: 5px outset #dab; + margin-bottom: 10px; + padding: 0 5px; +} + +footer { + background-color: #ebc; + border: 5px inset #dab; + padding: 10px; +} + +footer p:first-of-type { + margin-top: 0; +} +footer p:last-of-type { + margin-bottom: 0; +} + +img.btn { + margin: 0 2px; +} + +.fl { + float: left; +} + +.list-unstyled { + list-style: none; + padding: 0; + margin: 0; +} + +.alert { + border: 3px inset #fde; + margin: 1rem; + padding: 0 0.25rem; +} + +.bg-green { + background-color: #cfc; + border-color: #dfd; +} + +.bg-blue { + background-color: #ccf; + border-color: #ddf; +} + +.bg-red { + background-color: #faa; + border-color: #fbb; +} + +.width-90 { width: 90% } +.d-flex { display: flex } +.flex-fill { flex: 1 1 auto !important } +.text-left { text-align: left } + +.mb-1 { margin-bottom: 0.25rem } +.mb-2 { margin-bottom: 0.5rem } +.mb-3 { margin-bottom: 1rem } diff --git a/assets/images/bg.gif b/assets/images/bg.gif new file mode 100644 index 0000000..4cb49d4 Binary files /dev/null and b/assets/images/bg.gif differ diff --git a/index.php b/index.php index edd8f87..ce585b8 100644 --- a/index.php +++ b/index.php @@ -33,10 +33,8 @@ * * CREATE TABLE items ( * item_id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - * priority INT, - * count INT, - * dec_amount INT, - * inc_amount INT, + * priority INT DEFAULT 0, + * done BOOL DEFAULT FALSE, * description VARCHAR(2048), * key VARCHAR(64) * ); @@ -55,34 +53,19 @@ -