Commit 910fcd7e82741b3cfd9feec0b7eccc56b938f3d0
copy https://solarpunk.cool/downloads/patchwork.html
Michael Williams committed on 11/21/2017, 9:16:17 AMParent: 05b091acca0b6c259bc8ac28101132af986f8fdb
Files changed
index.css | changed |
index.html | changed |
index.js | changed |
images/invite-letterhead.jpg | added |
index.css | ||
---|---|---|
@@ -1,3 +1,91 @@ | ||
1 | -main { | |
2 | - text-align: center; | |
1 … | +body{ | |
2 … | + font-family: 'SourceCodeProRegular'; | |
3 … | + font-weight: lighter; | |
4 … | + font-style: normal; | |
5 … | + font-size: 16px; | |
6 … | + margin: 20px; } | |
7 … | + | |
8 … | +.title{ | |
9 … | + font-size: 2.5em; | |
10 … | + color: #48a47d; | |
11 … | + letter-spacing: 3px; | |
12 … | + font-weight: 200; | |
13 … | + margin-top: 40px; | |
14 … | + margin-bottom: 10px; | |
15 … | + text-transform: uppercase; | |
3 | 16 … | } |
17 … | + | |
18 … | +h2{ | |
19 … | + margin-top: 10px; | |
20 … | + font-size: 1.3em; | |
21 … | + color; #202329; | |
22 … | + font-weight: lighter; } | |
23 … | + | |
24 … | +.main{ | |
25 … | + max-width: 960px; | |
26 … | + margin: auto; | |
27 … | + text-align: center;} | |
28 … | + | |
29 … | + | |
30 … | +.logo{ | |
31 … | + max-width: 50%; | |
32 … | + display: block; | |
33 … | + margin: auto; } | |
34 … | + | |
35 … | +a{ | |
36 … | + color: inherit; | |
37 … | + font-size: 1.4em; | |
38 … | + font-weight: light; | |
39 … | + text-decoration: none; } | |
40 … | + | |
41 … | +.link-box{ | |
42 … | + max-width: 250px; | |
43 … | + text-align: center; | |
44 … | + margin: auto; | |
45 … | + margin-top: 35px; | |
46 … | + margin-bottom: 35px; | |
47 … | +} | |
48 … | + | |
49 … | +.link-button{ | |
50 … | + background-color: #015249; | |
51 … | + color: white; | |
52 … | + padding: 10px; } | |
53 … | + | |
54 … | +.caption{ | |
55 … | + font-size: 0.8em; | |
56 … | + margin-top: 1px; | |
57 … | + margin-bottom: 1px; | |
58 … | + font-style: italic; } | |
59 … | + | |
60 … | +.accent-text{ | |
61 … | + color: #77c9d4; | |
62 … | + font-weight: bold; | |
63 … | + font-style: normal; } | |
64 … | + | |
65 … | +.invite-code{ | |
66 … | + font-family: 'FantasqueSansMonoRegular'; | |
67 … | + font-style: normal; | |
68 … | + font-weight: lighter; | |
69 … | + font-size: 1.1em; | |
70 … | + line-height: 1.3em; } | |
71 … | + | |
72 … | +.gif{ | |
73 … | + max-width: 600px; | |
74 … | + display: block; | |
75 … | + margin: auto; | |
76 … | + margin-top: 40px; | |
77 … | + margin-bottom: 40px; | |
78 … | + -webkit-filter: drop-shadow(2px 2px 2px #a5a5af); | |
79 … | + filter: drop-shadow(2px 2px 2px #a5a5af); } | |
80 … | + | |
81 … | +.closer{ | |
82 … | + margin-top: 10px; | |
83 … | +} | |
84 … | + | |
85 … | +.closing-remarks{ | |
86 … | + margin-top: 60px; | |
87 … | + margin-bottom: 60px; } | |
88 … | + | |
89 … | +.platform { | |
90 … | + text-transform: capitalize; | |
91 … | +} |
index.html | ||
---|---|---|
@@ -1,19 +1,24 @@ | ||
1 | 1 … | |
2 | -<html lang=""> | |
2 … | +<html lang="en"> | |
3 | 3 … | <head> |
4 | 4 … | <meta charset="utf-8" /> |
5 | - <title>Patchwork Downloader</title> | |
5 … | + <title>Patchwork Download</title> | |
6 | 6 … | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
7 | - <link href="index.css" rel="stylesheet" /> | |
7 … | + <link rel="stylesheet" media="screen" href="https://fontlibrary.org/face/source-code-pro" type="text/css" /> | |
8 … | + <link href="index.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" /> | |
8 | 9 … | </head> |
9 | 10 … | <body> |
10 | - <main> | |
11 | - <h1>Download Patchwork!</h1> | |
12 | - <div>platform <span class="platform">PLATFORM</span></div> | |
13 | - <div>version <span class="version">VERSION</span></div> | |
14 | - <div>url <a class="url">URL</a</div> | |
15 | - <div>asset <a class="asset">ASSET</a></div> | |
16 | - </main> | |
11 … | + <div class="main"> | |
12 … | + <img src="../images/invite-letterhead.jpg" class="logo"> | |
13 … | + <h1 class="title">Download Patchwork</h1> | |
14 … | + <p><em>This will download the <a class="latest">latest version from Patchwork's github page</a>.</em></p> | |
15 … | + <div class="link-box"> | |
16 … | + <a class="download link-button"> | |
17 … | + <span class="platform"></span> | |
18 … | + </a> | |
19 … | + </div> | |
20 … | + <p class="caption">Latest version is <span class="version">UNKNOWN</span></p> | |
21 … | + </div> | |
17 | 22 … | <script src="bundle.js"></script> |
18 | 23 … | </body> |
19 | 24 … | </html> |
index.js | |||
---|---|---|---|
@@ -2,27 +2,26 @@ | |||
2 | 2 … | ||
3 | 3 … | patchworkDownloader() | |
4 | 4 … | ||
5 | 5 … | function patchworkDownloader () { | |
6 | - const platformEl = document.querySelector('main .platform') | ||
7 | - const versionEl = document.querySelector('main .version') | ||
8 | - const urlEl = document.querySelector('main .url') | ||
9 | - const assetEl = document.querySelector('main .asset') | ||
6 … | + const platformEl = document.querySelector('.main .platform') | ||
7 … | + const versionEl = document.querySelector('.main .version') | ||
8 … | + const latestEl = document.querySelector('.main .latest') | ||
9 … | + const downloadEl = document.querySelector('.main .download') | ||
10 | 10 … | ||
11 | 11 … | const platform = getPlatform(navigator.platform) | |
12 | 12 … | console.log('platform', platform) | |
13 … | + | ||
13 | 14 … | platformEl.textContent = platform | |
14 | 15 … | ||
15 | 16 … | getLatestRelease(function (err, release) { | |
16 | 17 … | if (err) throw err | |
17 | 18 … | ||
18 | 19 … | console.log('release', release) | |
19 | 20 … | ||
20 | 21 … | versionEl.textContent = release.version | |
21 | - urlEl.textContent = release.url | ||
22 | - urlEl.href = release.url | ||
23 | - assetEl.textContent = release.assets[platform] | ||
24 | - assetEl.href = release.assets[platform] | ||
22 … | + latestEl.href = release.url | ||
23 … | + downloadEl.href = release.assets[platform] | ||
25 | 24 … | }) | |
26 | 25 … | } | |
27 | 26 … | ||
28 | 27 … | function getPlatform (platform) { |
images/invite-letterhead.jpg |
---|
Built with git-ssb-web