Skip to content

Commit e23f442

Browse files
committed
Added Webpack
1 parent fa7890a commit e23f442

File tree

11 files changed

+6638
-127
lines changed

11 files changed

+6638
-127
lines changed

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/gen/script.js

+122
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/******/ (function(modules) { // webpackBootstrap
2+
/******/ // The module cache
3+
/******/ var installedModules = {};
4+
/******/
5+
/******/ // The require function
6+
/******/ function __webpack_require__(moduleId) {
7+
/******/
8+
/******/ // Check if module is in cache
9+
/******/ if(installedModules[moduleId]) {
10+
/******/ return installedModules[moduleId].exports;
11+
/******/ }
12+
/******/ // Create a new module (and put it into the cache)
13+
/******/ var module = installedModules[moduleId] = {
14+
/******/ i: moduleId,
15+
/******/ l: false,
16+
/******/ exports: {}
17+
/******/ };
18+
/******/
19+
/******/ // Execute the module function
20+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21+
/******/
22+
/******/ // Flag the module as loaded
23+
/******/ module.l = true;
24+
/******/
25+
/******/ // Return the exports of the module
26+
/******/ return module.exports;
27+
/******/ }
28+
/******/
29+
/******/
30+
/******/ // expose the modules object (__webpack_modules__)
31+
/******/ __webpack_require__.m = modules;
32+
/******/
33+
/******/ // expose the module cache
34+
/******/ __webpack_require__.c = installedModules;
35+
/******/
36+
/******/ // define getter function for harmony exports
37+
/******/ __webpack_require__.d = function(exports, name, getter) {
38+
/******/ if(!__webpack_require__.o(exports, name)) {
39+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
40+
/******/ }
41+
/******/ };
42+
/******/
43+
/******/ // define __esModule on exports
44+
/******/ __webpack_require__.r = function(exports) {
45+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
46+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
47+
/******/ }
48+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
49+
/******/ };
50+
/******/
51+
/******/ // create a fake namespace object
52+
/******/ // mode & 1: value is a module id, require it
53+
/******/ // mode & 2: merge all properties of value into the ns
54+
/******/ // mode & 4: return value when already ns object
55+
/******/ // mode & 8|1: behave like require
56+
/******/ __webpack_require__.t = function(value, mode) {
57+
/******/ if(mode & 1) value = __webpack_require__(value);
58+
/******/ if(mode & 8) return value;
59+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
60+
/******/ var ns = Object.create(null);
61+
/******/ __webpack_require__.r(ns);
62+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
63+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
64+
/******/ return ns;
65+
/******/ };
66+
/******/
67+
/******/ // getDefaultExport function for compatibility with non-harmony modules
68+
/******/ __webpack_require__.n = function(module) {
69+
/******/ var getter = module && module.__esModule ?
70+
/******/ function getDefault() { return module['default']; } :
71+
/******/ function getModuleExports() { return module; };
72+
/******/ __webpack_require__.d(getter, 'a', getter);
73+
/******/ return getter;
74+
/******/ };
75+
/******/
76+
/******/ // Object.prototype.hasOwnProperty.call
77+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
78+
/******/
79+
/******/ // __webpack_public_path__
80+
/******/ __webpack_require__.p = "";
81+
/******/
82+
/******/
83+
/******/ // Load entry module and return exports
84+
/******/ return __webpack_require__(__webpack_require__.s = 0);
85+
/******/ })
86+
/************************************************************************/
87+
/******/ ({
88+
89+
/***/ "./js/main.js":
90+
/*!********************!*\
91+
!*** ./js/main.js ***!
92+
\********************/
93+
/*! no static exports found */
94+
/***/ (function(module, exports) {
95+
96+
eval("$(document).ready(function() {\n $(window).scroll(function() {\n if ($(this).scrollTop() > 500) {\n $('#back-to-top').fadeIn();\n } else {\n $('#back-to-top').fadeOut();\n }\n });\n});\n\n\n//# sourceURL=webpack:///./js/main.js?");
97+
98+
/***/ }),
99+
100+
/***/ "./sass/main.scss":
101+
/*!************************!*\
102+
!*** ./sass/main.scss ***!
103+
\************************/
104+
/*! no static exports found */
105+
/***/ (function(module, exports, __webpack_require__) {
106+
107+
eval("module.exports = __webpack_require__.p + \"style.css\";\n\n//# sourceURL=webpack:///./sass/main.scss?");
108+
109+
/***/ }),
110+
111+
/***/ 0:
112+
/*!*******************************************!*\
113+
!*** multi ./js/main.js ./sass/main.scss ***!
114+
\*******************************************/
115+
/*! no static exports found */
116+
/***/ (function(module, exports, __webpack_require__) {
117+
118+
eval("__webpack_require__(/*! ./js/main.js */\"./js/main.js\");\nmodule.exports = __webpack_require__(/*! ./sass/main.scss */\"./sass/main.scss\");\n\n\n//# sourceURL=webpack:///multi_./js/main.js_./sass/main.scss?");
119+
120+
/***/ })
121+
122+
/******/ });

assets/static/gen/style.css

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
body {
2+
font-family: 'Source Sans Pro', sans-serif;
3+
color: #333333; }
4+
5+
h2 {
6+
font-weight: 600;
7+
padding-bottom: 0.5rem; }
8+
9+
.page-content {
10+
position: relative;
11+
min-height: calc(100vh - 21vh);
12+
padding-bottom: 3rem; }
13+
14+
.main-header {
15+
background-color: #EE5B32; }
16+
.main-header .navbar-brand {
17+
margin-right: 2rem; }
18+
.main-header .navbar-brand img {
19+
width: 250px; }
20+
.main-header .navbar-brand .legend {
21+
display: block;
22+
font-size: .9rem;
23+
letter-spacing: .15rem; }
24+
25+
.footer {
26+
bottom: 0; }
27+
28+
.card-columns {
29+
-webkit-column-count: 2;
30+
column-count: 2; }
31+
32+
.navbar {
33+
background-image: linear-gradient(90deg, #EE5B32, #FB7928, #EE5B32);
34+
background-size: 100% 130px;
35+
background-position-y: bottom; }
36+
37+
.page-title {
38+
background-color: #fff;
39+
border-bottom-style: solid;
40+
border-color: #EE5B32;
41+
border-width: 10px;
42+
padding-left: 0px;
43+
font-weight: 600;
44+
color: #333333; }
45+
46+
.featured-project-card {
47+
background-color: #fff;
48+
border-left-color: #00b5da !important;
49+
border-left-width: 10px;
50+
padding-left: 0px;
51+
min-width: 20rem;
52+
max-width: 20rem; }
53+
54+
.project-idea-header {
55+
background-color: #fff;
56+
border-left-color: #00b5da !important;
57+
border-left-width: 10px;
58+
padding-left: 0px;
59+
font-size: 1.5em; }
60+
61+
.badge-featured-project {
62+
background-color: #00b5da;
63+
color: #fff;
64+
font-size: 0.8rem; }
65+
66+
#back-to-top {
67+
cursor: pointer;
68+
position: fixed;
69+
bottom: 20px;
70+
right: 20px;
71+
display: none;
72+
background-color: #00b5da;
73+
border: none; }
74+
75+
.dropdown-item {
76+
font-size: 1.2em;
77+
text-align: center; }
78+
79+
.dropdown:hover:hover .dropdown-menu {
80+
display: block; }
81+
82+
.dropdown-menu {
83+
margin-top: 0px; }
84+
85+
.navbar-dark .navbar-nav .nav-item.active .nav-link {
86+
background: #e15803 !important; }
87+
88+
.navbar-dark .navbar-nav .nav-item {
89+
font-size: 1.2em;
90+
text-align: center; }
91+
.navbar-dark .navbar-nav .nav-item:hover {
92+
background: #e15803 !important; }
93+
.navbar-dark .navbar-nav .nav-item .nav-link {
94+
color: #fff;
95+
line-height: 1rem;
96+
border-left: 1px solid rgba(255, 255, 255, 0.6); }
97+
98+
.navbar-dark .navbar-toggler {
99+
border-color: #fff; }
100+
101+
@media only screen and (max-width: 1200px) {
102+
.navbar-dark .navbar-nav .nav-item .nav-link {
103+
border: None;
104+
text-align: center; } }
105+
106+
.toc-card {
107+
width: 18rem;
108+
margin-bottom: 1rem;
109+
float: right;
110+
margin: 1rem; }
111+
112+
.toc {
113+
margin-bottom: 0; }
114+
115+
.main-footer .footer small {
116+
display: flex;
117+
align-items: center; }
118+
.main-footer .footer small .text-muted {
119+
margin-left: 2rem; }

assets/static/style.css

-122
This file was deleted.

0 commit comments

Comments
 (0)