have all webapp html templates extend from base.html
This commit is contained in:
parent
1d8f5fa877
commit
3387a42dd2
|
@ -46,6 +46,7 @@
|
||||||
["resources/public/vendor/js/react.js" (render "resources/public/vendor/js/react.js" data)]
|
["resources/public/vendor/js/react.js" (render "resources/public/vendor/js/react.js" data)]
|
||||||
["resources/public/vendor/js/react.min.js" (render "resources/public/vendor/js/react.min.js" data)]
|
["resources/public/vendor/js/react.min.js" (render "resources/public/vendor/js/react.min.js" data)]
|
||||||
["resources/views/base.html" (render "resources/views/base.html" data)]
|
["resources/views/base.html" (render "resources/views/base.html" data)]
|
||||||
|
["resources/views/index.html" (render "resources/views/index.html" data)]
|
||||||
["resources/views/error.html" (render "resources/views/error.html" data)]
|
["resources/views/error.html" (render "resources/views/error.html" data)]
|
||||||
["resources/views/notfound.html" (render "resources/views/notfound.html" data)]
|
["resources/views/notfound.html" (render "resources/views/notfound.html" data)]
|
||||||
["src-cljs/{{path}}/client/main.cljs" (render "src-cljs/root_ns/client/main.cljs" data)]
|
["src-cljs/{{path}}/client/main.cljs" (render "src-cljs/root_ns/client/main.cljs" data)]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title><%name%></title>
|
<title>{% block title %}{% endblock %}<%name%></title>
|
||||||
|
|
||||||
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
||||||
{{ stylesheet('/css/screen.css') }}
|
{{ stylesheet('/css/screen.css') }}
|
||||||
|
@ -20,15 +20,8 @@
|
||||||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
||||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
||||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
||||||
{% if isDev %}
|
|
||||||
{{ javascript('/vendor/js/react.js') }}
|
|
||||||
{% else %}
|
|
||||||
{{ javascript('/vendor/js/react.min.js') }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if isDev %}
|
{% block head_scripts %}{% endblock %}
|
||||||
<script type="text/javascript" src="{{ path('/cljs/target/goog/base.js') }}"></script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var context = '{{ path('/') }}';
|
var context = '{{ path('/') }}';
|
||||||
|
@ -37,14 +30,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="app" class="container">
|
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ javascript('/cljs/main.js') }}
|
{% block body_scripts %}{% endblock %}
|
||||||
{% if isDev %}
|
|
||||||
<script type="text/javascript">goog.require('<%sanitized%>.client.main');</script>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,45 +1,20 @@
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
<!DOCTYPE html>
|
{% extends "base.html" %}
|
||||||
<!--[if lt IE 9]> <html class="old-ie no-ws" lang="en"> <![endif]-->
|
|
||||||
<!--[if lt IE 10]> <html class="no-ws" lang="en"> <![endif]-->
|
|
||||||
<!--[if gte IE 10]> <html lang="en"> <![endif]-->
|
|
||||||
<!--[if !IE]> --> <html lang="en"> <!-- <![endif]-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Error :: <%name%></title>
|
|
||||||
|
|
||||||
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
{% block title %}Error :: {% endblock %}
|
||||||
{{ stylesheet('/css/screen.css') }}
|
|
||||||
|
|
||||||
<!--[if lt IE 9]> {{ javascript('/vendor/js/jquery-1.11.1.min.js') }} <![endif]-->
|
{% block content %}
|
||||||
<!--[if gte IE 9]> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <![endif]-->
|
<div id="error-message" class="container">
|
||||||
<!--[if !IE]> --> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <!-- <![endif]-->
|
<div class="page-header">
|
||||||
{{ javascript('/vendor/js/es5-shim.min.js') }}
|
<h2>Server Error</h2>
|
||||||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
</div>
|
||||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
|
||||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<p class="lead">Your request could not be processed due to a server error.</p>
|
||||||
var context = '{{ path('/') }}';
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="error-message" class="container">
|
{% if stacktrace %}
|
||||||
<div class="page-header">
|
|
||||||
<h2>Server Error</h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="lead">Your request could not be processed due to a server error.</p>
|
|
||||||
|
|
||||||
{% if stacktrace %}
|
|
||||||
<div>
|
<div>
|
||||||
<pre>{{ stacktrace }}</pre>
|
<pre>{{ stacktrace }}</pre>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %}
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
25
src/leiningen/new/yawt/resources/views/index.html
Normal file
25
src/leiningen/new/yawt/resources/views/index.html
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{{=<% %>=}}
|
||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block head_scripts %}
|
||||||
|
{% if isDev %}
|
||||||
|
{{ javascript('/vendor/js/react.js') }}
|
||||||
|
{% else %}
|
||||||
|
{{ javascript('/vendor/js/react.min.js') }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if isDev %}
|
||||||
|
<script type="text/javascript" src="{{ path('/cljs/target/goog/base.js') }}"></script>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body_scripts %}
|
||||||
|
{{ javascript('/cljs/main.js') }}
|
||||||
|
{% if isDev %}
|
||||||
|
<script type="text/javascript">goog.require('<%sanitized%>.client.main');</script>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div id="app" class="container"></div>
|
||||||
|
{% endblock %}
|
|
@ -1,39 +1,14 @@
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
<!DOCTYPE html>
|
{% extends "base.html" %}
|
||||||
<!--[if lt IE 9]> <html class="old-ie no-ws" lang="en"> <![endif]-->
|
|
||||||
<!--[if lt IE 10]> <html class="no-ws" lang="en"> <![endif]-->
|
|
||||||
<!--[if gte IE 10]> <html lang="en"> <![endif]-->
|
|
||||||
<!--[if !IE]> --> <html lang="en"> <!-- <![endif]-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>Not Found :: <%name%></title>
|
|
||||||
|
|
||||||
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
{% block title %}Not Found :: {% endblock %}
|
||||||
{{ stylesheet('/css/screen.css') }}
|
|
||||||
|
|
||||||
<!--[if lt IE 9]> {{ javascript('/vendor/js/jquery-1.11.1.min.js') }} <![endif]-->
|
{% block content %}
|
||||||
<!--[if gte IE 9]> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <![endif]-->
|
<div id="error-message" class="container">
|
||||||
<!--[if !IE]> --> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <!-- <![endif]-->
|
<div class="page-header">
|
||||||
{{ javascript('/vendor/js/es5-shim.min.js') }}
|
<h2>Not Found</h2>
|
||||||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
</div>
|
||||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
|
||||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<p class="lead">The page or resource you requested could not be found.</p>
|
||||||
var context = '{{ path('/') }}';
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div id="error-message" class="container">
|
|
||||||
<div class="page-header">
|
|
||||||
<h2>Not Found</h2>
|
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %}
|
||||||
<p class="lead">The page or resource you requested could not be found.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
(defroutes
|
(defroutes
|
||||||
main-public-routes
|
main-public-routes
|
||||||
(GET "/" [] (views/render "base.html")))
|
(GET "/" [] (views/render "index.html")))
|
||||||
|
|
||||||
(defroutes api-routes
|
(defroutes api-routes
|
||||||
(context "/api" []
|
(context "/api" []
|
||||||
|
|
Reference in a new issue