Wrap everything up in a pretty site

This commit is contained in:
Emi Simpson 2022-02-02 14:31:07 -05:00
parent eb0e736a2f
commit 29d1613690
Signed by: Emi
GPG key ID: A12F2C2FFDC3D847
11 changed files with 312 additions and 2 deletions

18
Makefile Normal file
View file

@ -0,0 +1,18 @@
all: site/elm.min.js site/styles.css
site/elm.js: src/
elm make --optimize --output site/elm.js src/Main.elm
site/elm.min.js: site/elm.js
uglifyjs site/elm.js --compress 'pure_funcs=[F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9],pure_getters,keep_fargs=false,unsafe_comps,unsafe' | uglifyjs --mangle --output site/elm.min.js
site/styles.css: site/styles.scss
sass --update -t compressed site/styles.scss
clean:
rm -rf site/elm.js \
elm-stuff/ \
site/elm.min.js \
.sass-cache \
site/styles.css \
site/styles.css.map

BIN
site/assets/fonts/lack/Lack-Regular.woff (Stored with Git LFS) Normal file

Binary file not shown.

BIN
site/assets/fonts/lack/lack.woff2 (Stored with Git LFS) Normal file

Binary file not shown.

View file

@ -0,0 +1,5 @@
Copyright (c) 2005-2013, Jane Doe <jane@jane@university.edu>
Copyright (c) 2007, Pat Johnson <pat@fontstudio.org>
Copyright (c) 2006, Fred Foobar <fred@foobar.org>
Copyright (c) 2005, Tom Parker <tom@company.com>
Copyright (c) 2005, Joe Smith <joe@fontstudio.org>

View file

@ -0,0 +1,103 @@
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
SIL Open Font License v1.1
====================================================
Preamble
----------
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
Definitions
-------------
`"Font Software"` refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
`"Reserved Font Name"` refers to any names specified as such after the
copyright statement(s).
`"Original Version"` refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
`"Modified Version"` refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
`"Author"` refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
Permission & Conditions
------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1. Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2. Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3. No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5. The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
Termination
-----------
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
site/assets/fonts/resistance/resistance.eot (Stored with Git LFS) Executable file

Binary file not shown.

BIN
site/assets/fonts/resistance/resistance.ttf (Stored with Git LFS) Executable file

Binary file not shown.

BIN
site/assets/fonts/resistance/resistance.woff2 (Stored with Git LFS) Executable file

Binary file not shown.

72
site/index.html Normal file
View file

@ -0,0 +1,72 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
<script src="elm.min.js"></script>
<link rel="stylesheet" href="styles.css"/>
<style>
@font-face {
font-family: 'Resistance';
font-feature-settings: 'salt';
src: url('assets/fonts/resistance/resistance.woff2') format('woff2'),
url('assets/fonts/resistance/resistance.eot') format('embedded-opentype'),
url('assets/fonts/resistance/resistance.ttf') format('truetype');
}
@font-feature-values 'Resistance' {
@styleset {
normal-is: 1;
}
}
@font-face {
font-family: 'Lack';
src: url('assets/fonts/lack/lack.woff2') format('woff2'),
url('assets/fonts/lack/lack.woff') format('woff');
}
</style>
</head>
<body>
<header>
<h1>
<p><span>For Good,</span><span class="hr"></span></p>
<p><span class="hr"></span><span>Not Evil</span></p>
</h1>
</header>
<input
id="should-hide-intro"
type="checkbox"
style="display: none"
aria-hidden="true"
/>
<section id="intro">
<!--p>
Since the penning of the GPL, Free and Open Source software has led the charge
of software for a better world, and it splash it has made is unparalleled.
</p-->
<p>
The world of today is not the world our free software licenses were written for.
The licenses we created to protect freedom are being taken advantage of by
institutions like ICE and surveilence states to take away the freedom of others.
</p>
<p class="emphasis-paragraph">
It's time to reclaim our software in the name of freedom.
</p>
<p>
This site helps you find and build licenses that uphold the principles of open
source software, while making sure your code is used for good, not evil.
</p>
<br/>
<label
for="should-hide-intro"
aria-role="button" >
<div class="cool-button">
<div aria-hidden="true" class = "bevel tr"></div>
<div>Get Started</div>
<div aria-hidden="true" class = "bevel bl"></div>
</div>
</label>
</section>
<div id="elm-area"> </div>
<script>var app = Elm.Main.init({node: document.getElementById("elm-area")});</script>
</body>
</html>

97
site/styles.scss Normal file
View file

@ -0,0 +1,97 @@
body {
--color-bg: #170423;
--color-hi: #ce027c;
background-color: var(--color-bg);
color: white;
font-family: Lack, sansserif;
font-size: 1.5em;
line-height: 1.4em;
max-width: 700px;
margin: 0 auto;
margin-bottom: 60px;
}
header {
font-family: Resistance, sansserif;
font-variant-alternates: styleset(normal-is);
font-size: 3.2rem;
padding: 0px 49px;
p {
display: flex;
white-space: nowrap;
line-height: 1em;
margin: 20px 0;
.hr {
width: 100%;
height: 0.5em;
border-bottom: 1px solid white;
margin: 0 50px;
&:first-child {
margin-left: 0;
}
&:last-child {
margin-right: 0;
margin-left: 40px;
}
}
}
}
.emphasis-paragraph {
font-family: Resistance;
font-size: 3.5rem;
line-height: initial;
text-align: center;
margin-left: -50px;
margin-right: -50px;
}
#should-hide-intro:checked + #intro {
display: none;
}
#should-hide-intro:not(:checked) ~ #elm-area {
display: none;
}
.cool-button {
--bevel: var(--color-hi);
--bevel-size: 20px;
color: var(--color-bg);
width: fit-content;
font-family: Resistance;
font-size: 2.5rem;
margin-left: auto;
margin-right: auto;
cursor: pointer;
& > div:nth-child(2) {
padding: 5px 30px;
}
}
.bevel {
border: var(--bevel-size) solid var(--bevel);
&.tl, &.tr {
border-top: 0;
& ~ :not(.bevel) {
background-color: var(--bevel);
}
}
&.bl, &.br {
border-bottom: 0;
}
&.tr, &.br {
border-right-color: transparent;
}
&.tl, &.bl {
border-left-color: transparent;
}
}

View file

@ -4,7 +4,7 @@ import Browser
import Sort.Set exposing (Set)
import Html exposing (Html, div, input, label, p, text, h3)
import Html.Events exposing (onCheck)
import Html.Attributes exposing (class, type_)
import Html.Attributes exposing (class, type_, id)
import Modules exposing
( Module
, all_modules
@ -63,7 +63,7 @@ view_module_button enabled mod =
view : Model -> Html Msg
view model =
div [] (
div [id "elm-area"] (
all_modules
|> List.map (view_module_button model.enabled_modules)
)