Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <table border="0" cellpadding="0" cellspacing="3">
	<tbody contenteditable="false" oncontextmenu="return false">
		<tr>
			<th>Week</th>
			<th>Mon</th>
			<th>Tue</th>
			<th>Wed</th>
			<th>Thu</th>
			<th>Fri</th>
			<th>Sat</th>
			<th>Sun</th>
      <th>Total</th>
		</tr>
		<tr>
      <td>1<span>Jan 29</span></td>
			<td>4 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Rest</td>
      <td>12</td>
		</tr>
		<tr>
			<td>2<span>Feb 5</span></td>
			<td>4 m pace</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>5 m run</td>
			<td>Rest</td>
      <td>13</td>
		</tr>
		<tr>
			<td>3<span>Feb 12</span></td>
			<td>4 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>6 m run</td>
			<td>Rest</td>
      <td>14</td>
		</tr>
		<tr>
			<td>4<span>Feb 19</span></td>
			<td>4 m pace</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>7 m run</td>
			<td>Rest</td>
      <td>15</td>
		</tr>
		<tr>
			<td>5<span>Feb 26</span></td>
			<td>4 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>8 m run</td>
			<td>Rest</td>
      <td>16</td>
		</tr>
		<tr>
			<td>6<span>Mar 5</span></td>
			<td>4 m pace</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td><strong>5-K Race</strong></td>
			<td>Rest</td>
      <td>11<br></td>
		</tr>
		<tr>
			<td>7<span>Mar 12</span></td>
			<td>5 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>9 m run</td>
			<td>Rest</td>
      <td>18</td>
		</tr>
		<tr>
			<td>8<span>Mar 19</span></td>
			<td>5 m pace</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>10 m run</td>
			<td>Rest</td>
      <td>19</td>
		</tr>
		<tr>
			<td>9<span>Mar 26</span></td>
			<td>5 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td><strong>10-K Race</strong></td>
			<td>Rest</td>
      <td>16</td>
		</tr>
		<tr>
			<td>10<span>Apr 2</span></td>
			<td>5 m pace</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>11 m run</td>
			<td>Rest</td>
      <td>20</td>
		</tr>
		<tr>
			<td>11<span>Apr 9</span></td>
			<td>5 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>12 m run</td>
			<td>Rest</td>
      <td>21</td>
		</tr>
    <tr>
			<td>12<span>Apr 16</span></td>
			<td>4 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>4 m run</td>
			<td>Cross</td>
			<td>6 m run</td>
			<td>Rest</td>
      <td>14</td>
		</tr>
		<tr>
			<td>13<span>Apr 23</span></td>
			<td>2 m run</td>
			<td>Rest</td>
			<td>Cross</td>
			<td>1 m run</td>
			<td>Cross</td>
			<td><strong>Half Marathon!<span>April 28</span></strong></td>
      <td>Recover</td>
      <td>16</td>
		</tr>
	</tbody>
</table>

<div>
  <button id="edit">EDIT</button>
  <button id="save">SAVE</button>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Raleway');

body, h1, p, table{
  margin: 0;
  font-family: 'PT Sans', sans-serif;
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

table {
  border-collapse: collapse;
  height: 90vh;
}

tbody {
  cursor: default; 
}

td, th {
  border: 1px solid #755884;
  text-align:center;
  width: 11%;
  font-size: 14px;
}

th{
  background-color: #755884;
  color: white;
  border: 1px solid black;
  padding: 15px;
}

td:focus, th:focus{
  outline: none;
}

tr:nth-child(even){
  background-color: #f2f2f2;
}

tr:hover {
  background-color: #ddd;
}

td:first-child{
  font-weight: bold;
}

td:last-child{
  color: #755884;
}

td {
  color: #2e2e2e;
}

span{
  font-size: 11px;
  color: #755884;
  display: block;
}

.complete{
  background: grey;
  color: transparent;
  text-shadow : 0 0 0 #B8B8B8;
}

div {
  display: flex;
}

button {
  height: 10vh;
  width: 50%;
  border: none;
  background: #442d51;
  font-size: 14px;
  color: white;
  outline: none;
}

button:hover {
  background:#755884;
  cursor:pointer;
}

#save{
  border-left: 1px solid #f2f2f2;
}
              
            
!

JS

              
                var table = $('tbody');
var edit = $('#edit');
var save = $('#save');

if(localStorage.getItem('runschedule')){
  table.html(localStorage.getItem('runschedule'));
}
   
$('td').contextmenu(function() {
  $(this).toggleClass('complete');
  localStorage.setItem('runschedule', table.html());  
});

edit.click(function(){
  edit.css('background', '#755884');
  table.attr('contenteditable', 'true');
  table.css('cursor', 'auto');
})

save.click(function(){
  localStorage.setItem('runschedule', table.html());  
  table.attr('contenteditable', 'false');
  edit.css('background', '#442d51');
  table.css('cursor', 'default');
})
              
            
!
999px

Console