amp_base_theme 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7cd6945af12cc984452abdba580d4e5944711e31041949f42331a11c1bf57807
4
+ data.tar.gz: 06be623174eca661da8c72f23b780f7d70fe790fc51bb7ec9e145a1698627a37
5
+ SHA512:
6
+ metadata.gz: 7b866ab70a497d658e4783add09ff942905b83e5868084e62a66c67ad3c09501909b53fc8fa36dea977239dcd1327e94a723c902586b11838b6e3d1554356a83
7
+ data.tar.gz: ce7bbdac78652c7fc0d2890b4bc2c4c4e6687f1512aa86b8f3e53167a63649fb8b634378b9e224c414af4753dd01b5b03a49bbe1a879c6a0f4a576fa45043a91
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Lukas Himsel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,52 @@
1
+ # amp_base_theme
2
+
3
+ Welcome to your new Jekyll theme! In this directory, you'll find the files you need to be able to package up your theme into a gem. Put your layouts in `_layouts`, your includes in `_includes`, your sass files in `_sass` and any other assets in `assets`.
4
+
5
+ To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
6
+
7
+ TODO: Delete this and the text above, and describe your gem
8
+
9
+
10
+ ## Installation
11
+
12
+ Add this line to your Jekyll site's `Gemfile`:
13
+
14
+ ```ruby
15
+ gem "amp_base_theme"
16
+ ```
17
+
18
+ And add this line to your Jekyll site's `_config.yml`:
19
+
20
+ ```yaml
21
+ theme: amp_base_theme
22
+ ```
23
+
24
+ And then execute:
25
+
26
+ $ bundle
27
+
28
+ Or install it yourself as:
29
+
30
+ $ gem install amp_base_theme
31
+
32
+ ## Usage
33
+
34
+ TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lukas-h/amp_base_theme. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
39
+
40
+ ## Development
41
+
42
+ To set up your environment to develop this theme, run `bundle install`.
43
+
44
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
45
+
46
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
47
+ To add a custom directory to your theme-gem, please edit the regexp in `amp_base_theme.gemspec` accordingly.
48
+
49
+ ## License
50
+
51
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
52
+
@@ -0,0 +1,23 @@
1
+ {% if site.cookie_consent %}
2
+ <amp-consent layout="nodisplay" id="dsgvo-consent">
3
+ <script type="application/json">
4
+ {
5
+ "consentInstanceId": "dsgvo-consent",
6
+ "consentRequired": true,
7
+ "promptUI": "consent-ui",
8
+ "captions": {
9
+ "consentPromptCaption": "Diese Seite verwendet Cookies. Einige sind essenziell, andere verwenden wir für Statistiken und Marketing.",
10
+ "buttonActionCaption": "Alle Cookies akzeptieren"
11
+ }
12
+ }
13
+ </script>
14
+ <div id="consent-ui">
15
+ <p>
16
+ Diese Seite verwendet Cookies. Einige sind essenziell, andere verwenden wir für Statistiken und Marketing.
17
+ <a href="/datenschutz.html">Mehr erfahren!</a>
18
+ </p>
19
+ <button on="tap:dsgvo-consent.accept" role="button" class="btn btn-primary">Alle akzeptieren</button>
20
+ <button on="tap:dsgvo-consent.reject" role="button" class="btn">Nur essenzielle</button>
21
+ </div>
22
+ </amp-consent>
23
+ {% endif %}
@@ -0,0 +1,17 @@
1
+ {% if site.facebook_analytics %}
2
+ <amp-analytics type="facebookpixel" id="facebook-pixel" data-block-on-consent="_till_accepted" {% if site.cookie_consent %}data-block-on-consent="_till_accepted"{% endif %}>
3
+ <script type="application/json">
4
+ {
5
+ "vars": {
6
+ "pixelId": "{{ site.facebook_analytics }}"
7
+ },
8
+ "triggers": {
9
+ "trackPageview": {
10
+ "on": "visible",
11
+ "request": "pageview"
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+ </amp-analytics>
17
+ {% endif %}
@@ -0,0 +1,17 @@
1
+ {% if site.google_analytics %}
2
+ <amp-analytics type="googleanalytics" {% if site.cookie_consent %}data-block-on-consent="_till_accepted"{% endif %}>
3
+ <script type="application/json">
4
+ {
5
+ "vars": {
6
+ "account": "{{ site.google_analytics }}"
7
+ },
8
+ "triggers": {
9
+ "trackPageview": {
10
+ "on": "visible",
11
+ "request": "pageview"
12
+ }
13
+ }
14
+ }
15
+ </script>
16
+ </amp-analytics>
17
+ {% endif %}
@@ -0,0 +1,3 @@
1
+ {% include analytics/google-analytics.html %}
2
+ {% include analytics/facebook-analytics.html %}
3
+ {% include analytics/cookie-consent.html %}
@@ -0,0 +1,7 @@
1
+ <head>
2
+ {% include head/seo.html %}
3
+ {% include head/amp-boilerplate.html %}
4
+ {% include head/amp-custom.html %}
5
+ <script async src="https://cdn.ampproject.org/v0.js"></script>
6
+ {% include head/amp-components.html %}
7
+ </head>
@@ -0,0 +1,67 @@
1
+ <style amp-boilerplate>
2
+ body {
3
+ -webkit-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
4
+ -moz-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
5
+ -ms-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
6
+ animation: -amp-start 8s steps(1, end) 0s 1 normal both
7
+ }
8
+
9
+ @-webkit-keyframes -amp-start {
10
+ from {
11
+ visibility: hidden
12
+ }
13
+
14
+ to {
15
+ visibility: visible
16
+ }
17
+ }
18
+
19
+ @-moz-keyframes -amp-start {
20
+ from {
21
+ visibility: hidden
22
+ }
23
+
24
+ to {
25
+ visibility: visible
26
+ }
27
+ }
28
+
29
+ @-ms-keyframes -amp-start {
30
+ from {
31
+ visibility: hidden
32
+ }
33
+
34
+ to {
35
+ visibility: visible
36
+ }
37
+ }
38
+
39
+ @-o-keyframes -amp-start {
40
+ from {
41
+ visibility: hidden
42
+ }
43
+
44
+ to {
45
+ visibility: visible
46
+ }
47
+ }
48
+
49
+ @keyframes -amp-start {
50
+ from {
51
+ visibility: hidden
52
+ }
53
+
54
+ to {
55
+ visibility: visible
56
+ }
57
+ }
58
+ </style><noscript>
59
+ <style amp-boilerplate>
60
+ body {
61
+ -webkit-animation: none;
62
+ -moz-animation: none;
63
+ -ms-animation: none;
64
+ animation: none
65
+ }
66
+ </style>
67
+ </noscript>
@@ -0,0 +1,34 @@
1
+ {% assign components = site.amp_components %}
2
+ {% assign component_keys = site.amp_components | map: "category" %}
3
+
4
+ {% if page.amp_components %}
5
+
6
+ {% for comp in page.amp_components %}
7
+ {% if site.component_keys contains comp.name %}{% else %}
8
+
9
+ {% assign comp_array = page.amp_components | where: "name", comp.name %}
10
+ {% assign components = components | concat: comp_array %}
11
+ {% assign comp_name = comp.name | split: "" %}
12
+ {% assign components_keys = component_keys | concat: comp_name %}
13
+
14
+ {% endif %}
15
+ {% endfor %}
16
+
17
+ {% endif %}
18
+
19
+ {% if site.google_analytics or site.facebook_analytics %}
20
+ {% if component_keys contains "amp-analytics" %}{% else %}
21
+
22
+ {% assign analytics_comp = site.data.amp_components | where: "name", "amp-analytics" %}
23
+ {% assign components = components | concat: analytics_comp %}
24
+ {% assign comp_name = "amp-analytics" | split: "" %}
25
+ {% assign component_keys = component_keys | concat: comp_name %}
26
+
27
+ {% endif %}
28
+ {% endif %}
29
+
30
+ {% for comp in components %}
31
+
32
+ <script async custom-element="{{ comp.name }}" src="https://cdn.ampproject.org/v0/{{ comp.name }}-{{ comp.version | default: "0.1" }}.js"></script>
33
+
34
+ {% endfor %}
@@ -0,0 +1,3 @@
1
+ <style amp-custom>
2
+
3
+ </style>
@@ -0,0 +1,49 @@
1
+ <meta charset="utf-8">
2
+ <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+
5
+ <title>{{ page.title | default: site.title }}</title>
6
+
7
+ <link rel="canonical" href="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
8
+ <link rel="manifest" href="{{ site.baseurl }}/manifest.json">
9
+
10
+ <meta name="description" content="{{ page.excerpt | default: site.description | strip_html }}">
11
+ <meta name="robots" content="index,follow">
12
+ <meta name="author" content="{{ page.author | default: site.author }}">
13
+ <meta itemprop="name" content="{{ site.title }}">
14
+ <meta name="theme-color" content="{{ site.color }}">
15
+ <meta name="google" value="notranslate">
16
+ <meta name="keywords" value="{{ site.keywords | join:', ' }}" />
17
+ <meta name="news_keywords" content="{{ site.keywords | join:', ' }}" />
18
+ <link href="/feed.xml" type="application/rss+xml" rel="alternate" />
19
+
20
+ {% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification }}" />{% endif %}
21
+
22
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.baseurl }}/uploads/144x144.png">
23
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ site.baseurl }}/uploads/114x114.png">
24
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ site.baseurl }}/uploads/72x72.png">
25
+ <link rel="apple-touch-icon-precomposed" href="{{ site.baseurl }}/uploads/57x57.png">
26
+ <link rel="shortcut icon" sizes="196x196" href="{{ site.baseurl }}/uploads/196x196.png">
27
+ <link rel="shortcut icon" href="{{ site.baseurl }}/uploads/favicon.png">
28
+
29
+ <meta name="HandheldFriendly" content="True">
30
+ <meta name="MobileOptimized" content="320">
31
+
32
+ <meta name="msapplication-TileImage" content="{{ site.baseurl }}/uploads/144x144.png">
33
+ <meta name="msapplication-TileColor" content="{{ site.color }}">
34
+
35
+ <meta property="og:url" content="{{ site.url }}{{ site.baseurl }}{{ page.url }}" />
36
+ <meta property="og:type" content="website" />
37
+ <meta property="og:title" content="{{ page.title | default: site.title }}" />
38
+ <meta property="og:description" content="{{ page.excerpt | default: site.description | strip_html }}" />
39
+ <meta property="og:image" content="{{ page.image | default: site.image }}" />
40
+ <meta property="og:image:type" content="image/png" />
41
+
42
+ <meta name="twitter:card" content="summary" />
43
+ <meta name="twitter:title" content="{{ page.title | default: site.title }}" />
44
+ <meta name="twitter:description" content="{{ page.excerpt | default: site.description | strip_html }}" />
45
+ <meta name="twitter:image" content="{{ page.image | default: site.image }}" />
46
+ <meta name="twitter:site" content="@{{ site.twitter }}" />
47
+
48
+
49
+ {% include head/structured-data.html %}
File without changes
@@ -0,0 +1,5 @@
1
+ ---
2
+ ---
3
+
4
+ {% capture _LINE_FEED %}
5
+ {% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}
@@ -0,0 +1,14 @@
1
+ ---
2
+ layout: compress
3
+ ---
4
+
5
+ <!doctype html>
6
+ <html ⚡>
7
+ {% include head.html %}
8
+
9
+ <body>
10
+ {{ content }}
11
+ {% include footer.html %}
12
+ </body>
13
+
14
+ </html>
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {{ content }}
metadata ADDED
@@ -0,0 +1,73 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: amp_base_theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Lukas Himsel
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.1'
27
+ description:
28
+ email:
29
+ - lukas@himsel.me
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - LICENSE.txt
35
+ - README.md
36
+ - _includes/analytics/cookie-consent.html
37
+ - _includes/analytics/facebook-analytics.html
38
+ - _includes/analytics/google-analytics.html
39
+ - _includes/footer.html
40
+ - _includes/head.html
41
+ - _includes/head/amp-boilerplate.html
42
+ - _includes/head/amp-components.html
43
+ - _includes/head/amp-custom.html
44
+ - _includes/head/seo.html
45
+ - _includes/head/structured-data.html
46
+ - _layouts/compress.html
47
+ - _layouts/default.html
48
+ - _layouts/page.html
49
+ - _layouts/post.html
50
+ homepage: https://github.com/lukas-h/amp_base_theme
51
+ licenses:
52
+ - MIT
53
+ metadata: {}
54
+ post_install_message:
55
+ rdoc_options: []
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ required_rubygems_version: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ requirements: []
69
+ rubygems_version: 3.0.3
70
+ signing_key:
71
+ specification_version: 4
72
+ summary: A starter pack for AMP-based (amp.dev) Jekyll sites
73
+ test_files: []