Merge pull request #40 from lbryio/front-end-collapse-nav

Front end collapse nav
This commit is contained in:
Bill Bittner 2017-06-23 12:54:58 -07:00 committed by GitHub
commit 00847b1c9a
8 changed files with 98 additions and 50 deletions

View file

@ -79,3 +79,7 @@ h4 {
.stop-float {
clear: both;
}
.toggle-link {
float: right;
}

View file

@ -45,8 +45,17 @@ canvas {
/* all claims */
.all-claims-item {
margin-top: 2px;
padding-top: 2px;
border-top: 1px lightgrey solid;
overflow: auto;
}
.all-claims-img {
height: 200px;
width: 20%;
float: left;
margin: 5px 30px 5px 0px;
}
/* footer */

View file

@ -0,0 +1,19 @@
function toggleSection(event){
event.preventDefault();
var dataSet = event.target.dataset;
var status = dataSet.open;
var masterElement = document.getElementById(event.srcElement.id);
var slaveElement = document.getElementById(dataSet.slaveelementid);
if (status === "false") {
slaveElement.hidden = false;
masterElement.innerText = "[close]";
masterElement.dataset.open = "true";
} else {
slaveElement.hidden = true;
masterElement.innerText = "[open]";
masterElement.dataset.open = "false";
}
console.log(status);
}

View file

@ -6,15 +6,22 @@
<h3>All Claims</h3>
<p>These are all the free, public assets at that claim. You can publish more at <a href="/">spee.ch</a>.</p>
{{#each claims}}
<div class="all-claims-item">
<img class="all-claims-img" src="/{{this.name}}/{{this.claim_id}}" />
<div class="card card-block">
<p>claim_id: {{this.claim_id}}</p>
<p>direct link <a href="/{{this.name}}/{{this.claim_id}}">here</a></p>
<p>author: {{this.value.stream.metadata.author}}</p>
<p>description: {{this.value.stream.metadata.description}}</p>
<p>license: {{this.value.stream.metadata.license}}</p>
<div class="all-claims-details">
<ul style="list-style-type:none">
<li>claim: {{this.name}}</li>
<li>claim_id: {{this.claim_id}}</li>
<li>direct link: <a href="/{{this.name}}/{{this.claim_id}}">spee.ch/{{this.name}}/{{this.claim_id}}</a></li>
<li>author: {{this.value.stream.metadata.author}}</li>
<li>description: {{this.value.stream.metadata.description}}</li>
<li>license: {{this.value.stream.metadata.license}}</li>
</ul>
</div>
</div>
<hr>
{{/each}}
</div>
<div class="footer">
{{> footer}}
</div>
</div>

View file

@ -10,6 +10,7 @@
</head>
<body>
{{{ body }}}
<script src="/assets/js/generalFunctions.js"></script>
<!-- google analytics -->
{{ googleAnalytics }}
</body>

View file

@ -1,5 +1,8 @@
<div class="panel">
<h2>Documentation</h2>
<h2>Documentation
<a class="toggle-link" id="documentation-toggle" href="#" onclick="toggleSection(event)" data-open="false" data-slaveelementid="documentation-detail">[open]</a>
</h2>
<div id="documentation-detail" hidden="true">
<strong>spee.ch/</strong>
<ul>
<li><a href="/">https://spee.ch</a></li>
@ -21,3 +24,4 @@
<li >E.g. <a href="/doitlive/all">spee.ch/doitlive/all</a></li>
</ul>
</div>
</div>

View file

@ -1,5 +1,8 @@
<div class="panel">
<h2>What is spee.ch? </h2>
<h2>What is spee.ch?
<a class="toggle-link" id="examples-toggle" href="#" onclick="toggleSection(event)" data-open="false" data-slaveelementid="examples-detail">[open]</a>
</h2>
<div id="examples-detail" hidden="true">
<p>Spee.ch is an image hosting service based on the LBRY blockchain. It reads and publishes free, public images.</p>
<div class="example">
<h4>Use spee.ch to embed a specific image:</h4>
@ -21,3 +24,4 @@
</div>
</div>
</div>
</div>

View file

@ -1,5 +1,5 @@
<h2>What Is Spee.ch?</h2>
<h3>Spee.ch is for sharing</h3>
<p>Spee.ch is a platform by which you can publish images to the Lbry blockchain. Just upload an image, title it, and send it off into the lbry ecosystem.</p>
<p>Spee.ch is a platform by which you can publish images to the Lbry blockchain. Just upload an image, title it, and send it off into the lbry blockchain.</p>
<p>Spee.ch is also a platform to serve you those images. It's like have a personal chef that will serve you a meal anywhere in the world. All you have to do is ask for it, by using "spee.ch/" + the name of a claim.</p>
<p>If you want a specific image, just ask for it with the claim_id by using "spee.ch/" + the name of the claim + "/" + the claim id.</p>