Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ImAlsoGreg/reffit
Browse files Browse the repository at this point in the history
  • Loading branch information
imalsogreg committed Apr 17, 2014
2 parents c8339a5 + d89f9ee commit 8e1f67e
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 18 deletions.
5 changes: 4 additions & 1 deletion snaplets/heist/templates/_login.tpl
Expand Up @@ -2,10 +2,13 @@

<bind tag="postAction">/login</bind>
<bind tag="submitText">Login</bind>

<apply template="alpha_warning"/>

<apply template="userlogin"/>

<div style="margin: 0px auto; width:40%">
<p style="text-align:right">
Don't have an account yet? <a href="/new_user">Join us!</a>
</p>
</div>
</div>
5 changes: 3 additions & 2 deletions snaplets/heist/templates/_new_user.tpl
@@ -1,5 +1,6 @@
<h1>Create your account</h1>

<h1 style="text-align:center">Welcome to Reffit!</h1>
<br/>
<apply template="alpha_warning"/>
<bind tag="postAction">/new_user</bind>
<bind tag="submitText">Add User</bind>
<apply template="userform"/>
4 changes: 2 additions & 2 deletions snaplets/heist/templates/about.tpl
Expand Up @@ -3,7 +3,7 @@
<h2>What is Reffit?</h2>
<p>Scientists discuss other scientists' papers all the time, in journal clubs, conferences, and informal chats. Rather than letting all those words just heat up air, we want to bottle them, and distill them into a summary of how the community feels about a science paper.</p>

<h2>Is that necessary? Can't scientist's just read the papers and decide for themselves?</h2>
<h2>Is that necessary? Can't scientists just read the papers and decide for themselves?</h2>
<p>That's how it works now. And we're seeing that 80% of high-profile papers fail to replicate. It may be a culture problem. Scientists are rewarded for the name of the journal they publish in. Science is complicated - it can be hard for reviewers to understand what's methodologically wrong with a complicated paper.</p>
<p>But people talking around the water-cooler often <em>do</em> know. Sometimes <em>you</em> know. Reffit wants you to help build the consensus, and to help identify other people building the consensus.</p>

Expand Down Expand Up @@ -31,7 +31,7 @@

<h2>What does that mean, concretely?</h2>

<p>The idea is to collect a large number of individual bits of praise and criticism for scientific works. Readers click on the summaries they find helpful, and the praise and criticism they agree with. We collect and sort that invormation to build a quick overview of what a paper means, what's good about it, and how trustworthy it is. Noone can be an expert in every field, so these overviews can give you a more informed perspective on a paper that before you could only appreciate from a distance.</p>
<p>The idea is to collect a large number of individual bits of praise and criticism for scientific works. Readers click on the summaries they find helpful, and the praise and criticism they agree with. We collect and sort that invormation to build a quick overview of what a paper means, what's good about it, and how trustworthy it is. No one can be an expert in every field, so these overviews can give you a more informed perspective on a paper that before you could only appreciate from a distance.</p>

<h2>Isn't that system sensitive to vote-rigging?</h2>

Expand Down
13 changes: 13 additions & 0 deletions snaplets/heist/templates/alpha_warning.tpl
@@ -0,0 +1,13 @@
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Reffit is in alpha</strong>. There is no SSL here yet. Your participation is hugely appreciated, please sign up and write! But be safe while I iron out the kinks.
<ul>
<li><strong>Don't use a password that you use on any other website</strong></li>
<li>My programming mistake may result in anonymity slips, so <strong>don't write anything yet that you wouldn't say to the world in person.</strong></li>
<li>I never get to see your password - it's encrypted on your computer</li>
<li>I <strong>will not sell your e-mail address to anyone, or display it anywhere on the site</strong></li>
<li>Log in as user/password test/test if you want to do random testing. I'll delete this account before beta</li>
<li>Other content will be carried into the beta version, so write valuable things!</li>
</ul>
<p>A more thorough privacy policy is in the works.Feedback to imalsogreg. I'm on gmail. Thanks for checking Reffit out, have fun!</p>
</div>
16 changes: 7 additions & 9 deletions snaplets/heist/templates/base.tpl
@@ -1,10 +1,10 @@
<html>
<head>
<title>Reffit!</title>


<title>Reffit! (Alpha)</title>

<link rel="stylesheet" type="text/css" href="/static/media/css/screen.css"/>
<link rel="stylesheet" type="text/css" href="/static/media/css/prose.css"/>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
Expand All @@ -13,20 +13,18 @@
<link rel="stylesheet" type="test/css" href="/static/media/css/tree.css"/>
<link rel="icon" type="image/png" href="/static/media/img/flavCircle.png"/>
<link rel="stylesheet" type="text/css" href="/static/media/css/screen.css"/>
<link rel="stylesheet" type="text/css" href="/static/media/css/prose.css"/>
</head>
<body>
<apply template="nav"/>
<div id="content">
<apply-content/>
</div>
<div id="footer">
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion snaplets/heist/templates/nav.tpl
Expand Up @@ -7,7 +7,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Reffit</a>
<a class="navbar-brand" href="/">Reffit (Alpha)</a>
</div>

<div class="collapse navbar-collapse" id="navbar-collapse-1" style="padding:0px 50px 10px 50px">
Expand Down
9 changes: 8 additions & 1 deletion src/Site.hs
Expand Up @@ -96,7 +96,14 @@ handleDumpState = do
u <- query QueryAllUsers
dc <- query QueryAllDocClasses
ft <- query QueryAllFieldTags
writeText . T.pack . show $ PersistentState d u dc ft
aUser <- currentUser
case userLogin <$> aUser of
Just "imalsogreg" ->
writeText . T.pack . show $ PersistentState d u dc ft
Just n ->
writeText $ T.append n ", only the admin can dump_state."
Nothing ->
writeText $ "Only admin can dump_state."


------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions static/media/css/screen.css
Expand Up @@ -6,7 +6,6 @@ html {
body {
background-color: #FAFCFF;
padding: 10px;

margin: 0;
width:100%;
}
Expand Down Expand Up @@ -96,7 +95,7 @@ h3 .button{
background-color:rgba(255, 255, 255, 0.8);
border-style:solid;
border-width:1px;
border-color:#000;
border-color:#88e;
border-radius:10px;
opacity:1;
overflow:auto;
Expand Down

0 comments on commit 8e1f67e

Please sign in to comment.