aboutsummaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
Diffstat (limited to 'src/web')
-rw-r--r--src/web/js/components/MainApp.react.js2
-rw-r--r--src/web/static/css/customized-bootstrap.css6
-rw-r--r--src/web/static/css/one-page-app.css2
-rw-r--r--src/web/templates/home.html27
-rw-r--r--src/web/templates/layout.html53
5 files changed, 44 insertions, 46 deletions
diff --git a/src/web/js/components/MainApp.react.js b/src/web/js/components/MainApp.react.js
index ffb14589..6e695b49 100644
--- a/src/web/js/components/MainApp.react.js
+++ b/src/web/js/components/MainApp.react.js
@@ -2,7 +2,6 @@ var React = require('react');
var Col = require('react-bootstrap/lib/Col');
var Grid = require('react-bootstrap/lib/Grid');
-var JarrNavBar = require('./Navbar.react');
var Menu = require('./Menu.react');
var MiddlePanel = require('./MiddlePanel.react');
var RightPanel = require('./RightPanel.react');
@@ -11,7 +10,6 @@ var RightPanel = require('./RightPanel.react');
var MainApp = React.createClass({
render: function() {
return (<div>
- <JarrNavBar />
<Grid fluid id="jarr-container">
<Menu />
<Col id="middle-panel" mdOffset={3} lgOffset={2}
diff --git a/src/web/static/css/customized-bootstrap.css b/src/web/static/css/customized-bootstrap.css
index ad90304d..c58e0692 100644
--- a/src/web/static/css/customized-bootstrap.css
+++ b/src/web/static/css/customized-bootstrap.css
@@ -42,3 +42,9 @@ a {
width: 200px;
display: inline;
}
+
+.alert-message {
+ position: relative;
+ display: block;
+ z-index: 1001;
+}
diff --git a/src/web/static/css/one-page-app.css b/src/web/static/css/one-page-app.css
index ffad209e..db666236 100644
--- a/src/web/static/css/one-page-app.css
+++ b/src/web/static/css/one-page-app.css
@@ -124,7 +124,7 @@
right: 4px;
}
#right-panel {
- top: 50px;
+ top: 0px;
}
#rp-breadcrum{
margin-top: 10px;
diff --git a/src/web/templates/home.html b/src/web/templates/home.html
index 155742c5..64e8140d 100644
--- a/src/web/templates/home.html
+++ b/src/web/templates/home.html
@@ -1,22 +1,9 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- {% block head %}
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="description" content="JARR is a web-based news aggregator." />
- <meta name="author" content="" />
- <title>JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %}</title>
- <link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.ico") }}" />
- <!-- Add custom CSS here -->
- <link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" />
+{% extends "layout.html" %}
+{% block head %}
+ {{ super() }}
<link href="{{ url_for("static", filename="css/one-page-app.css") }}" rel="stylesheet" media="screen" />
- <!-- Bootstrap core CSS -->
- <link href="{{ url_for("static", filename="css/bootstrap.min.css") }}" rel="stylesheet" media="screen" />
- {% endblock %}
- </head>
- <body>
+{% endblock %}
+{% block content %}
<section id="jarrapp" />
- </body>
- <script type="text/javascript" src="{% if cdn != '' %}{{ cdn }}bundle.min.js{% else %}{{ url_for('static', filename = 'js/bundle.min.js') }}{% endif %}"></script>
-</html>
+ <script type="text/javascript" src="{% if cdn != '' %}{{ cdn }}bundle.min.js{% else %}{{ url_for('static', filename = 'js/bundle.min.js') }}{% endif %}"></script>
+{% endblock %}
diff --git a/src/web/templates/layout.html b/src/web/templates/layout.html
index 50f96e8f..d863513f 100644
--- a/src/web/templates/layout.html
+++ b/src/web/templates/layout.html
@@ -9,12 +9,16 @@
<title>JARR{% if head_titles %} - {{ ' - '.join(head_titles) }}{% endif %}</title>
<link rel="shortcut icon" href="{{ url_for("static", filename="img/favicon.ico") }}" />
<!-- Bootstrap core CSS -->
- <link href="{{ url_for("static", filename="css/bootstrap.min.css") }}" rel="stylesheet" media="screen" />
+
<!-- Add custom CSS here -->
+ <link href="{{ url_for("static", filename="css/bootstrap.min.css") }}" rel="stylesheet" media="screen" />
<link href="{{ url_for("static", filename="css/customized-bootstrap.css") }}" rel="stylesheet" media="screen" />
+
+
{% endblock %}
</head>
<body>
+ {% block menu %}
<nav id="jarrnav" class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
@@ -36,16 +40,35 @@
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav navbar-right">
{% if current_user.is_authenticated %}
- <!-- <li><a href="{{ url_for("feed.form") }}"><span class="glyphicon glyphicon-plus-sign"></span> {{ _('Add a feed') }}</a></li> -->
+ {% if conf.CRAWLING_METHOD == "classic" and (not conf.ON_HEROKU or current_user.is_admin) %}
+ <li><a href="/fetch"><span class="glyphicon glyphicon-import"></span> {{ _('Fetch') }}</a></li>
+ {% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
- <div><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;{{ _('Add a feed') }}</div>
+ <div><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;{{ _('Add a new feed') }}</div>
</a>
<ul class="dropdown-menu">
<li>
<form action="{{ url_for('feed.bookmarklet') }}" class="navbar-form navbar-left" method="GET" name="save">
<div class="input-group input-group-inline">
- <input class="form-control" name="url" type="url" placeholder="{{_("site or feed url")}}" required="required"/>
+ <input class="form-control" name="url" type="url" placeholder="{{_("Site or feed url")}}" required="required"/>
+ <span class="input-group-btn">
+ <button type="submit" class="btn btn-default" /><span class="glyphicon glyphicon-plus"></span></button>
+ </span>
+ </div><!-- /input-group -->
+ </form>
+ </li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ <div><span class="glyphicon glyphicon-plus-sign"></span>&nbsp;{{ _('Add a new category') }}</div>
+ </a>
+ <ul class="dropdown-menu">
+ <li>
+ <form action="/category/create" class="navbar-form navbar-left" method="POST" name="category">
+ <div class="input-group input-group-inline">
+ <input class="form-control" name="name" type="text" placeholder="{{_("Category name")}}" required="required"/>
<span class="input-group-btn">
<button type="submit" class="btn btn-default" /><span class="glyphicon glyphicon-plus"></span></button>
</span>
@@ -54,9 +77,6 @@
</li>
</ul>
</li>
- {% if conf.CRAWLING_METHOD == "classic" and (not conf.ON_HEROKU or current_user.is_admin) %}
- <li><a href="/fetch"><span class="glyphicon glyphicon-import"></span> {{ _('Fetch') }}</a></li>
- {% endif %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ _('Feed') }} <b class="caret"></b></a>
<ul class="dropdown-menu">
@@ -71,6 +91,7 @@
</a>
<ul class="dropdown-menu">
<li><a href="{{ url_for("user.profile") }}"><span class="glyphicon glyphicon-user"></span> {{ _('Profile') }}</a></li>
+ <li><a href="{{ url_for("user.management") }}"><span class="glyphicon glyphicon-user"></span> {{ _('Your data') }}</a></li>
<li><a href="{{ url_for("about") }}"><span class="glyphicon glyphicon-question-sign"></span> {{ _('About') }}</a></li>
{% if current_user.is_admin %}
<li role="presentation" class="divider"></li>
@@ -87,9 +108,10 @@
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
+ {% endblock %}
<br />
- <div class="container not-at-home">
+ <div class="container alert-message not-at-home">
{% block messages %}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
@@ -112,20 +134,5 @@
<script type="text/javascript" src="{{ url_for('static', filename = 'js/bootstrap.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/articles.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename = 'js/feed.js') }}"></script>
- <script type="text/javascript" class="source">
- var filter_ = {% if filter_ %}"{{ filter_ }}"{% else %}undefined{% endif %};
- if (filter_ == undefined) {
- if (window.location.href.indexOf("filter_=all") > -1){
- filter_ = 'all';
- }
- else if (window.location.href.indexOf("filter_=unread") > -1) {
- filter_ = 'unread';
- }
- else if (window.location.href.indexOf("filter_=read") > -1) {
- filter_ = 'read';
- }
- }
- $("#tab-" + filter_).attr('class', "active");
- </script>
</body>
</html>
bgstack15