Difference between revisions of "Team:ZJU-China/interLab"

 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<html lang="en">
 
<html lang="en">
  
<head>
+
<head>
 +
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 +
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 +
<title>InterLab</title>
 +
<link rel="stylesheet" type="text/css" href="https://2018.igem.org/wiki/index.php?title=Team:ZJU-China/NavCSS/nav_pos&action=raw&ctype=text/css" />
 +
<link rel="stylesheet" type="text/css" href="https://2018.igem.org/wiki/index.php?title=Team:ZJU-China/NavCSS/navFont&action=raw&ctype=text/css" />
 +
<script type="text/javascript" src="https://2018.igem.org/wiki/index.php?title=Team:ZJU-China/NavJS&action=raw&ctype=text/javascript"></script>
 +
<script type="text/javascript">$(document).ready(function(){$().maps();});</script>
 +
<style>
 +
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption{
 +
    margin: 0;
 +
    padding: 0;
 +
    border: 0;
 +
    outline: 0;
 +
    font-size: 100%;
 +
    vertical-align: baseline;
 +
    background: transparent;
 +
}
  
<meta charset="UTF-8">
+
html, body, .globalWrapper {
 +
    width: 100%;
 +
}
 +
.logo_2018 {
 +
display: none;
 +
}
 +
.firstHeading {
 +
  display: none !important;
 +
}
  
<title>Progress Nav</title>
+
.content {
 +
  padding: 0;
 +
  margin: 0;
 +
  position: relative;
 +
  left:-3%;
 +
  width:135%;
 +
}
 +
</style>
 +
</head>
  
<meta name="description" content="">
+
<body>
<meta name="author" content="Hakim El Hattab">
+
  
<meta name="viewport" content="width=700, user-scalable=no" />
+
<div class="content" >
 
+
<ul class="venus-menu">
<link href="https://2018.igem.org/wiki/index.php?title=Team:ZJU-China/interLab/CSS&action=raw&ctype=text/css" rel="stylesheet" type="text/css" />
+
<li class="active" ><a href="#"><i class="icon-star-half"></i>home</a></li>
 
+
<li><a href="#"><i class="icon-certificate"></i>Project</a>
</head>
+
 
+
<body>
+
 
+
<nav class="toc">
+
 
<ul>
 
<ul>
<li><a href="#intro">Intro</a></li>
+
<li><a href="#">Description</a></li>
<li>
+
<li><a href="#">Design&Results</a>
<a href="#dev">Developer Mode</a>
+
 
<ul>
 
<ul>
<li><a href="#dev-edit-html">Edit HTML</a></li>
+
<li><a href="#">Curli</a></li>
<li><a href="#dev-element-classes">Element Classes</a></li>
+
<li><a href="#">Tag/Catcher System</a></li>
<li><a href="#dev-slide-classes">Slide Classes</a></li>
+
<li><a href="#">Enzyme</a></li>
<li><a href="#dev-export-html">Export HTML</a></li>
+
<li><a href="#">Logic Gate</a></li>
 
</ul>
 
</ul>
 
</li>
 
</li>
<li>
+
<li><a href="#">Applied Design</a>
<a href="#css">CSS Editor</a>
+
 
<ul>
 
<ul>
<li><a href="#css-fonts">Custom Fonts</a></li>
+
<li><a href="#">Overview</a></li>
<li><a href="#css-developer-mode">Developer Mode</a></li>
+
<li><a href="#">2D print</a></li>
<li><a href="#css-examples">Examples</a></li>
+
<li><a href="#">Electrode</a></li>
 +
<li><a href="#">Integration</a></li>
 +
<li><a href="#">Roll-out Plan</a></li>
 
</ul>
 
</ul>
 
</li>
 
</li>
 
</ul>
 
</ul>
<svg class="toc-marker" width="200" height="200" xmlns="http://www.w3.org/2000/svg">
+
</li>
<path stroke="#444" stroke-width="3" fill="transparent" stroke-dasharray="0, 0, 0, 1000" stroke-linecap="round" stroke-linejoin="round" transform="translate(-0.5, -0.5)" />
+
<li><a href="#"><i class="icon-sitemap"></i>Parts</a>
</svg>
+
<ul>
</nav>
+
<li><a href="#">Overview</a></li>
 
+
<li><a href="#">Basic Parts</a></li>
<article class="contents">
+
<li><a href="#">Composite Parts</a></li>
<section id="intro">
+
<li><a href="#">Improved Parts</a></li>
<h2>Progress Nav</h2>
+
</ul>
<p>
+
</li>
This page demonstrates an idea for how progress can be visualized inside of a standard page nav. Scroll the page and note how the marker animates to highlight all of the sections that are currently on screen.
+
<li><a href="#"><i class="icon-cogs"></i>Modeling</a></li>
</p>
+
<li><a href="#"><i class="icon-leaf"></i>InterLab</a></li>
<p>
+
<li><a href="#"><i class="icon-ambulance"></i>Safety</a></li>
The rest of the content below is taken from . Take a look at that to see how the progress nav looks on a real page.
+
<li><a href="#"><i class="icon-fire"></i>Human Practice</a>
</p>
+
<ul>
 +
<li><a href="#">Silver</a>
 +
<ul>
 +
<li><a href="#">TED Talk</a></li>
 +
<li><a href="#">Subscriptions</a></li>
 +
</ul>
 +
</li>
 +
<li><a href="#">Gold Integrated</a>
 +
<ul>
 +
<li><a href="#">Academics</a></li>
 +
<li><a href="#">Hospitals</a></li>
 +
<li><a href="#">Bioethics</a></li>
 +
</ul>
 +
</li>
 +
<li><a href="#">Education & Public Engagement</a>
 +
<ul>
 +
<li><a href="#">Science Museum</a></li>
 +
<li><a href="#">Bioart Exhibition</a></li>
 +
</ul>
 +
</li>
 +
<li><a href="#">Collaborations</a></li>
 +
</ul>
 +
</li>
 +
<li><a href="#"><i class="icon-book"></i>Notebook</a>
 +
<ul>
 +
<li><a href="#">Lab Book</a></li>
 +
<li><a href="#">Protocols</a></li>
 +
</ul>
 +
</li>
 +
<li><a href="#"><i class="icon-user-md"></i>Team</a>
 +
<ul>
 +
<li><a href="#">Members</a></li>
 +
<li><a href="#">Contributions</a></li>
 +
<li><a href="#">Sponsors</a></li>
 +
</ul>
 +
</li>
 
 
<h2>Slides for Developers</h2>
+
<!--</li>-->
<p>
+
</ul>
We strive to make Slides a great and flexible tool for developers. Presentations created on Slides are HTML documents under the hood, so generally anything that HTML can do, Slides can do. We make it easy to access and edit the underlying HTML and CSS through the <a href="#dev">Developer Mode</a>.
+
</div>
</p>
+
<p>
+
There's also an API for creating new presentations with preset content and we're aiming to add additional APIs in the future.
+
</p>
+
</section>
+
 
+
<section>
+
<div id="dev">
+
<h2>Developer Mode</h2>
+
<p>
+
The Slides editor has a developer mode which is useful if you know a bit of HTML and CSS. With this mode active you will be able to modify the underlying HTML of your deck, allowing you to make adjustments that the Slides editor does not provide interface options for.
+
</p>
+
<p>
+
To enable the developer mode open the editor settings in the bottom left corner:
+
</p>
+
 
+
<img class="developer-image" src="img/slides-developer-mode-1.png">
+
</div>
+
 
+
<div id="dev-edit-html">
+
<h3>Editing HTML</h3>
+
<p>
+
The per-slide HTML editor can be accessed from the slide options area. It gives you raw access to the current slide's HTML, allowing you to change anything you like. Note that some elements, such as &lt;script&gt; and &lt;link&gt;, are not allowed for security reasons.
+
</p>
+
 
+
<img class="developer-image" src="img/slides-developer-mode-2.png">
+
</div>
+
 
+
<div id="dev-element-classes">
+
<h3>Element Classes </h3>
+
<p>
+
As a paying Slides customer you have access to the <a href="#css">CSS editor</a> which allows you to add custom styles to your deck. By turning on the developer mode a new "class name" field will appear for any block that you focus. This allows you to easily target a specific element with your CSS.
+
</p>
+
<p>
+
Here's an example that defines an "upside-down" class using custom CSS and applies it to a text block.
+
</p>
+
<pre class="code-block" data-highlight-theme="github-gist"><code class="hljs css">.upside-down {
+
transform: scale( 1, -1 );
+
}</code></pre>
+
 
+
<img class="developer-image" src="img/slides-developer-mode-3.png">
+
</div>
+
 
+
<div id="dev-slide-classes">
+
<h3>Slide Classes </h3>
+
<p>
+
Just like you can add custom classes to individual elements it's also possible to add custom classes at the slide level. This can used to apply broader changes to the whole slide like inverting text and icon colors or changing the slide transition.
+
</p>
+
<img class="developer-image" src="img/slides-developer-mode-4.png">
+
<p>
+
Under the hood the slide background element is separate from the slide itself. Here are two examples showing how you'd target the slide contents or slide background using a custom class called "night-sky":
+
</p>
+
 
+
<pre class="code-block" data-highlight-theme="github-gist"><code class="hljs css">// Targets the slide contents
+
.slides .night-sky svg path {
+
fill: yellow;
+
}
+
 
+
// Target the slide background
+
.backgrounds .night-sky {
+
background: linear-gradient(0deg, #141528, #0b1bb2);
+
}</code></pre>
+
 
+
<img class="developer-image" src="img/slides-developer-mode-5.png">
+
</div>
+
 
+
<div id="dev-export-html">
+
<h3>Export HTML</h3>
+
<p>
+
You can access the complete HTML for all slides in your deck inside of the export panel, under "Export to reveal.js". This provides a way of exporting your deck markup and the core Slides styles to reveal.js. There are a few limitations with exporting this way but it should provide a good starting point.
+
</p>
+
 
+
<img class="developer-image" src="img/slides-developer-mode-6.png">
+
</div>
+
 
+
</section>
+
 
+
<section>
+
<div id="css">
+
<h2>CSS Editor </h2>
+
<p>
+
The CSS editor lets you author custom styles for your presentation with a real-time preview of the result. It's available as an option inside of the Style panel of the presentation editor.
+
</p>
+
<p>
+
The editor preprocesses styles using <a href="http://lesscss.org/">LESS</a>, though you're free to write plain CSS as well. We apply the styles in real-time as you type so there's no need to leave the editor or even press a refresh button to see what you're getting. Note that when your styles are saved they will be automatically wrapped in a ".reveal {}" selector to avoid conflicts with other page styles.
+
</p>
+
</div>
+
<div id="css-fonts">
+
<h3>Custom Fonts</h3>
+
<p>
+
You can load custom fonts from Typekit and Google fonts and apply them using custom CSS.
+
</p>
+
</div>
+
<div id="css-developer-mode">
+
<h3>Developer Mode</h3>
+
<p>
+
If you turn on the <a href="#dev">developer mode</a> you can also add custom classes to any focused element. This is a convenient way to easily apply your CSS to specific elements.
+
</p>
+
</div>
+
 
+
<div id="css-examples">
+
<h3>Examples</h3>
+
<pre class="code-block" data-highlight-theme="github-gist"><code class="hljs css">// Change presentation background
+
&amp; {
+
background: #a83239;
+
}
+
 
+
// Change color of body text
+
.slides {
+
color: #009999;
+
}
+
 
+
// Turn text white if the slide has a dark background
+
.has-dark-background {
+
color: #fff;
+
}
+
 
+
// Add a blue border to all slides (each slide is a &lt;section&gt;)
+
.slides section {
+
outline: 1px solid blue;
+
}
+
 
+
// Add a red border to all vertical stacks of slides
+
.slides section.stack {
+
outline: 1px solid red;
+
}<br>
+
// Include a custom font<br>@font-face {<br>&nbsp; font-family: "Cabin Sketch";<br>&nbsp; src: url("https://s3.amazonaws.com/static.slid.es/fonts/cabinsketch/cabinsketch-regular.woff") format("woff"),<br>&nbsp; &nbsp; &nbsp; &nbsp;url("https://s3.amazonaws.com/static.slid.es/fonts/cabinsketch/cabinsketch-regular.ttf") format("truetype");<br>}
+
<br>.slides h1, .slides h2, .slides h3 {<br>&nbsp; &nbsp; font-family: "Cabin Sketch";<br>}
+
 
+
 
+
// Change color of controls and progress bar
+
@interactiveColor: rgb(200,105,119);
+
 
+
.progress span {
+
background: @interactiveColor !important;
+
}
+
 
+
.controls .navigate-left {
+
border-right-color: @interactiveColor !important;
+
}
+
.controls .navigate-right {
+
border-left-color: @interactiveColor !important;
+
}
+
.controls .navigate-up {
+
border-bottom-color: @interactiveColor !important;
+
}
+
.controls .navigate-down {
+
border-top-color: @interactiveColor !important;
+
}</code></pre>
+
</div>
+
 
+
<p>Here's where you can access the CSS editor from inside of the Style panel:</p>
+
<img class="developer-image" src="img/slides-css-editor-1.png">
+
 
+
<p>A screenshot of the editor:</p>
+
<img class="developer-image" src="img/slides-css-editor-2.png">
+
 
+
</section>
+
</article>
+
 
+
<script src="https://2018.igem.org/wiki/index.php?title=Team:ZJU-China/interLab/JavaScript&action=edit" type="text/javascript"></script>
+
 
+
+
<style type="text/css" media="screen">
+
.credits {
+
position: fixed;
+
left: 3em;
+
bottom: 4em;
+
font-size: 1em;
+
z-index: 20;
+
color: #444;
+
vertical-align: middle;
+
}
+
 
+
.credits * + * {
+
margin-top: 15px;
+
}
+
 
+
.credits a {
+
display: block;
+
padding: 8px 10px;
+
color: #777;
+
border: 2px solid #bbb;
+
background: #fff;
+
text-decoration: none;
+
}
+
 
+
.credits a:hover {
+
border-color: #555;
+
color: #222;
+
}
+
 
+
@media screen and (max-height: 700px) {
+
.credits {
+
display: none;
+
}
+
}
+
</style>
+
  
</body>
+
</body>
  
 
</html>
 
</html>

Latest revision as of 15:58, 22 July 2018

InterLab