diff --git a/app/home.php b/app/home.php new file mode 100644 index 0000000..378eaa1 --- /dev/null +++ b/app/home.php @@ -0,0 +1,37 @@ +
+
+
+
+ +
+ +
+ {instance} +
+
+
+
+
+ + diff --git a/css/base.php b/css/base.php index f14a601..28effc3 100644 --- a/css/base.php +++ b/css/base.php @@ -2,7 +2,6 @@ body { padding: 0; margin: 0; - padding-top: 1em; font-family: system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,"mastodon-font-sans-serif",sans-serif; } @@ -34,7 +33,45 @@ body { background: #9b1919; } +.window.hidden { display: none !important } +*[id*="-item"] { display: none !important } + +.flex { display: flex } +.center { margin: auto } +.wmax { width: 100vw } +.hmax { height: 100vh } + textarea { max-width: -moz-available; } + +a { + text-decoration: none; + color: inherit; +} + + +/* specific styles */ +#window-home { + background: #d7d7d7; +} +#window-home #instances .item { + padding: .5em; + background: #fff; + border-radius: .5em; + box-shadow: 0px 0px .5em #0000004f; + margin-top: .5em; +} +#window-home #instances .item:hover { + background: #f9f9f9; +} +#window-home #instances .item:active, +#window-home #instances .item:focus { + background: #dfdfdf; +} +#window-home #instances .item img { + width: 2.5em; + height: 2.5em; +} + diff --git a/img/software-mastodon.png b/img/software-mastodon.png new file mode 100644 index 0000000..b3eab90 Binary files /dev/null and b/img/software-mastodon.png differ diff --git a/index.php b/index.php index a17ca05..ead5e1c 100644 --- a/index.php +++ b/index.php @@ -9,30 +9,44 @@ +
+ + + + +
diff --git a/js/base.php b/js/base.php index a8ade93..7843e6e 100644 --- a/js/base.php +++ b/js/base.php @@ -41,6 +41,12 @@ var E = { query.remove(); } }, + template: function(_id, cback) { + var tpl = E.elemid(_id+'-item').outerHTML; + tpl = tpl.replace('id="'+_id+'-item"','class="item"'); + tpl = tpl.replace('data-src=', 'src='); + E.elemid(_id).innerHTML = cback(tpl); + }, }; function isVisible(element) { @@ -100,6 +106,9 @@ function _get_func_params(func) { return params; } +function capitalize(str) { + return str[0].toUpperCase() + str.substring(1); +} function printstack() { console.error(new Error().stack) } function uuidv4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {