diff --git a/Makefile b/Makefile
index 0679797..9844c06 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,8 @@ $(PAGES_DIR)/status.chtml: $(PAGES_DIR)/status.html
./filec $< data_status_html > $@
$(PAGES_DIR)/config.chtml: $(PAGES_DIR)/config.html
./filec $< data_config_html > $@
+$(PAGES_DIR)/account.chtml: $(PAGES_DIR)/account.html
+ ./filec $< data_account_html > $@
$(MASTODONT_DIR):
git clone $(MASTODONT_URL) || true
diff --git a/dist/ratfe.css b/dist/ratfe.css
index 601c27b..d258835 100644
--- a/dist/ratfe.css
+++ b/dist/ratfe.css
@@ -102,13 +102,14 @@ div#content aside
/*************************************************
* BUTTONS *
*************************************************/
-input[type=button], input[type=submit], .sidebarbtn
+input[type=button], input[type=submit], .sidebarbtn, .btn
{
background: linear-gradient(#fff, #f1f1f1);
color: #000;
+ text-decoration: none;
}
-input[type=button]:hover, input[type=submit]:hover, .sidebarbtn:hover
+input[type=button]:hover, input[type=submit]:hover, .sidebarbtn:hover, .btn:hover
{
background: linear-gradient(#aa0000, #600000);
border-color: #400000;
@@ -116,7 +117,7 @@ input[type=button]:hover, input[type=submit]:hover, .sidebarbtn:hover
cursor: pointer;
}
-input[type=button]:active, input[type=submit]:active, .sidebarbtn:active
+input[type=button]:active, input[type=submit]:active, .sidebarbtn:active, .btn:active
{
background: linear-gradient(#600000, #aa0000);
border-color: #400000;
@@ -141,7 +142,6 @@ input[type=button], input[type=submit]
border-bottom: 1px solid #dadada;
display: block;
padding: 8px 8px 8px 16px;
- text-decoration: none;
}
ul li:first-child a.sidebarbtn
@@ -283,3 +283,98 @@ ul li:first-child a.sidebarbtn
list-style-type: none;
padding-left: 15px;
}
+
+
+/**********************
+ * Profiles *
+ **********************/
+.header-btn
+{
+ text-decoration: none;
+ color: #606060;
+ font-size: 14px;
+}
+
+.header-btn .btn-content
+{
+ color: #000;
+}
+
+.btn.header-btn:hover span
+{
+ color: #fff;
+}
+
+.header-btn span
+{
+ display: block;
+ text-align: center;
+}
+
+.acct-banner
+{
+ width: 100%;
+ display: flex;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ height: 256px;
+ align-items: end;
+}
+
+.acct-pfp
+{
+ position: relative;
+ z-index: 1;
+ border: 3px solid #cacaca;
+ background-color: #fff;
+ border-radius: 8px;
+ width: 100px;
+ height: 100px;
+ top: 38px;
+ left: 150px;
+ margin-top: -108px;
+ margin-left: -108px;
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+
+.acct-header
+{
+ display: flex;
+ padding-left: 160px;
+ background: linear-gradient(#fff, #f1f1f1);
+ border-bottom: 1px solid #cacaca;
+ background-color: #e8e8e8;
+}
+
+.acct-info-data
+{
+ position: relative;
+ left: 160px;
+ top: -10px;
+ text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.4);
+}
+
+.acct-displayname
+{
+ font-size: 26px;
+ display: block;
+ color: #fff;
+}
+
+.acct-username
+{
+ font-size: 14px;
+ color: #cacaca;
+ display: block;
+}
+
+.header-btn
+{
+ display: inline-block;
+ padding: 8px 15px;
+ margin: 0;
+
+}
diff --git a/dist/static.png b/dist/static.png
new file mode 100644
index 0000000..f82ad84
Binary files /dev/null and b/dist/static.png differ
diff --git a/src/account.c b/src/account.c
new file mode 100644
index 0000000..0ed9344
--- /dev/null
+++ b/src/account.c
@@ -0,0 +1,66 @@
+/*
+ * RatFE - Lightweight frontend for Pleroma
+ * Copyright (C) 2022 Nekobit
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+#include
+#include
+#include "base_page.h"
+#include "../config.h"
+#include "account.h"
+#include "easprintf.h"
+
+// Files
+#include "../static/index.chtml"
+#include "../static/account.chtml"
+
+char* construct_account_page(struct mstdnt_account* acct, size_t* res_size)
+{
+ int result_size;
+ char* result;
+ result_size = easprintf(&result, data_account_html,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL);
+ if (result_size == -1)
+ result = NULL;
+
+ if (res_size) *res_size = result_size;
+ return result;
+}
+
+void content_account(mastodont_t* api)
+{
+ char* account_page;
+ account_page = construct_account_page(NULL, NULL);
+
+ struct base_page b = {
+ .locale = L10N_EN_US,
+ .content = account_page,
+ .sidebar_right = NULL
+ };
+
+ /* Output */
+ render_base_page(&b);
+}
diff --git a/src/account.h b/src/account.h
new file mode 100644
index 0000000..e9c2972
--- /dev/null
+++ b/src/account.h
@@ -0,0 +1,26 @@
+/*
+ * RatFE - Lightweight frontend for Pleroma
+ * Copyright (C) 2022 Nekobit
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+#ifndef ACCOUNT_H
+#define ACCOUNT_H
+#include
+
+char* construct_account_page(struct mstdnt_account* acct, size_t* res_size);
+void content_account(mastodont_t* api);
+
+#endif // ACCOUNT_H
diff --git a/src/index.c b/src/index.c
index c4a449a..33675d4 100644
--- a/src/index.c
+++ b/src/index.c
@@ -40,7 +40,7 @@ void content_index(mastodont_t* api)
status_format = "Error in malloc!";
struct base_page b = {
- .locale = L10N_ES_ES,
+ .locale = L10N_EN_US,
.content = status_format,
.sidebar_right = NULL
};
diff --git a/src/path.c b/src/path.c
index ab23951..77e817d 100644
--- a/src/path.c
+++ b/src/path.c
@@ -20,7 +20,7 @@
#include
#include "path.h"
#include "index.h"
-
+#include "account.h"
void handle_paths(mastodont_t* api, struct path_info* paths, size_t paths_len)
{
char* path = getenv("PATH_INFO");
@@ -31,7 +31,7 @@ void handle_paths(mastodont_t* api, struct path_info* paths, size_t paths_len)
}
else if (path[1] == '@')
{ // Account path
- content_index(api);
+ content_account(api);
}
else
{ // Generic path
diff --git a/static/account.html b/static/account.html
new file mode 100644
index 0000000..5e353bc
--- /dev/null
+++ b/static/account.html
@@ -0,0 +1,32 @@
+
+
+
+ %s
+