This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Wtower/v0-1-7
Version 0.1.7
- Loading branch information
Showing
17 changed files
with
158 additions
and
21 deletions.
There are no files selected for viewing
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
File renamed without changes.
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,11 @@ | ||
""" | ||
URL routing for core app | ||
Generated by yeoman generator-django-ana <%= version %> on <%= date %>. | ||
""" | ||
from django.conf.urls import url | ||
from <%= name %>_core import views | ||
|
||
urlpatterns = [ | ||
url(r'^contact/', views.ContactView.as_view(), name='contact'), | ||
url(r'^$', views.IndexView.as_view(), name='index'), | ||
] |
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,19 @@ | ||
""" | ||
View handler definitions for core | ||
Generated by yeoman generator-django-ana <%= version %> on <%= date %>. | ||
""" | ||
from django.views.generic.base import TemplateView | ||
from braces.views import FormMessagesMixin | ||
from envelope.views import ContactView as EnvelopeContactView | ||
|
||
|
||
class IndexView(TemplateView): | ||
template_name = '<%= name %>_core/index.html' | ||
|
||
def get_context_data(self, **kwargs): | ||
return {} | ||
|
||
|
||
class ContactView(FormMessagesMixin, EnvelopeContactView): | ||
form_valid_message = "Message sent." | ||
form_invalid_message = "Please fill in all fields in the contact form." |
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,58 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<title><%= verboseName %> contact form: {{ subject }}</title> | ||
<link rel="stylesheet" href="../../static/css/email_body.css"> | ||
</head> | ||
<body class=""> | ||
<table border="0" cellpadding="0" cellspacing="0" class="body"> | ||
<tr> | ||
<td> </td> | ||
<td class="container"> | ||
<div class="content"> | ||
|
||
<span class="preheader"><%= verboseName %> contact form: {{ subject }}</span> | ||
<table class="main"> | ||
|
||
<tr> | ||
<td class="wrapper"> | ||
<table border="0" cellpadding="0" cellspacing="0"> | ||
<tr> | ||
<td> | ||
<h1>{{ subject }}</h1> | ||
<p><span class="sender">Sender:</span> | ||
<a href="mailto:{{ email }}">{{ sender }} ({{ email }})</a></p> | ||
<p> </p> | ||
{{ message|linebreaks }} | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
|
||
</table> | ||
|
||
<div class="footer"> | ||
<table border="0" cellpadding="0" cellspacing="0"> | ||
<tr> | ||
<td class="content-block powered-by"> | ||
<span class="apple-link"> | ||
<a href="http://<%= deployHost %>"><%= verboseName %></a> contact form</span> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="content-block powered-by"> | ||
<!--Powered by <a href="http://9-dev.com">9dev</a>.--> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
</div> | ||
</td> | ||
<td> </td> | ||
</tr> | ||
</table> | ||
</body> | ||
</html> |
21 changes: 21 additions & 0 deletions
21
generators/app/templates/private/stylesheets/email_body.sass
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,21 @@ | ||
@import ../../node_modules/responsive-html-email-template/src/email | ||
|
||
/* ------------- | ||
* Custom styles | ||
*-------------- | ||
h1, h2, h3, h4, h5, h6, p | ||
padding-top: 10px | ||
text-align: left | ||
|
||
h1, h2, h3, h4, h5, h6 | ||
color: #e8bb48 | ||
|
||
h1 | ||
border-bottom: 1px solid | ||
|
||
p | ||
color: #2b2a33 | ||
|
||
.sender | ||
font-weight: 700 | ||
padding-right: 10px |
Empty file.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{ subject }} | ||
{% with subject|length as n %}{% with ''|center:n as range %}{% for _ in range %}={% endfor %}{% endwith %}{% endwith %} | ||
|
||
Sender: {{ sender }} ({{ email }}) | ||
|
||
{{ message }} | ||
|
||
-- | ||
<%= verboseName %> contact form |
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