Skip to content

Instantly share code, notes, and snippets.

@gadenbuie
Last active April 23, 2018 01:57
Show Gist options
  • Save gadenbuie/04fa46bbde107458faf74c685b927c83 to your computer and use it in GitHub Desktop.
Save gadenbuie/04fa46bbde107458faf74c685b927c83 to your computer and use it in GitHub Desktop.
My Shiny directory index template
<!DOCTYPE html>
<html>
<head>
<title>{{title}}</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
<!-- <link rel="stylesheet" href="https://unpkg.com/[email protected]/build/base-min.css"> -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
body {
font-family: 'Source Sans Pro', sans-serif;
}
pre, tt, code, .code, #detail {
font-family: 'Source Code Pro', monospace;
}
h1 {
font-size: 40px;
text-align: center;
margin-bottom: 5px;
}
h2 {
font-size: 30px;
text-align: center;
color: #444;
margin-top: 5px;
}
a {
text-decoration: none;
}
.container {
width: 100%;
}
.app-list {
max-width: 450px;
margin: auto;
border: black 2px solid;
border-radius: 5px;
padding: 15px;
margin-top: 10%;
box-shadow: #555 3px 4px 1px 1px;
}
.file-list ul {
list-style: none;
padding: 0px;
}
.file-list li {
display: block;
width: 100%;
text-align: center;
}
.file-list ul li a {
display: block;
width: 100%;
border: #222 solid 1px;
padding-top: 10px;
padding-bottom: 10px;
border: black 1px solid;
margin-bottom: 10px;
color: blue;
}
.file-list ul li a:hover {
background: #ddd;
color: blueviolet;
}
@media (max-width: 375px) {
/* .app-list {
width: 100%;
margin-left: 20px;
margin-right: 20px;
} */
body {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<div class="app-list">
<h1>App List</h1>
<h2 class="code">{{title}}</h2>
<div class="file-list">
<ul>
{{#each apps}}
<li><a class="code" href="{{this.url}}">{{this.name}}</a> (application)</li>
{{/each}}
{{#each dirs}}
<li><a class="code" href="{{this.url}}/">{{this.name}}/</a></li>
{{/each}}
{{#each files}}
<li><a class="code" href="{{this.url}}">{{this.name}}</a></li>
{{/each}}
</ul>
</div>
<p style = "text-align: center; margin-top: 25px;">
<a href="https://twitter.com/grrrck">@grrrck</a> <br />
<a href="https://garrickadenbuie.com">garrickadenbuie.com</a>
</p>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment