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.min.js" (render "resources/public/vendor/js/react.min.js" 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/notfound.html" (render "resources/views/notfound.html" 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="X-UA-Compatible" content="IE=edge">
|
||||
<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('/css/screen.css') }}
|
||||
|
@ -20,15 +20,8 @@
|
|||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
||||
{% 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 %}
|
||||
{% block head_scripts %}{% endblock %}
|
||||
|
||||
<script type="text/javascript">
|
||||
var context = '{{ path('/') }}';
|
||||
|
@ -37,14 +30,9 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<div id="app" class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
{{ javascript('/cljs/main.js') }}
|
||||
{% if isDev %}
|
||||
<script type="text/javascript">goog.require('<%sanitized%>.client.main');</script>
|
||||
{% endif %}
|
||||
{% block body_scripts %}{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,33 +1,10 @@
|
|||
{{=<% %>=}}
|
||||
<!DOCTYPE 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>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
||||
{{ stylesheet('/css/screen.css') }}
|
||||
{% block title %}Error :: {% endblock %}
|
||||
|
||||
<!--[if lt IE 9]> {{ javascript('/vendor/js/jquery-1.11.1.min.js') }} <![endif]-->
|
||||
<!--[if gte IE 9]> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <![endif]-->
|
||||
<!--[if !IE]> --> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <!-- <![endif]-->
|
||||
{{ javascript('/vendor/js/es5-shim.min.js') }}
|
||||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
||||
|
||||
<script type="text/javascript">
|
||||
var context = '{{ path('/') }}';
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="error-message" class="container">
|
||||
{% block content %}
|
||||
<div id="error-message" class="container">
|
||||
<div class="page-header">
|
||||
<h2>Server Error</h2>
|
||||
</div>
|
||||
|
@ -39,7 +16,5 @@
|
|||
<pre>{{ stacktrace }}</pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
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>
|
||||
<!--[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>
|
||||
{% extends "base.html" %}
|
||||
|
||||
{{ stylesheet('/vendor/css/bootstrap.min.css') }}
|
||||
{{ stylesheet('/css/screen.css') }}
|
||||
{% block title %}Not Found :: {% endblock %}
|
||||
|
||||
<!--[if lt IE 9]> {{ javascript('/vendor/js/jquery-1.11.1.min.js') }} <![endif]-->
|
||||
<!--[if gte IE 9]> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <![endif]-->
|
||||
<!--[if !IE]> --> {{ javascript('/vendor/js/jquery-2.1.1.min.js') }} <!-- <![endif]-->
|
||||
{{ javascript('/vendor/js/es5-shim.min.js') }}
|
||||
{{ javascript('/vendor/js/es5-sham.min.js') }}
|
||||
<!--[if lt IE 9]>{{ javascript('/vendor/js/html5shiv.min.js') }}<![endif]-->
|
||||
{{ javascript('/vendor/js/bootstrap.min.js') }}
|
||||
|
||||
<script type="text/javascript">
|
||||
var context = '{{ path('/') }}';
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="error-message" class="container">
|
||||
{% block content %}
|
||||
<div id="error-message" class="container">
|
||||
<div class="page-header">
|
||||
<h2>Not Found</h2>
|
||||
</div>
|
||||
|
||||
<p class="lead">The page or resource you requested could not be found.</p>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
(defroutes
|
||||
main-public-routes
|
||||
(GET "/" [] (views/render "base.html")))
|
||||
(GET "/" [] (views/render "index.html")))
|
||||
|
||||
(defroutes api-routes
|
||||
(context "/api" []
|
||||
|
|
Reference in a new issue