mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-23 11:51:05 -05:00
Updated get-started to render from markdown
This commit is contained in:
50
app/content/get-started.md
Normal file
50
app/content/get-started.md
Normal file
@@ -0,0 +1,50 @@
|
||||
<h1 class="font-body-2xl margin-bottom-3">Get started</h1>
|
||||
|
||||
<ol class="usa-process-list">
|
||||
<li class="usa-process-list__item padding-bottom-4 margin-top-2">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Check if Notify.gov is right for you</h2>
|
||||
<p>Read about our <a class="usa-link" href="{{ url_for('main.features') }}">features</a>, <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a> and <a class="usa-link" href="{{ url_for('main.roadmap') }}">roadmap</a>.</p>
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Create an account</h2>
|
||||
{% if not current_user.is_authenticated %}
|
||||
<p><a class="usa-link" href="{{ url_for('.register') }}">Create an account</a> for free and add your first Notify service. When you add a new service it will start in <a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
|
||||
{% else %}
|
||||
<p>Create an account for free and add your first Notify service. When you add a new service, it will start in <a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Write some messages</h2>
|
||||
<p>Add message templates with examples of the content you plan to send. You can use our <a class="usa-link" href="{{ url_for('main.guidance_index') }}">guidance</a> to help you.</p>
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Set up your service</h2>
|
||||
{% if not current_user.is_authenticated or not current_service %}
|
||||
<p>Review your settings to add message branding and sender information.</p>
|
||||
<p>Add team members and check their permissions.</p>
|
||||
{% else %}
|
||||
<p>Review your <a class="usa-link" href="{{ url_for('.service_settings', service_id=current_service.id) }}">settings</a> to add message branding and sender information.</p>
|
||||
<p>Add <a class="usa-link" href="{{ url_for('.manage_users', service_id=current_service.id) }}">team members</a> and check their permissions.</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<!-- <li class="get-started-list__item">
|
||||
<h2 class="usa-process-list__heading line-height-sans-1">Set up an API integration (optional)</h2>
|
||||
<p>You can use the Notify API to send messages automatically.</p>
|
||||
<p>Our <a class="usa-link" href="{{ url_for('main.documentation') }}">documentation</a> explains how to integrate the API with a web application or back office system.</p>
|
||||
</li> -->
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Start sending messages</h2>
|
||||
{% if not current_user.is_authenticated or not current_service %}
|
||||
<p>When you’re ready to send messages to people outside your team, go to the <b class="bold">Settings</b> page and select <b class="bold">Request to go live</b>. We’ll approve your request within one working day.</p>
|
||||
{% else %}
|
||||
<p>You should <a class="usa-link" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a> when you’re ready to send messages to people outside your team. We’ll approve your request within one working day.</p>
|
||||
{% endif %}
|
||||
<!-- <p>Check <a class="usa-link" href="{{ url_for('main.how_to_pay') }}">how to pay</a> if you’re planning to exceed the <a class="usa-link" href="{{ url_for('.pricing', _anchor='text-messages') }}">free text message allowance</a>.</p> -->
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
@@ -4,12 +4,17 @@ from flask import (
|
||||
make_response,
|
||||
redirect,
|
||||
render_template,
|
||||
render_template_string,
|
||||
request,
|
||||
url_for,
|
||||
url_for
|
||||
)
|
||||
from flask_login import current_user
|
||||
from flask.helpers import get_root_path
|
||||
from notifications_utils.template import HTMLEmailTemplate
|
||||
|
||||
import markdown
|
||||
import os
|
||||
|
||||
from app import email_branding_client, status_api_client
|
||||
from app.main import main
|
||||
from app.main.forms import FieldWithNoneOption
|
||||
@@ -17,6 +22,19 @@ from app.main.views.pricing import CURRENT_SMS_RATE
|
||||
from app.main.views.sub_navigation_dictionaries import features_nav, using_notify_nav
|
||||
from app.utils.user import user_is_logged_in
|
||||
|
||||
#Should find a better home
|
||||
def get_md(mdf):
|
||||
APP_ROOT = get_root_path('notifications-admin')
|
||||
file = 'app/content/' + mdf + '.md'
|
||||
md_file = os.path.join(APP_ROOT, file)
|
||||
with open(md_file) as f:
|
||||
content_text = f.read()
|
||||
|
||||
md_render = markdown.markdown(content_text)
|
||||
jn_render = render_template_string(md_render)
|
||||
|
||||
return jn_render
|
||||
|
||||
|
||||
@main.route("/")
|
||||
def index():
|
||||
@@ -256,7 +274,7 @@ def get_started_old():
|
||||
def get_started():
|
||||
return render_template(
|
||||
"views/get-started.html",
|
||||
navigation_links=using_notify_nav(),
|
||||
navigation_links=using_notify_nav(), content=get_md('get-started')
|
||||
)
|
||||
|
||||
|
||||
@@ -324,6 +342,7 @@ def send_files_by_email():
|
||||
)
|
||||
|
||||
|
||||
|
||||
# --- Redirects --- #
|
||||
|
||||
|
||||
|
||||
@@ -9,55 +9,6 @@
|
||||
|
||||
{% block content_column_content %}
|
||||
|
||||
<h1 class="font-body-2xl margin-bottom-3">Get started</h1>
|
||||
|
||||
<ol class="usa-process-list">
|
||||
<li class="usa-process-list__item padding-bottom-4 margin-top-2">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Check if Notify.gov is right for you</h2>
|
||||
<p>Read about our <a class="usa-link" href="{{ url_for('main.features') }}">features</a>, <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a> and <a class="usa-link" href="{{ url_for('main.roadmap') }}">roadmap</a>.</p>
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Create an account</h2>
|
||||
{% if not current_user.is_authenticated %}
|
||||
<p><a class="usa-link" href="{{ url_for('.register') }}">Create an account</a> for free and add your first Notify service. When you add a new service it will start in <a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
|
||||
{% else %}
|
||||
<p>Create an account for free and add your first Notify service. When you add a new service, it will start in <a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Write some messages</h2>
|
||||
<p>Add message templates with examples of the content you plan to send. You can use our <a class="usa-link" href="{{ url_for('main.guidance_index') }}">guidance</a> to help you.</p>
|
||||
</li>
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Set up your service</h2>
|
||||
{% if not current_user.is_authenticated or not current_service %}
|
||||
<p>Review your settings to add message branding and sender information.</p>
|
||||
<p>Add team members and check their permissions.</p>
|
||||
{% else %}
|
||||
<p>Review your <a class="usa-link" href="{{ url_for('.service_settings', service_id=current_service.id) }}">settings</a> to add message branding and sender information.</p>
|
||||
<p>Add <a class="usa-link" href="{{ url_for('.manage_users', service_id=current_service.id) }}">team members</a> and check their permissions.</p>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<!-- <li class="get-started-list__item">
|
||||
<h2 class="usa-process-list__heading line-height-sans-1">Set up an API integration (optional)</h2>
|
||||
<p>You can use the Notify API to send messages automatically.</p>
|
||||
<p>Our <a class="usa-link" href="{{ url_for('main.documentation') }}">documentation</a> explains how to integrate the API with a web application or back office system.</p>
|
||||
</li> -->
|
||||
|
||||
<li class="usa-process-list__item padding-bottom-4">
|
||||
<h2 class="usa-process-list__heading line-height-sans-3">Start sending messages</h2>
|
||||
{% if not current_user.is_authenticated or not current_service %}
|
||||
<p>When you’re ready to send messages to people outside your team, go to the <b class="bold">Settings</b> page and select <b class="bold">Request to go live</b>. We’ll approve your request within one working day.</p>
|
||||
{% else %}
|
||||
<p>You should <a class="usa-link" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a> when you’re ready to send messages to people outside your team. We’ll approve your request within one working day.</p>
|
||||
{% endif %}
|
||||
<!-- <p>Check <a class="usa-link" href="{{ url_for('main.how_to_pay') }}">how to pay</a> if you’re planning to exceed the <a class="usa-link" href="{{ url_for('.pricing', _anchor='text-messages') }}">free text message allowance</a>.</p> -->
|
||||
</li>
|
||||
|
||||
</ol>
|
||||
{{ content | safe }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user