Skip to content

Commit

Permalink
cb: make popups slightly less annoying, so the cb can still do some k…
Browse files Browse the repository at this point in the history
…ind of work
  • Loading branch information
Kurocon committed Apr 16, 2024
1 parent f39ae54 commit 0cd3383
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 89 deletions.
44 changes: 4 additions & 40 deletions amelie/style/static/js/cb.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ let popupSettings = [
{
url: 'former-boards',
specialMessage: "We see that you are on the former boards page. Trying to remember your 10 predecessors?",
minTime: 1,
maxTime: 7,
minTime: 15,
maxTime: 60,
specialFunction: () => {
// shuffle board members images
let images = $(".content > p > img");
Expand Down Expand Up @@ -87,47 +87,11 @@ let popupSettings = [
},
runPopupOnce: true
},

// Optional; uncomment with caution
// {
// url: 'companies',
// specialMessage: "Wow, you actually visited this page?",
// minTime: 1,
// maxTime: 5,
// specialFunction: () => {
// const funnyCompanyMap = {
// 'Booking.com': 'Pooping.com',
// 'Belastingdienst': 'Roverheid',
// 'Voortman Steel Group': 'Voortman Plastic Guys',
// 'Technolution': 'NoSolution',
// 'Adlink': 'Adtlink',
// 'ASML': 'ASSUML',
// 'Baker Tilly': 'Bakery Tillery',
// 'Booking Experts': 'Pooping Experts',
// 'ChipSoft': 'ChipsHard',
// 'Deloitte': 'TheLottery',
// 'El Nino': 'El Niño',
// 'Extendas': 'Extend Das',
// 'EY': 'HEY!',
// 'Nedap': 'Nee, dab',
// 'OVSoftware': 'Oh nee, software!'
// };

// for (const [key, value] of Object.entries(funnyCompanyMap)) {
// const contentText = $("#content").html();
// if (contentText.includes(key)) {
// let newText = contentText.replace(key, value);
// $("#content").html(newText)
// }
// }
// },
// runPopupOnce: true
// },
{
url: 'claudia',
specialMessage: "Heyhey, this page is dangerous! Only for (capable) members, like SysCom!",
minTime: 1,
maxTime: 5,
minTime: 15,
maxTime: 60,
specialFunction: () => {},
runPopupOnce: false
},
Expand Down
92 changes: 43 additions & 49 deletions templates/basis.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@
{% get_current_language as LANGUAGE_CODE %}

<html lang="{{ LANGUAGE_CODE }}" {% if env == 'STAGING' %} id="staging" {% elif env == 'DEBUG' %} id="debug"{% endif %}>
<head>
<!-- SEO -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{% if metadata_enable_opengraph %}
<head>
<!-- SEO -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
{% if metadata_enable_opengraph %}
{# Make image larger, tricks somewebsites #}
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:type" content="website" />
{% else %}
<meta name="description" content="{% trans 'Website of I.C.T.S.V. Inter-Actief, the study association for Technical Computer Science and Business Information Technology students at the University of Twente' %}">
<!-- FB Image -->
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:type" content="website" />
{% else %}
<meta name="description" content="{% trans 'Website of I.C.T.S.V. Inter-Actief, the study association for Technical Computer Science and Business Information Technology students at the University of Twente' %}">
<!-- FB Image -->
<meta property="og:image" content="https://{{ request.get_host }}{% cached_static "img/pdf/ialogo.png" %}" />
{% endif %}
<meta name="keywords" content="{% trans 'inter-actief, utwente, university of twente, computer science, technical computer science, study association, Business Information Technology' %}">
{% endif %}
<meta name="keywords" content="{% trans 'inter-actief, utwente, university of twente, computer science, technical computer science, study association, Business Information Technology' %}">
<meta name="apple-itunes-app" content="app-id=586912286">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#1d428a">

<meta name="application-name" content="Inter-Actief" />
<title>{% trans 'Study Association Inter-Actief' %} :: {% block titel %}{% trans 'Frontpage' %}{% endblock titel %}</title>
<title>{% trans 'Study Association Inter-Actief' %} :: {% block titel %}{% trans 'Frontpage' %}{% endblock titel %}</title>

<!-- Scripts -->
<!-- Scripts -->
{% compress js %}
<script src="{% cached_static 'js/jquery-1.8.0.min.js' %}" type="text/javascript"></script>
<script src="{% cached_static 'js/bootstrap-datepicker.js' %}" type="text/javascript"></script>
Expand All @@ -34,8 +34,8 @@
{% endcompress %}

{% if debug %}
<link type="text/less" rel="stylesheet" href="{% cached_static 'less/style.less' %}" />
<script src="{% cached_static 'js/less-2.5.3.min.js' %}" type="text/javascript"></script>
<link type="text/less" rel="stylesheet" href="{% cached_static 'less/style.less' %}" />
<script src="{% cached_static 'js/less-2.5.3.min.js' %}" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{% cached_static 'css/chosen.min.css' %}" />
{% else %}
{% compress css %}
Expand All @@ -52,57 +52,51 @@
<link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}css/april-fools.css" />
{% endif %}

{% if request.person.is_candidate_board %}
{% if True or request.person.is_candidate_board %}
{% compress css %}
<link type="text/css" rel="stylesheet" href="{% cached_static 'css/kb.css' %}" media="screen"/>
<link type="text/css" rel="stylesheet" href="{% cached_static 'css/kb.css' %}" media="screen"/>

{% comment %} Bootstrap 3.4.1 to make modal work {% endcomment %}
{% comment %} Bootstrap 3.4.1 to make modal work {% endcomment %}
<link rel="stylesheet" type="text/css" href="{% cached_static 'css/bootstrap-3.4.1.min.css' %}" media="all"/>

{% endcompress %}

{% compress js %}
{% comment %} Bootstrap modal needed for popup {% endcomment %}
{% comment %} Bootstrap modal needed for popup {% endcomment %}
<script src="{% cached_static 'js/bootstrap-modal.js' %}"></script>

{% comment %} Clippy {% endcomment %}
<script src="{% cached_static 'js/clippy.min.js' %}"></script>

{% comment %} CB script {% endcomment %}
{% comment %} CB script {% endcomment %}
<script src="{% cached_static 'js/cb.js' %}"></script>
<script type="module" src="{% cached_static 'js/cb-clippy-handler.js' %}"></script>
{% endcompress %}

{% comment %} Popup for CB {% endcomment %}
<div class="modal cb-modal fade" tabindex="-1" role="dialog" id="CbModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content cb-modal-content">
<div class="modal-header cb-modal-header">
<h2>Important message from the board</h2>
{% comment %} <img src="{% cached_static 'img/april-fools/anim1282.gif' %}" alt="anim1282" /> {% endcomment %}
<p id="cb-header"></p>
</div>
<div class="modal-body">
<h2 id="cb-modal-text"><h2>
</div>
</div>
</div>
</div>

<div class="cb-clippy"/>

{% comment %} Popup for CB {% endcomment %}
<div class="modal cb-modal fade" tabindex="-1" role="dialog" id="CbModal">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content cb-modal-content">
<div class="modal-header cb-modal-header">
<h2>Important message from the board</h2>
<p id="cb-header"></p>
</div>
<div class="modal-body">
<h2 id="cb-modal-text"><h2>
</div>
</div>
</div>
</div>
<div class="cb-clippy" />
{% endif %}

{% block head %}{% endblock head %}
{% block head %}{% endblock head %}

<!-- Feeds -->
<link rel="alternate" title="{% trans "News RSS feed" %}" type="application/rss+xml" href="{% url 'feeds:latest-news' %}" />
<link rel="alternate" title="{% trans "Activities RSS-feed" %}" type="application/rss+xml" href="{% url 'feeds:activities' %}" />
<link rel="alternate" title="{% trans "Activities iCal feed" %}" type="text/calendar" href="{% url 'activities:activities_ics_international' lang=LANGUAGE_CODE %}" />
<!-- Feeds -->
<link rel="alternate" title="{% trans "News RSS feed" %}" type="application/rss+xml" href="{% url 'feeds:latest-news' %}" />
<link rel="alternate" title="{% trans "Activities RSS-feed" %}" type="application/rss+xml" href="{% url 'feeds:activities' %}" />
<link rel="alternate" title="{% trans "Activities iCal feed" %}" type="text/calendar" href="{% url 'activities:activities_ics_international' lang=LANGUAGE_CODE %}" />

<!-- Compatibility with older browsers -->
<!--[if IE]><script src="https://html5shiv.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script><![endif]-->
<!--[if (gte IE 6)&(lte IE 8)]><script src="https://cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js" type="text/javascript"></script><![endif]-->
<!-- Compatibility with older browsers -->
<!--[if IE]><script src="https://html5shiv.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script><![endif]-->
<!--[if (gte IE 6)&(lte IE 8)]><script src="https://cdnjs.cloudflare.com/ajax/libs/selectivizr/1.0.2/selectivizr-min.js" type="text/javascript"></script><![endif]-->

<!-- https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color -->
<meta name="theme-color" content="#1D428A">
Expand Down

0 comments on commit 0cd3383

Please sign in to comment.