Skip to content

Commit ccf8ee7

Browse files
committed
Initial commit
0 parents  commit ccf8ee7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+42434
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Lemon
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
# There are many boilerplates. This one is mine.
3+
4+
I never set out to create a boilerplate, but after making sites dozens of times, I realized there were familiar patterns I was reaching for, and I'd always copy that code out of my last project. The most recent time, I decided to strip everything out into a boilerplate.
5+
6+
## What is this?
7+
This is the starting point that I ([Lemon](https://ahoylemon.xyz)) use every time I make a new website. It's built using my own aesthetics.
8+
9+
### And what aesthetics are those?
10+
I want to have reusable components to help me make a static HTML site, and I want to do that as quickly as possible. At the same time, I *don't* want to have a whole bunch of boilerplate stuff in the shipped code. The idea here is **only when you need it**: Making something that's slim and extendable.
11+
12+
Also you'll need [Prepros](https://prepros.io). I'm a fan of it, and I avoid NPM whenever I can, so this uses Prepros.
13+
14+
This also assumes you want to write in Vue, Sass & Pug.
15+
16+
### Alright, how do I get started?
17+
Clone this repo and add the site folder to Prepros. hit the globe button in the top left to serve your page. If you see **It works.** in the middle of the screen, congratulations is working right
18+
19+
## Fundamentals
20+
I'll break this down into three sections, Pug, Vue and Sass.
21+
22+
1. [Pug](_docs/pug.md)
23+
2. [Sass](_docs/sass.md)
24+
3. [js](_docs/js.md)

css/site.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/site.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

img/bg/bg1.jpg

690 KB
Loading
Loading

index.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title></title>
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7+
<link href="css/site.css" rel="stylesheet">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<meta name="description" content="">
10+
<meta http-equiv="last-modified" content="2022-12-03T06:24:40.279Z">
11+
<link rel="preconnect" href="https://fonts.googleapis.com">
12+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13+
<link href="https://fonts.googleapis.com/css2?family=Caudex&amp;family=Zen+Dots&amp;display=swap" rel="stylesheet">
14+
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk&amp;display=swap" rel="stylesheet">
15+
</head>
16+
<body>
17+
<div id="app" v-cloak>
18+
<main style="min-height:100vh; display:flex; align-items:center; justify-content:center; padding:calc(2rem + 35vh) 2rem 2rem 2rem;">
19+
<div class="inner">
20+
<div class="questions">
21+
<!-- Multiple Choice-->
22+
<dl class="favorite-color">
23+
<dt>
24+
<div class="title">Which of these colors calms your thoughts?</div>
25+
</dt>
26+
<dd>
27+
<forn>
28+
<ul class="options" :count="questions[0].options.length">
29+
<li v-for="(option, key) in questions[0].options">
30+
<label :style="{'background-color':option.hex}" :class="{'active': option.name == answers.favColor, 'inactive': (answers.favColor &amp;&amp; option.name != answers.favColor)}">
31+
<input type="radio" :value="option.name" v-model="answers.favColor">
32+
<div class="text"><span :class="{ 'dark': option.light }">{{option.name}}</span><small v-if="option.small">{{option.small}}</small></div>
33+
</label>
34+
</li>
35+
</ul>
36+
</forn>
37+
</dd>
38+
</dl>
39+
<!-- Range-->
40+
<!--adl.how-many-drinks
41+
dt
42+
.title(:style="{'font-weight': howManyDrinks}") How many alcoholic drinks do you <strong>need</strong> to have in a week?
43+
dd
44+
form
45+
.field
46+
input(type="range" min="3" max="13" v-model="howManyDrinks")
47+
.field
48+
input(type="text" min="3" max="13" v-model="howManyDrinks" readonly disabled)
49+
50+
-->
51+
</div>
52+
</div>
53+
</main>
54+
</div>
55+
<div class="javascripts">
56+
<script src="js/libraries/vue.full.js"></script>
57+
<script>const testing = true;</script>
58+
<script src="js/min/site.min.js?updated2022-12-03T06:24:40.279Z"></script>
59+
</div>
60+
</body>
61+
</html>

js/globals/_functions.js

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
function randomNumber(min,max) {
2+
return Math.floor(Math.random() * (max - min) ) + min;
3+
}
4+
5+
function randomFrom(array) {
6+
return array[Math.floor(Math.random()*(array.length))];
7+
}
8+
9+
function shuffle(o){
10+
for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
11+
return o;
12+
}
13+
14+
function addCommas(x) {
15+
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
16+
}
17+
18+
function findInArray(haystack,needle) {
19+
let n = haystack.indexOf(needle);
20+
if (n > -1) {
21+
return n;
22+
} else {
23+
return null;
24+
}
25+
}
26+
27+
function removeFromArray(haystack,needle) {
28+
for( var i = haystack.length-1; i--;){
29+
if ( haystack[i] == needle) {
30+
haystack.splice(i, 1);
31+
}
32+
}
33+
}
34+
35+
36+
function percentOf(total,part) {
37+
if (total == 0 || part == 0) {
38+
return 0;
39+
} else {
40+
return Math.round((part * 100) / total);
41+
}
42+
43+
}
44+
45+
function sendEvent(c, a, l, v) {
46+
if (v) {
47+
ga('send', 'event', { eventCategory: c, eventAction: a, eventLabel: l, eventValue:v });
48+
//console.log('CATEGORY: '+c+', ACTION:'+a+', LABEL:'+l+', VALUE:'+v);
49+
} else if (l) {
50+
ga('send', 'event', { eventCategory: c, eventAction: a, eventLabel: l });
51+
//console.log('CATEGORY: '+c+', ACTION:'+a+', LABEL:'+l);
52+
} else {
53+
ga('send', 'event', { eventCategory: c, eventAction: a });
54+
//console.log('CATEGORY: '+c+', ACTION:'+a);
55+
}
56+
}

0 commit comments

Comments
 (0)