-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(shares): implement share articles via email and social platforms
- add share article via email - add share article facebook and twitter - add tests on share articles [Starts #162949230]
- Loading branch information
1 parent
be09863
commit bd8899e
Showing
10 changed files
with
465 additions
and
79 deletions.
There are no files selected for viewing
18 changes: 0 additions & 18 deletions
18
authors/apps/articles/migrations/0002_auto_20190130_1803.py
This file was deleted.
Oops, something went wrong.
43 changes: 43 additions & 0 deletions
43
authors/apps/articles/migrations/0002_auto_20190131_1337.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 2.1.4 on 2019-01-31 13:37 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('articles', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Rating', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('rating', models.FloatField(default=0)), | ||
], | ||
), | ||
migrations.AlterField( | ||
model_name='article', | ||
name='updated_at', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
migrations.AlterField( | ||
model_name='comments', | ||
name='updated_at', | ||
field=models.DateTimeField(auto_now=True), | ||
), | ||
migrations.AddField( | ||
model_name='rating', | ||
name='article', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='articles.Article'), | ||
), | ||
migrations.AddField( | ||
model_name='rating', | ||
name='user', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), | ||
), | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="x-ua-compatible" content="ie=edge"> | ||
<title>Password Reset</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<style type="text/css"> | ||
/** | ||
* Google webfonts. Recommended to include the .woff version for cross-client compatibility. | ||
*/ | ||
@media screen { | ||
@font-face { | ||
font-family: 'Source Sans Pro'; | ||
font-style: normal; | ||
font-weight: 400; | ||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), | ||
url(https://fonts.gstatic.com/s/sourcesanspro/v10/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); | ||
} | ||
@font-face { | ||
font-family: 'Source Sans Pro'; | ||
font-style: normal; | ||
font-weight: 700; | ||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), | ||
url(https://fonts.gstatic.com/s/sourcesanspro/v10/toadOcfmlt9b38dHJxOBGFkQc6VGVFSmCnC_l7QZG60.woff) format('woff'); | ||
} | ||
} | ||
/** | ||
* Avoid browser level font resizing. | ||
* 1. Windows Mobile | ||
* 2. iOS / OSX | ||
*/ | ||
body, | ||
table, | ||
td, | ||
a { | ||
-ms-text-size-adjust: 100%; /* 1 */ | ||
-webkit-text-size-adjust: 100%; /* 2 */ | ||
} | ||
/** | ||
* Remove extra space added to tables and cells in Outlook. | ||
*/ | ||
table, | ||
td { | ||
mso-table-rspace: 0pt; | ||
mso-table-lspace: 0pt; | ||
} | ||
/** | ||
* Better fluid images in Internet Explorer. | ||
*/ | ||
img { | ||
-ms-interpolation-mode: bicubic; | ||
} | ||
/** | ||
* Remove blue links for iOS devices. | ||
*/ | ||
a[x-apple-data-detectors] { | ||
font-family: inherit !important; | ||
font-size: inherit !important; | ||
font-weight: inherit !important; | ||
line-height: inherit !important; | ||
color: inherit !important; | ||
text-decoration: none !important; | ||
} | ||
/** | ||
* Fix centering issues in Android 4.4. | ||
*/ | ||
div[style*="margin: 16px 0;"] { | ||
margin: 0 !important; | ||
} | ||
body { | ||
width: 100% !important; | ||
height: 100% !important; | ||
padding: 0 !important; | ||
margin: 0 !important; | ||
} | ||
/** | ||
* Collapse table borders to avoid space between cells. | ||
*/ | ||
table { | ||
border-collapse: collapse !important; | ||
} | ||
a { | ||
color: #1a82e2; | ||
} | ||
img { | ||
height: auto; | ||
line-height: 100%; | ||
text-decoration: none; | ||
border: 0; | ||
outline: none; | ||
} | ||
</style> | ||
</head> | ||
<body style="background-color: #e9ecef;"> | ||
<!-- start preheader --> | ||
<div class="preheader" style="display: none; max-width: 0; max-height: 0; overflow: hidden; | ||
font-size: 1px; line-height: 1px; color: #fff; opacity: 0;"> | ||
A preheader is the short summary text that follows the subject line when an email is viewed | ||
in the inbox. | ||
</div> | ||
<!-- end preheader --> | ||
<!-- start body --> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | ||
<!-- start logo --> | ||
<tr> | ||
<td align="center" bgcolor="#e9ecef"> | ||
<!--[if (gte mso 9)|(IE)]> | ||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600"> | ||
<tr> | ||
<td align="center" valign="top" width="600"> | ||
<![endif]--> | ||
<!--[if (gte mso 9)|(IE)]> | ||
</td> | ||
</tr> | ||
</table> | ||
<![endif]--> | ||
</td> | ||
</tr> | ||
<!-- end logo --> | ||
<!-- start hero --> | ||
<tr> | ||
<td align="center" bgcolor="#e9ecef"> | ||
<!--[if (gte mso 9)|(IE)]> | ||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600"> | ||
<tr> | ||
<td align="center" valign="top" width="600"> | ||
<![endif]--> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;"> | ||
<tr> | ||
<td align="left" bgcolor="#ffffff" style="padding: 36px 24px 0; font-family: 'Source Sans Pro', | ||
Helvetica, Arial, sans-serif; border-top: 3px solid #d4dadf;"> | ||
<h1 style="margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -1px; line-height: 48px;"> | ||
<center>Author's Haven</center></h1> | ||
</td> | ||
</tr> | ||
</table> | ||
<!--[if (gte mso 9)|(IE)]> | ||
</td> | ||
</tr> | ||
</table> | ||
<![endif]--> | ||
</td> | ||
</tr> | ||
<!-- end hero --> | ||
<!-- start copy block --> | ||
<tr> | ||
<td align="center" bgcolor="#e9ecef"> | ||
<!--[if (gte mso 9)|(IE)]> | ||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600"> | ||
<tr> | ||
<td align="center" valign="top" width="600"> | ||
<![endif]--> | ||
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;"> | ||
<!-- start copy --> | ||
<tr> | ||
<td align="left" bgcolor="#ffffff" style="padding: 24px; font-family: 'Source Sans Pro', | ||
Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px;"> | ||
<p style="margin: 0;">Hello,</b></p> | ||
<p style="margin: 0;">{{username}} has shared an article,</b> | ||
<a href="{{link}}" target="_blank">{{title}}</a></p> | ||
<div style="padding:25px","background-color: lightblue"><div><p><b>{{title}}</b></p><p> | ||
<img style="width:50px;height:50px;" src="{{author_image}}" alt="Author's image"> | ||
<i style="font-size:12px"> by:{{author}}</i></p> | ||
<p>{{body}}...<a href="{{link}}" target="_blank">Read more</a></p></p></div></div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td align="center" bgcolor="#ffffff" style="padding: 24px; font-family: 'Source Sans Pro', | ||
Helvetica, Arial, sans-serif; font-size: 16px; line-height: 24px; border-bottom: 3px solid #d4dadf"> | ||
<p style="margin: 0;">Cheers,<br> The Author's Haven Team.</p> | ||
</td> | ||
</tr> | ||
<!-- end copy --> | ||
</table> | ||
<!--[if (gte mso 9)|(IE)]> | ||
</td> | ||
</tr> | ||
</table> | ||
<![endif]--> | ||
</td> | ||
</tr> | ||
<!-- end copy block --> | ||
<!-- start footer --> | ||
<tr> | ||
<td align="center" bgcolor="#e9ecef" style="padding: 24px;"> | ||
<!--[if (gte mso 9)|(IE)]> | ||
<table align="center" border="0" cellpadding="0" cellspacing="0" width="600"> | ||
<tr> | ||
<td align="center" valign="top" width="600"> | ||
<![endif]--> | ||
</td> | ||
</tr> | ||
</table> | ||
<![endif]--> | ||
</td> | ||
</tr> | ||
<!-- end footer --> | ||
</table> | ||
<!-- end body --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.