Skip to content

Commit 9167c04

Browse files
authored
Merge pull request creativecommons#31 from code-n-chill/master
Ported from CSS to SASS using webpack + some documentation updates to adjust changes
2 parents 3a30684 + c1a2502 commit 9167c04

File tree

10 files changed

+6398
-127
lines changed

10 files changed

+6398
-127
lines changed

.lektorproject

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ target = ghpages+https://creativecommons/creativecommons.github.io
77
[packages]
88
lektor-markdown-header-anchors = 0.3.1
99
lektor-google-analytics = 0.1.3
10+
lektor-webpack-support = 0.5

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ else fails, try removing the virtual environment and reinstalling:
4343
## Development
4444

4545
1. Run `pipenv shell` to spawn a shell with the virtualenv activated
46-
1. Run `lektor server` to start the Lektor development server. You will be able
46+
1. Run `lektor server -f webpack` to start the Lektor development server. You will be able
4747
to see the website at [`http://localhost:5000/`][lektorlocal]. The Lektor
4848
server will rebuild the site every time you change any content.
4949

@@ -68,8 +68,7 @@ on production!
6868

6969
Here's how the code is structured in the top level of the repository:
7070
- **`assets`**: This directory contains the JavaScript and CSS files for the
71-
project. Most of the JavaScript and CSS is third-party code and loaded via
72-
CDN so this is pretty empty.
71+
project built via webpack. Most of the JavaScript and CSS is third-party code and loaded via CDN so this is pretty empty.
7372
- **`content`**: The content of the site lives here. [Here's an explanation of
7473
how content works in Lektor][lektorcontent]. This is probably what you'll be
7574
modifying most often.
@@ -79,6 +78,8 @@ Here's how the code is structured in the top level of the repository:
7978
- **`templates`**: This is where the [Jinja2][jinja2] templates that render
8079
content are stored. See the [Lektor template documentation][lektortemplate]
8180
for more information.
81+
- **`webpack`**: This is where all the webpack config files as well as Sass and
82+
JavaScript files for the project resides. The JavaScript and Sass files are compiled and saved in assets folder during lektor build process.
8283

8384
[lektorcontent]:https://www.getlektor.com/docs/content/
8485
[lektormodels]:(https://www.getlektor.com/docs/models/

assets/static/style.css

-122
This file was deleted.

templates/layout.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<link rel="shortcut icon" type="image/x-icon" href="{{ '/static/favicon.ico'|url }}">
55
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
66
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700" rel="stylesheet">
7-
<link rel="stylesheet" href="{{ '/static/style.css'|url }}">
7+
<link rel="stylesheet" href="{{ '/static/gen/style.css'|url }}">
88
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
99
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
1010
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
11-
<script type="text/javascript" src="{{ '/static/script.js'|url }}"></script>
11+
<script type="text/javascript" src="{{ '/static/gen/script.js'|url }}"></script>
1212
<title>{% block title %}Welcome{% endblock %} — Creative Commons on GitHub</title>
1313
<body>
1414
<div class="ga-script">{{ generate_google_analytics() }}</div>
File renamed without changes.

0 commit comments

Comments
 (0)