get rid of modal box code. probably some other stuff can be deleted, too

lektura
max.mehl 2017-08-29 16:41:48 +02:00
parent 0aeff55bde
commit 8282a4eba2
13 changed files with 35 additions and 209 deletions

View File

@ -90,6 +90,28 @@ DefaultContentLanguage = "en"
formSubmit = "Sign"
# Resources boxes section
[params.resources]
[[params.resources.list]]
title = "Latest News"
description = "The latest updates about this campaign and public code in Europe"
img = "news.jpg"
link = "/news/"
[[params.resources.list]]
title = "Take Further Action"
description = "Already signed the Open Letter? Learn what else you can do"
img = "action.jpg"
link = "/getactive/"
[[params.resources.list]]
title = "Press Contact"
description = "Contact information for press and interested public"
img = "press.jpg"
link = "/contact/"
# Spread the word section
[params.spread]
headline = "Spread the word!"

View File

@ -1,6 +0,0 @@
modalID: 4
title: Neuigkeiten
date:
img: 4.jpg
shortLink: latestNews
description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit.

View File

@ -1,6 +0,0 @@
modalID: 3
title: Werde aktiv!
date:
img: 3.jpg
shortLink: takeAction
description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit.

View File

@ -1,6 +0,0 @@
modalID: 6
title: Presse
date:
img: 6.jpg
shortLink: pressInformation
description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit.

View File

@ -1,6 +0,0 @@
modalID: 4
title: Latest News
date:
img: news.jpg
shortLink: latestNews
description: Here should be an auto-generated list of news and their teasers from fsfe.org which are tagged with [pmpc](https://fsfe.org/tags/tagged-pmpc.en.html). There's no tag-specific RSS yet so we have to hack that. See issue https://git.fsfe.org/pmpc/website/issues/2

View File

@ -1,21 +0,0 @@
modalID: 3
title: Take Action!
date:
img: action.jpg
shortLink: takeAction
description: "Help us convince our governments that software paid with your taxes should be public by...
* ... signing the petition [LINK]
* ... sharing the petition with others [LINK for sharing]
* ... get info material
* ... call your representative
* ... donating to our campaign [LINK]
"

View File

@ -1,6 +0,0 @@
modalID: 6
title: Press information
date:
img: press.jpg
shortLink: pressInformation
description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel enim aliquid dicta ullam in repellendus amet perspiciatis adipisci architecto obcaecati sit voluptas ipsam, deleniti neque placeat tenetur cum tempore velit.

View File

@ -25,7 +25,7 @@
{{ partial "action.html" . }}
{{ end }}
{{ if $data.resources }}
{{ if .Site.Params.resources }}
{{ partial "resources.html" . }}
{{ end }}
@ -38,10 +38,6 @@
{{ end }}
{{ partial "legal.html" . }}
{{ if $data.resources }}
{{ partial "modals.html" . }}
{{ end }}
{{ partial "sharecolumn.html" . }}

View File

@ -1,39 +0,0 @@
{{ "<!-- RESOURCES MODALS -->" | safeHTML }}
{{ $data := index .Site.Data .Site.Language.Lang }}
{{ range $data.resources }}
<div class="resources-modal modal fade" id="{{ .shortLink }}" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-content">
<div class="close-modal" data-dismiss="modal">
<div class="lr">
<div class="rl">
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<div class="modal-body">
{{ with .title }}
<h2>{{ . }}</h2>
{{ end }}
{{ if and .title .description }}
<hr class="star-primary">
{{ end }}
<img src="img/resources/{{ .img }}" class="img-responsive img-centered" alt="">
{{ with .description }}
<p>{{ . | markdownify }}</p>
{{ end }}
{{ if .date }}
<ul class="list-inline item-details">
<li><strong>{{ with $.Site.Params.resources.modal.date }}{{.}}</strong>: {{ end }}
{{ .date }}
</li>
</ul>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</div>
{{ end }}

View File

@ -4,9 +4,9 @@
<div class="container-fluid">
<h2 class="hidden">{{ .Site.Params.navigation.links.resources }}</h2>
<div class="row no-gutter">
{{ range $data.resources }}
{{ range .Site.Params.resources.list }}
<div class="col-lg-4 col-sm-6">
<a href="#{{ .shortLink }}" class="resources-box resources-link" data-toggle="modal">
<a href="{{ .link }}" class="resources-box resources-link">
<img src="/img/resources/{{ .img }}" class="img-responsive" alt="">
{{ if .title }}
<div class="resources-box-caption">
@ -16,6 +16,11 @@
{{ . }}
</div>
{{ end }}
{{ with .description }}
<div class="resource-description">
{{ . }}
</div>
{{ end }}
</div>
</div>
{{ end }}

View File

@ -383,14 +383,14 @@ header .header-content .header-content-inner p {
font-family: 'Open Sans','Helvetica Neue',Arial,sans-serif;
}
.resources-box .resources-box-caption .resources-box-caption-content .resource-category {
text-transform: uppercase;
.resources-box .resources-box-caption .resources-box-caption-content .resource-description {
margin-top: 10px;
font-size: 14px;
font-weight: 600;
}
.resources-box .resources-box-caption .resources-box-caption-content .resource-name {
font-size: 18px;
font-size: 20px;
}
.resources-box:hover .resources-box-caption {
@ -398,8 +398,8 @@ header .header-content .header-content-inner p {
}
@media(min-width:768px) {
.resources-box .resources-box-caption .resources-box-caption-content .resource-category {
font-size: 16px;
.resources-box .resources-box-caption .resources-box-caption-content .resource-description {
font-size: 14px;
}
.resources-box .resources-box-caption .resources-box-caption-content .resource-name {

View File

@ -1,83 +0,0 @@
/*!
* The code below adds the modal functionality of the Freelancer Bootstrap Theme
* and was originally part of this theme.
*
*
* Start Bootstrap - Freelancer Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
overflow-x: hidden;
}
.img-centered {
margin: 0 auto;
}
.modal { overflow-y: scroll }
.resources-modal .modal-content {
padding: 50px 0;
min-height: 100%;
border: 0;
border-radius: 0;
text-align: center;
background-clip: border-box;
-webkit-box-shadow: none;
box-shadow: none;
}
.resources-modal .modal-content h2 {
margin: 0;
font-size: 3em;
}
.resources-modal .modal-content img {
margin-bottom: 30px;
}
.resources-modal .modal-content .item-details {
margin: 30px 0;
}
.resources-modal .close-modal {
position: fixed;
top: 25px;
right: 25px;
width: 30px;
height: 30px;
background-color: transparent;
cursor: pointer;
}
.resources-modal .close-modal:hover {
opacity: .3;
}
.resources-modal .close-modal .lr {
z-index: 1051;
width: 1px;
height: 30px;
margin-left: 15px;
background-color: #2c3e50;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.resources-modal .close-modal .lr .rl {
z-index: 1052;
width: 1px;
height: 30px;
background-color: #2c3e50;
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.resources-modal .modal-backdrop {
display: none;
opacity: 0;
}

View File

@ -46,27 +46,3 @@
new WOW().init();
})(jQuery); // End of use strict
/*
* This function allows you to open a modal box by defining it in the URL
* e.g. https://localhost:1313/#resourcesModal1
*/
(function() {
if (window.location.href.indexOf('#') > -1) {
var modalID = window.location.href.split('#')[1];
var modal = document.getElementById(modalID);
modal.className += ' in';
modal.style.display = 'block';
var closeButtons = document.getElementsByClassName('close-modal');
for(var i = 0; i < closeButtons.length; i++) {
closeButtons[i].onclick = function() {
modal.style.display = 'none';
modal.classList.remove('in');
};
}
}
})();