Skip to content
Permalink
Browse files

Update github guide page

  • Loading branch information...
nlaz committed Feb 13, 2019
1 parent 1cc4c8e commit 617a11ef6dccef7aa52a0804339576b85e773bf9
Showing with 12 additions and 12 deletions.
  1. +1 −1 app/app.py
  2. +2 −2 app/templates/500.html
  3. +6 −6 app/templates/github/guide.html
  4. +1 −1 app/templates/github/index.html
  5. +1 −1 app/views/github.py
  6. +1 −1 app/views/public.py
@@ -2,7 +2,7 @@

from flask import Flask, render_template
from . import settings, views, models
from extensions import db, markdown
from .extensions import db, markdown

project_dir = os.path.dirname(os.path.abspath(__file__))

@@ -2,8 +2,8 @@

{% block content %}
<div class='container py-5 my-5 text-muted text-center'>
<h1 class='h5'>This isn't the page you are looking for.</h1>
<p>We couldn't find this page. Please check your URL or go back home.<p>
<h1 class='h5'>Oops, Something went wrong.</h1>
<p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p>
<a href='/' class='btn btn-primary'>Go back home</a>
</div>
{% endblock %}
@@ -1,13 +1,13 @@
{% extends 'layout.html' %}

{% block header %}
<div class='bg-dark text-light py-5'>
<div class='container py-5 my-4'>
<h1 class='h1 text-white mb-1'>GitHub API Example</h1>
<h2 class='h6 text-secondary'>Simple example of fetching and managing GitHub data.</h2>
<a href="{{ url_for('public.user_guide', _anchor='github-oauth') }}" class='btn btn-primary mt-2'>Learn More</a>
<div class='bg-dark text-light py-5'>
<div class='container py-5 my-4'>
<h1 class='display-5 mb-1 text-white mb-1'>GitHub API Example</h1>
<h2 class='lead text-gray-light'>Example of fetching and managing GitHub data.</h2>
<a href="{{ url_for('public.user_guide', _anchor='github-oauth') }}" class='btn btn-primary mt-2'>Learn More</a>
</div>
</div>
</div>
{% endblock %}

{% block content %}
@@ -34,7 +34,7 @@ <h5 class="m-0">Starred Repos</h5>
<div class="d-flex justify-content-between">
<div class="d-flex flex-column">
{% if item['owner'] %}
<a href="{{ item['html_url'] }}">
<a class='text-blue' href="{{ item['html_url'] }}">
{{ item['owner']['login'] }} / <b>{{ item['name'] }}</b>
</a>
<small class="text-muted">
@@ -13,7 +13,7 @@ def index():
if not 'access_token' in session:
flash('This page needs an authenticated user. Please sign in with your GitHub account.', 'warning')
with open('docs/USER_GUIDE.md', 'r') as input_file:
text = input_file.read().decode('utf-8')
text = input_file.read().encode().decode('utf-8')
content = markdown.render(text)
return render_template('github/guide.html', body=content)

@@ -15,7 +15,7 @@ def index():
@blueprint.route('/user-guide')
def user_guide():
with open('docs/USER_GUIDE.md', 'r') as input_file:
text = input_file.read().decode('utf-8')
text = input_file.read().encode().decode('utf-8')
content = markdown.render(text)
return render_template('home/index.html', body=content)

0 comments on commit 617a11e

Please sign in to comment.
You can’t perform that action at this time.