Skip to content

Instantly share code, notes, and snippets.

@emwdx
Created June 3, 2012 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emwdx/2862463 to your computer and use it in GitHub Desktop.
Save emwdx/2862463 to your computer and use it in GitHub Desktop.
An exploration of HTML, CSS, and some PHP for helping create the Global Physics Problem Database.
<!DOCTYPE html>
<?php
$username = 'Evan';
$user_type = 'teacher';
$question_text = 'A ball is thrown vertically at 10 meters per second on the surface of Earth. What is the minimum time (in seconds) it could take to reach its maximum height?' ?>
<html>
<style>
.container {
background:white;
float:center;
.top_bar {
font-family:Ubuntu;
font-size: 20px;
border:1px solid blue;
}
}
.top_bar #top_menu {
font-family:Ubuntu;
border:1px solid blue;
border-radius:5px;
color:black;
background:#5E56D6;
}
.top_bar #top_menu li {
border-radius: 5px;
background:#5E56D6;
display:inline;
color:black
padding:20px;
margin:20px;
}
.top_bar #top_menu li:hover {
background:#ABA7E3;
}
.top_bar #welcome_msg {
color:white;
font-size:16px;
}
.top_bar #welcome_msg:hover {
background:#5E56D6;
}
.display {
border:1px solid blue;
font-family:Ubuntu;
font-size:16px;
</style>
<head>
<title>Physics Problem Database</title>
<link href="
<?php echo URL::to_asset('/css/style.css'); ?>" rel="stylesheet" type="text/css" >
</head>
<body>
<div class = "container">
<div class = "top_bar">
<ul id = "top_menu">
<span id = "welcome_msg"> Welcome <?php echo $username ?> !</span>
<li>home</li>
<?php if($user_type=='student') {
echo "<li> feedback</li>";}?>
<?php if($user_type=='teacher') {
echo "<li> results</li>";
echo "<li> upload new</li>";}?>
<li>problems</li>
<li>about</li>
</ul>
</div>
<textarea class = "display" rows = "10" cols = "40">
<?php echo $question_text;?>
</textarea>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment