aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/templates/views/partial
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-08 21:38:27 +0300
committerGravatar Vitaly Takmazov2018-11-08 21:38:27 +0300
commit7aaa3f9a29c280f01c677c918932620be45cdbd7 (patch)
tree39947b2c889afd08f9c73ba54fab91159d2af258 /src/main/resources/templates/views/partial
parent3ea9770d0d43fbe45449ac4531ec4b0a374d98ea (diff)
Merge everything into single Spring Boot application
Diffstat (limited to 'src/main/resources/templates/views/partial')
-rw-r--r--src/main/resources/templates/views/partial/footer.html16
-rw-r--r--src/main/resources/templates/views/partial/homecolumn.html25
-rw-r--r--src/main/resources/templates/views/partial/message.html76
-rw-r--r--src/main/resources/templates/views/partial/navigation.html36
-rw-r--r--src/main/resources/templates/views/partial/settings_tabs.html6
-rw-r--r--src/main/resources/templates/views/partial/tagcolumn.html33
-rw-r--r--src/main/resources/templates/views/partial/tags.html3
-rw-r--r--src/main/resources/templates/views/partial/usercolumn.html89
-rw-r--r--src/main/resources/templates/views/partial/usertags.html3
9 files changed, 287 insertions, 0 deletions
diff --git a/src/main/resources/templates/views/partial/footer.html b/src/main/resources/templates/views/partial/footer.html
new file mode 100644
index 00000000..35972254
--- /dev/null
+++ b/src/main/resources/templates/views/partial/footer.html
@@ -0,0 +1,16 @@
+<div id="footer">
+ <div id="footer-right"> &middot;
+ <a href="/help/contacts" rel="nofollow">{{ i18n("messages","link.contacts") }}</a> &middot;
+ <a href="/help/tos" rel="nofollow">{{ i18n("messages","link.tos") }}</a>
+ </div>
+ <div id="footer-social">
+ <a href="https://twitter.com/Juick" rel="nofollow"><i data-icon="ei-sc-twitter" data-size="m"></i></a>
+ <a href="https://vk.com/juick" rel="nofollow"><i data-icon="ei-sc-vk" data-size="m"></i></a>
+ <a href="https://www.facebook.com/JuickCom" rel="nofollow"><i data-icon="ei-sc-facebook" data-size="m"></i></a>
+ </div>
+ <div id="footer-left">juick.com &copy; 2008-2018
+ {% if links | default ('') is not empty %}
+ <br/>{{ i18n("messages","label.sponsors") }}: {{ links | raw }}
+ {% endif %}
+ </div>
+</div>
diff --git a/src/main/resources/templates/views/partial/homecolumn.html b/src/main/resources/templates/views/partial/homecolumn.html
new file mode 100644
index 00000000..01448bca
--- /dev/null
+++ b/src/main/resources/templates/views/partial/homecolumn.html
@@ -0,0 +1,25 @@
+<ul class="toolbar">
+ <li>
+ <a href="/?show=top" title="Top">
+ <i data-icon="ei-heart" data-size="s"></i>Top
+ </a>
+ </li>
+ <li>
+ <a href="/?show=all" title="{{ i18n("messages","link.allMessages") }}">
+ <i data-icon="ei-search" data-size="s"></i>{{ i18n("messages","link.allMessages") }}
+ </a>
+ </li>
+ <li>
+ <a href="/?show=photos" title="{{ i18n("messages","link.withPhotos") }}">
+ <i data-icon="ei-camera" data-size="s"></i>{{ i18n("messages","link.withPhotos") }}
+ </a>
+ </li>
+</ul>
+<div class="tags">
+ <h4>{{ i18n("messages","link.trends") }}</h4>
+ {% include "views/partial/tags" %}
+ {% if showAdv | default(false) %}
+ <h4>Наши друзья</h4>
+ <a href="https://ru.wix.com/">конструктор сайтов</a>
+ {% endif %}
+</div> \ No newline at end of file
diff --git a/src/main/resources/templates/views/partial/message.html b/src/main/resources/templates/views/partial/message.html
new file mode 100644
index 00000000..00ca048c
--- /dev/null
+++ b/src/main/resources/templates/views/partial/message.html
@@ -0,0 +1,76 @@
+<article data-mid="{{ msg.mid }}">
+ <header class="h">
+ <span>
+ <a href="/{{ msg.user.name }}/"><span>{{ msg.user.name }}</span></a>
+ </span>
+ <div class="msg-avatar"><a href="/{{ msg.user.name }}/">
+ <img src="//i.juick.com/a/{{ msg.user.uid }}.png" alt="{{ msg.user.name }}"/></a>
+ </div>
+ <div class="msg-ts">
+ <a href="/{{ msg.user.name }}/{{ msg.mid }}">
+ <time datetime="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }}Z"
+ title="{{ msg.timestamp | timestamp | date('yyyy-MM-dd HH:mm:ss') }} GMT">
+ {{ msg.timestamp | prettyTime }}
+ </time>
+ </a>
+ </div>
+ <div class="msg-tags">
+ {{ tags(msg.user.name, msg.tags | tagsList) }}
+ </div>
+ </header>
+ <p>{{ msg | formatMessage }}</p>
+ {% if msg.AttachmentType is not empty %}
+ <p class="ir"><a href="//i.juick.com/p/{{ msg.mid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}.{{ msg.AttachmentType }}">
+ <img src="//i.juick.com/photos-512/{{ msg.mid }}.{{ msg.AttachmentType }}" alt=""/></a>
+ </p>
+ {% endif %}
+ <nav class="l">
+ {% if visitor.uid == msg.user.uid %}
+ <a href="/{{ msg.mid }}" class="a-like msg-button">
+ <span class="msg-button-icon">
+ <i data-icon="ei-heart" data-size="s"></i>
+ {% if msg.likes > 0 %}&nbsp;{{ msg.likes }}{% endif %}
+ </span>
+ <span>&nbsp;{{ i18n("messages","message.recommend") }}</span>
+ </a>
+ {% elseif visitor.uid > 0 %}
+ <a href="/post?body=!+%23{{ msg.mid }}" class="a-like msg-button">
+ <span class="msg-button-icon">
+ <i data-icon="ei-heart" data-size="s"></i>
+ {% if msg.likes > 0 %}&nbsp;{{ msg.likes }}{% endif %}
+ </span>
+ <span>&nbsp;{{ i18n("messages","message.recommend") }}</span>
+ </a>
+ {% else %}
+ <a href="/login" class="a-login msg-button">
+ <span class="msg-button-icon">
+ <i data-icon="ei-heart" data-size="s"></i>
+ {% if msg.likes > 0 %}&nbsp;{{ msg.likes }}{% endif %}
+ </span>
+ <span>&nbsp;{{ i18n("messages","message.recommend") }}</span>
+ </a>
+ {% endif %}
+ {% if (not msg.ReadOnly) or (visitor.uid == msg.user.uid) %}
+ <a href="/{{ msg.mid }}" class="a-comment msg-button">
+ <span class="msg-button-icon">
+ <i data-icon="ei-comment" data-size="s"></i>
+ {% if msg.Replies > 0 %}&nbsp;
+ {% if msg.unread %}
+ <span class="badge">{{ msg.Replies }}</span>
+ {% else %}
+ {{ msg.Replies }}
+ {% endif %}
+ {% endif %}
+ </span>
+ <span>&nbsp;{{ i18n("messages","message.comment") }}</span>
+ </a>
+ <a href="#" class="msg-menu msg-button">
+ <i data-icon="ei-link" data-size="s"></i>
+ <span>&nbsp;{{ i18n("messages","message.share") }}</span>
+ </a>
+ {% endif %}
+ {% if msg.FriendsOnly %}
+ <a href="#" class="a-privacy">Открыть доступ</a>
+ {% endif %}
+ </nav>
+</article> \ No newline at end of file
diff --git a/src/main/resources/templates/views/partial/navigation.html b/src/main/resources/templates/views/partial/navigation.html
new file mode 100644
index 00000000..03b6c56d
--- /dev/null
+++ b/src/main/resources/templates/views/partial/navigation.html
@@ -0,0 +1,36 @@
+<header>
+ <div id="header_wrapper">
+ {% if visitor.uid > 0 %}
+ <div id="ctitle">
+ <a href="/{{ visitor.name }}">
+ <img src="//i.juick.com/a/{{ visitor.uid }}.png" alt=""/>{{ visitor.name }}
+ </a>
+ </div>
+ {% else %}
+ <div id="logo"><a href="/{% if visitor.uid > 0 %}?show=my{% endif %}">Juick</a></div>
+ {% endif %}
+ <div id="search">
+ <form action="/">
+ <input name="search" class="text"
+ placeholder="{{ i18n('messages','label.search') }}" value="{{ search | default('') }}"/>
+ </form>
+ </div>
+ <nav id="global">
+ <ul>
+ <li><a href="/"><i data-icon="ei-comment" data-size="s"></i>{{ i18n("messages","link.discuss") }}{% if visitor.unreadCount > 0 %}<span class="badge">{{ visitor.unreadCount }}</span>{% endif %}</a></li>
+ <li><a href="/?show=all" rel="nofollow"><i data-icon="ei-search" data-size="s"></i>{{ i18n("messages","link.allMessages") }}</a></li>
+ {% if visitor.uid > 0 %}
+ <li><a id="post" href="/post">
+ <i data-icon="ei-pencil" data-size="s"></i>{{ i18n("messages","link.postMessage") }}</a>
+ </li>
+ {% else %}
+ <li>
+ <a class="a-login" href="/login" rel="nofollow">
+ <i data-icon="ei-user" data-size="s"></i>{{ i18n("messages", "link.Login") }}
+ </a>
+ </li>
+ {% endif %}
+ </ul>
+ </nav>
+ </div>
+</header>
diff --git a/src/main/resources/templates/views/partial/settings_tabs.html b/src/main/resources/templates/views/partial/settings_tabs.html
new file mode 100644
index 00000000..4715253e
--- /dev/null
+++ b/src/main/resources/templates/views/partial/settings_tabs.html
@@ -0,0 +1,6 @@
+<div id="pagetabs"><ul>
+ <li><a href="/settings">{{ i18n("messages","link.settings.main") }}</a></li>
+ <li><a href="/settings?page=password">{{ i18n("messages","link.settings.password") }}</a></li>
+ <li><a href="/settings?page=about">{{ i18n("messages","link.settings.about") }}</a></li>
+ <li><a href="/logout"><i data-icon="ei-user" data-size="s"></i>{{ i18n("messages","link.logout") }}</a></li>
+</ul></div> \ No newline at end of file
diff --git a/src/main/resources/templates/views/partial/tagcolumn.html b/src/main/resources/templates/views/partial/tagcolumn.html
new file mode 100644
index 00000000..3e61d3d3
--- /dev/null
+++ b/src/main/resources/templates/views/partial/tagcolumn.html
@@ -0,0 +1,33 @@
+<div id="ctitle">
+ <h2>*{{ tag.name }}</h2>
+</div>
+{% if visitor is not empty and visitor.uid > 0 %}
+<ul class="toolbar">
+ {% if isSubscribed %}
+ <li>
+ <a href="/post?body=U+%2A{{ tag.name }}" title="Подписан">
+ <i data-icon="ei-check" data-size="s"></i>Subscribed
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="/post?body=S+%2A{{ tag.name }}" title="Подписаться">
+ <i data-icon="ei-plus" data-size="s"></i>Subscribe
+ </a>
+ </li>
+ {% endif %}
+ {% if isInBL %}
+ <li>
+ <a href="/post?body=BL+%2A{{ tag.name }}" title="Разблокировать">
+ <i data-icon="ei-close-o" data-size="s"></i>Unblock
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="/post?body=BL+%2A{{ tag.name }}" title="Заблокировать">
+ <i data-icon="ei-close" data-size="s"></i>Block
+ </a>
+ </li>
+ {% endif %}
+</ul>
+{% endif %}
diff --git a/src/main/resources/templates/views/partial/tags.html b/src/main/resources/templates/views/partial/tags.html
new file mode 100644
index 00000000..3235213e
--- /dev/null
+++ b/src/main/resources/templates/views/partial/tags.html
@@ -0,0 +1,3 @@
+{% for tag in tags %}
+ <a href="/tag/{{ tag | urlencode }}" title="{{ tag }}">{{ tag | raw }}</a>
+{% endfor %} \ No newline at end of file
diff --git a/src/main/resources/templates/views/partial/usercolumn.html b/src/main/resources/templates/views/partial/usercolumn.html
new file mode 100644
index 00000000..2b1963e3
--- /dev/null
+++ b/src/main/resources/templates/views/partial/usercolumn.html
@@ -0,0 +1,89 @@
+{% if visitor is not empty and visitor.uid > 0 and visitor.uid != user.uid %}
+<div id="ctitle">
+ <a href="/{{ user.name }}">
+ <img src="//i.juick.com/a/{{ user.uid }}.png" alt=""/>{{ user.name }}
+ </a>
+</div>
+<ul class="toolbar">
+ {% if isSubscribed %}
+ <li>
+ <a href="/post?body=U+%40{{ user.name }}" title="Подписан">
+ <i data-icon="ei-check" data-size="s"></i>Subscribed
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="/post?body=S+%40{{ user.name }}" title="Подписаться">
+ <i data-icon="ei-plus" data-size="s"></i>Subscribe
+ </a>
+ </li>
+ {% endif %}
+ {% if isInBL %}
+ <li>
+ <a href="/post?body=BL+%40{{ user.name }}" title="Разблокировать">
+ <i data-icon="ei-close-o" data-size="s"></i>Unblock
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="/post?body=BL+%40{{ user.name }}" title="Заблокировать">
+ <i data-icon="ei-close" data-size="s"></i>Block
+ </a>
+ </li>
+ {% endif %}
+ {% if not isInBLAny %}
+ <li>
+ <a href="/pm/sent?uname={{ user.name }}" title="Написать приватное сообщение">
+ <i data-icon="ei-envelope" data-size="s"></i>PM
+ </a>
+ </li>
+ {% endif %}
+</ul>
+{% else %}
+<hr/>
+{% endif %}
+<ul>
+ {% if visitor is not empty and visitor.uid == user.uid %}
+ <li><a href="/?show=my"><i data-icon="ei-clock" data-size="s"></i>{{ i18n("messages","link.my") }}</a></li>
+ <li><a href="/pm/inbox"><i data-icon="ei-envelope" data-size="s"></i>{{ i18n("messages","link.privateMessages") }}</a></li>
+ <li><a href="/?show=discuss"><i data-icon="ei-comment" data-size="s"></i>{{ i18n("messages","link.discuss") }}</a></li>
+ {% endif %}
+ <li><a href="/{{ user.name }}/?show=recomm" rel="nofollow"><i data-icon="ei-heart" data-size="s"></i>{{ i18n("messages","blog.recommendations") }}</a></li>
+ <li><a href="/{{ user.name }}/?show=photos" rel="nofollow"><i data-icon="ei-camera" data-size="s"></i>{{ i18n("messages","blog.photos") }}</a></li>
+ {% if visitor is not empty and visitor.uid == user.uid and false %}
+ <li><a href="/?show=mycomments" rel="nofollow">{{ i18n("messages","blog.comments") }}</a></li>
+ <li><a href="/?show=unanswered" rel="nofollow">Неотвеченные</a></li>
+ {% endif %}
+ {% if visitor is not empty and visitor.uid == user.uid %}
+ <li><a href="/settings" rel="nofollow"><i data-icon="ei-gear" data-size="s"></i>{{ i18n("messages","link.settings") }}</a></li>
+ {% endif %}
+</ul>
+<hr/>
+<form action="/{{ user.name }}/">
+ <p><input type="text" name="search" class="inp" placeholder="{{ i18n('messages','label.search') }}"/></p>
+</form>
+{% include "views/partial/usertags" %}
+<hr/>
+<div id="ustats">
+ <ul>
+ <li><a href="/{{ user.name }}/friends">{{ i18n("messages","blog.iread") }}: {{ statsIRead }}</a></li>
+ <li><a href="/{{ user.name }}/readers">{{ i18n("messages","blog.readers") }}: {{ statsMyReaders }}</a></li>
+ {% if statsMyBL > 0 and visitor.uid == user.uid %}
+ <li><a href="/{{ user.name }}/bl">{{ i18n("messages","blog.bl") }}: {{ statsMyBL }}</a></li>
+ {% endif %}
+ <li>{{ i18n("messages","blog.messages") }}: {{ statsMessages }}</li>
+ <li>{{ i18n("messages","blog.comments") }}: {{ statsReplies }}</li>
+ </ul>
+ {% if iread is not empty %}
+ <div class="iread">
+ {% for u in iread %}
+ <span>
+ <a href="/{{ u.name }}/">
+ <img src="//i.juick.com/as/{{ u.uid }}.png" alt="{{ u.name }}"/>
+ </a>
+ </span>
+ {% endfor %}
+ </div>
+ {% endif %}
+
+</div>
diff --git a/src/main/resources/templates/views/partial/usertags.html b/src/main/resources/templates/views/partial/usertags.html
new file mode 100644
index 00000000..71d1303e
--- /dev/null
+++ b/src/main/resources/templates/views/partial/usertags.html
@@ -0,0 +1,3 @@
+{% import "views/macros/tags" %}
+{{ tags(user.name, tagStats) }}
+<a href="/{{ user.name }}/tags" rel="nofollow">...</a> \ No newline at end of file