Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag moderation #349

Open
wants to merge 11 commits into
base: tag-moderation
Choose a base branch
from
23 changes: 14 additions & 9 deletions browser/templates/murmur/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@
<link rel="apple-touch-icon" sizes="144x144" href="/static/images/favicon/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/static/images/favicon/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/static/images/favicon/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-32x32.svg" sizes="32x32">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-96x96.svg" sizes="96x96">
<link rel="icon" type="image/png" href="/static/images/favicon/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/static/images/favicon/favicon-16x16.svg" sizes="16x16">
<link rel="manifest" href="/static/images/favicon/android-chrome-manifest.json">
<link rel="shortcut icon" href="/static/images/favicon/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Murmur">
Expand All @@ -41,16 +40,18 @@

<body>

<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top" role="navigation">
<nav id="navbar" class="navbar navbar-expand-lg navbar-light bg-light fixed-top" role="navigation">
<div class="container">
<a class="navbar-brand" id="logo" href="/"><img class="icon" src="/static/images/favicon/favicon-194x194.png">Murmur</a>
<a class="navbar-brand mt-1" id="logo" href="/">
<img src="/static/images/favicon/favicon-32x32.svg" alt="Murmur's logo a open letter with sound waves" width="32" height="31" class="d-inline-block align-baseline">
Murmur
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
{% if user.is_authenticated %}
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="nav navbar-nav">

{% if not group_page %}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarGroupDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Expand Down Expand Up @@ -131,10 +132,14 @@
<div id="navbarNav" class="collapse navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/accounts/login/">Login</a>
<a class="nav-link" href="/accounts/login/">
<button id="login-btn" class="btn btn-sm" type="submit">Login</button>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/accounts/register/">Register</a>
<a class="nav-link" href="/accounts/register/">
<button id="logout-btn" class="btn btn-sm" type="submit">Register</button>
</a>
</li>
</ul>
</div>
Expand Down
2 changes: 1 addition & 1 deletion browser/templates/murmur/create_post.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ <h3>Send Post to <span id="group-name">{{ group_info.name }}</span></h3><hr />
<script type="text/javascript">
django_tag_data = {{ tag_data|safe }};
</script>
<script type="text/javascript" src="/static/javascript/murmur/create_post.js"></script>
<script type="module" src="/static/javascript/murmur/create_post.js"></script>
{% endblock %}
95 changes: 0 additions & 95 deletions browser/templates/murmur/demo.html

This file was deleted.

32 changes: 2 additions & 30 deletions browser/templates/murmur/edit_my_settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,35 +122,7 @@ <h4>Tag Subscription</h4>
Send me no emails except the following subscribed tags
</label>
{% endif %}
<table id="tag-subscription-table" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Select</th>
<th>Tag</th>
<th>Description</th>
<th>Num Posts</th>
</tr>
</thead>
<tbody>
{% if tag_info %}
{% for tag in tag_info %}
<tr class="my_row">
<!-- Select, Tag, Description, Number of Posts -->
{% if settings.tag_blocking_mode %}
<td align="center"><img src="/static/css/third-party/images/block.svg" class="inactive" data-type="tag-select" id ={{ tag.id }}></td>
{% else %}
<td align="center"><img src="/static/css/third-party/images/check.svg" class="inactive" data-type="tag-select" id ={{ tag.id }}></td>
{% endif %}
<td><label class="tag" id="tag_{{ forloop.counter0 }}" style="background-color: #{{ tag.color }}">{{ tag.name }}</label></td>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sed nulla et nulla fermentum molestie.</td>
<td><span>{{ tag.num_p }} post(s)</span></td>
</tr>
{% endfor %}
{% else %}
<tr></tr>
{% endif %}
</tbody>
</table>
{% include "./modules/tag_subscription_table.html" with tag_info=tag_info settings=settings %}
</article>
<article id='donotsent-list-area' class="mt-4">
<h3>My do-not-send list of this group</h3>
Expand Down Expand Up @@ -194,7 +166,7 @@ <h3>My do-not-send list of this group</h3>
<script type="text/javascript">
tag_subscription = {{ tag_subscription|safe }};
</script>
<script type="text/javascript" src="/static/javascript/murmur/my_group_settings.js"></script>
<script type="module" src="/static/javascript/murmur/my_group_settings.js"></script>
{% endblock %}


Expand Down
65 changes: 37 additions & 28 deletions browser/templates/murmur/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,48 @@

{% block customcss %}
<link href="/static/DataTables/datatables.min.css" rel="stylesheet">
<style>
body {
background: url(/static/images/murmurations/4227243_a0587ccefe_o.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
{% endblock %}

{% block content %}

<div id="container-home" class="d-flex flex-column mt-5">
<div id="intro" class="mx-5 mt-5 mb-3">
<h1 id="welcome" class="title">Welcome to Murmur</h1>
<h4 id="mission">We're re-imagining mailing lists and community discourse for the age of social media.</h4>
</div>
<div id="description" class="mx-5 mb-3">
<p>Though mailing list software has changed little in the past 40 years, social media and other community sites have changed drastically.</p>
<p>Murmur introduces new features to the mailing list so that you can communicate with your group in the way that you desire, through email or the web.</p>
<p>And as a community, members can collectively organize and moderate the discussion to satisfy the varied needs and concerns of their cohorts.</p>
</div>
<div id="links" class="font-weight-bold mx-5 mb-5">
<a href="/about" class="mr-3">Learn More</a>
<a href="/groups/murmur-discuss" class="mr-3">Join our Murmur list</a>
<a href="/group_list">Explore All Public Groups</a>
</div>
</div>
{% include "murmur/demo.html" %}

<div id="image-attrib"></div>

<section id="intro">
<h1 id="intro-heading" class="mx-3">Welcome to Murmur</h1>
<p id="intro-subheading" class="mx-3">We're re-imagining mailing lists and community discourse for the age of social media</p>
<a id="call-to-action" href="/accounts/register/">
<button id="cta-btn" class="btn btn-primary">Try Out Smart Mailing List</button>
</a>
</section>
<section id="features">
{% include "./modules/demo.html" %}
</section>

<!-- <div id="image-attrib"></div> -->
<footer>
<article class="footer-about">
<h5 class="txt-primary">Modernizing Mailing Lists</h5>
<p id="footer-info">Though mailing list software has changed little in the past 40 years, social media and other community sites have changed drastically.
Murmur introduces new features to the mailing list so that you can communicate with your group in the way that you desire, through email or the web.
And as a community, members can collectively organize and moderate the discussion to satisfy the varied needs and concerns of their cohorts.
</p>
</article>
<div class="footer-actions">
<article class="footer-nav">
<img class="footer-logo" src="/static/images/favicon/favicon-32x32.svg" alt="Murmur's logo a open letter with sound waves" width="64" height="63">
<ul class="footer-links ml-5 my-0 pl-0">
<li><a class="footer-link text-decoration-none mr-3" href="/about">Learn More</a></li>
<li><a class="footer-link text-decoration-none mr-3" href="/group_list">Explore</a></li>
<li><a class="footer-link text-decoration-none mr-5" href="mailto:[email protected]">Contact Us</a></li>
</ul>
</article>
<article>
<form class="footer-join mt-2" action="">
<input class="join-email p-2" type="email" placeholder="Email...">
<input class="join-submit p-2" type="submit" value="Join">
</form>
</article>
</div>
</footer>

{% endblock %}

Expand Down
48 changes: 48 additions & 0 deletions browser/templates/murmur/modules/demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{% extends "murmur/base.html" %}

{% block customcss %}
<link href="/static/DataTables/datatables.min.css" rel="stylesheet">
{% endblock %}

{% block content %}

<article id="feature-desc" class="translate-down mt-5">
<h4 class="feature-title p-2" style="background-color: indianred;">Tag Subscription</h4>
<h5 class="feature-heading mt-3">Filter your inbox with tags to get the inbox you desire</h5>
<p class="feature-subheading mt-3 mb-3">
Declutter your inbox through personalized tag subscription in every mailing list group.
Simply select which tags you want to block or subscribe to in your settings.
</p>
</article>
<!-- Demo data (demo_info) for tags and emails can be modified in views.py index function -->
<article id="feature-demo" class="d-flex translate-down mb-5">
<div class="demo-settings p-4">
<h4 class="txt-primary">Settings</h4>
<label class="d-block" for="block-mode">
<input class="mr-1" type="radio" id="block-mode" name="tag-mode" value="block-mode" checked>
Send me all emails except the following blocked tags
</label>
<label class="d-block mb-3" for="subscribe-mode">
<input class="mr-1" type="radio" id="subscribe-mode" name="tag-mode" value="subscribe-mode">
Send me no emails except the following subscribed tags
</label>
{% include "./tag_subscription_table.html" with tag_info=demo_info.tags settings=settings %}
</div>
<ul class="demo-emails p-4">
<h4 class="txt-primary mb-3">Inbox</h4>
{% for email in demo_info.emails %}
<li class="sample-email p-3 mb-2">
{% for tag in email.tags %}
<span class="label2 mr-1" style="background-color: #{{ tag.color }};">{{ tag.name }}</span>
{% endfor %}
<span id="demo-subject">{{ email.subject }}</span>
</li>
{% endfor %}
</ul>
</article>

{% endblock %}

{% block customjs %}
<script type="module" src="/static/javascript/murmur/demo.js"></script>
{% endblock %}
30 changes: 30 additions & 0 deletions browser/templates/murmur/modules/tag_subscription_table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!-- Tag subcription template table -->
<table id="tag-subscription-table" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Select</th>
<th>Tag</th>
<th>Description</th>
<th>Num Posts</th>
</tr>
</thead>
<tbody>
{% if tag_info %}
{% for tag in tag_info %}
<tr class="my_row">
<!-- Select, Tag, Description, Number of Posts -->
{% if settings.tag_blocking_mode %}
<td align="center"><img src="/static/css/third-party/images/block.svg" class="inactive" data-type="tag-select" id ={{ tag.id }}></td>
{% else %}
<td align="center"><img src="/static/css/third-party/images/check.svg" class="inactive" data-type="tag-select" id ={{ tag.id }}></td>
{% endif %}
<td><label class="tag" id="tag_{{ forloop.counter0 }}" style="background-color: #{{ tag.color }}">{{ tag.name }}</label></td>
<td>{{ tag.desc|default:"No description"}}</td>
<td><span>{{ tag.num_p }} post(s)</span></td>
</tr>
{% endfor %}
{% else %}
<tr></tr>
{% endif %}
</tbody>
</table>
Loading