git ssb

1+

dinoworm 🐛 / patchwork-downloader



Commit 910fcd7e82741b3cfd9feec0b7eccc56b938f3d0

copy https://solarpunk.cool/downloads/patchwork.html

Michael Williams committed on 11/21/2017, 9:16:17 AM
Parent: 05b091acca0b6c259bc8ac28101132af986f8fdb

Files changed

index.csschanged
index.htmlchanged
index.jschanged
images/invite-letterhead.jpgadded
index.cssView
@@ -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;
316 }
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.htmlView
@@ -1,19 +1,24 @@
11 <!DOCTYPE html>
2-<html lang="">
2 +<html lang="en">
33 <head>
44 <meta charset="utf-8" />
5- <title>Patchwork Downloader</title>
5 + <title>Patchwork Download</title>
66 <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" />
89 </head>
910 <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>
1722 <script src="bundle.js"></script>
1823 </body>
1924 </html>
index.jsView
@@ -2,27 +2,26 @@
22
33 patchworkDownloader()
44
55 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')
1010
1111 const platform = getPlatform(navigator.platform)
1212 console.log('platform', platform)
13 +
1314 platformEl.textContent = platform
1415
1516 getLatestRelease(function (err, release) {
1617 if (err) throw err
1718
1819 console.log('release', release)
1920
2021 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]
2524 })
2625 }
2726
2827 function getPlatform (platform) {
images/invite-letterhead.jpg
images/invite-letterhead.jpg

Built with git-ssb-web