-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from django-daiquiri/webpack
Webpack
- Loading branch information
Showing
43 changed files
with
7,597 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
module.exports = { | ||
'root': true, | ||
'globals': { | ||
'gettext': true, | ||
'ngettext': true, | ||
'interpolate': true, | ||
'process': true, | ||
'require': true | ||
}, | ||
'env': { | ||
'browser': true, | ||
'es2021': true, | ||
'node': true | ||
}, | ||
'extends': [ | ||
'eslint:recommended', | ||
'plugin:react/recommended' | ||
], | ||
'overrides': [], | ||
'parserOptions': { | ||
'ecmaVersion': 'latest', | ||
'sourceType': 'module' | ||
}, | ||
'plugins': [ | ||
'react' | ||
], | ||
'ignorePatterns': ['**/static/**/*.js'], | ||
'rules': { | ||
'indent': 'off', | ||
'no-empty-pattern': 'off', | ||
'linebreak-style': [ | ||
'error', | ||
'unix' | ||
], | ||
'quotes': [ | ||
'error', | ||
'single' | ||
], | ||
'semi': [ | ||
'error', | ||
'never' | ||
] | ||
}, | ||
'settings': { | ||
'react': { | ||
'version': 'detect' | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ __pycache__/ | |
/htmlcov | ||
/env | ||
/venv | ||
/node_modules | ||
|
||
build | ||
dist | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v21 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
|
||
import App from './users/App' | ||
|
||
createRoot( | ||
document.getElementById('app') | ||
).render(<App />) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const App = () => { | ||
return <span>👍</span> | ||
} | ||
|
||
export default App |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends 'core/new/wide.html' %} | ||
{% load static %} | ||
|
||
{% block js %} | ||
{{ block.super }} | ||
<script src="{% static 'auth/dist/js/users.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
{% block wide %} | ||
|
||
<h1>User management</h1> | ||
|
||
<div id="app" class="users"></div> | ||
|
||
{% 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
|
||
import App from './messages/App' | ||
|
||
createRoot( | ||
document.getElementById('app') | ||
).render(<App />) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const App = () => { | ||
return <span>👍</span> | ||
} | ||
|
||
export default App |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% extends 'core/new/wide.html' %} | ||
{% load static %} | ||
|
||
{% block js %} | ||
{{ block.super }} | ||
<script src="{% static 'contact/dist/js/messages.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
{% block wide %} | ||
|
||
<h1>Contact messages</h1> | ||
|
||
<div id="app" class="messages"></div> | ||
|
||
{% 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import 'bootstrap' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// take the baseurl from the <head> of the django template | ||
export default document.querySelector('meta[name="baseurl"]').content.replace(/\/+$/, '') |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@import '~bootstrap/scss/bootstrap'; | ||
|
||
@import 'layout'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
h1 { | ||
margin-top: 20px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{% load static %}<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
|
||
{% include 'core/new/base_head.html' %} | ||
|
||
{% block css %} | ||
<link rel="stylesheet" href="{% static 'core/dist/css/base.css' %}" /> | ||
{% endblock %} | ||
|
||
{% block js %} | ||
<script src="{% static 'core/dist/js/base.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
{% include 'core/new/base_navigation.html' %} | ||
|
||
{% block content %}{% endblock %} | ||
|
||
{% include 'core/new/base_footer.html' %} | ||
|
||
{% if not debug %}{% include 'core/base_analytics.html' %}{% endif %} | ||
</body> | ||
|
||
</html> |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% load static %} | ||
|
||
<title>{{ request.site.name }}</title> | ||
|
||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | ||
|
||
<meta property="og:title" content="{{ request.site.name }}" /> | ||
<meta property="og:url" content="{{ request.site.domain }}" /> | ||
|
||
<meta name='baseurl' content="{% url 'home' %}" /> | ||
<meta name='staticurl' content="{% static '' %}" /> | ||
|
||
<link rel="shortcut icon" href="{% static 'core/img/favicon.png' %}" type="image/png" /> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<div class="container-fluid"> | ||
<a class="navbar-brand" href="{% url 'home' %}">{{ request.site.name }}</a> | ||
<button | ||
class="navbar-toggler" type="button" | ||
data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" | ||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="collapse navbar-collapse" id="navbar-collapse"> | ||
<ul class="navbar-nav me-auto mb-2 mb-lg-0"> | ||
<li class="nav-item"> | ||
|
||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends 'core/new/base.html' %} | ||
{% block content %} | ||
|
||
<main class="container"> | ||
<section class="wide"> | ||
{% block wide %}{% endblock %} | ||
</section> | ||
</main> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
|
||
import App from './examples/App' | ||
|
||
createRoot( | ||
document.getElementById('app') | ||
).render(<App />) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const App = () => { | ||
return <span>👍</span> | ||
} | ||
|
||
export default App |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
|
||
import App from './jobs/App' | ||
|
||
createRoot( | ||
document.getElementById('app') | ||
).render(<App />) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const App = () => { | ||
return <span>👍</span> | ||
} | ||
|
||
export default App |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react' | ||
import { createRoot } from 'react-dom/client' | ||
|
||
import App from './query/App' | ||
|
||
createRoot( | ||
document.getElementById('app') | ||
).render(<App />) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react' | ||
|
||
const App = () => { | ||
return <span>👍</span> | ||
} | ||
|
||
export default App |
Empty file.
Empty file.
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'core/new/wide.html' %} | ||
{% load static %} | ||
|
||
{% block css %} | ||
{{ block.super }} | ||
<link rel="stylesheet" href="{% static 'query/dist/css/examples.css' %}" /> | ||
{% endblock %} | ||
|
||
{% block js %} | ||
{{ block.super }} | ||
<script src="{% static 'query/dist/js/examples.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
{% block wide %} | ||
|
||
<h1>Example queries</h1> | ||
|
||
<div id="app" class="examples"></div> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'core/new/wide.html' %} | ||
{% load static %} | ||
|
||
{% block css %} | ||
{{ block.super }} | ||
<link rel="stylesheet" href="{% static 'query/dist/css/jobs.css' %}" /> | ||
{% endblock %} | ||
|
||
{% block js %} | ||
{{ block.super }} | ||
<script src="{% static 'query/dist/js/jobs.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
{% block wide %} | ||
|
||
<h1>Query jobs</h1> | ||
|
||
<div id="app" class="jobs"></div> | ||
|
||
{% 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'core/new/wide.html' %} | ||
{% load static %} | ||
|
||
{% block css %} | ||
{{ block.super }} | ||
<link rel="stylesheet" href="{% static 'query/dist/css/query.css' %}" /> | ||
{% endblock %} | ||
|
||
{% block js %} | ||
{{ block.super }} | ||
<script src="{% static 'query/dist/js/query.js' %}" defer></script> | ||
{% endblock %} | ||
|
||
{% block wide %} | ||
|
||
<h1>Query interface</h1> | ||
|
||
<div id="app" class="query"></div> | ||
|
||
{% endblock %} |
Oops, something went wrong.