From 008edd8bee0414a1743e9e1a0f85b27a90e395e7 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Sat, 8 Oct 2016 19:32:45 +0100 Subject: [PATCH] Lots of tidying up, moved inline CSS into SCSS --- RIGS/static/css/screen.css | 2 +- RIGS/static/scss/screen.scss | 22 +++ RIGS/templates/RIGS/event_embed.html | 172 +++++++++++------------- templates/base_embed.html | 17 +-- templates/registration/login.html | 11 +- templates/registration/login_embed.html | 4 +- templates/registration/loginform.html | 10 +- 7 files changed, 116 insertions(+), 122 deletions(-) diff --git a/RIGS/static/css/screen.css b/RIGS/static/css/screen.css index d7ed2f52..de7e6c67 100644 --- a/RIGS/static/css/screen.css +++ b/RIGS/static/css/screen.css @@ -16,4 +16,4 @@ * Portions copyright Addy Osmani, jQuery UI & Twitter Bootstrap * Created the LESS version by $dharapvj * Released under MIT - */.ui-tooltip{display:block;font-size:11px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;position:absolute;visibility:visible;z-index:1070;max-width:200px;background:#000;border:1px solid #000;color:#fff;padding:3px 8px;text-align:center;text-decoration:none;-moz-box-shadow:inset 0 1px 0 #000;-webkit-box-shadow:inset 0 1px 0 #000;box-shadow:inset 0 1px 0 #000;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;border-width:1px}.ui-tooltip .arrow{overflow:hidden;position:absolute;margin-left:0;height:20px;width:20px}.ui-tooltip .arrow.bottom{top:100%;left:38%}.ui-tooltip .arrow.bottom:after{border-top:8px solid #000;border-right:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid transparent}.ui-tooltip .arrow.top{top:-50%;bottom:22px;left:42%}.ui-tooltip .arrow.top:after{border-top:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #000;border-left:6px solid transparent}.ui-tooltip .arrow.left{top:25%;left:-15%;right:0;bottom:-16px}.ui-tooltip .arrow.left:after{width:0;border-top:6px solid transparent;border-right:6px solid #000;border-bottom:6px solid transparent;border-left:6px solid transparent}.ui-tooltip .arrow.right{top:26%;left:100%;right:0;bottom:-16px;margin-left:1px}.ui-tooltip .arrow.right:after{width:0;border-top:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #000}.ui-tooltip .arrow:after{content:" ";position:absolute;height:0;left:0;top:0;width:0;margin-left:0;bottom:12px;box-shadow:6px 5px 9px -9px #000}body,.pad-top{padding-top:50px}#content{padding:40px 15px}#userdropdown>li{padding:0 0.3em}#userdropdown>li .media-object,#activity .media-object{max-width:3em}.table tbody>tr>td.vert-align{vertical-align:middle}.align-right{text-align:right}textarea{width:100%;resize:vertical}.btn-page,.btn-pad{margin:0 0 0.5em}.custom-combobox{display:block}.event-mic-photo{max-width:2em}.item-description{margin-left:1em}.overflow-ellipsis{text-overflow:ellipsis;display:inline-block;max-width:100%;overflow:hidden}.modal-dialog{z-index:inherit}.panel-default .default{background-color:#f5f5f5}del{background-color:#f2dede;border-radius:3px}ins{background-color:#dff0d8;border-radius:3px}.loading-animation{position:relative;margin:30px auto 0}.loading-animation .circle{background-color:transparent;border:5px solid rgba(0,183,229,0.9);opacity:.9;border-right:5px solid transparent;border-left:5px solid transparent;border-radius:50px;box-shadow:0 0 35px #2187e7;width:50px;height:50px;margin:0 auto;-moz-animation:spinPulse 1s infinite ease-in-out;-webkit-animation:spinPulse 1s infinite ease-in-out;animation:spinPulse 1s infinite ease-in-out}.loading-animation .circle1{background-color:transparent;border:5px solid rgba(0,183,229,0.9);opacity:.9;border-left:5px solid transparent;border-right:5px solid transparent;border-radius:50px;box-shadow:0 0 15px #2187e7;width:30px;height:30px;margin:0 auto;position:relative;top:-40px;-moz-animation:spinoffPulse 1s infinite linear;-webkit-animation:spinoffPulse 1s infinite linear;animation:spinoffPulse 1s infinite linear}@-moz-keyframes spinPulse{0%{-moz-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-moz-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-moz-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@-webkit-keyframes spinPulse{0%{-webkit-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-webkit-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-webkit-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@keyframes spinPulse{0%{-moz-transform:rotate(160deg);-ms-transform:rotate(160deg);-webkit-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-moz-transform:rotate(145deg);-ms-transform:rotate(145deg);-webkit-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-moz-transform:rotate(-320deg);-ms-transform:rotate(-320deg);-webkit-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@-moz-keyframes spinoffPulse{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinoffPulse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinoffPulse{0%{-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}} + */.ui-tooltip{display:block;font-size:11px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);opacity:0.8;position:absolute;visibility:visible;z-index:1070;max-width:200px;background:#000;border:1px solid #000;color:#fff;padding:3px 8px;text-align:center;text-decoration:none;-moz-box-shadow:inset 0 1px 0 #000;-webkit-box-shadow:inset 0 1px 0 #000;box-shadow:inset 0 1px 0 #000;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;border-width:1px}.ui-tooltip .arrow{overflow:hidden;position:absolute;margin-left:0;height:20px;width:20px}.ui-tooltip .arrow.bottom{top:100%;left:38%}.ui-tooltip .arrow.bottom:after{border-top:8px solid #000;border-right:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid transparent}.ui-tooltip .arrow.top{top:-50%;bottom:22px;left:42%}.ui-tooltip .arrow.top:after{border-top:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #000;border-left:6px solid transparent}.ui-tooltip .arrow.left{top:25%;left:-15%;right:0;bottom:-16px}.ui-tooltip .arrow.left:after{width:0;border-top:6px solid transparent;border-right:6px solid #000;border-bottom:6px solid transparent;border-left:6px solid transparent}.ui-tooltip .arrow.right{top:26%;left:100%;right:0;bottom:-16px;margin-left:1px}.ui-tooltip .arrow.right:after{width:0;border-top:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #000}.ui-tooltip .arrow:after{content:" ";position:absolute;height:0;left:0;top:0;width:0;margin-left:0;bottom:12px;box-shadow:6px 5px 9px -9px #000}body,.pad-top{padding-top:50px}#content{padding:40px 15px}#userdropdown>li{padding:0 0.3em}#userdropdown>li .media-object,#activity .media-object{max-width:3em}.table tbody>tr>td.vert-align{vertical-align:middle}.align-right{text-align:right}textarea{width:100%;resize:vertical}.btn-page,.btn-pad{margin:0 0 0.5em}.custom-combobox{display:block}.event-mic-photo{max-width:2em}.item-description{margin-left:1em}.overflow-ellipsis{text-overflow:ellipsis;display:inline-block;max-width:100%;overflow:hidden}.modal-dialog{z-index:inherit}.panel-default .default{background-color:#f5f5f5}del{background-color:#f2dede;border-radius:3px}ins{background-color:#dff0d8;border-radius:3px}.loading-animation{position:relative;margin:30px auto 0}.loading-animation .circle{background-color:transparent;border:5px solid rgba(0,183,229,0.9);opacity:.9;border-right:5px solid transparent;border-left:5px solid transparent;border-radius:50px;box-shadow:0 0 35px #2187e7;width:50px;height:50px;margin:0 auto;-moz-animation:spinPulse 1s infinite ease-in-out;-webkit-animation:spinPulse 1s infinite ease-in-out;animation:spinPulse 1s infinite ease-in-out}.loading-animation .circle1{background-color:transparent;border:5px solid rgba(0,183,229,0.9);opacity:.9;border-left:5px solid transparent;border-right:5px solid transparent;border-radius:50px;box-shadow:0 0 15px #2187e7;width:30px;height:30px;margin:0 auto;position:relative;top:-40px;-moz-animation:spinoffPulse 1s infinite linear;-webkit-animation:spinoffPulse 1s infinite linear;animation:spinoffPulse 1s infinite linear}@-moz-keyframes spinPulse{0%{-moz-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-moz-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-moz-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@-webkit-keyframes spinPulse{0%{-webkit-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-webkit-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-webkit-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@keyframes spinPulse{0%{-moz-transform:rotate(160deg);-ms-transform:rotate(160deg);-webkit-transform:rotate(160deg);transform:rotate(160deg);opacity:0;box-shadow:0 0 1px #2187e7}50%{-moz-transform:rotate(145deg);-ms-transform:rotate(145deg);-webkit-transform:rotate(145deg);transform:rotate(145deg);opacity:1}100%{-moz-transform:rotate(-320deg);-ms-transform:rotate(-320deg);-webkit-transform:rotate(-320deg);transform:rotate(-320deg);opacity:0}}@-moz-keyframes spinoffPulse{0%{-moz-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinoffPulse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinoffPulse{0%{-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}html.embedded{min-height:100%}html.embedded body{min-height:100%;padding:0}html.embedded .embed_container{border:5px solid #e9e9e9;padding-top:12px;min-height:100%;width:100%}html.embedded .source{background:url("/static/imgs/pyrigs-avatar.png") no-repeat;background-size:16px 16px;padding-left:20px} diff --git a/RIGS/static/scss/screen.scss b/RIGS/static/scss/screen.scss index be36ebbb..fef12c60 100644 --- a/RIGS/static/scss/screen.scss +++ b/RIGS/static/scss/screen.scss @@ -147,3 +147,25 @@ ins { }; } } + +html.embedded{ + min-height:100%; + + body{ + min-height:100%; + padding:0; + } + + .embed_container{ + border:5px solid #e9e9e9; + padding-top:12px; + min-height:100%; + width:100%; + } + .source{ + background: url('/static/imgs/pyrigs-avatar.png') no-repeat; + background-size: 16px 16px; + padding-left: 20px; + } + +} \ No newline at end of file diff --git a/RIGS/templates/RIGS/event_embed.html b/RIGS/templates/RIGS/event_embed.html index 71b69217..3eefd00a 100644 --- a/RIGS/templates/RIGS/event_embed.html +++ b/RIGS/templates/RIGS/event_embed.html @@ -3,100 +3,87 @@ {% block content %} - - -
-
- Rig Information Gathering System -
- -
- - - {% if object.mic %} -
- {{ object.mic.initials }}
- -
- {% elif object.is_rig %} - +
+ + {% if object.mic %} +
+ {{ object.mic.initials }}
+ +
+ {% elif object.is_rig %} + + {% endif %} +
+ +

+ + {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} + | {{ object.name }} + {% if object.venue %} + at {{ object.venue }} {% endif %} - -

- - - - {% if object.is_rig %}N{{ object.pk|stringformat:"05d" }}{% else %}{{ object.pk }}{% endif %} - | {{ object.name }} - {% if object.venue %} - at {{ object.venue }} - {% endif %} +

+

+ {{ object.start_date|date:"D d/m/Y" }} + {% if object.end_date and object.end_date != object.start_date %} + – {{ object.end_date|date:"D d/m/Y" }} + {% endif %} + ({{ object.get_status_display }}) +

- - - -

- {{ object.start_date|date:"D d/m/Y" }} - {% if object.end_date and object.end_date != object.start_date %} - – {{ object.end_date|date:"D d/m/Y" }} - {% endif %} - ({{ object.get_status_display }}) -

- - {% if object.is_rig %} -
- {{ object.person.name }} - {% if object.organisation %} - for {{ object.organisation.name }} - {% endif %} - {% if object.dry_hire %}Dry Hire{% endif %} -
+ {% if object.is_rig %} +
+ {{ object.person.name }} + {% if object.organisation %} + for {{ object.organisation.name }} {% endif %} + {% if object.dry_hire %}Dry Hire{% endif %} +
+ {% endif %} - - - {% if object.mic %} - - - - - {% endif %} - {% if object.description %} - - - - - {% endif %} - {% if object.meet_at %} - - - - - {% endif %} - {% if object.access_at %} - - - - - {% endif %} - {% if object.has_start_time %} - - - - - {% endif %} - {% if object.has_end_time%}{% if object.start_date != object.end_date or object.start_time != object.end_time %} + +
MIC{{object.mic.name}}
Description{{ object.description|linebreaksbr }}
Crew meet{{ object.meet_at|date:"H:i" }} {{ object.meet_at|date:"(Y-m-d)" }}
Access at{{ object.access_at|date:"H:i" }} {{ object.access_at|date:"(Y-m-d)" }}
Event starts - {{ object.start_time|date:"H:i" }} - {{ object.start_date|date:"(Y-m-d)" }}
-
+ {% if object.mic %} + + + + + {% endif %} + {% if object.description %} + + + + + {% endif %} + {% if object.meet_at %} + + + + + {% endif %} + {% if object.access_at %} + + + + + {% endif %} + {% if object.has_start_time %} + + + + + {% endif %} + {% if object.has_end_time%} + {% if object.start_date != object.end_date or object.start_time != object.end_time %} - {% endif %}{% endif %} -
MIC{{object.mic.name}}
Description{{ object.description|linebreaksbr }}
Crew meet{{ object.meet_at|date:"H:i" }} {{ object.meet_at|date:"(Y-m-d)" }}
Access at{{ object.access_at|date:"H:i" }} {{ object.access_at|date:"(Y-m-d)" }}
Event starts + {{ object.start_time|date:"H:i" }} + {{ object.start_date|date:"(Y-m-d)" }}
+
Event ends @@ -104,10 +91,11 @@ {{ object.end_date|date:"(Y-m-d)" }}
-
-
+ {% endif %} + {% endif %} +
+ + {% endblock %} \ No newline at end of file diff --git a/templates/base_embed.html b/templates/base_embed.html index da3f3480..fe987b90 100644 --- a/templates/base_embed.html +++ b/templates/base_embed.html @@ -1,12 +1,12 @@ {% load static from staticfiles %} {% load raven %} - + lang="{% firstof LANGUAGE_CODE 'en' %}" + class="embedded"> @@ -14,7 +14,6 @@ - - diff --git a/templates/registration/login.html b/templates/registration/login.html index f9db2e81..5dd85fe7 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -2,14 +2,9 @@ {% block title %}Login{% endblock %} -{% block extra-head %} - {% if next %} - - {% endif %} -{% endblock %} - {% block content %} +
+

Rig Information Gathering System

+
{% include 'registration/loginform.html' %} {% endblock %} \ No newline at end of file diff --git a/templates/registration/login_embed.html b/templates/registration/login_embed.html index f14a1d28..32fbb8dd 100644 --- a/templates/registration/login_embed.html +++ b/templates/registration/login_embed.html @@ -4,7 +4,7 @@ {% block title %}Login{% endblock %} {% block content %} -
+

Rig Information Gathering System

@@ -22,7 +22,7 @@ {% render_field form.password class+="form-control" placeholder=form.password.label %}
- + diff --git a/templates/registration/loginform.html b/templates/registration/loginform.html index 4ec09d2c..94343065 100644 --- a/templates/registration/loginform.html +++ b/templates/registration/loginform.html @@ -12,9 +12,11 @@ {% render_field form.password class+="form-control" placeholder=form.password.label %} - Register - Forgotten Password - - +
+ Register + Forgotten Password + + +
\ No newline at end of file