Skip to content

Commit

Permalink
improve persistent data storage UI
Browse files Browse the repository at this point in the history
  • Loading branch information
daattali committed Jul 26, 2016
1 parent fe204d8 commit a3014f3
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 15 deletions.
8 changes: 1 addition & 7 deletions persistent-data-storage/text/appDesc.md
Expand Up @@ -2,10 +2,4 @@ This app is a demonstration of how to store data from a shiny app in a *persiste

For more information on this topic, read [the associated tutorial on persistent data storage](http://deanattali.com/blog/shiny-persistent-data-storage/).

In this app, the data that is saved and restored is user-submitted responses to a form. This is a practical use case of saving data from a shiny app. For a guide on how to build forms with Shiny, see [this tutorial](http://deanattali.com/2015/06/14/mimicking-google-form-shiny/).

<span id="created-by-dean">
Created by [Dean Attali](http://deanattali.com)
&bull;
Code [on GitHub](https://github.com/daattali/shiny-server/tree/master/persistent-data-storage)
</span>
In this app, the data that is saved and restored is user-submitted responses to a form. This is a practical use case of saving data from a shiny app. For a guide on how to build forms with Shiny, see [this tutorial](http://deanattali.com/2015/06/14/mimicking-google-form-shiny/).
23 changes: 19 additions & 4 deletions persistent-data-storage/ui.R
Expand Up @@ -14,10 +14,25 @@ shinyUI(fluidPage(
title = "Persistent data storage with Shiny",
shinyjs::useShinyjs(),
tags$head(includeCSS(file.path("www", "app.css"))),

div(
id = "titlePanel",
"Persistent data storage with Shiny"
tags$a(
href="https://github.com/daattali/shiny-server/tree/master/persistent-data-storage",
tags$img(style="position: absolute; top: 0; right: 0; border: 0;",
src="github-orange-right.png",
alt="Fork me on GitHub")
),
div(id = "header",
div(id = "title",
"Persistent data storage with Shiny"
),
div(id = "subsubtitle",
"Created by",
tags$a(href = "http://deanattali.com/", "Dean Attali"),
HTML("&bull;"),
tags$a(href = "http://deanattali.com/blog/shiny-persistent-data-storage/", "Tutorial"),
"on storing data in Shiny",
HTML("&bull;"),
tags$a(href = "http://daattali.com/shiny/", "More apps"), "by Dean"
)
),

# Select storage type and show a description about it
Expand Down
26 changes: 22 additions & 4 deletions persistent-data-storage/www/app.css
Expand Up @@ -2,11 +2,29 @@ body {
background-color: #fafafa;
}

#titlePanel {
#header {
text-align: center;
font-size: 40px;
margin: 10px 0 -10px;
font-weight: bold;
color: #fdfdfd;
text-shadow: 0 0 1px #000;
padding: 30px 0 45px;
border-bottom: 1px solid #ddd;
margin: 0 -30px 20px;
background: url('header.jpg');
}

#title {
font-size: 5em;
text-shadow: 0 0 5px #000;
margin-bottom: 5px
}

#subsubtitle {
font-size: 1.3em;
}

#subsubtitle a {
color: #fdfdfd;
text-decoration: underline;
}

.well {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added persistent-data-storage/www/header.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a3014f3

Please sign in to comment.