Changes to the mineral practice page
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDown"></div>
|
||||
<div id="mainText">
|
||||
<div id="pushDown"></div>
|
||||
<div id="mainText">
|
||||
<p><h3>Welcome to 3DVOL – Minerals.</h3><br><br>
|
||||
This website contains a three-dimensional virtual object library of the most important rock-forming minerals making up planet Earth. You will find information on:<br>
|
||||
<ul>
|
||||
<li>Which are the most common minerals on Earth?</li>
|
||||
<li>What are their most important physical and chemical properties?</li>
|
||||
<li>Where in the Earth and under which physical conditions do they form?</li>
|
||||
<li>How can they be identified in hand specimen?</li>
|
||||
</ul>
|
||||
A mineral is typically defined as an inorganic solid with a particular chemical composition and a characteristic, periodic atomic structure.
|
||||
This characteristic atomic make-up is often reflected in the macroscopic crystalline structure of a mineral.
|
||||
The 3D models presented on this website will help you to visualise, study, and memorise these beautiful and often
|
||||
complex crystal structures as well as other diagnostic features of minerals.
|
||||
<br>
|
||||
We hope that you enjoy using 3DVOL.
|
||||
<br><br>
|
||||
Your 3DVOL team
|
||||
<br><br>
|
||||
Acknowledgements
|
||||
<br>
|
||||
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
||||
</p>
|
||||
</div><!-- CLOSE MAINTEXT !-->
|
||||
This website contains a three-dimensional virtual object library of the most important rock-forming minerals making up planet Earth. You will find information on:<br>
|
||||
<ul>
|
||||
<li>Which are the most common minerals on Earth?</li>
|
||||
<li>What are their most important physical and chemical properties?</li>
|
||||
<li>Where in the Earth and under which physical conditions do they form?</li>
|
||||
<li>How can they be identified in hand specimen?</li>
|
||||
</ul>
|
||||
A mineral is typically defined as an inorganic solid with a particular chemical composition and a characteristic, periodic atomic structure.
|
||||
This characteristic atomic make-up is often reflected in the macroscopic crystalline structure of a mineral.
|
||||
The 3D models presented on this website will help you to visualise, study, and memorise these beautiful and often
|
||||
complex crystal structures as well as other diagnostic features of minerals.
|
||||
<br>
|
||||
We hope that you enjoy using 3DVOL.
|
||||
<br><br>
|
||||
Your 3DVOL team
|
||||
<br><br>
|
||||
Acknowledgements
|
||||
<br>
|
||||
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
||||
</p>
|
||||
</div><!-- CLOSE MAINTEXT !-->
|
||||
{% endblock %}
|
||||
@@ -2,52 +2,50 @@
|
||||
|
||||
{% block content %}
|
||||
<div id="sidebar">
|
||||
<div id='mineralMenu'>
|
||||
<ul>
|
||||
<li class="has-sub mainitem"><a href="#">Select a mineral</a>
|
||||
<ul>
|
||||
<li><a href='#mineralOne' name="mineralOne"><span>Mineral 1</span></a></li>
|
||||
<li><a href='#mineralTwo' name="mineralTwo"><span>Mineral 2</span></a></li>
|
||||
<li><a href='#mineralThree' name="mineralThree"><span>Mineral 3</span></a></li>
|
||||
<li><a href='#mineralFour' name="mineralFour"><span>Mineral 4</span></a></li>
|
||||
<li class="last"><a href='#mineralFive' name="mineralFive"><span>Mineral 5</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- close MINERALMENU !-->
|
||||
<div id="mineralContainer">
|
||||
<div id="mineralOne" style="display:none">
|
||||
<h1 class="subHeadings">Mineral name here</h1>
|
||||
<h2 class="theoryHeadings">Physical properties</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<h2 class="theoryHeadings">Diagnostic features</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<h2 class="theoryHeadings">Geological significance</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
</div>
|
||||
<div id="mineralTwo" style="display:none">
|
||||
<p>Info about mineral 2</p>
|
||||
</div>
|
||||
<div id="mineralThree" style="display:none">
|
||||
<p>Info about mineral 3</p>
|
||||
</div>
|
||||
<div id="mineralFour" style="display:none">
|
||||
<p>Info about mineral 4</p>
|
||||
</div>
|
||||
<div id="mineralFive" style="display:none">
|
||||
<p>Info about mineral 5</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mineralMenu'>
|
||||
<ul>
|
||||
<li class="has-sub mainitem"><a href="#">Select a mineral</a>
|
||||
<ul>
|
||||
{% for sample in active_samples %}
|
||||
<li>{{ sample.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div><!-- close MINERALMENU !-->
|
||||
<div id="mineralContainer">
|
||||
<div id="mineralOne" style="display:none">
|
||||
<h1 class="subHeadings">Mineral name here</h1>
|
||||
<h2 class="theoryHeadings">Physical properties</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<h2 class="theoryHeadings">Diagnostic features</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<h2 class="theoryHeadings">Geological significance</h2>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
<p>Info about the mineral here</p>
|
||||
</div>
|
||||
<div id="virtualObject">
|
||||
<div id="mineralTwo" style="display:none">
|
||||
<p>Info about mineral 2</p>
|
||||
</div>
|
||||
<div id="mineralThree" style="display:none">
|
||||
<p>Info about mineral 3</p>
|
||||
</div>
|
||||
<div id="mineralFour" style="display:none">
|
||||
<p>Info about mineral 4</p>
|
||||
</div>
|
||||
<div id="mineralFive" style="display:none">
|
||||
<p>Info about mineral 5</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<img src="images/rock_example.jpeg" class="example" />
|
||||
</div>
|
||||
<div id="virtualObject">
|
||||
<img src="images/rock_example.jpeg" class="example" />
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -8,10 +8,11 @@ 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'^minerals_theory/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_theory.html"), name='minerals_theory'),
|
||||
url(r'^minerals_practice/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
||||
url(r'^minerals_practice/$', views.MineralPracticeView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
||||
url(r'^minerals_selftest/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_selftest.html"), name='minerals_selftest'),
|
||||
url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
|
||||
url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
||||
url(r'^minerals/(?P<pk>\d+)/$', views.MineralPracticeView.as_view(), name='mineral_detail'),
|
||||
#url(r'^(?P<pk>\d+)/$', views.DetailView.as_view(), name='detail'),
|
||||
#url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.MEDIA_ROOT}),
|
||||
)
|
||||
|
||||
@@ -4,6 +4,8 @@ Define the views for the Django MVC
|
||||
|
||||
from django import template
|
||||
from django.views import generic
|
||||
from itertools import chain
|
||||
from operator import attrgetter
|
||||
|
||||
from three_d_viewer.models import Sample, Category, Mineral
|
||||
register = template.Library()
|
||||
@@ -24,7 +26,21 @@ class HomeView(generic.ListView):
|
||||
filter(active=True).order_by('name')
|
||||
return context
|
||||
|
||||
class MineralPracticeView(generic.ListView):
|
||||
model = Sample
|
||||
template_name = 'three_d_viewer/minerals_practice.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(MineralPracticeView, self).get_context_data(**kwargs)
|
||||
cat = Category.objects.get(name='Minerals')
|
||||
#context['active_samples'] = cat.active_samples
|
||||
result = cat.active_samples
|
||||
|
||||
for child in cat.active_children:
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
return context
|
||||
|
||||
class DetailView(generic.DetailView):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user