diff --git a/royalnet/royalgamesweb.py b/royalnet/royalgamesweb.py index 2339b329..06afdc1f 100644 --- a/royalnet/royalgamesweb.py +++ b/royalnet/royalgamesweb.py @@ -1,6 +1,6 @@ import os -from .web import create_app -from .web.royalprints import * +from royalnet.web import create_app +from royalnet.web.royalprints import * class TestConfig: @@ -8,7 +8,7 @@ class TestConfig: TG_AK = os.environ["TG_AK"] -app = create_app(TestConfig, [rp_home, rp_wikiview, rp_tglogin, rp_docs, rp_wikiedit, rp_mcstatus]) +app = create_app(TestConfig, [rp_home, rp_wikiview, rp_tglogin, rp_docs, rp_wikiedit, rp_mcstatus, rp_diarioview]) if __name__ == "__main__": diff --git a/royalnet/web/royalprints/__init__.py b/royalnet/web/royalprints/__init__.py index 2b65ff79..a2be01c6 100644 --- a/royalnet/web/royalprints/__init__.py +++ b/royalnet/web/royalprints/__init__.py @@ -6,5 +6,6 @@ from .tglogin import rp as rp_tglogin from .docs import rp as rp_docs from .wikiedit import rp as rp_wikiedit from .mcstatus import rp as rp_mcstatus +from .diarioview import rp as rp_diarioview -__all__ = ["rp_home", "rp_wikiview", "rp_tglogin", "rp_docs", "rp_wikiedit", "rp_mcstatus"] +__all__ = ["rp_home", "rp_wikiview", "rp_tglogin", "rp_docs", "rp_wikiedit", "rp_mcstatus", "rp_diarioview"] diff --git a/royalnet/web/royalprints/diarioview/__init__.py b/royalnet/web/royalprints/diarioview/__init__.py index 1a768811..07ffbc66 100644 --- a/royalnet/web/royalprints/diarioview/__init__.py +++ b/royalnet/web/royalprints/diarioview/__init__.py @@ -3,16 +3,19 @@ import flask as f import os from ... import Royalprint -from ....database.tables import Royal, WikiPage, WikiRevision +from ....database.tables import Royal, Diario tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') rp = Royalprint("diarioview", __name__, url_prefix="/diarioview", template_folder=tmpl_dir, - required_tables={Royal, WikiPage, WikiRevision}) + required_tables={Royal, Diario}) -@rp.route("/", defaults={"page": 0}) +@rp.route("/", defaults={"page": 1}) @rp.route("/") def diarioview_index(page): alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"] - return "TODO" + if page < 1: + return "Page should be >1", 404 + entries = alchemy_session.query(alchemy.Diario).order_by(alchemy.Diario.diario_id.desc()).offset((page - 1) * 1000).limit(1000).all() + return f.render_template("diarioview_page.html", page=page, entries=entries) diff --git a/royalnet/web/royalprints/diarioview/templates/diarioview_page.html b/royalnet/web/royalprints/diarioview/templates/diarioview_page.html new file mode 100644 index 00000000..b6728577 --- /dev/null +++ b/royalnet/web/royalprints/diarioview/templates/diarioview_page.html @@ -0,0 +1,40 @@ +{% extends "base.html" %} + +{% block title %} + Pagina {{ page }} - Diario RYG +{% endblock %} + +{% block content %} +
+ {% for entry in entries %} +
+
+ {% if entry.media_url %} + Caricamento immagine fallito + {% endif %} + {% if entry.text %} + "{{ entry.text }}" + {% endif %} +
+ {% if entry.quoted %} +
+ — + {% if entry.quoted_account %} + {{ entry.quoted }} + {% else %} + {{ entry.quoted }} + {% endif %} + {% if entry.context %} + , {{ entry.context }} + {% endif %} +
+ {% endif %} + {% if entry.creator %} +
Salvato da {{ entry.creator.username }}
+ {% endif %} + + #{{ entry.diario_id }} +
+ {% endfor %} +
+{% endblock %} diff --git a/royalnet/web/static/ryg.css b/royalnet/web/static/ryg.css index e4c6b242..c2aa33f1 100644 --- a/royalnet/web/static/ryg.css +++ b/royalnet/web/static/ryg.css @@ -127,16 +127,33 @@ h6 { margin-bottom: 0; font-weight: normal; } +pre { + color: lightgray; + border: 1px solid rgba(160, 204, 255, 0.1); + background-color: rgba(160, 204, 255, 0.1); + padding: 2px 4px 2px 8px; + margin: 8px; +} code { font-family: "Consolas", "Source Code Pro", monospace; } blockquote { - color: #a0ccff; - border-left: 3px solid #a0ccff; - background-color: rgba(160, 204, 255, 0.1); + color: #7dff7d; + border-left: 3px solid #7dff7d; + background-color: rgba(125, 255, 125, 0.1); padding: 2px 4px 2px 8px; margin: 8px; } +blockquote.spoiler { + color: transparent; + background-color: rgba(255, 125, 125, 0.1); + border: 1px solid rgba(255, 125, 125, 0.1); + border-radius: 2px; + padding: 4px; +} +blockquote.spoiler:hover { + color: #ff7d7d; +} textarea { background-color: rgba(160, 204, 255, 0.1); color: #a0ccff; @@ -202,9 +219,6 @@ select option { background-color: #293c61; color: #a0ccff; } -pre { - margin: 0; -} img { margin-left: auto; margin-right: auto; @@ -605,7 +619,6 @@ button[disabled=""] { justify-self: end; grid-row: 2; } - .wikiview-doublebox .bot { background-color: transparent; border-top: 0; @@ -627,26 +640,60 @@ button[disabled=""] { margin-top: revert; margin-bottom: revert; } -.wikiview-doublebox .bot blockquote { - color: #7dff7d; - border-left: 3px solid #7dff7d; - background-color: rgba(125, 255, 125, 0.1); +.diario { + display: grid; + grid-template-columns: auto auto 8%; } -.wikiview-doublebox .bot blockquote.spoiler { +.diario .diario-content { + grid-row: 1; + grid-column-start: 1; + grid-column-end: 4; + margin-top: 2px; + margin-bottom: 2px; +} +.diario .diario-content .diario-img { + color: red; +} +.diario .diario-quote { + grid-row: 2; + grid-column-start: 1; + grid-column-end: 4; + font-size: small; + margin-top: 2px; + margin-bottom: 2px; +} +.diario .diario-quote .diario-context { + font-style: italic; +} +.diario .diario-timestamp { + grid-row: 3; + grid-column: 1; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; +} +.diario .diario-created { + grid-row: 3; + grid-column: 2; + justify-self: end; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; +} +.diario .diario-id { + grid-row: 3; + grid-column: 3; + justify-self: end; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; +} +.diario.diario-spoiler { color: transparent; background-color: rgba(255, 125, 125, 0.1); - border: 1px solid rgba(255, 125, 125, 0.1); - border-radius: 2px; - padding: 4px; + border-left: 3px solid #ff7d7d; } -.wikiview-doublebox .bot blockquote.spoiler:hover { +.diario.diario-spoiler:hover { color: #ff7d7d; } -.wikiview-doublebox .bot pre { - color: lightgray; - border: 1px solid rgba(160, 204, 255, 0.1); - background-color: rgba(160, 204, 255, 0.1); - padding: 2px 4px 2px 8px; - margin: 8px; -} /*# sourceMappingURL=ryg.css.map */ \ No newline at end of file diff --git a/royalnet/web/static/ryg.css.map b/royalnet/web/static/ryg.css.map index ff1983f1..b252ebd8 100644 --- a/royalnet/web/static/ryg.css.map +++ b/royalnet/web/static/ryg.css.map @@ -1 +1 @@ -{"version":3,"sources":["ryg.less"],"names":[],"mappings":"AAuBA;EACI,aALS,SAAS,4BAKlB;EACA,yBAAA;EACA,cAAA;EACA,sBAAA;;AAGJ;EACI,cAAA;EACA,qBAAA;;AAEA,CAAC;EACG,cAAA;;AAGJ,CAAC;EACG,YAAA;;AAOA,CAFH,IAAI,UAEA;EACG,aAAa,qBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAVH,IAAI,UAUA,sBAAsB;EACnB,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlBH,IAAI,UAkBA,iCAAiC;AAAU,CAlB/C,IAAI,UAkB4C,0BAA0B;EACnE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1BH,IAAI,UA0BA,2BAA2B;AAAU,CA1BzC,IAAI,UA0BsC,kCAAkC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlCH,IAAI,UAkCA,4BAA4B;AAAU,CAlC1C,IAAI,UAkCuC,iCAAiC;EACrE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CA1CH,IAAI,UA0CA,yBAAyB;AAAU,CA1CvC,IAAI,UA0CoC,gCAAgC;EACjE,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,OAAT;EACA,iBAAA;;AAIJ,CAlDH,IAAI,UAkDA,qCAAqC;EAClC,aAAa,uBAAb;EACA,iBAAA;EACA,SAAS,O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,WAAA;;AAIR,mBACI;EACI,6BAAA;EACA,aAAA;EACA,iDAAA;EACA,+CAAA;EACA,gDAAA;;AANR,mBACI,KAOI;EACI,kBAAA;EACA,eAAA;EACA,aAAA;;AAXZ,mBACI,KAaI;AAdR,mBACI,KAaQ;AAdZ,mBACI,KAaY;AAdhB,mBACI,KAagB;AAdpB,mBACI,KAaoB;AAdxB,mBACI,KAawB;EAChB,kBAAA;EACA,qBAAA;;AAKZ;EACI,aAAA;EACA,mCAAA;;AAFJ,OAII;EACI,WAAA;EACA,oBAAA;EACA,kBAAA;EACA,eAAA;EACA,kBAAA;;AATR,OAII,gBAOI;EACI,UAAA;;AAZZ,OAgBI;EACI,WAAA;EACA,oBAAA;EACA,kBAAA;EACA,gBAAA;EACA,eAAA;EACA,kBAAA;;AAtBR,OAgBI,cAQI;EACI,kBAAA;;AAzBZ,OA6BI;EACI,WAAA;EACA,cAAA;EACA,kBAAA;EACA,eAAA;EACA,kBAAA;;AAlCR,OAqCI;EACI,WAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,eAAA;EACA,kBAAA;;AA3CR,OA8CI;EACI,WAAA;EACA,cAAA;EACA,iBAAA;EACA,kBAAA;EACA,eAAA;EACA,kBAAA;;AAGJ,OAAC;EACG,kBAAA;EACA,0CAAA;EACA,8BAAA;;AAEA,OALH,eAKI;EACG,cAAA","file":"ryg.css"} \ No newline at end of file diff --git a/royalnet/web/static/ryg.less b/royalnet/web/static/ryg.less index 6528b813..60c49e50 100644 --- a/royalnet/web/static/ryg.less +++ b/royalnet/web/static/ryg.less @@ -172,16 +172,37 @@ h1, h2, h3, h4, h5, h6 { font-weight: normal; } + +pre { + color: lightgray; + border: 1px solid @fg-ten; + background-color: @fg-ten; + padding: 2px 4px 2px 8px; + margin: 8px; +} + code { font-family: @monospace-fonts; } blockquote { - color: @fg; - border-left: 3px solid @fg; - background-color: @fg-ten; + color: @pastel-lime; + border-left: 3px solid @pastel-lime; + background-color: fade(@pastel-lime, 10%); padding: 2px 4px 2px 8px; margin: 8px; + + &.spoiler { + color: transparent; + background-color: fade(@pastel-red, 10%); + border: 1px solid fade(@pastel-red, 10%); + border-radius: 2px; + padding: 4px; + + &:hover { + color: @pastel-red; + } + } } textarea { @@ -248,10 +269,6 @@ select { } } -pre { - margin: 0; -} - img { margin-left: auto; margin-right: auto; @@ -764,31 +781,71 @@ table { margin-top: revert; margin-bottom: revert; } - - blockquote { - color: @pastel-lime; - border-left: 3px solid @pastel-lime; - background-color: fade(@pastel-lime, 10%); - - &.spoiler { - color: transparent; - background-color: fade(@pastel-red, 10%); - border: 1px solid fade(@pastel-red, 10%); - border-radius: 2px; - padding: 4px; - - &:hover { - color: @pastel-red; - } - } - } - - pre { - color: lightgray; - border: 1px solid @fg-ten; - background-color: @fg-ten; - padding: 2px 4px 2px 8px; - margin: 8px; - } } } + +.diario { + display: grid; + grid-template-columns: auto auto 8%; + + .diario-content { + grid-row: 1; + grid-column-start: 1; + grid-column-end: 4; + margin-top: 2px; + margin-bottom: 2px; + + .diario-img { + color: red; + } + } + + .diario-quote { + grid-row: 2; + grid-column-start: 1; + grid-column-end: 4; + font-size: small; + margin-top: 2px; + margin-bottom: 2px; + + .diario-context { + font-style: italic; + } + } + + .diario-timestamp { + grid-row: 3; + grid-column: 1; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; + } + + .diario-created { + grid-row: 3; + grid-column: 2; + justify-self: end; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; + } + + .diario-id { + grid-row: 3; + grid-column: 3; + justify-self: end; + font-size: x-small; + margin-top: 2px; + margin-bottom: 2px; + } + + &.diario-spoiler { + color: transparent; + background-color: fade(@pastel-red, 10%); + border-left: 3px solid @pastel-red; + + &:hover { + color: @pastel-red; + } + } +} \ No newline at end of file