Browse Source

combine css and js

pull/7/head
Pēteris Caune 9 years ago
parent
commit
2750729bc9
6 changed files with 25 additions and 7 deletions
  1. +2
    -1
      .gitignore
  2. +8
    -0
      hc/settings.py
  3. +1
    -0
      requirements.txt
  4. +4
    -3
      templates/base.html
  5. +5
    -2
      templates/front/my_checks.html
  6. +5
    -1
      templates/front/welcome.html

+ 2
- 1
.gitignore View File

@ -1,2 +1,3 @@
__pycache__/
local_settings.py
local_settings.py
static-collected

+ 8
- 0
hc/settings.py View File

@ -30,6 +30,7 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'compressor',
'djrill',
'hc.accounts',
@ -92,6 +93,13 @@ PING_ENDPOINT = SITE_ROOT + "/ping/"
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")]
STATIC_ROOT = os.path.join(BASE_DIR, 'static-collected')
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
COMPRESS_OFFLINE = True
EMAIL_BACKEND = "djrill.mail.backends.djrill.DjrillBackend"


+ 1
- 0
requirements.txt View File

@ -1,4 +1,5 @@
Django==1.8.2
django_compressor
psycopg2==2.6
djrill
pygments

+ 4
- 3
templates/base.html View File

@ -6,14 +6,17 @@
<meta name="description" content="Monitor and Get Notified When Your Cron Jobs Fail. Free alternative to Cronitor and Dead Man's Snitch.">
<meta name="keywords" content="monitor cron jobs daemon background worker service cronjob monitoring crontab alert notify cronitor deadmanssnitch">
{% load staticfiles %}
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>
{% load compress staticfiles %}
{% compress css %}
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'css/nouislider.min.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'css/nouislider.pips.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'css/style.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'css/pricing.css' %}" type="text/css">
<link rel="stylesheet" href="{% static 'css/syntax.css' %}" type="text/css">
{% endcompress %}
</head>
<body class="page-{{ page }}">
<nav class="navbar navbar-default">
@ -66,8 +69,6 @@
</div>
</footer>
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
{% block scripts %}{% endblock %}
</body>
</html>

+ 5
- 2
templates/front/my_checks.html View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load humanize staticfiles hc_extras %}
{% load compress humanize staticfiles hc_extras %}
{% block title %}My Checks - healthchecks.io{% endblock %}
@ -224,7 +224,10 @@
{% endblock %}
{% block scripts %}
<script src="{% static 'js/moment.min.js' %}"></script>
{% compress js %}
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/nouislider.min.js' %}"></script>
<script src="{% static 'js/checks.js' %}"></script>
{% endcompress %}
{% endblock %}

+ 5
- 1
templates/front/welcome.html View File

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load humanize staticfiles %}
{% load compress humanize staticfiles %}
{% block containers %}
<div class="index-bleed">
@ -126,5 +126,9 @@
{% endblock %}
{% block scripts %}
{% compress js %}
<script src="{% static 'js/jquery-2.1.4.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/index.js' %}"></script>
{% endcompress %}
{% endblock %}

Loading…
Cancel
Save