Skip to content
Permalink
Browse files

Nuke Pug (#1468)

* adding base-compiled.html

* removing pug tasks

* removing pug bits

* pj bump

* readme update

* removing pug rule

* deprecated keyword

* wagtail
  • Loading branch information...
gvn committed Apr 27, 2018
1 parent ebbc190 commit 879cc765a65001e4322251f8a1fc9cd342fb7142
@@ -1,2 +1 @@
**/*.pug
analytics.js
@@ -4,7 +4,6 @@ TODO.txt
node_modules/
dest/
source/json/temp/
network-api/networkapi/templates/pages/base-compiled.html

# Byte-compiled / optimized / DLL files
__pycache__/

This file was deleted.

@@ -95,7 +95,7 @@ The `load_fake_data` command will output the following URLs every time:

### Running the project for front-end development

- At the root of the project you can run: `npm start`, which will start the server as well as watch tasks for recompiling changes to Pug, JS, and Sass files.
- At the root of the project you can run: `npm start`, which will start the server as well as watch tasks for recompiling changes to JS(X) and Sass files.

### Tests

@@ -110,11 +110,7 @@ You can run the tests using the following command

#### HTML

HTML for the majority of the site is generated from [Pug](https://pugjs.org) templates.

Some templates used by Mezzanine (at the time of writing: Opportunity, Campaign, and Fellowships pages) are written as Django templates but extend blocks from a common base template (`network-api/networkapi/templates/pages/base-compiled.html`) that is generated from Pug (see `source/pug/templates/base-for-django.pug`). This allows code sharing for the overall HTML "shell" of the site between Pug and Django templates as we migrate away from Pug.

Localized strings are pulled from [Java .properties](https://en.wikipedia.org/wiki/.properties) files located in `/locales`.
HTML for the majority of the site is generated from Django/Wagtail templates and components.

#### CSS

@@ -148,18 +144,17 @@ Django powers the backend of the site, and we use Mezzanine with Django to provi
│   └── components <- React components
├── json <- JSON for static data sets
│   └── temp <- JSON pulled from web services. Don't commit!
├── pug <- Pug templates
└── sass <- Sass code
```

---

## Development

This project is based on Mezzanine, which is itself based on Django, so the documentation for both projects applies.
If you're new to Django, Django official documentation provide a [tutorial](https://docs.djangoproject.com/en/2.0/intro/) and a handful of [topics](https://docs.djangoproject.com/en/2.0/topics/) and [how-to](https://docs.djangoproject.com/en/2.0/howto/) guides to help you get started. If you're completely new to programming, check
This project is based on [Wagtail](https://wagtail.io/), which is itself based on Django, so the documentation for both projects applies.
If you're new to Django, Django official documentation provide a [tutorial](https://docs.djangoproject.com/en/2.0/intro/) and a handful of [topics](https://docs.djangoproject.com/en/2.0/topics/) and [how-to](https://docs.djangoproject.com/en/2.0/howto/) guides to help you get started. If you're completely new to programming, check
[Django Girls](https://tutorial.djangogirls.org/en/) tutorial.

### Pipenv workflow

Checking [Pipenv documentation](https://docs.pipenv.org/) is highly recommended if you're new to it.
@@ -31,7 +31,6 @@
"NodeJS",
"CSS",
"Sass",
"Pug",
"ReactJS"
]
}
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>{% load settings_value %}
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">{% block socialMetadata %}{% endblock %}
<link rel="stylesheet" href="/_css/main.compiled.css">
<link rel="stylesheet" href="//code.cdn.mozilla.net/fonts/fira.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Nunito+Sans:400,600,300,700">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Zilla+Slab:300,400,600,700,300i">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400,700">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/_images/favicons/apple-touch-icon-180x180@2x.png">
<link rel="icon" type="image/png" sizes="196x196" href="/_images/favicons/favicon-196x196@2x.png">
<link rel="shortcut icon" href="/_images/favicons/favicon.ico">
<title>{% block pageTitle %}Mozilla Foundation - {{ page.meta_title }}{% endblock %}</title>
</head>
<body id="view-{% block bodyID %}{% endblock %}">
<div class="takeover"></div>
<div class="wrapper">
<div id="member-notice">{% if page.status == 1 %}<div><strong>Draft preview.</strong> You must save as Published to make it public.</div>{% endif %}
</div>
<div class="sticky-top">
<div class="wrapper-join-us">
<div class="container">
<div class="join-us" id="join-us"></div>
</div>
</div>{% if page.zen_nav == True %}<div id="primary-nav" data-nav-mode="zen"></div>{% else %}<div id="primary-nav"></div>{% endif %}
</div>
<div class="wrapper-2">
<div id="hero">
<div class="container">{% block heroGuts %}{% endblock %}
</div>
</div>
</div>{% block content %}{% endblock %}
<footer class="mofo-footer">
<div class="container">
<ul class="list-unstyled footer-links row justify-content-center">
<li class="col-auto"><a class="footer-link-email" href="mailto:network@mozillafoundation.org">Email</a></li>
<li class="col-auto"><a class="footer-link-twitter" href="https://twitter.com/mozilla">Twitter</a></li>
<li class="col-auto"><a class="footer-link-facebook" href="https://www.facebook.com/mozilla">Facebook</a></li>
<li class="col-auto"><a class="footer-link-cc-license" href="https://creativecommons.org/licenses/by/4.0">License</a></li>
<li class="col-auto"><a class="footer-link-code-of-conduct" href="https://www.mozilla.org/about/governance/policies/participation/">Participation Guidelines</a></li>
<li class="col-auto"><a class="footer-link-legal" href="https://mozilla.org/en-US/about/legal/">Legal</a></li>
<li class="col-auto"><a class="footer-link-privacy" href="https://mozilla.org/en-US/privacy/websites/">Privacy</a></li>
<li class="col-auto"><a class="footer-link-donate" id="donate-footer-btn" href="https://donate.mozilla.org?utm_source=foundation.mozilla.org&amp;utm_medium=referral&amp;utm_content=footer" target="_blank" rel="noopener noreferrer">Donate</a></li>
</ul>
<div class="org-info mozilla">
<div class="logo-container"><a class="logo" href="https://mozilla.org"></a></div>
<p>Mozilla is a global non-profit dedicated to putting you in control of your online experience and shaping the future of the web for the public good. Visit us at <a href="https://mozilla.org">mozilla.org</a>.</p>
</div>
</div>
</footer>
</div>
</body>
</html>
<script src="/_js/main.compiled.js"></script>

0 comments on commit 879cc76

Please sign in to comment.
You can’t perform that action at this time.