diff --git a/src/snek/app.py b/src/snek/app.py index cb4de21..a1c8938 100644 --- a/src/snek/app.py +++ b/src/snek/app.py @@ -45,6 +45,7 @@ from snek.view.terminal import TerminalSocketView, TerminalView from snek.view.upload import UploadView from snek.view.web import WebView from snek.view.stats import StatsView +from snek.view.user import UserView from snek.webdav import WebdavApplication SESSION_KEY = b"c79a0c5fda4b424189c427d28c9f7c34" @@ -171,6 +172,7 @@ class Application(BaseApplication): self.router.add_view("/drive.json", DriveView) self.router.add_view("/drive/{drive}.json", DriveView) self.router.add_view("/stats.json", StatsView) + self.router.add_view("/user/{user}.html", UserView) self.webdav = WebdavApplication(self) self.add_subapp("/webdav", self.webdav) diff --git a/src/snek/templates/message.html b/src/snek/templates/message.html index 9773ae1..e38d662 100644 --- a/src/snek/templates/message.html +++ b/src/snek/templates/message.html @@ -1 +1 @@ -<div style="max-width:100%;" data-uid="{{uid}}" data-color="{{color}}" data-channel_uid="{{channel_uid}}" data-user_nick="{{user_nick}}" data-created_at="{{created_at}}" data-user_uid="{{user_uid}}" class="message"><div class="avatar" style="background-color: {{color}}; color: black;"><img width="40px" height="40px" src="/avatar/{{user_uid}}.svg" /></div><div class="message-content"><div class="author" style="color: {{color}};">{{user_nick}}</div><div class="text">{% autoescape false %}{% emoji %}{% linkify %}{% markdown %}{% autoescape false %}{{ message }}{%raw %} {% endraw%}{%endautoescape%}{% endmarkdown %}{% endlinkify %}{% endemoji %}{% endautoescape %}</div><div class="time no-select" data-created_at="{{created_at}}"></div></div></div> +<div style="max-width:100%;" data-uid="{{uid}}" data-color="{{color}}" data-channel_uid="{{channel_uid}}" data-user_nick="{{user_nick}}" data-created_at="{{created_at}}" data-user_uid="{{user_uid}}" class="message"><div class="avatar" style="background-color: {{color}}; color: black;"><a href="/user/{{user_uid}}.html"><img width="40px" height="40px" src="/avatar/{{user_uid}}.svg" /></a></div><div class="message-content"><div class="author" style="color: {{color}};">{{user_nick}}</div><div class="text">{% autoescape false %}{% emoji %}{% linkify %}{% markdown %}{% autoescape false %}{{ message }}{%raw %} {% endraw%}{%endautoescape%}{% endmarkdown %}{% endlinkify %}{% endemoji %}{% endautoescape %}</div><div class="time no-select" data-created_at="{{created_at}}"></div></div></div> diff --git a/src/snek/templates/settings/index.html b/src/snek/templates/settings/index.html index f91fc5d..cbd4cf8 100644 --- a/src/snek/templates/settings/index.html +++ b/src/snek/templates/settings/index.html @@ -6,8 +6,6 @@ {% endblock %} -{% block header_text %}<h2 style="color:#fff">Settings</h2>{% endblock %} - {% block head %} <link href="https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.20.0/min/vs/editor/editor.main.min.css" rel="stylesheet"> @@ -15,23 +13,18 @@ {% endblock %} +{% block logo %} +<h1>Setting page</h1> + +{% endblock %} + {% block main %} -<div id="profile_description"></div> - -<script type="module"> - - require.config({ paths: { 'vs': 'https://cdn.bootcdn.net/ajax/libs/monaco-editor/0.20.0/min/vs' } }); - - require(['vs/editor/editor.main'], function () { -var editor = monaco.editor.create(document.getElementById('profile_description'), { - value: phpCode, - language: 'php' - }); - }) -</script> - {% endblock main %} + + + + diff --git a/src/snek/view/index.py b/src/snek/view/index.py index 2313ea9..c8b1409 100644 --- a/src/snek/view/index.py +++ b/src/snek/view/index.py @@ -11,7 +11,7 @@ from snek.system.view import BaseView - +from aiohttp import web class IndexView(BaseView): async def get(self):