Merge V2 branch
@@ -3,6 +3,8 @@ Configuration for the Django admin site
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from django.db import models
|
||||
from django.forms import TextInput, Textarea
|
||||
from three_d_viewer.models import Category, Sample, Question, Answer, Mineral, GlossaryEntry
|
||||
|
||||
admin.site.register(Category)
|
||||
@@ -10,4 +12,12 @@ admin.site.register(Sample)
|
||||
admin.site.register(Question)
|
||||
admin.site.register(Answer)
|
||||
admin.site.register(Mineral)
|
||||
admin.site.register(GlossaryEntry)
|
||||
#admin.site.register(GlossaryEntry)
|
||||
|
||||
|
||||
class GlossaryEntryAdmin(admin.ModelAdmin):
|
||||
formfield_overrides = {
|
||||
models.TextField: {'widget': Textarea(attrs={'rows':4, 'cols':40})},
|
||||
}
|
||||
|
||||
admin.site.register(GlossaryEntry, GlossaryEntryAdmin)
|
||||
@@ -133,10 +133,15 @@ body {
|
||||
}
|
||||
|
||||
#footer {
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
/*margin-left: auto;*/
|
||||
background-color: #CCCCCC;
|
||||
z-index: 900;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#footer ul {
|
||||
@@ -197,13 +202,18 @@ body {
|
||||
}
|
||||
|
||||
#logo {
|
||||
width: 10%;
|
||||
width: 20%;
|
||||
height: 44px;
|
||||
background-color: #FFFFFF;
|
||||
text-align: center;
|
||||
background-color: #CCCCCC;
|
||||
text-align: left;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.logoImage {
|
||||
width: auto;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
#logo p {
|
||||
padding-top: 5%;
|
||||
}
|
||||
@@ -270,8 +280,18 @@ body {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* TEXT STYLES */
|
||||
|
||||
ul.introList {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
td.term {
|
||||
|
||||
padding-right: 100px;
|
||||
}
|
||||
|
||||
#mainText p {
|
||||
font-size: 12pt;
|
||||
font-family: 'quicksandregular', Helvetica, sans-serif;
|
||||
@@ -280,6 +300,14 @@ body {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#theoryText p {
|
||||
font-size: 12pt;
|
||||
font-family: 'quicksandregular', Helvetica, sans-serif;
|
||||
line-height: 16pt;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#mineralContainer p {
|
||||
font-size: 12pt;
|
||||
font-family: 'quicksandregular', Helvetica, sans-serif;
|
||||
@@ -311,6 +339,17 @@ h2.theoryHeadings {
|
||||
|
||||
}
|
||||
|
||||
h3.headings {
|
||||
font-size: 14pt;
|
||||
font-family: 'quicksandbold', Helvetica, sans-serif;
|
||||
line-height: 18pt;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
|
||||
}
|
||||
|
||||
img.example {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -346,7 +385,7 @@ img.example {
|
||||
padding: 0;
|
||||
}
|
||||
#cssmenu > ul > li.mainitem { /*CUSTOM CLASS TEST*/
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
}
|
||||
#cssmenu > ul > #menu-button {
|
||||
display: none;
|
||||
@@ -628,7 +667,7 @@ img.example {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/*CUSTOM CLASS TEST*/
|
||||
/*CUSTOM CLASS TEST*/
|
||||
#mineralMenu > ul > li.mainitem {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -644,7 +683,7 @@ img.example {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
padding: 15px 20px;
|
||||
color: #7a8189;
|
||||
color: #7a8189 ;
|
||||
text-transform: uppercase;
|
||||
-webkit-transition: color 0.25s ease-out;
|
||||
-moz-transition: color 0.25s ease-out;
|
||||
@@ -706,6 +745,7 @@ img.example {
|
||||
z-index: -2;
|
||||
}
|
||||
#mineralMenu ul ul {
|
||||
width: 84.5%; /* TESTING HERE!!!!!!!!!!!!!! */
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: 70px;
|
||||
@@ -720,9 +760,11 @@ img.example {
|
||||
#mineralMenu ul ul ul {
|
||||
top: 37px;
|
||||
padding-left: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
#mineralMenu ul ul li {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
#mineralMenu > ul > li:hover > ul {
|
||||
left: auto;
|
||||
@@ -735,7 +777,7 @@ img.example {
|
||||
opacity: 1;
|
||||
}
|
||||
#mineralMenu ul ul li a {
|
||||
width: 130px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 10px 20px;
|
||||
font-size: 10px;
|
||||
@@ -783,6 +825,7 @@ img.example {
|
||||
-o-transform: rotateY(180deg);
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
@media all and (max-width: 800px), only screen and (-webkit-min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min--moz-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (-o-min-device-pixel-ratio: 2/1) and (max-width: 1024px), only screen and (min-device-pixel-ratio: 2) and (max-width: 1024px), only screen and (min-resolution: 192dpi) and (max-width: 1024px), only screen and (min-resolution: 2dppx) and (max-width: 1024px) {
|
||||
#mineralMenu {
|
||||
width: auto;
|
||||
|
||||
BIN
three_d_viewer/images/SiO4 tetraedra.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
three_d_viewer/images/Thumbs.db
Normal file
BIN
three_d_viewer/images/bowen.jpg
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
three_d_viewer/images/cyclosilicates.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
three_d_viewer/images/depth profile.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
three_d_viewer/images/earth differentiation.png
Normal file
|
After Width: | Height: | Size: 335 KiB |
BIN
three_d_viewer/images/element abundance.png
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
three_d_viewer/images/inosilicates.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
three_d_viewer/images/logo2.png
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
three_d_viewer/images/logo_main.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
three_d_viewer/images/nesosilicates.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
three_d_viewer/images/phyllosilicates.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
three_d_viewer/images/seismic earth.png
Normal file
|
After Width: | Height: | Size: 596 KiB |
BIN
three_d_viewer/images/sorosilicates.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
three_d_viewer/images/tectosilicates.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -0,0 +1,77 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding field 'Sample.erb101_sample'
|
||||
db.add_column(u'three_d_viewer_sample', 'erb101_sample',
|
||||
self.gf('django.db.models.fields.BooleanField')(default=False),
|
||||
keep_default=False)
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting field 'Sample.erb101_sample'
|
||||
db.delete_column(u'three_d_viewer_sample', 'erb101_sample')
|
||||
|
||||
|
||||
models = {
|
||||
u'three_d_viewer.answer': {
|
||||
'Meta': {'object_name': 'Answer'},
|
||||
'correct': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': u"orm['three_d_viewer.Question']"}),
|
||||
'text': ('django.db.models.fields.CharField', [], {'max_length': '2000'})
|
||||
},
|
||||
u'three_d_viewer.category': {
|
||||
'Meta': {'object_name': 'Category'},
|
||||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['three_d_viewer.Category']"})
|
||||
},
|
||||
u'three_d_viewer.glossaryentry': {
|
||||
'Meta': {'object_name': 'GlossaryEntry'},
|
||||
'definition': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
u'three_d_viewer.mineral': {
|
||||
'Meta': {'object_name': 'Mineral', '_ormbases': [u'three_d_viewer.Sample']},
|
||||
'chemical_formula': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'cleavage_fracture': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'colour': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'crystallography': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'habit': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
'hardness': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '3', 'decimal_places': '2', 'blank': 'True'}),
|
||||
'identifying_features': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
'lustre': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'occurance': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
u'sample_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['three_d_viewer.Sample']", 'unique': 'True', 'primary_key': 'True'}),
|
||||
'specific_gravity': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '4', 'decimal_places': '2', 'blank': 'True'}),
|
||||
'streak': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
|
||||
},
|
||||
u'three_d_viewer.question': {
|
||||
'Meta': {'object_name': 'Question'},
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'sample': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': u"orm['three_d_viewer.Sample']"}),
|
||||
'text': ('django.db.models.fields.CharField', [], {'max_length': '2000'})
|
||||
},
|
||||
u'three_d_viewer.sample': {
|
||||
'Meta': {'object_name': 'Sample'},
|
||||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'description': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000', 'null': 'True', 'blank': 'True'}),
|
||||
'erb101_sample': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model_filename': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'samples'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['three_d_viewer.Category']"}),
|
||||
'viewed_count': ('django.db.models.fields.IntegerField', [], {'default': '0'})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['three_d_viewer']
|
||||
@@ -42,6 +42,10 @@ class Category(CommonInfo):
|
||||
@property
|
||||
def active_samples(self):
|
||||
return self.samples.select_subclasses(Sample, Mineral).filter(active=True).order_by('name')
|
||||
|
||||
@property
|
||||
def active_101_samples(self):
|
||||
return self.samples.select_subclasses(Sample, Mineral).filter(active=True).filter(erb101_sample=True).order_by('name')
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Categories"
|
||||
@@ -59,6 +63,7 @@ class Sample(CommonInfo):
|
||||
on_delete=models.SET_NULL,
|
||||
related_name="samples")
|
||||
viewed_count = models.IntegerField(default=0)
|
||||
erb101_sample = models.BooleanField(default=False)
|
||||
|
||||
#Use the inheritance manager for handling subclasses
|
||||
objects = InheritanceManager()
|
||||
@@ -76,11 +81,11 @@ class Sample(CommonInfo):
|
||||
self.viewed_count += 1
|
||||
|
||||
if cat.name == 'Fossils':
|
||||
return 'three_d_viewer:fossil_detail'
|
||||
return 'fossil_detail'
|
||||
elif cat.name == 'Rocks':
|
||||
return 'three_d_viewer:rock_detail'
|
||||
return 'rock_detail'
|
||||
else:
|
||||
return 'three_d_viewer:sample_detail'
|
||||
return 'sample_detail'
|
||||
|
||||
|
||||
class Mineral(Sample):
|
||||
@@ -102,7 +107,7 @@ class Mineral(Sample):
|
||||
@property
|
||||
def url(self):
|
||||
self.viewed_count += 1
|
||||
return 'three_d_viewer:mineral_detail'
|
||||
return 'mineral_detail'
|
||||
|
||||
|
||||
class Question(models.Model):
|
||||
|
||||
@@ -385,7 +385,7 @@ img.example {
|
||||
padding: 0;
|
||||
}
|
||||
#cssmenu > ul > li.mainitem { /*CUSTOM CLASS TEST*/
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
}
|
||||
#cssmenu > ul > #menu-button {
|
||||
display: none;
|
||||
|
||||
BIN
three_d_viewer/static/three_d_viewer/images/SiO4 tetraedra.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/bravais lattices.png
Normal file
|
After Width: | Height: | Size: 293 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/crystal axes.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 340 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/crystal symmetry.png
Normal file
|
After Width: | Height: | Size: 555 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/crystal systems.png
Normal file
|
After Width: | Height: | Size: 186 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/cyclosilicates.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/depth profile.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
|
After Width: | Height: | Size: 335 KiB |
|
After Width: | Height: | Size: 123 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/inosilicates.png
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/nesosilicates.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/phyllosilicates.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/seismic earth.png
Normal file
|
After Width: | Height: | Size: 596 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/sorosilicates.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
three_d_viewer/static/three_d_viewer/images/tectosilicates.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@@ -18,27 +18,36 @@
|
||||
<div id="container">
|
||||
<div id="header">
|
||||
<div id="logo">
|
||||
<img src={% static "three_d_viewer/images/logo_main.png" %} class="logoImage">
|
||||
<a href="{% url 'three_d_viewer:home' %}"><img src={% static "three_d_viewer/images/logo_main.png" %} class="logoImage"></a>
|
||||
</div><!-- CLOSE LOGO !-->
|
||||
<div id="menuContainer">
|
||||
<div id='cssmenu'>
|
||||
<ul>
|
||||
{% block home %}
|
||||
<li class='active mainitem'><a href="{% url 'three_d_viewer:home' %}"><span>Home</span></a></li>
|
||||
<li class='active mainitem'><a href="{% url 'three_d_viewer:erb101_home' %}"><span>ERB101</span></a></li>
|
||||
{% endblock %}
|
||||
<li class='has-sub mainitem'><a href='#'><span>Minerals</span></a>
|
||||
<ul>
|
||||
<li class='has-sub'><a><span>Theory</span></a>
|
||||
<ul>
|
||||
{% block theory %}
|
||||
<li><a href="{% url 'three_d_viewer:theory_fd' %}"><span>Formation and differentiation of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_structure' %}"><span>Structure of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_pt' %}"><span>Pressure and temperature</span></a></li>
|
||||
<li class='last'><a href="{% url 'three_d_viewer:theory_bowen' %}"><span>Bowen's reaction series</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_bowen' %}"><span>Bowen's reaction series</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_classification' %}"><span>Classification of minerals</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_silicates' %}"><span>Silicates</span></a></li>
|
||||
<li class='last'><a href="{% url 'three_d_viewer:theory_crystals' %}"><span>Crystals</span></a></li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="{% url 'three_d_viewer:minerals_practice' %}"><span>Practice</span></a></li>
|
||||
{% block mineral_practice %}<li><a href="{% url 'three_d_viewer:minerals_practice' %}"><span>Practice</span></a></li>{% endblock %}
|
||||
<!--<li class='last'><a href="{% url 'three_d_viewer:minerals_selftest' %}"><span>Self Test</span></a></li>!-->
|
||||
</ul>
|
||||
</li>
|
||||
<li class="mainitem"><a href="{% url 'three_d_viewer:rocks_practice' %}"><span>Rocks</span></a></li>
|
||||
<li class='last mainitem'><a href="{% url 'three_d_viewer:fossil_practice' %}"><span>Fossils</span></a></li>
|
||||
{% block rock_practice %}<li class="mainitem"><a href="{% url 'three_d_viewer:rocks_practice' %}"><span>Rocks</span></a></li>{% endblock %}
|
||||
{% block fossil_menu %}<li class='last mainitem'><a href="{% url 'three_d_viewer:fossil_practice' %}"><span>Fossils</span></a></li>{% endblock %}
|
||||
</ul>
|
||||
</div><!-- CLOSE CSSMENU !-->
|
||||
</div><!-- CLOSE MENUCONTAINER !-->
|
||||
|
||||
31
three_d_viewer/templates/three_d_viewer/erb101/base.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
|
||||
{% block home %}
|
||||
<li class='active mainitem'><a href="{% url 'three_d_viewer:erb101_home' %}"><span>ERB101 Home</span></a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block mineral_practice %}
|
||||
<li><a href="{% url 'three_d_viewer:erb101_minerals_practice' %}"><span>Practice</span></a></li>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block rock_practice %}
|
||||
<li class="mainitem"><a href="{% url 'three_d_viewer:erb101_rocks_practice' %}"><span>Rocks</span></a></li>
|
||||
{% endblock %}
|
||||
|
||||
{% block fossil_menu %}
|
||||
{% endblock %}
|
||||
|
||||
{% block theory %}
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_fd' %}"><span>Formation and differentiation of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_structure' %}"><span>Structure of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_pt' %}"><span>Pressure and temperature</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_bowen' %}"><span>Bowen's reaction series</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_classification' %}"><span>Classification of minerals</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:erb101_theory_silicates' %}"><span>Silicates</span></a></li>
|
||||
<li class='last'><a href="{% url 'three_d_viewer:erb101_theory_crystals' %}"><span>Crystals</span></a></li>
|
||||
{% endblock %}
|
||||
|
||||
<script type="text/javascript">
|
||||
alert("Hello world");
|
||||
</script>
|
||||
21
three_d_viewer/templates/three_d_viewer/erb101/home.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "three_d_viewer/erb101/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h3 class="headings">ERB101 - Earth Systems</h3><br><br>
|
||||
<p>
|
||||
Earth Science impacts every aspect of modern life. Hence, the concepts of Earth Science
|
||||
are fundamental not only to the field of Geology, but also to Environmental Science, natural
|
||||
resource management, civil engineering and society at large. Earth Systems provides an
|
||||
introduction to Earth Science, including earth materials, geologic history, geological and
|
||||
physical geography process at the Earth's surface, and the complex interplay between the
|
||||
lithosphere and landscapes. Additionally, the unit provides readily accessible examples of
|
||||
the use of scientific reasoning for understanding complex natural systems. Hence, Earth
|
||||
Systems is a foundation unit for further studies in Geology and Environmental Science, but
|
||||
more importantly, serves as a broad introduction to the very world we live on and to the ways
|
||||
of science in general. Such a background is highly desirable for any informed citizenry for
|
||||
understanding complex issues of resource, environment, and societal development.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "three_d_viewer/mineral_detail.html" %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "three_d_viewer/minerals_practice.html" %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% extends "three_d_viewer/rock_detail.html" %}
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{% extends "three_d_viewer/rock_practice.html" %}
|
||||
@@ -0,0 +1,26 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="bowensreactionseries">Bowen's Reaction Series</h2>
|
||||
<p>
|
||||
Bowen's Reaction Series arranges the silicate minerals in the order that they crystallise from a magma. The minerals at the top of the series crystallise from the melt at higher temperature than those
|
||||
lower down. It contains a continuous series, (right hand limb), discontinuous series (left hand limb), and the residual phases that describe the reaction pathway of different silicate minerals.
|
||||
The discontinuous series crystallises different minerals, with abrupt changes separating the different minerals due to a mineral reacting with the melt to form a different mineral (eg. Olivine reacting to crystallise pyroxene).
|
||||
The continuous series always crystallises plagioclase, but the composition of the plagioclase varies from more calcic at higher temperatures and more sodic as the temperature decreases.
|
||||
with the minerals at the bottom of the series being more stable, and less susceptible to weathering.
|
||||
The residual phases are the minerals at the bottom and crystallise last. Bowen's reaction series also predicts the stability of minerals in the low pressure conditions at the Earth's surface,
|
||||
<br /><br />
|
||||
It should be noted that all reactions do not start crystallising olivine/anorthite-rich plagioclase and continue through until they crystallise quartz.
|
||||
The actual reactions depend on many factors, such as the chemical composition of the melt, temperature, pressure, and amount of fractional crystallisation.
|
||||
For example, basalts form from the crystallisation of olivine, pyroxene and calcic plagioclase meaning that crystallisation stopped without the series progressing.
|
||||
If more fractional crystallisation were to occur, more intermediate and felsic minerals can crystallise.
|
||||
<br/>
|
||||
<img src="{% static "three_d_viewer/images/bowen.jpg" %}" style="padding-top:20px; text-align: left;" width="600px" height="auto">
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,32 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="classification">Classification of Minerals</h2>
|
||||
<p>
|
||||
The classification of minerals is based on their chemistry. The following mineral classes are based on the character of their common anions:</p>
|
||||
<li><p>Silicates (SiO<sub>4</sub><sup>4-</sup>)</p></li>
|
||||
<li><p>Oxides (O<sup>2-</sup>)</p></li>
|
||||
<li><p>Sulfides (S<sup>2-</sup>)</p></li>
|
||||
<li><p>Sulfates (SO<sub>4</sub><sup>2-</sup>)</p></li>
|
||||
<li><p>Halides (Cl<sup>-</sup>)</p></li>
|
||||
<li><p>Fluorites (F<sup>-</sup>)</p></li>
|
||||
<li><p>Phosphates (PO<sub>4</sub><sup>3-</sup>)</p></li>
|
||||
<li><p>Carbonates (CO<sub>3</sub><sup>2-</sup>)</p></li>
|
||||
<li><p>Native elements, e.g. Au.</p></li>
|
||||
<p><br />
|
||||
The relative abundance of elements in the Earth’s crust (? Composition and structure of Earth) determines which minerals form.
|
||||
As we can see in table x, oxygen is the most abundant anion in the Earth’s crust.
|
||||
Thus, the crust can be seen as a tight package of oxygen anions (O<sup>2-</sup>), which are bonded by larger cations,
|
||||
such as Si<sup>4+</sup>, Mg<sup>2+</sup>, or Al<sup>3+</sup>.
|
||||
The way atoms are packed together depends on the cation to anion radius ratio (Rx/Rz).
|
||||
With oxygen as the major anion, specific coordination and coordination polyhedra can be expected for different cations.
|
||||
<br /><br /><br />
|
||||
<a href="{% url 'three_d_viewer:theory_silicates' %}"><span>Silicate minerals</span></a>
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,56 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="pressureandtemp">Pressure and Temperature</h2>
|
||||
<p>
|
||||
The heat contained within the Earth is generated by two main sources: the formation of the Earth,
|
||||
and the decay of radioactive isotopes. The Earth was formed by the accretion of a large number of
|
||||
planitesimals as it cleared its orbit. The impact of those planitesimals generated a large amount
|
||||
of heat which is still being lost from the Earth’s core today. The other source of heat comes
|
||||
from the radioactive decay of elements within the crust and mantle of the Earth.
|
||||
The primary radioactive isotopes in the Earth are uranium-235, uranium-238, thorium-232,
|
||||
and potassium-40. Radioactive decay is the dominant form of heat flow at the surface of the Earth,
|
||||
providing approximately 80% of the heat budget.
|
||||
<br /><br />
|
||||
The temperature of the Earth changes from around 0°C at the surface to over 5000°C in the core.
|
||||
The geothermal gradient in the crust is approximately 30°C per kilometre in the crust on average,
|
||||
however there is significant local variation due to things such as the conductive abilities of the
|
||||
rocks at particular locations, as well as the presence of nearby magmatic intrusions.
|
||||
The geothermal gradient in the mantle reduces significantly, down to approximately 0.3°C/km.
|
||||
The base of the lithosphere is defined by the 1000°C isotherm. The base of the mantle is at
|
||||
approximately 2800°C.
|
||||
<br /><br />
|
||||
The method of heat transfer changes throughout the Earth. There are three main mechanisms for
|
||||
heat transfer in the Earth: conduction, convection, and radiation. Starting in the inner core,
|
||||
the main method of heat transfer is by conduction through the solid material. In the liquid,
|
||||
outer core heat transfer is by both conduction and convection. The mantle is dominated by convection,
|
||||
which is the driver of plate tectonics. The crust is again dominated by conduction, and finally
|
||||
energy escapes the Earth to the atmosphere by radiation.
|
||||
<br /><br />
|
||||
Pressure in the Earth continually increases with depth, according to the formula P = gρz,
|
||||
where g is the gravitation field strength, ρ is the density and z is the depth. The main
|
||||
difference in the pressure gradient is cause by the different lithologies in the layers
|
||||
of the Earth. The average density of continental crust is approximately 2.7g/cm3 and
|
||||
is ~3.0 g/cm3 in oceanic crust, and increases to about 3.3 g/cm3 in the mantle.
|
||||
The increase of pressure with depth in the Earth affects the dominant mineralogy, as
|
||||
well as the increase of the melting point of different minerals.
|
||||
<br /><br />
|
||||
The structure of minerals, such as olivine becomes unstable as pressure increases.
|
||||
Below about 410km olivine becomes unstable and transforms into wadsleyite, which has the
|
||||
same chemical composition as olivine, but has a different crystal structure. As depth
|
||||
increases, wadsleyite transforms to ringwoodite, which subsequently transforms into
|
||||
perovskite at about 600km.
|
||||
<br /><br />
|
||||
At higher pressure, minerals have a higher melting point. The effect is this phenomenon
|
||||
is that the dominant method of melting in the mantle is not by increasing the temperature
|
||||
past its melting point, but by decompression. Due to convective processes in the mantle,
|
||||
as parts of the mantle rise the decrease in pressure lowers the melting temperature and
|
||||
can cause the mantle to melt.
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="structureofearth">Structure of Earth</h2>
|
||||
<p>
|
||||
The Earth's structure is differentiated in three distinct layers: the core, mantle, and crust. The layers are distinguished by a change in the velocity of seismic waves at their boundaries.
|
||||
The crust is the upper most part of the earth, with depths ranging from an average of 7km in in the oceans, to an average of 38km in continental crust.
|
||||
The crust thickens underneath mountain ranges, and can reach depths of 90km underneath the Himalayas. The composition of the crust also differs between oceanic and
|
||||
continental environments. Ocean crust is young mafic crust dominated by basalts and gabbros that is recycled regularly(~300Ma) due to subduction processes.
|
||||
Continental crust is much more varied in structure and composition than oceanic, but has an overall average composition of granodiorite.
|
||||
<br /><br />
|
||||
The boundary of the crust and mantle is defined by the Mohorovičić discontinuity, commonly referred to as the Moho.
|
||||
It is defined by a sharp increase in seismic wave velocity, due to a change in material properties between crustal rocks and mantle rocks. The mantle is dominated by
|
||||
silicate minerals that are rich in iron and magnesium, chiefly pyroxenes and polymorphs of olivine, forming peridotite. The mantle, while solid, behaves plastically,
|
||||
allowing to flow at very slow rates.
|
||||
<br /><br />
|
||||
The core is distinguished by the absence of S waves, leading to the inference that the core is liquid. The core is separated into the outer core and the inner core.
|
||||
The outer core is liquid dominated by iron and nickel. The inner core is solid, as determined by the strong refraction of P waves at the inner core-outer core boundary,
|
||||
and was formed by crystalizing minerals from the liquid part of the core as the Earth cools.
|
||||
<br /><br />
|
||||
The crust and mantle are also further distinguished by material properties into the lithosphere, asthenosphere, and mesosphere. The chemical composition is
|
||||
uniform throughout the mantle though, but changes in pressure and temperature determine which polymorphs will exist at different depths.
|
||||
The lithosphere contains the crust, and the upper part of the mantle down to ~100km under oceanic crust, and 200-300km under continental crust (Twiss & Moores, 2007).
|
||||
The lithosphere-asthenosphere boundary is defined by the 1300K isotherm, which is the temperature where olivine starts to behave viscously.
|
||||
The rocks in the mesosphere are under more pressure than those in the asthenosphere, so no longer behave viscously.</p>
|
||||
<figure>
|
||||
<img src="{% static "three_d_viewer/images/structure - usgs.gif" %}" style="padding-top:20px;">
|
||||
<figcaption><p>Image sourced from <a href="http://pubs.usgs.gov/gip/dynamic/graphics/FigS1-1.gif">USGS</a>.</p></figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -8,7 +8,7 @@
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td class="term"><p>{{ entry.name }}</p></td>
|
||||
<td><p>{{ entry.definition }}</p></td>
|
||||
<td><p>{{ entry.definition|safe }}</p></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
@@ -64,6 +64,10 @@ function load(){
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Streak:</p></td>
|
||||
<td><p>{{ mineral.streak }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p>Habit:</p></td>
|
||||
<td><p>{{ mineral.habit }}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{% block content %}
|
||||
<div id="sidebar">
|
||||
<div id='mineralMenu'>
|
||||
<ul>
|
||||
<li class="has-sub mainitem"><a href="#">{% block menu_header %}Select a sample{% endblock %}</a>
|
||||
<ul>
|
||||
{% for sample in active_samples %}
|
||||
<li><a href={% url sample.url sample.id %}>{{ sample.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- close MINERALMENU !-->
|
||||
{% block sample_detail %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
{% block 3dcontent %}
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -28,8 +28,9 @@ function load(){
|
||||
}
|
||||
request.send();
|
||||
}
|
||||
|
||||
{% endblock load %}
|
||||
|
||||
{% block menu_header %}Select a rock{% endblock %}
|
||||
{% block menu_header %}Select a rock {% endblock %}
|
||||
|
||||
|
||||
|
||||
@@ -403,4 +403,5 @@ function resizeCanvas() {
|
||||
<canvas id="canvas" class="example"></canvas>
|
||||
<div><br><span id="progress" style="color: red"></span></div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% extends base_template %}
|
||||
|
||||
{% block content %}
|
||||
<div id="sidebar">
|
||||
@@ -7,7 +7,11 @@
|
||||
<li class="has-sub mainitem"><a href="#">{% block menu_header %}Select a sample{% endblock %}</a>
|
||||
<ul>
|
||||
{% for sample in active_samples %}
|
||||
<li><a href={% url sample.url sample.id %}>{{ sample.name }}</a></li>
|
||||
{% if base_template == 'three_d_viewer/base.html' %}
|
||||
<li><a href={% url 'three_d_viewer:'|add:sample.url sample.id %}>{{ sample.name }}</a></li>
|
||||
{% else %}
|
||||
<li><a href={% url 'three_d_viewer:erb101_'|add:sample.url sample.id %}>{{ sample.name }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
@@ -7,17 +7,25 @@
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="bowensreactionseries">Bowen's Reaction Series</h2>
|
||||
<p>
|
||||
Bowen's Reaction Series arranges the silicate minerals in the order that they crystallise from a magma. The minerals at the top of the series crystallise from the melt at higher temperature than those
|
||||
lower down. It contains a continuous series, (right hand limb), discontinuous series (left hand limb), and the residual phases that describe the reaction pathway of different silicate minerals.
|
||||
The discontinuous series crystallises different minerals, with abrupt changes separating the different minerals due to a mineral reacting with the melt to form a different mineral (eg. Olivine reacting to crystallise pyroxene).
|
||||
The continuous series always crystallises plagioclase, but the composition of the plagioclase varies from more calcic at higher temperatures and more sodic as the temperature decreases.
|
||||
with the minerals at the bottom of the series being more stable, and less susceptible to weathering.
|
||||
The residual phases are the minerals at the bottom and crystallise last. Bowen's reaction series also predicts the stability of minerals in the low pressure conditions at the Earth's surface,
|
||||
Bowen's Reaction Series arranges the <a href="{% url silicates_theory %}"><span>silicate minerals</span></a> in the order that they crystallize from magma. The minerals at the
|
||||
top of the series crystallize from the melt at higher temperature than those lower down. It contains a continuous series, (right hand limb), a
|
||||
discontinuous series (left hand limb), and the residual phases, which are listed in their relative sequence of crystallization. The discontinuous
|
||||
series describes the sequence of minerals that crystallize as the temperature of the magma decreases. The discontinuity of each of the
|
||||
crystallization sequences reflects the different melting/crystallization temperatures of the minerals, and the change in composition of the
|
||||
residual magma, as the early crystallizing phases are being fractionated from the melt. The continuous series always crystallizes <a href={% url url_extender|add:plag.url plag.id %}>plagioclase</a>,
|
||||
but the composition of the plagioclase changes from more calcic (i.e. anorthite) at higher temperatures to more sodic (i.e. albite) as the
|
||||
temperature decreases. The compositional change during mineral growth can be recorded in compositional zoning of plagioclase
|
||||
crystals. The minerals at the bottom of Bowen’s reaction series crystallize last and are more stable,
|
||||
and less susceptible to weathering. Thus, Bowen's reaction series also predicts the stability of minerals in the
|
||||
low pressure conditions at the Earth's surface.
|
||||
<br /><br />
|
||||
It should be noted that all reactions do not start crystallising olivine/anorthite-rich plagioclase and continue through until they crystallise quartz.
|
||||
The actual reactions depend on many factors, such as the chemical composition of the melt, temperature, pressure, and amount of fractional crystallisation.
|
||||
For example, basalts form from the crystallisation of olivine, pyroxene and calcic plagioclase meaning that crystallisation stopped without the series progressing.
|
||||
If more fractional crystallisation were to occur, more intermediate and felsic minerals can crystallise.
|
||||
It should be noted that all reactions do not start crystallizing olivine/anorthite-rich plagioclase and continue through until they
|
||||
crystallize <a href={% url url_extender|add:quartz.url quartz.id %}>quartz</a>. Which minerals actually form, depend on many factors, such as the chemical composition of the melt, temperature,
|
||||
pressure, and amount of fractional crystallization. For example, basalts form from the crystallization of
|
||||
<a href={% url url_extender|add:olivine.url olivine.id %}>olivine</a>,
|
||||
<a href={% url url_extender|add:diopside.url diopside.id %}>pyroxene</a> and
|
||||
calcic plagioclase, meaning that crystallization stopped without the series progressing. If more fractional crystallization
|
||||
were to occur, more intermediate and felsic minerals can crystallize.
|
||||
<br/>
|
||||
<img src="{% static "three_d_viewer/images/bowen.jpg" %}" style="padding-top:20px; text-align: left;" width="600px" height="auto">
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="classification">Classification of Minerals</h2>
|
||||
<p>
|
||||
The classification of minerals is based on their chemistry. The following mineral classes are based on the character of their common anions:</p>
|
||||
<li><p><a href="{% url silicates_theory %}"><span>Silicates</span></a> (SiO<sub>4</sub><sup>4-</sup>)</p></li>
|
||||
<li><p>Oxides (O<sup>2-</sup>)</p></li>
|
||||
<li><p>Sulfides (S<sup>2-</sup>)</p></li>
|
||||
<li><p>Sulfates (SO<sub>4</sub><sup>2-</sup>)</p></li>
|
||||
<li><p>Halides (Cl<sup>-</sup>)</p></li>
|
||||
<li><p>Fluorites (F<sup>-</sup>)</p></li>
|
||||
<li><p>Phosphates (PO<sub>4</sub><sup>3-</sup>)</p></li>
|
||||
<li><p>Carbonates (CO<sub>3</sub><sup>2-</sup>)</p></li>
|
||||
<li><p>Native elements, e.g. Au.</p></li>
|
||||
<p><br />
|
||||
<img src="{% static "three_d_viewer/images/element abundance.png" %}" align="right" width="412" height="324">
|
||||
The relative abundance of elements in the Earth’s crust (see <a href="{% url structure_theory %}"><span>Structure of Earth</span></a>) determines which minerals form.
|
||||
Oxygen is the most abundant anion in the Earth’s crust.
|
||||
Thus, the crust can be seen as a tight package of oxygen anions (O<sup>2-</sup>), which are bonded by larger cations,
|
||||
such as Si<sup>4+</sup>, Mg<sup>2+</sup>, or Al<sup>3+</sup>.
|
||||
The way atoms are packed together depends on the cation to anion radius ratio (Rx/Rz).
|
||||
With oxygen as the major anion, specific coordination and coordination polyhedra can be expected for different cations.
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
35
three_d_viewer/templates/three_d_viewer/theory/crystals.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="classification">Crystals</h2>
|
||||
<p>
|
||||
<a href="{% static "three_d_viewer/images/crystal axes.png" %}"><img width="150" height="150" src="{% static "three_d_viewer/images/crystal axes.png" %}" align="right"></a>
|
||||
<a href="{% static "three_d_viewer/images/crystal systems.png" %}"><img height="220" width="153" src="{% static "three_d_viewer/images/crystal systems.png" %}" align="left"></a>
|
||||
An important characteristic of minerals is their crystallinity that is defined by the 3-dimensional, periodic structure of their atomic/ionic
|
||||
components. (Note that some substances, e.g. opal or obsidian, do not form crystals, but are amorphous.
|
||||
We sometimes refer to them as mineraloids)
|
||||
<br /><br />
|
||||
The smallest translatable unit cell of a crystal is defined by the crystal axes a, b and c and corresponding angles a, ß and γ.
|
||||
There are seven systems of crystal axes called the seven crystal systems.
|
||||
There are 14 crystal lattices, called the Bravais lattices that describe different possibilities of
|
||||
distributing lattice points in the unit cells of the seven crystal systems. Among the seven crystal systems, 32 crystallographic
|
||||
point groups (or crystal classes) are distinguished based on the possible combination of symmetry operations, such as reflection,
|
||||
rotation, inversion and rotoinversion, within 3-dimensional space. Combination of the 14 Bravais lattices and the 32 point groups result in 230 space groups,
|
||||
when further glide plane and screw axes symmetry elements are included. The space groups describe all possibly existing crystal and 3-dimensional structures.
|
||||
<br /><br />
|
||||
The crystal form arises from the symmetry elements that define the shape of the unit cell. Length and angle of the
|
||||
unit vectors describe the shape of the unit cell for each crystal system. The external shape of a particular crystal is called crystal
|
||||
habit and essentially dependent on the physical-chemical framework conditions during crystal growth.
|
||||
<br />
|
||||
<a href="{% static "three_d_viewer/images/bravais lattices.png" %}"><img height="300" width="163" src="{% static "three_d_viewer/images/bravais lattices.png" %}" align="right"></a>
|
||||
<a href="{% static "three_d_viewer/images/bravais lattices.png" %}"><img height="300" width="163" src="{% static "three_d_viewer/images/bravais lattices.png" %}" align="left"></a>
|
||||
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
|
||||
<a href="{% static "three_d_viewer/images/crystal morphology.png" %}"><img height="150" width="309" src="{% static "three_d_viewer/images/crystal morphology.png" %}"></a>
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,33 @@
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="formationdiff">Formation and differentiation of Earth</h2>
|
||||
<p>
|
||||
Earth, like the Sun and the other planets of our Solar System formed around 4.6 billion years ago from part of a giant molecular
|
||||
cloud - the cosmic debris of a massive supernova. Out of matter that coalesced in the center of the molecular cloud due to
|
||||
gravitational collapse emerged the proto-Sun and a surrounding disk of dust and gas. Attraction forces within this rotating
|
||||
protoplanetary disk that fed the young Sun, led to the accretion of progressively growing objects and planetesimals.
|
||||
Increasing mass and gravitational forces of the growing planetary bodies resulted in interactions and disturbance in their orbits,
|
||||
ultimately giving rise to larger collisions.
|
||||
<br /><br />
|
||||
Earth, as a terrestrial inner planet formed relatively close to the Sun through the
|
||||
accumulation of rather heavier matter, whereas the outer planets formed from gas that had been blown away in more distal
|
||||
regions of the solar system (solar wind). Continuous bombardment and larger impacts – including one that led to the
|
||||
formation of the Moon -, and the radioactive decay within the Earth heated the planet resulting in partial melting.
|
||||
Different melting temperatures and density contrasts led to gravitational segregation of a heavier iron core and a lighter
|
||||
silicate mantle. Further chemical differentiation by partial melting of the mantle led to the formation of Earth’s proto-crust.
|
||||
The Earth’s layering into core, mantle and crust due to this early differentiation remains an essential
|
||||
feature of the Earth’s structure.
|
||||
<br /><br />
|
||||
</p>
|
||||
<figure>
|
||||
<a href="{% static "three_d_viewer/images/earth differentiation.png" %}"><img width=600 height=350 src="{% static "three_d_viewer/images/earth differentiation.png" %}">
|
||||
<figcaption>Differentiation of minerals within the earth</figcaption>
|
||||
</figure>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
@@ -7,49 +7,57 @@
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="pressureandtemp">Pressure and Temperature</h2>
|
||||
<p>
|
||||
The heat contained within the Earth is generated by two main sources: the formation of the Earth,
|
||||
and the decay of radioactive isotopes. The Earth was formed by the accretion of a large number of
|
||||
planitesimals as it cleared its orbit. The impact of those planitesimals generated a large amount
|
||||
of heat which is still being lost from the Earth’s core today. The other source of heat comes
|
||||
from the radioactive decay of elements within the crust and mantle of the Earth.
|
||||
The primary radioactive isotopes in the Earth are uranium-235, uranium-238, thorium-232,
|
||||
and potassium-40. Radioactive decay is the dominant form of heat flow at the surface of the Earth,
|
||||
providing approximately 80% of the heat budget.
|
||||
The heat contained within the Earth is generated by two main sources: the formation of the Earth, and the decay of radioactive isotopes.
|
||||
The Earth was formed by the accretion of a large number of planetesimals as it cleared its orbit.
|
||||
The impact of those planetesimals generated a large amount of heat which is still being lost from the Earth’s core today.
|
||||
The other source of heat comes from the radioactive decay of elements within the crust and mantle of the Earth.
|
||||
The primary radioactive isotopes in the Earth are uranium-235, uranium-238, thorium-232, and potassium-40.
|
||||
Radioactive decay is the dominant form of heat flow at the surface of the Earth, providing approximately 80% of the heat budget.
|
||||
<br /><br />
|
||||
The temperature of the Earth changes from around 0°C at the surface to over 5000°C in the core.
|
||||
The geothermal gradient in the crust is approximately 30°C per kilometre in the crust on average,
|
||||
however there is significant local variation due to things such as the conductive abilities of the
|
||||
rocks at particular locations, as well as the presence of nearby magmatic intrusions.
|
||||
The geothermal gradient in the mantle reduces significantly, down to approximately 0.3°C/km.
|
||||
The base of the lithosphere is defined by the 1000°C isotherm. The base of the mantle is at
|
||||
approximately 2800°C.
|
||||
</p>
|
||||
<figure>
|
||||
<a href='{% static "three_d_viewer/images/seismic earth.png" %}'><img height=300 width=300 src='{% static "three_d_viewer/images/seismic earth.png" %}'></a>
|
||||
<figcaption>The seismic profile of the earth</figcaption>
|
||||
</figure>
|
||||
<p>
|
||||
<br />
|
||||
The temperature of the Earth changes from around 0°C at the surface to over 5000°C in the core.
|
||||
The geothermal gradient in the crust is approximately 30°C per kilometre in the crust on average, however there is significant local
|
||||
variation due to things such as the conductive abilities of the rocks at particular locations, as well as the presence of nearby magmatic
|
||||
intrusions. The geothermal gradient in the mantle reduces significantly, down to approximately 0.3°C/km. The base of the lithosphere
|
||||
is defined by the 1000°C isotherm. The base of the mantle is at approximately 2800°C.
|
||||
<br /><br />
|
||||
The method of heat transfer changes throughout the Earth. There are three main mechanisms for
|
||||
heat transfer in the Earth: conduction, convection, and radiation. Starting in the inner core,
|
||||
the main method of heat transfer is by conduction through the solid material. In the liquid,
|
||||
outer core heat transfer is by both conduction and convection. The mantle is dominated by convection,
|
||||
which is the driver of plate tectonics. The crust is again dominated by conduction, and finally
|
||||
energy escapes the Earth to the atmosphere by radiation.
|
||||
The method of heat transfer changes throughout the Earth. There are three main mechanisms for heat transfer in the Earth:
|
||||
conduction, convection, and radiation. Starting in the inner core, the main method of heat transfer is by conduction through the
|
||||
solid material. In the liquid, outer core heat transfer is by both conduction and convection. The mantle is dominated by convection,
|
||||
which is the driver of plate tectonics. The crust is again dominated by conduction, and finally energy escapes the
|
||||
Earth to the atmosphere by radiation.
|
||||
<br /><br />
|
||||
Pressure in the Earth continually increases with depth, according to the formula P = gρz,
|
||||
where g is the gravitation field strength, ρ is the density and z is the depth. The main
|
||||
difference in the pressure gradient is cause by the different lithologies in the layers
|
||||
of the Earth. The average density of continental crust is approximately 2.7g/cm3 and
|
||||
is ~3.0 g/cm3 in oceanic crust, and increases to about 3.3 g/cm3 in the mantle.
|
||||
The increase of pressure with depth in the Earth affects the dominant mineralogy, as
|
||||
well as the increase of the melting point of different minerals.
|
||||
Pressure in the Earth continually increases with depth, according to the formula P = gρz, where g is the gravitation field strength,
|
||||
ρ is the density and z is the depth. The main difference in the pressure gradient is cause by the different lithologies in the layers
|
||||
of the Earth. The average density of continental crust is approximately 2.7g/cm<sup>3</sup> and is ~3.0 g/cm<sup>3</sup> in oceanic crust,
|
||||
and increases to about 3.3 g/cm<sup>3</sup> in the mantle. The increase of pressure with depth in the Earth affects the dominant mineralogy,
|
||||
as well as the increase of the melting point of different minerals.
|
||||
<br /><br />
|
||||
The structure of minerals, such as olivine becomes unstable as pressure increases.
|
||||
Below about 410km olivine becomes unstable and transforms into wadsleyite, which has the
|
||||
same chemical composition as olivine, but has a different crystal structure. As depth
|
||||
increases, wadsleyite transforms to ringwoodite, which subsequently transforms into
|
||||
perovskite at about 600km.
|
||||
The structure of minerals, such as <a href={% url url_extender|add:olivine.url olivine.id %}>olivine</a> becomes unstable as pressure increases.
|
||||
Below about 410 km olivine (Mg<sub>2</sub>SiO<sub>4</sub>) becomes unstable and transforms into wadsleyite (Mg<sub>2</sub>SiO<sub>4</sub>),
|
||||
which has the same chemical composition as olivine, but has a different crystal structure. As depth increases,
|
||||
wadsleyite transforms to ringwoodite (Mg<sub>2</sub>SiO<sub>4</sub>) at ~520 km, which subsequently transforms into silicate perovskite
|
||||
(MgSiO<sub>3</sub>) and magnesiowuestite (MgO) at about 660km depth. The increase in density is observed in an increase in the
|
||||
velocity of P- and S-waves.
|
||||
<br /><br />
|
||||
At higher pressure, minerals have a higher melting point. The effect is this phenomenon
|
||||
is that the dominant method of melting in the mantle is not by increasing the temperature
|
||||
past its melting point, but by decompression. Due to convective processes in the mantle,
|
||||
as parts of the mantle rise the decrease in pressure lowers the melting temperature and
|
||||
can cause the mantle to melt.
|
||||
</p>
|
||||
<figure>
|
||||
<a href='{% static "three_d_viewer/images/depth profile.png" %}' align="right"><img height=300 width=270 src='{% static "three_d_viewer/images/depth profile.png" %}'></a>
|
||||
<figcaption>The depth profile of the earth</figcaption>
|
||||
</figure>
|
||||
<p>
|
||||
<br />
|
||||
At higher pressure, minerals have a higher melting point. The effect of this phenomenon is that the dominant method of
|
||||
melting in the mantle is not by increasing the temperature past its melting point, but by decompression.
|
||||
Due to convective processes in the mantle, as parts of the mantle rise the decrease in pressure lowers the melting temperature
|
||||
and can cause the mantle to melt. Such process is observed at oceanic spreading centres, where partial decompression melting of the
|
||||
mantle produces juvenile oceanic crust.
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Silicates</h1>
|
||||
<figure>
|
||||
<img src="{% static "three_d_viewer/images/SiO4 tetraedra.png" %}">
|
||||
<figcaption>The silica tetrahedron, [SiO<sub>4</sub>]<sup>4-</sup></figcaption>
|
||||
</figure>
|
||||
<br />
|
||||
<table>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="cyclosilicates">Cyclosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/cyclosilicates.png" %}" align="right">
|
||||
The cyclosilicates form rings of linked [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra with either [Si<sub>3</sub>O<sub>9</sub>]<sup>6-</sup>,
|
||||
[Si<sub>4</sub>O<sub>12</sub>]<sup>8-</sup>, or [Si<sub>6</sub>O<sub>18</sub>]<sup>12-</sup> configurations. Cordierite with the
|
||||
chemical formula (Mg,Fe)<sub>2</sub>Al<sub>4</sub>Si<sub>5</sub>O<sub>18</sub> represents an example of the cyclosilicate group.
|
||||
</p>
|
||||
</tr></td>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="inosilicates">Inosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/inosilicates.png" %}" align="right">
|
||||
In the inosilicates, [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra are linked as chains, which in turn are linked together by cations.
|
||||
Single-chain inosilicates form [Si<sub>2</sub>O<sub>6</sub>]<sup>4-</sup> groups, and double-chain inosilicates
|
||||
form [Si<sub>4</sub>O<sub>11</sub>]<sup>6-</sup> groups. Pyroxenes, e.g. <a href={% url url_extender|add:diopside.url diopside.id %}>diopside</a> with the chemical formula
|
||||
CaMgSi<sub>2</sub>O<sub>6</sub>, are single-chain, and amphiboles, e.g. hornblende
|
||||
(Ca<sub>2</sub>(Mg,Fe,Al)<sub>5</sub>(Al,Si)<sub>8</sub>O<sub>22</sub>(OH)) or <a href={% url url_extender|add:actinolite.url actinolite.id %}>actinolite</a>
|
||||
(Ca<sub>2</sub>(Fe,Mg)<sub>5</sub>Si<sub>8</sub>O<sub>22</sub>(OH)<sub>2</sub>) are double-chain inosilicates.
|
||||
</p>
|
||||
</tr></td>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="nesosilicates">Nesosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/nesosilicates.png" %}" align="right">
|
||||
In the nesosilicate group, [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra are isolated from each other and share their oxygens
|
||||
with octahedral groups, which contain cations, such as Mg<sup>2+</sup>, Fe<sup>2+</sup>, or Ca<sup>2+</sup>. A common
|
||||
rock-forming mineral of the nesosilicate group is
|
||||
<a href={% url url_extender|add:olivine.url olivine.id %}>olivine</a> with the chemical formula
|
||||
(Mg,Fe)<sub>2</sub>SiO<sub>4</sub>.
|
||||
</p>
|
||||
</tr></td>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="phyllosilicates">Phyllosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/phyllosilicates.png" %}" align="right">
|
||||
Phyllosilicates comprise sheets of [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra rings, where three of the four oxygens of
|
||||
each tedrahedrons are shared resulting in [Si<sub>4</sub>O<sub>10</sub>]<sup>4-</sup> groups. Biotite with the
|
||||
chemical formula K(Mg,Fe)<sub>3</sub>(AlSi<sub>3</sub>O<sub>10</sub>)(F,OH)<sub>2</sub> is a common rock-forming phyllosilicate.
|
||||
</p>
|
||||
</tr></td>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="sorosilicates">Sorosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/sorosilicates.png" %}" align="right">
|
||||
Two [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra are linked by a shared corner oxygen to form
|
||||
[Si<sub>2</sub>O<sub>7</sub>]<sup>6-</sup> groups. An example for the sorosilicate group is the mineral epidote with the
|
||||
chemical formula Ca<sub>2</sub>Al<sub>2</sub>(Fe<sup>3+</sup>,Al)(SiO<sub>4</sub>)(Si<sub>2</sub>O<sub>7</sub>)O(OH).
|
||||
</p>
|
||||
</tr></td>
|
||||
<tr><td>
|
||||
<h2 class="theoryHeadings" id="tectosilicates">Tectosilicates</h2>
|
||||
<p>
|
||||
<img src="{% static "three_d_viewer/images/tectosilicates.png" %}" align="right">
|
||||
Complete linkage of [SiO<sub>4</sub>]<sup>4-</sup> tedrahedra results in the 3-dimensional framework of the tectosilicates.
|
||||
<a href={% url url_extender|add:quartz.url quartz.id %}>Quartz</a> (SiO<sub>2</sub>) and the feldspars
|
||||
(<a href={% url url_extender|add:plag.url plag.id %}>plagioclase</a>,
|
||||
<a href={% url url_extender|add:microcline.url microcline.id %}>microcline</a>)
|
||||
(e.g. anorthite, CaAl<sub>2</sub>Si<sub>2</sub>O<sub>8</sub>) are tectosilicates.
|
||||
</p>
|
||||
</tr></td>
|
||||
</table>
|
||||
<br /><br /><br /><br />
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% extends base_template %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
@@ -6,30 +6,47 @@
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="structureofearth">Structure of Earth</h2>
|
||||
<p>
|
||||
The Earth's structure is differentiated in three distinct layers: the core, mantle, and crust. The layers are distinguished by a change in the velocity of seismic waves at their boundaries.
|
||||
The crust is the upper most part of the earth, with depths ranging from an average of 7km in in the oceans, to an average of 38km in continental crust.
|
||||
The crust thickens underneath mountain ranges, and can reach depths of 90km underneath the Himalayas. The composition of the crust also differs between oceanic and
|
||||
continental environments. Ocean crust is young mafic crust dominated by basalts and gabbros that is recycled regularly(~300Ma) due to subduction processes.
|
||||
Continental crust is much more varied in structure and composition than oceanic, but has an overall average composition of granodiorite.
|
||||
|
||||
<figure align="left">
|
||||
<img src="{% static "three_d_viewer/images/structure - usgs.gif" %}" >
|
||||
<figcaption align="left"><p>Image sourced from <a href="http://pubs.usgs.gov/gip/dynamic/graphics/FigS1-1.gif">USGS</a>.</p></figcaption>
|
||||
</figure>
|
||||
<br />
|
||||
<p>The Earth's structure is differentiated in three distinct layers: the core, mantle, and crust. The layers are distinguished
|
||||
by a change in the velocity of seismic waves at their boundaries.
|
||||
The crust is the upper most part of the earth, with
|
||||
depths ranging from an average of 7 km in the oceans, to an average of 38 km in continental crust. The crust thickens underneath mountain
|
||||
ranges, and can reach depths of 90 km underneath the Himalayas. The composition of the crust also differs between oceanic and continental
|
||||
environments. Ocean crust is young mafic crust dominated by basalts and gabbros that is recycled regularly (~300 Ma) due to subduction
|
||||
processes. Continental crust is much more varied in structure and composition than oceanic, but has an overall average
|
||||
composition of granodiorite.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<br /><br />
|
||||
<img src="{% static "three_d_viewer/images/element abundance.png" %}" align="right" width="412" height="324">
|
||||
The boundary of the crust and mantle is defined by the Mohorovicic discontinuity, commonly referred to as the Moho. It is defined by a
|
||||
sharp increase in seismic wave velocity, due to a change in material properties between crustal rocks and mantle rocks.
|
||||
The mantle is dominated by silicate minerals that are rich in iron and magnesium, chiefly
|
||||
<a href={% url url_extender|add:diopside.url diopside.id %}>pyroxenes</a> and polymorphs of
|
||||
<a href={% url url_extender|add:olivine.url olivine.id %}>olivine</a>,
|
||||
forming peridotite. The mantle, while solid, behaves plastically, allowing to flow at very slow rates.
|
||||
<br /><br />
|
||||
The boundary of the crust and mantle is defined by the Mohorovi?i? discontinuity, commonly referred to as the Moho.
|
||||
It is defined by a sharp increase in seismic wave velocity, due to a change in material properties between crustal rocks and mantle rocks. The mantle is dominated by
|
||||
silicate minerals that are rich in iron and magnesium, chiefly pyroxenes and polymorphs of olivine, forming peridotite. The mantle, while solid, behaves plastically,
|
||||
allowing to flow at very slow rates.
|
||||
The core is distinguished by the absence of S waves, leading to the inference that the core is liquid.
|
||||
The core is separated into the outer core and the inner core. The outer core is liquid dominated by iron and nickel.
|
||||
The inner core is solid, as determined by the strong refraction of P waves at the inner core-outer core boundary, and was formed by
|
||||
crystallizing minerals from the liquid part of the core as the Earth cools.
|
||||
<br /><br />
|
||||
The core is distinguished by the absence of S waves, leading to the inference that the core is liquid. The core is separated into the outer core and the inner core.
|
||||
The outer core is liquid dominated by iron and nickel. The inner core is solid, as determined by the strong refraction of P waves at the inner core-outer core boundary,
|
||||
and was formed by crystalizing minerals from the liquid part of the core as the Earth cools.
|
||||
<br /><br />
|
||||
The crust and mantle are also further distinguished by material properties into the lithosphere, asthenosphere, and mesosphere. The chemical composition is
|
||||
uniform throughout the mantle though, but changes in pressure and temperature determine which polymorphs will exist at different depths.
|
||||
The lithosphere contains the crust, and the upper part of the mantle down to ~100km under oceanic crust, and 200-300km under continental crust (Twiss & Moores, 2007).
|
||||
The lithosphere-asthenosphere boundary is defined by the 1300K isotherm, which is the temperature where olivine starts to behave viscously.
|
||||
The rocks in the mesosphere are under more pressure than those in the asthenosphere, so no longer behave viscously.</p>
|
||||
<figure>
|
||||
<img src="{% static "three_d_viewer/images/structure - usgs.gif" %}" style="padding-top:20px;">
|
||||
<figcaption><p>Image sourced from <a href="http://pubs.usgs.gov/gip/dynamic/graphics/FigS1-1.gif">USGS</a>.</p></figcaption>
|
||||
The crust and mantle are also further distinguished by material properties into the lithosphere, asthenosphere, and
|
||||
mesosphere. The chemical composition is uniform throughout the mantle though, but changes in pressure and temperature
|
||||
determine which polymorphs will exist at different depths. The lithosphere contains the crust, and the upper part of the mantle down
|
||||
to ~100 km under oceanic crust, and 200-300 km under continental crust (Twiss & Moores, 2007). The lithosphere-asthenosphere boundary
|
||||
is defined by the 1300 K isotherm, which is the temperature where olivine starts to behave viscously. The rocks in the mesosphere are
|
||||
under more pressure than those in the asthenosphere, so no longer behave viscously.
|
||||
</p>
|
||||
<figure align="left" >
|
||||
<a href='{% static "three_d_viewer/images/depth profile.png" %}' align="right"><img height=494 width=412 src='{% static "three_d_viewer/images/depth profile.png" %}'></a>
|
||||
<figcaption>The seismic profile of the Earth.</figcaption>
|
||||
</figure>
|
||||
</div>
|
||||
<div id="pushDownThree"></div>
|
||||
|
||||
@@ -7,9 +7,20 @@ urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^$', views.HomeView.as_view(), name='home'),
|
||||
url(r'^$', generic.TemplateView.as_view(template_name="three_d_viewer/home.html"), name='home'),
|
||||
url(r'^theory/structure/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/structure.html"), name='theory_structure'),
|
||||
url(r'^theory/bowen/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/bowen.html"), name='theory_bowen'),
|
||||
url(r'^theory/pressure_temp/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/pressure_temp.html"), name='theory_pt'),
|
||||
url(r'^theory/structure/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/structure.html"), name='theory_structure'),
|
||||
url(r'^theory/erb101_structure/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/structure.html"), name='erb101_theory_structure'),
|
||||
url(r'^theory/bowen/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/bowen.html"), name='theory_bowen'),
|
||||
url(r'^theory/erb101_bowen/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/bowen.html" ), name='erb101_theory_bowen'),
|
||||
url(r'^theory/pressure_temp/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/pressure_temp.html"), name='theory_pt'),
|
||||
url(r'^theory/erb101_pressure_temp/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/pressure_temp.html"), name='erb101_theory_pt'),
|
||||
url(r'^theory/formationdiff/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/formationdiff.html"), name='theory_fd'),
|
||||
url(r'^theory/erb101_formationdiff/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/formationdiff.html"), name='erb101_theory_fd'),
|
||||
url(r'^theory/silicates/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/silicates.html"), name='theory_silicates'),
|
||||
url(r'^theory/erb101_silicates/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/silicates.html"), name='erb101_theory_silicates'),
|
||||
url(r'^theory/classification/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/classification.html"), name='theory_classification'),
|
||||
url(r'^theory/erb101_classification/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/classification.html"), name='erb101_theory_classification'),
|
||||
url(r'^theory/crystals/$', views.TheoryTemplateView.as_view(template_name="three_d_viewer/theory/crystals.html"), name='theory_crystals'),
|
||||
url(r'^theory/erb101_crystals/$', views.ERB101TheoryTemplateView.as_view(template_name="three_d_viewer/theory/crystals.html"), name='erb101_theory_crystals'),
|
||||
url(r'^minerals_practice/$', views.MineralPracticeView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
||||
url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
||||
url(r'^minerals_selftest/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_selftest.html"), name='minerals_selftest'),
|
||||
@@ -19,6 +30,12 @@ urlpatterns = patterns(
|
||||
url(r'^fossils/(?P<pk>\d+)/$', views.FossilDetailView.as_view(), name='fossil_detail'),
|
||||
url(r'^glossary/$', views.GlossaryView.as_view(), name='glossary'),
|
||||
url(r'^acknowledgements/$', generic.TemplateView.as_view(template_name='three_d_viewer/acknowledgements.html'), name='acknowledgements'),
|
||||
url(r'^erb101/$', views.ERB101HomeView.as_view(), name='erb101_home'),
|
||||
url(r'^erb101/$', generic.TemplateView.as_view(template_name="three_d_viewer/erb101/home.html"), name='erb101_home'),
|
||||
url(r'^erb101_rock_practice/$', views.ERB101RockPracticeView.as_view(), name='erb101_rocks_practice'),
|
||||
url(r'^erb101_minerals_practice/$', views.ERB101MineralPracticeView.as_view(), name='erb101_minerals_practice'),
|
||||
url(r'^erb101_minerals/(?P<pk>\d+)/$', views.ERB101MineralDetailView.as_view(), name='erb101_mineral_detail'),
|
||||
url(r'^erb101_rocks/(?P<pk>\d+)/$', views.ERB101RockDetailView.as_view(), name='erb101_rock_detail'),
|
||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.MEDIA_ROOT}),
|
||||
)
|
||||
|
||||
@@ -39,6 +39,7 @@ class MineralPracticeView(generic.ListView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
class MineralDetailView(generic.DetailView):
|
||||
@@ -61,6 +62,7 @@ class MineralDetailView(generic.DetailView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
@@ -86,6 +88,7 @@ class RockPracticeView(generic.ListView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
class RockDetailView(generic.DetailView):
|
||||
@@ -105,6 +108,7 @@ class RockDetailView(generic.DetailView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
@@ -130,6 +134,7 @@ class FossilPracticeView(generic.ListView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
class FossilDetailView(generic.DetailView):
|
||||
@@ -149,6 +154,7 @@ class FossilDetailView(generic.DetailView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
@@ -165,3 +171,144 @@ class GlossaryView(generic.ListView):
|
||||
context = super(GlossaryView, self).get_context_data(**kwargs)
|
||||
context['entries'] = GlossaryEntry.objects.all().order_by("name")
|
||||
return context
|
||||
|
||||
class ERB101HomeView(generic.ListView):
|
||||
"""
|
||||
Show the home page
|
||||
"""
|
||||
|
||||
template_name = 'three_d_viewer/erb101/home.html'
|
||||
model = Sample
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101HomeView, self).get_context_data(**kwargs)
|
||||
context['active_samples'] = Sample.objects.select_subclasses(Mineral).filter(active=True).filter(erb101_sample=True).order_by('name')
|
||||
context['parent_categories'] = Category.objects.filter(parent=None). \
|
||||
filter(active=True).order_by('name')
|
||||
return context
|
||||
|
||||
class ERB101MineralPracticeView(generic.ListView):
|
||||
model = Mineral
|
||||
template_name = 'three_d_viewer/erb101/minerals_practice.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101MineralPracticeView, self).get_context_data(**kwargs)
|
||||
cat = Category.objects.get(name='Minerals')
|
||||
result = cat.active_101_samples
|
||||
|
||||
for child in cat.active_children:
|
||||
result = chain(result, child.active_101_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/erb101/base.html'
|
||||
return context
|
||||
|
||||
class ERB101MineralDetailView(generic.DetailView):
|
||||
"""
|
||||
Add extra functionality for mineral details
|
||||
"""
|
||||
|
||||
model = Mineral
|
||||
template_name = 'three_d_viewer/erb101/mineral_detail.html'
|
||||
|
||||
parent_categories = Category.objects.filter(parent=None). \
|
||||
filter(active=True).order_by("name")
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101MineralDetailView, self).get_context_data(**kwargs)
|
||||
cat = Category.objects.get(name='Minerals')
|
||||
result = cat.active_samples
|
||||
|
||||
for child in cat.active_children:
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/erb101/base.html'
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
object = super(ERB101MineralDetailView, self).get_object()
|
||||
object.viewed_count += 1
|
||||
object.save()
|
||||
return object
|
||||
|
||||
class ERB101RockPracticeView(generic.ListView):
|
||||
model = Sample
|
||||
template_name = 'three_d_viewer/erb101/rock_practice.html'
|
||||
|
||||
parent_categories = Category.objects.filter(parent=None). \
|
||||
filter(active=True).order_by("name")
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101RockPracticeView, self).get_context_data(**kwargs)
|
||||
cat = Category.objects.get(name='Rocks')
|
||||
result = cat.active_101_samples
|
||||
|
||||
for child in cat.active_children:
|
||||
result = chain(result, child.active_101_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/erb101/base.html'
|
||||
return context
|
||||
|
||||
|
||||
class ERB101RockDetailView(generic.DetailView):
|
||||
model = Sample
|
||||
template_name = 'three_d_viewer/erb101/rock_detail.html'
|
||||
|
||||
parent_categories = Category.objects.filter(parent=None). \
|
||||
filter(active=True).order_by("name")
|
||||
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101RockDetailView, self).get_context_data(**kwargs)
|
||||
cat = Category.objects.get(name='Rocks')
|
||||
result = cat.active_samples
|
||||
|
||||
for child in cat.active_children:
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
context['base_template'] = 'three_d_viewer/erb101/base.html'
|
||||
return context
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
object = super(ERB101RockDetailView, self).get_object()
|
||||
object.viewed_count += 1
|
||||
object.save()
|
||||
return object
|
||||
|
||||
class TheoryTemplateView(generic.TemplateView):
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(TheoryTemplateView, self).get_context_data(**kwargs)
|
||||
context['base_template'] = 'three_d_viewer/base.html'
|
||||
context['url_extender'] = 'three_d_viewer:'
|
||||
context['olivine'] = Mineral.objects.filter(name='Olivine')[0]
|
||||
context['quartz'] = Mineral.objects.filter(name='Quartz')[0]
|
||||
context['microcline'] = Mineral.objects.filter(name='Microcline')[0]
|
||||
context['plag'] = Mineral.objects.filter(name='Plagioclase')[0]
|
||||
context['diopside'] = Mineral.objects.filter(name='Diopside')[0]
|
||||
context['actinolite'] = Mineral.objects.filter(name='Actinolite')[0]
|
||||
|
||||
context['silicates_theory'] = 'three_d_viewer:theory_silicates'
|
||||
context['structure_theory'] = 'three_d_viewer:theory_structure'
|
||||
return context
|
||||
|
||||
class ERB101TheoryTemplateView(generic.TemplateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(ERB101TheoryTemplateView, self).get_context_data(**kwargs)
|
||||
context['base_template'] = 'three_d_viewer/erb101/base.html'
|
||||
context['url_extender'] = 'three_d_viewer:erb101_'
|
||||
context['olivine'] = Mineral.objects.filter(name='Olivine')[0]
|
||||
context['quartz'] = Mineral.objects.filter(name='Quartz')[0]
|
||||
context['microcline'] = Mineral.objects.filter(name='Microcline')[0]
|
||||
context['plag'] = Mineral.objects.filter(name='Plagioclase')[0]
|
||||
context['diopside'] = Mineral.objects.filter(name='Diopside')[0]
|
||||
context['actinolite'] = Mineral.objects.filter(name='Actinolite')[0]
|
||||
|
||||
context['silicates_theory'] = 'three_d_viewer:erb101_theory_silicates'
|
||||
context['structure_theory'] = 'three_d_viewer:erb101_theory_structure'
|
||||
return context
|
||||
|
||||
|
||||