Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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