aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/resources/templates/views/partial
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-26 12:06:10 +0300
committerGravatar Vitaly Takmazov2018-02-26 12:06:10 +0300
commitd91c5508f2172347e18ad93f6048582deda4ae02 (patch)
tree91b5fb44634f072eb21630bcaf0955766a133380 /juick-www/src/main/resources/templates/views/partial
parentc6bc69cee51066ae2f153208bd995d43637223c9 (diff)
www: move templates to resources
Diffstat (limited to 'juick-www/src/main/resources/templates/views/partial')
-rw-r--r--juick-www/src/main/resources/templates/views/partial/footer.html17
-rw-r--r--juick-www/src/main/resources/templates/views/partial/homecolumn.html23
-rw-r--r--juick-www/src/main/resources/templates/views/partial/message.html70
-rw-r--r--juick-www/src/main/resources/templates/views/partial/navigation.html24
-rw-r--r--juick-www/src/main/resources/templates/views/partial/settings_tabs.html6
-rw-r--r--juick-www/src/main/resources/templates/views/partial/tagcolumn.html33
-rw-r--r--juick-www/src/main/resources/templates/views/partial/tags.html3
-rw-r--r--juick-www/src/main/resources/templates/views/partial/thread_list.html49
-rw-r--r--juick-www/src/main/resources/templates/views/partial/thread_tree.html2
-rw-r--r--juick-www/src/main/resources/templates/views/partial/usercolumn.html89
-rw-r--r--juick-www/src/main/resources/templates/views/partial/usertags.html3
11 files changed, 319 insertions, 0 deletions
diff --git a/juick-www/src/main/resources/templates/views/partial/footer.html b/juick-www/src/main/resources/templates/views/partial/footer.html
new file mode 100644
index 00000000..87744183
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/footer.html
@@ -0,0 +1,17 @@
+<div id="footer">
+ <div id="footer-right"> &middot;
+ <a href="/help/ru/contacts" rel="nofollow">{{ i18n("messages","link.contacts") }}</a> &middot;
+ <a href="/help/" rel="nofollow">{{ i18n("messages","link.help") }}</a> &middot;
+ <a href="/help/ru/adv" rel="nofollow">{{ i18n("messages","link.adv") }}</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/juick-www/src/main/resources/templates/views/partial/homecolumn.html b/juick-www/src/main/resources/templates/views/partial/homecolumn.html
new file mode 100644
index 00000000..6142e9e9
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/homecolumn.html
@@ -0,0 +1,23 @@
+<ul class="toolbar">
+ <li>
+ <a href="/" 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>
+<p class="tags">
+ {% include "views/partial/tags" %}
+ {% if showAdv | default(false) %}
+ <a href="http://ru.wix.com/">конструктор сайтов</a>
+ {% endif %}
+</p> \ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/partial/message.html b/juick-www/src/main/resources/templates/views/partial/message.html
new file mode 100644
index 00000000..9e3ede6c
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/message.html
@@ -0,0 +1,70 @@
+<article data-mid="{{ msg.mid }}" itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting" itemref="org">
+ <header class="h">
+ <span itemprop="author" itemscope="" itemtype="http://schema.org/Person">
+ <a href="/{{ msg.user.name }}/" itemprop="url" rel="author"><span itemprop="name">{{ 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 itemprop="datePublished dateModified" itemtype="http://schema.org/Date" 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" itemprop="headline">
+ {{ tags(msg.user.name, msg.tags | tagsList) }}
+ </div>
+ </header>
+ <p itemprop="description">{{ 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 itemprop="image" 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;{{ msg.Replies }}{% 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/juick-www/src/main/resources/templates/views/partial/navigation.html b/juick-www/src/main/resources/templates/views/partial/navigation.html
new file mode 100644
index 00000000..7afabcc3
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/navigation.html
@@ -0,0 +1,24 @@
+<header>
+ <div id="header_wrapper">
+ <div id="logo"><a href="/{% if visitor.uid > 0 %}?show=my{% endif %}">Juick</a></div>
+ <nav id="global">
+ <ul>
+ {% if visitor.uid > 0 %}
+ <li><a href="/?show=discuss"><i data-icon="ei-comment" data-size="s"></i>{{ i18n("messages","link.discuss") }}</a></li>
+ {% else %}
+ <li><a href="/?show=photos" rel="nofollow"><i data-icon="ei-camera" data-size="s"></i>{{ i18n("messages","link.withPhotos") }}</a></li>
+ {% endif %}
+ <li><a href="/?show=all" rel="nofollow"><i data-icon="ei-search" data-size="s"></i>{{ i18n("messages","link.allMessages") }}</a></li>
+ <li><a id="post" href="/post"><i data-icon="ei-pencil" data-size="s"></i>{{
+ i18n("messages","link.postMessage") }}</a>
+ </li>
+ </ul>
+ </nav>
+ <div id="search">
+ <form action="/">
+ <input name="search" class="text"
+ placeholder="{{ i18n('messages','label.search') }}" value="{{ search | default('') }}"/>
+ </form>
+ </div>
+ </div>
+</header>
diff --git a/juick-www/src/main/resources/templates/views/partial/settings_tabs.html b/juick-www/src/main/resources/templates/views/partial/settings_tabs.html
new file mode 100644
index 00000000..4715253e
--- /dev/null
+++ b/juick-www/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/juick-www/src/main/resources/templates/views/partial/tagcolumn.html b/juick-www/src/main/resources/templates/views/partial/tagcolumn.html
new file mode 100644
index 00000000..3e61d3d3
--- /dev/null
+++ b/juick-www/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/juick-www/src/main/resources/templates/views/partial/tags.html b/juick-www/src/main/resources/templates/views/partial/tags.html
new file mode 100644
index 00000000..3235213e
--- /dev/null
+++ b/juick-www/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/juick-www/src/main/resources/templates/views/partial/thread_list.html b/juick-www/src/main/resources/templates/views/partial/thread_list.html
new file mode 100644
index 00000000..f273dec7
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/thread_list.html
@@ -0,0 +1,49 @@
+{% for msg in replies %}
+<li id="{{ msg.rid }}" class="msg">
+ <div class="msg-cont">
+ <div class="msg-header">
+ {% if not msg.user.banned %}
+ <a href="/{{ msg.user.name }}/">{{ msg.user.name }}</a>
+ <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>
+ {% else %}
+ [удалено]:
+ <div class="msg-avatar">
+ <img src="//i.juick.com/av-96.png"/>
+ </div>
+ {% endif %}
+ <div class="msg-ts">
+ <a href="/{{ msg.mid }}#{{ msg.rid }}">
+ <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>
+ <div class="msg-txt">{{ msg | formatMessage }}</div>
+ {% if msg.AttachmentType is not empty %}
+ <div class="msg-media">
+ <a href="//i.juick.com/p/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" data-fname="{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}">
+ <img src="//i.juick.com/photos-512/{{ msg.mid }}-{{ msg.rid }}.{{ msg.AttachmentType }}" alt=""/>
+ </a>
+ </div>
+ {% endif %}
+ <div class="msg-links">/{{ msg.rid }}
+ {% if msg.replyto > 0 %}
+ {{ i18n("messages","reply.inReplyTo") }} <a href="#{{ msg.replyto }}">/{{ msg.replyto }}</a>
+ {% endif %}
+ {% if msg.VisitorCanComment %}
+ &middot; <a href="/post?body=%23{{ msg.mid }}/{{ msg.rid }}%20" class="a-thread-comment">{{ i18n("messages","reply.reply") }}</a>
+ </div>
+ <div class="msg-comment-target msg-comment-hidden"></div>
+ {% elseif visitor.uid == 0 %}
+ &middot; <a href="#" class="a-login">{{ i18n("messages","reply.reply") }}</a>
+ </div>
+ {% else %}
+ </div>
+ {% endif %}
+ </div>
+</li>
+{% endfor %} \ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/partial/thread_tree.html b/juick-www/src/main/resources/templates/views/partial/thread_tree.html
new file mode 100644
index 00000000..f207b8e0
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/thread_tree.html
@@ -0,0 +1,2 @@
+{% import "views/macros/tree" %}
+{{ tree(replies, visitor, 0, 0, false) }} \ No newline at end of file
diff --git a/juick-www/src/main/resources/templates/views/partial/usercolumn.html b/juick-www/src/main/resources/templates/views/partial/usercolumn.html
new file mode 100644
index 00000000..382c3622
--- /dev/null
+++ b/juick-www/src/main/resources/templates/views/partial/usercolumn.html
@@ -0,0 +1,89 @@
+<div id="ctitle">
+ <a href="/{{ user.name }}">
+ <img src="//i.juick.com/a/{{ user.uid }}.png" alt=""/>{{ user.name }}
+ </a>
+</div>
+{% if visitor is not empty and visitor.uid > 0 and visitor.uid != user.uid %}
+<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/juick-www/src/main/resources/templates/views/partial/usertags.html b/juick-www/src/main/resources/templates/views/partial/usertags.html
new file mode 100644
index 00000000..71d1303e
--- /dev/null
+++ b/juick-www/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