From 2f682b5e3cfc3fc5f961b60129be7bc90e0d6a03 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 28 Dec 2016 22:38:21 +0300 Subject: juick-www: now on spring-webmvc --- .../src/main/webapp/WEB-INF/juick.conf.example | 6 - .../src/main/webapp/WEB-INF/layouts/content.html | 27 ++++ juick-www/src/main/webapp/WEB-INF/layouts/rss.xml | 38 +++++ juick-www/src/main/webapp/WEB-INF/views/404.html | 11 ++ juick-www/src/main/webapp/WEB-INF/views/help.html | 10 ++ .../main/webapp/WEB-INF/views/partial/footer.html | 34 +++++ .../webapp/WEB-INF/views/partial/homecolumn.html | 6 + .../webapp/WEB-INF/views/partial/navigation.html | 37 +++++ .../WEB-INF/views/partial/settings_tabs.html | 5 + .../main/webapp/WEB-INF/views/partial/tags.html | 3 + .../src/main/webapp/WEB-INF/views/pm_inbox.html | 37 +++++ .../src/main/webapp/WEB-INF/views/pm_sent.html | 33 +++++ .../main/webapp/WEB-INF/views/settings_about.html | 20 +++ .../webapp/WEB-INF/views/settings_auth-email.html | 9 ++ .../main/webapp/WEB-INF/views/settings_main.html | 156 +++++++++++++++++++++ .../webapp/WEB-INF/views/settings_password.html | 17 +++ .../webapp/WEB-INF/views/settings_privacy.html | 9 ++ .../main/webapp/WEB-INF/views/settings_result.html | 9 ++ .../src/main/webapp/WEB-INF/views/signup.html | 41 ++++++ juick-www/src/main/webapp/WEB-INF/web.xml | 38 ----- 20 files changed, 502 insertions(+), 44 deletions(-) delete mode 100644 juick-www/src/main/webapp/WEB-INF/juick.conf.example create mode 100644 juick-www/src/main/webapp/WEB-INF/layouts/content.html create mode 100644 juick-www/src/main/webapp/WEB-INF/layouts/rss.xml create mode 100644 juick-www/src/main/webapp/WEB-INF/views/404.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/help.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/footer.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/partial/tags.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/pm_sent.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_about.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_main.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_password.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/settings_result.html create mode 100644 juick-www/src/main/webapp/WEB-INF/views/signup.html (limited to 'juick-www/src/main/webapp/WEB-INF') diff --git a/juick-www/src/main/webapp/WEB-INF/juick.conf.example b/juick-www/src/main/webapp/WEB-INF/juick.conf.example deleted file mode 100644 index bbe2a9e5..00000000 --- a/juick-www/src/main/webapp/WEB-INF/juick.conf.example +++ /dev/null @@ -1,6 +0,0 @@ -mysql_username=username -xmpp_password=secret -sape_user=usertoken -wns_application_sip=ms-app://x-1-11-1-1111111111-... -wns_client_secret=secret -xmpp_disabled=false \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/content.html b/juick-www/src/main/webapp/WEB-INF/layouts/content.html new file mode 100644 index 00000000..6a564034 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/layouts/content.html @@ -0,0 +1,27 @@ + + + + + + + + {% block headers %} + {{ headers | raw }} + {% endblock %} + {{ title }} + + + + + {% include "views/partial/navigation" %} +
+ {% block content %} + {% endblock %} +
+ + {% include "views/partial/footer" %} + + \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/layouts/rss.xml b/juick-www/src/main/webapp/WEB-INF/layouts/rss.xml new file mode 100644 index 00000000..23866c8a --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/layouts/rss.xml @@ -0,0 +1,38 @@ + + + + + {{ user.getName() }} - Juick + http://juick.com/{{ user.getName() }}/ + The latest messages by @{{ user.getName() }} at Juick + + http://i.juick.com/a/{{ user.getUid() }}.png + {{ user.getName() }} - Juick + http://juick.com/{{ user.getName() }}/ + + {% for msg in msgs %} + + http://juick.com/{{ msg.getUser().getName() }}/{{ msg.getMid() }} + http://juick.com/{{ msg.getUser().getName() }}/{{ msg.getMid() }} + <![CDATA[@{{ msg.getUser().getName() }}: {% for tag in msg.getTags() %} *{{ tag }}{% endfor %}]]> + + {{ sdfRSS.format(msg.getDate()) }} + http://juick.com/{{ msg.getUser().getName() }}/{{ msg.getMid() }} + {% for tag in msg.getTags() %} + {{ tag }} + {% endfor %} + {% if msg.getAttachmentType() is not empty %} + {% if msg.getAttachmentType() == "jpg" %} + + + {% elseif msg.getAttachmentType() == "png" %} + + + {% endif %} + {% endif %} + + + {% endfor %} + + diff --git a/juick-www/src/main/webapp/WEB-INF/views/404.html b/juick-www/src/main/webapp/WEB-INF/views/404.html new file mode 100644 index 00000000..21f42d75 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/404.html @@ -0,0 +1,11 @@ +{% extends "layouts/content" %} +{% block content %} +
+

Страница не найдена

+

Сожалеем, но страницу с этим адресом удалил её автор, либо её никогда не существовало.

+
+{% endblock %} + +{% block "column" %} +{% include "views/partial/homecolumn" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/help.html b/juick-www/src/main/webapp/WEB-INF/views/help.html new file mode 100644 index 00000000..a4b76676 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/help.html @@ -0,0 +1,10 @@ +{% extends "layouts/content" %} +{% block content %} +
+ {{ content | raw }} +
+{% endblock %} + +{% block "column" %} +{{ navigation | raw }} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html b/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html new file mode 100644 index 00000000..6978a2c0 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/footer.html @@ -0,0 +1,34 @@ + + \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html b/juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html new file mode 100644 index 00000000..28a73662 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/homecolumn.html @@ -0,0 +1,6 @@ +

+ {% include "views/partial/tags" %} + {% if showAdv %} + конструктор сайтов + {% endif %} +

\ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html b/juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html new file mode 100644 index 00000000..2863d0c3 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/navigation.html @@ -0,0 +1,37 @@ +
+ + + +
+ {% if visitor.getUID() > 0 %} + + + {% else %} +

Чтобы добавлять сообщения и комментарии, представьтесь. +

+ {% endif %} +
+
diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html b/juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html new file mode 100644 index 00000000..d7901d5e --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/settings_tabs.html @@ -0,0 +1,5 @@ +
\ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/partial/tags.html b/juick-www/src/main/webapp/WEB-INF/views/partial/tags.html new file mode 100644 index 00000000..4d05b7fb --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/partial/tags.html @@ -0,0 +1,3 @@ +{% for tag in tags %} + {{ tag }} +{% endfor %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html b/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html new file mode 100644 index 00000000..cb55582a --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/pm_inbox.html @@ -0,0 +1,37 @@ +{% extends "layouts/content" %} +{% block content %} +{% if not msgs.isEmpty() %} + +{% endif %} +{% endblock %} +{% block "column" %} +{% include "views/partial/homecolumn" %} +{% endblock %} diff --git a/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html b/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html new file mode 100644 index 00000000..41f3814b --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/pm_sent.html @@ -0,0 +1,33 @@ +{% extends "layouts/content" %} +{% block content %} +
+
+
To:
+
+
+
+
+{% if not msgs.isEmpty() %} + +{% endif %} +{% endblock %} +{% block "column" %} +{% include "views/partial/homecolumn" %} +{% endblock %} diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_about.html b/juick-www/src/main/webapp/WEB-INF/views/settings_about.html new file mode 100644 index 00000000..a11a1609 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_about.html @@ -0,0 +1,20 @@ +{% extends "layouts/content" %} +{% block content %} +
+
+

Full name:

+

Country:

+

URL:
+ Please, start with "http://"

+

About:
+
+ Max. 255 symbols

+

Avatar:
+ Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported.

+

+
+
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html b/juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html new file mode 100644 index 00000000..e7ed985a --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_auth-email.html @@ -0,0 +1,9 @@ +{% extends "layouts/content" %} +{% block content %} +
+

{{ result }}

Settings.

+
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_main.html b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html new file mode 100644 index 00000000..39c6d875 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_main.html @@ -0,0 +1,156 @@ +{% extends "layouts/content" %} +{% block content %} +
+

Настройки

+
+
+ Notification options +

Reply notifications ("Message posted")

+

Subscriptions notifications ("@user subscribed...")

+

Posts recommendations ("Recommended by @user")

+

+
+
+
+ + Telegram + {% if telegram_name is not empty %} +
+
Telegram: {{ telegram_name }} — + + +
+
+ {% else %} +

To connect Telegram account: send any text message to @Juick_bot +

+ {% endif %} +
+
+
+ + XMPP accounts + +

Your accounts:

+

+ {% for jid in jids %} +
+ {% endfor %} + {% for auth in auths %} + + — Confirm
+ {% endfor %} +

+ {% if jids is not empty %} +

+ {% endif %} +

To add new jabber account: send any text message to juick@juick.com +

+
+
+
+ + E-mail + +
+

Add account:
+ + + +

+
+
+

Your accounts:

+

+ {% for email in emails %} +
+ {% endfor %} + {% if emails is empty %} + -

+ {% else %} +

+

+ {% endif %} +
+ {% if emails is not empty %} +
+

You can receive all your subscriptions by email:
+ Sent to every day at + +

+
+ {% endif %} +

 

+

You can post to Juick via e-mail. Send your plain text + messages to special secret e-mail. You can attach one photo or video file.

+

Secret email: {% if ehash is not empty %} {{ ehash }} {% else %}-{% endif %}

+
+

+
+
+
+ + Facebook + + {% if fbstatus.isConnected() %} + {% if fbstatus.isCrosspostEnabled() %} +
+
+ Facebook: Enabled — + + +
+
+ {% else %} +
+
+ Facebook: Disabled — + + +
+
+ {% endif %} + {% else %} +

Cross-posting to Facebook: Connect to Facebook

+ {% endif %} +
+
+ + Twitter + {% if twitter_name is not empty %} +
+
Twitter: {{ twitter_name }} — + + +
+
+ {% else %} +

Cross-posting to Twitter: Connect to Twitter

+ {% endif %} +
+ +
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_password.html b/juick-www/src/main/webapp/WEB-INF/views/settings_password.html new file mode 100644 index 00000000..d7883546 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_password.html @@ -0,0 +1,17 @@ +{% extends "layouts/content" %} +{% block content %} +
+
+ Changing your password +
+ +

Change password:
+ (max. length - 16 symbols)

+
+
+
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html b/juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html new file mode 100644 index 00000000..29ed5e95 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_privacy.html @@ -0,0 +1,9 @@ +{% extends "layouts/content" %} +{% block content %} +
+

Privacy

+
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/settings_result.html b/juick-www/src/main/webapp/WEB-INF/views/settings_result.html new file mode 100644 index 00000000..88a52938 --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/settings_result.html @@ -0,0 +1,9 @@ +{% extends "layouts/content" %} +{% block content %} +
+

{{ result | raw }}

+
+{% endblock %} +{% block "column" %} +{% include "views/partial/settings_tabs" %} +{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/views/signup.html b/juick-www/src/main/webapp/WEB-INF/views/signup.html new file mode 100644 index 00000000..e454f7dd --- /dev/null +++ b/juick-www/src/main/webapp/WEB-INF/views/signup.html @@ -0,0 +1,41 @@ +{% extends "layouts/content" %} +{% block content %} +

+ {% if type | slice(0, 1) == 'f' %} + Facebook + {% elseif type | slice(0, 1) == 'v' %} + VKontakte + {% elseif type | slice(0, 1) == 'x' %} + XMPP + {% elseif type | slice(0, 1) == 'd' %} + Telegram + {% endif %} + {{ account | raw }}

+ +

Связать с существующим аккаунтом Juick

+
+ + + + {% if visitor.getUID() > 0 %} + + {% else %} +

Имя пользователя:

+

Пароль:

+

+ {% endif %} +
+ +
+ +

Создать новый аккаунт Juick

+
+ + + +

Имя пользователя:
(От 2-х до 16-и латинских символов + и/или цифр, дефис)

+

Пароль:
(от 6-и до 32-х символов)

+

+
+{% endblock %} \ No newline at end of file diff --git a/juick-www/src/main/webapp/WEB-INF/web.xml b/juick-www/src/main/webapp/WEB-INF/web.xml index ed9e8e62..a31c71d0 100644 --- a/juick-www/src/main/webapp/WEB-INF/web.xml +++ b/juick-www/src/main/webapp/WEB-INF/web.xml @@ -2,42 +2,4 @@ - - Main - com.juick.www.Main - 1 - - - Main - / - - - default - /scripts.js - - - default - /style.css - - - default - /scripts.js.map - - - default - /style.css.map - - - js - application/javascript;charset=UTF-8 - - - css - text/css;charset=UTF-8 - - - - 30 - - -- cgit v1.2.3