Last active
June 24, 2021 00:59
-
-
Save craigderington/159ea15a0093da0b567043870deddede to your computer and use it in GitHub Desktop.
Flask layout.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
{% extends "layout.html" %} | |
{% block title %} | |
Reddit Reader | Public Timeline | |
{% endblock %} | |
{% block body %} | |
<h2><i class="fa fa-reddit-square"></i> Recent Reddits | |
<a style="margin-left:5px;" href="#menu-toggle" class="btn btn-default" id="menu-toggle"><i class="fa fa-toggle-left"></i> Toggle Menu</a> | |
<span class="pull-right" style="font-size:14px;"><i class="fa fa-check-circle"></i> Currently Showing {{ news_stories.count() }} reddits</span> | |
</h2> | |
{% for item in news_stories %} | |
<div class="well" style="padding:10px;margin-bottom:5px;margin-top:10px;"> | |
<h4>{{ item.title }} ></h4> | |
<h5>subreddit:/r/{{ item.subreddit }} <span style="margin-left:10px;">domain: {{ item.domain }}</span> | |
<span class="pull-right"> | |
<a href="{{ url_for('reddit_delete', reddit_id=item._id) }}" onclick="return confirm('Are you sure you want to delete this story?');"> | |
<i class="fa fa-times-circle fa-3x"></i> | |
</a> | |
</span> | |
</h5> | |
<h6><small>{{ item.created.strftime('%m-%d-%Y @ %H:%M:%S') }}</small></h6> | |
<a href="{{ item.link }}" target="_blank">{{ item.link }}</a> | |
</div> | |
{% endfor %} | |
{% endblock %} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, shrink-to-fit=no, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title>{% block title %}Welcome Reader{% endblock %} | Reddit Reader</title> | |
<!-- Bootstrap Core CSS --> | |
<link href="static/css/bootstrap.min.css" rel="stylesheet"> | |
<!-- Custom CSS --> | |
<link href="static/css/simple-sidebar.css" rel="stylesheet"> | |
<!--- FontAwesome --> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"> | |
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> | |
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> | |
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<!-- Sidebar --> | |
<div id="sidebar-wrapper"> | |
<ul class="sidebar-nav"> | |
<li class="sidebar-brand"> | |
<a href="{{ url_for('reddit') }}"> | |
<i class="fa fa-reddit"></i> Reddit Reader | |
</a> | |
</li> | |
<li> | |
<a href="{{ url_for('reddit') }}"> | |
<i class="fa fa-simplybuilt"></i> My Reddit | |
</a> | |
</li> | |
<li> | |
<a href="{{ url_for('reddit_new') }}"> | |
<i class="fa fa-refresh"></i> Refresh | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<i class="fa fa-check"></i> Subreddits | |
</a> | |
</li> | |
<li> | |
<a href="https://github.com/craigderington/reddit_reader" target="_blank"> | |
<i class="fa fa-github"></i> GitHub Source | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<i class="fa fa-question-circle"></i> About | |
</a> | |
</li> | |
<li> | |
<a href="#"> | |
<i class="fa fa-legal"></i> Legal | |
</a> | |
</li> | |
<li> | |
<a href="{{ url_for('login') }}"> | |
<i class="fa fa-lock"></i> Login | |
</a> | |
</li> | |
</ul> | |
</div> | |
<!-- /#sidebar-wrapper --> | |
<!-- Page Content --> | |
<div id="page-content-wrapper"> | |
<div class="container-fluid"> | |
{% with flashes = get_flashed_messages() %} | |
{% if flashes %} | |
<div class="row"> | |
{% for message in flashes %} | |
<div class="alert alert-success alert-dismissible" role="alert"> | |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
<strong><i class="fa fa-warning"></i> Notice</strong> {{ message }} | |
</div> | |
{% endfor %} | |
</div> | |
{% endif %} | |
{% endwith %} | |
<div class="row"> | |
{% block body %}{% endblock body %} | |
</div> | |
</div><!-- /#container-fluid --> | |
</div><!-- /#page-content-wrapper --> | |
<div class="footer" style="padding:20px;margin-top:35px;"> | |
<i class="fa fa-envira"></i> Powered By <a href="http://flask.pocoo.org" target="_blank">Flask</a> & <a href="https://www.mongodb.com" target="_blank">MongoDB</a> | |
<span class="pull-right"> | |
<i class="fa fa-th-list"></i> Created by <a href="#" target="_blank">Craig Derington</a> | |
</span> | |
</div> | |
</div> | |
<!-- /#wrapper --> | |
<!-- jQuery --> | |
<script src="static/js/jquery.js"></script> | |
<!-- Bootstrap Core JavaScript --> | |
<script src="static/js/bootstrap.min.js"></script> | |
<!-- Menu Toggle Script --> | |
<script> | |
$("#menu-toggle").click(function(e) { | |
e.preventDefault(); | |
$("#wrapper").toggleClass("toggled"); | |
}); | |
</script> | |
</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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<meta name="description" content=""> | |
<meta name="author" content="Craig Derington"> | |
<link rel="icon" href="favicon.ico"> | |
<title>Reddit Reader | Please Login</title> | |
<!-- Bootstrap core CSS --> | |
<link href="static/css/bootstrap.min.css" rel="stylesheet"> | |
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> | |
<link href="static/css/ie10-viewport-bug-workaround.css" rel="stylesheet"> | |
<!-- Custom styles for this template --> | |
<link href="static/css/signin.css" rel="stylesheet"> | |
<!--- FontAwesome --> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"> | |
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
<!--[if lt IE 9]> | |
<script src="//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> | |
<script src="//oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div class="container"> | |
<form class="form-signin"> | |
<h3><i class="fa fa-reddit"></i> Reddit Reader </h3> | |
<h4 class="form-signin-heading">Please sign in</h4> | |
<label for="inputEmail" class="sr-only">Email address</label> | |
<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus> | |
<label for="inputPassword" class="sr-only">Password</label> | |
<input type="password" id="inputPassword" class="form-control" placeholder="Password" required> | |
<div class="checkbox"> | |
<div align="center"> | |
<label> | |
<input type="checkbox" value="remember-me"> Remember me | |
</label> | |
</div> | |
</div> | |
<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button> | |
</form> | |
<div align="center"> | |
<a href="{{ url_for('reddit') }}" class="btn btn-sm btn-default"> | |
<i class="fa fa-arrow-circle-left"></i> Cancel | |
</a> | |
</div> | |
</div> <!-- /container --> | |
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> | |
<script src="static/js/ie10-viewport-bug-workaround.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment