-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from xsanda/landing-screen
Landing page
- Loading branch information
Showing
16 changed files
with
197 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
demo |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cjss.js.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); | ||
|
||
body { | ||
/* Data */ | ||
--data: js-expr({ | ||
name: 'world', | ||
}); | ||
|
||
/* Markup */ | ||
--body: html( | ||
<a href="https://github.com/cjss-group/CJSS/" class="github-link"> | ||
<span><code>cjss-group/CJSS</code></span> | ||
<img src="media/github.png" srcset="media/github@2x.png 2x, media/github@3x.png 3x"> | ||
</a> | ||
<div class="spacer"> | ||
<main class="center"> | ||
<h1>Hello ${data.name}!</h1> | ||
<h2>This page was constructed entirely within CSS files. That includes all the data, markup, scripts, and also styles.</h2> | ||
|
||
<h3>Click the items below to toggle.</h3> | ||
<nav class="click-demo">{nav}</nav> | ||
<h3>Download CJSS for your own project (please don’t!)</h3> | ||
<nav class="downloads" | ||
data-links="[{"title": "Development version", "name": "cjss.js"}, {"title": "Minified version", "name": "cjss.min.js"}]"> | ||
Title | ||
</nav> | ||
<p><recursion data-depth="4"></recursion></p> | ||
</main> | ||
</div> | ||
); | ||
|
||
/* Just some regular old CSS */ | ||
font-family: Roboto, sans-serif; | ||
margin: 0; | ||
background-image: linear-gradient( 70.6deg, rgba(172,30,255,1) 0.3%, rgba(65,35,251,1) 55.8%, rgba(35,251,224,1) 105.1% ); | ||
color: white; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100%; | ||
flex-direction: column; | ||
flex: 1; | ||
} | ||
|
||
body > .github-link { | ||
padding: 1rem; | ||
align-self: flex-end; | ||
text-decoration: none; | ||
color: inherit; | ||
font-size: 1.5em; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
body > .github-link > span { | ||
overflow: hidden; | ||
margin-right: -5px; | ||
} | ||
body > .github-link > img { | ||
position: relative; | ||
z-index: 1; | ||
width: 64px; | ||
} | ||
|
||
body > .github-link > span > code { | ||
padding: 1rem; | ||
display: inline-block; | ||
transition: transform 0.5s ease-out; | ||
} | ||
|
||
body > .github-link:not(:hover) > span > code { | ||
transform: translateX(100%); | ||
transition-timing-function: ease-in; | ||
} | ||
|
||
body > .spacer { | ||
flex: 1; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
html { | ||
height: 100%; | ||
} | ||
|
||
body h1 { | ||
font-size: 50px; | ||
margin: 0; | ||
} | ||
|
||
body h3 { | ||
opacity: 0.6; | ||
margin: 30px 0 20px 0; | ||
} | ||
|
||
.center { | ||
text-align: center; | ||
} | ||
|
||
recursion { | ||
border: 1.5px solid; | ||
padding: 3px; | ||
padding-left: 6px; | ||
position: relative; | ||
display: inline-block; | ||
font-size: 0; | ||
|
||
--data: js-expr({ | ||
depth: this.dataset.depth, | ||
}); | ||
--body: js-expr( | ||
data.depth > 0 ? `<recursion data-depth="${data.depth-1}"></recursion>` : '' | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.buttons { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.buttons > * { | ||
padding: 0.3em 0.5em; | ||
margin: 0 0.3em; | ||
color: white; | ||
text-decoration: none; | ||
font-size: 1.2em; | ||
border-radius: 0.2em; | ||
box-shadow: 0 0 0 1px white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@import url('buttons.css'); | ||
|
||
.downloads { | ||
display: flex; | ||
justify-content: center; | ||
--data: js-expr( | ||
JSON.parse(this.dataset.links) | ||
); | ||
|
||
--prepare: js( | ||
this.classList.add('buttons'); | ||
); | ||
|
||
--body: js-expr( | ||
data.map(({ title, name }) => ` | ||
<a href="dist/${name}" download="${name}">${title} (<code>${name}</code>)</a> | ||
`).join('') | ||
); | ||
} | ||
|
||
.downloads > * { | ||
--script: js( | ||
function toggle() { | ||
this.classList.toggle('active'); | ||
} | ||
|
||
this.addEventListener('click', toggle); | ||
); | ||
} | ||
|
||
.downloads > :hover { | ||
outline: none; | ||
text-shadow: 0 0 5px white; | ||
box-shadow: 0 0 5px white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters