Skip to content

Commit

Permalink
Merge pull request #64 from libris/feature/local-fonts-and-no-ga
Browse files Browse the repository at this point in the history
Locally hosted fonts and no more Google Analytics
  • Loading branch information
andersju authored Mar 25, 2021
2 parents 9293078 + 095476f commit 3997817
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 24 deletions.
17 changes: 2 additions & 15 deletions libstat/templates/libstat/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@

{% if ""|analytics_enabled %}

<!-- Google analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-57675588-1', 'auto');
ga('send', 'pageview');

</script>
<!-- End Google analytics Code -->

<!-- Piwik -->
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(['trackPageView']);
Expand All @@ -29,6 +16,6 @@
})();
</script>
<noscript><p><img src="//analytics.kb.se/piwik.php?idsite=24" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->
<!-- End Matomo Code -->

{% endif %}
1 change: 1 addition & 0 deletions libstat/templates/libstat/base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<link href="/static/js/plugins/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/static/css/font-awesome.min.css" rel="stylesheet"/>
<link href="/static/css/open-sans.css" rel="stylesheet"/>
<link href="/static/css/report.css" rel="stylesheet"/>
<link href="/static/css/index.css" rel="stylesheet"/>

Expand Down
7 changes: 1 addition & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,4 @@ Filerna hamnar under [data/excel_exports] (data/excel_exports) (under /data/appl

## Analytics

[Google Analytics](http://www.google.com/analytics) används för att spåra hur externa användare använder tjänsten.
Kontot som används delas tillsammans med de andra utvecklade systemen i Libris.

Inloggningsuppgifterna kan fås genom att fråga en involverad utvecklare.

Tjänsten genererar även data till Piwik på [http://analytics.kb.se](http://analytics.kb.se)
Tjänsten genererar data till Matomo på [http://analytics.kb.se](http://analytics.kb.se).
1 change: 1 addition & 0 deletions static/css/bundle.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
@import url("../js/plugins/bootstrap-datepicker/1.3.0/css/datepicker3.css");
@import url("../js/plugins/bootstrap-tokenfield/0.12.0/css/bootstrap-tokenfield.css");
@import url("font-awesome.min.css");
@import url("open-sans.css");
@import url("libstat.css");
2 changes: 1 addition & 1 deletion static/css/bundle.min.css

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions static/css/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,700&display=swap');

html {
width: 100%;
height: 100%;
Expand Down
39 changes: 39 additions & 0 deletions static/css/open-sans.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* open-sans-regular - latin-ext_latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local(''),
url('../fonts/open-sans-v18-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/open-sans-v18-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* open-sans-italic - latin-ext_latin */
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local(''),
url('../fonts/open-sans-v18-latin-ext_latin-italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/open-sans-v18-latin-ext_latin-italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* open-sans-600 - latin-ext_latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local(''),
url('../fonts/open-sans-v18-latin-ext_latin-600.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/open-sans-v18-latin-ext_latin-600.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* open-sans-700 - latin-ext_latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local(''),
url('../fonts/open-sans-v18-latin-ext_latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/open-sans-v18-latin-ext_latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 3997817

Please sign in to comment.