mirror of
				https://github.com/DerTyp7/tealcode-django-python.git
				synced 2025-10-31 05:07:08 +01:00 
			
		
		
		
	added Analytics
This commit is contained in:
		| @@ -41,6 +41,7 @@ INSTALLED_APPS = [ | |||||||
|     'django.contrib.messages', |     'django.contrib.messages', | ||||||
|     'django.contrib.staticfiles', |     'django.contrib.staticfiles', | ||||||
|     'main.apps.MainConfig', |     'main.apps.MainConfig', | ||||||
|  |     'analytics.apps.AnalyticsConfig', | ||||||
| ] | ] | ||||||
|  |  | ||||||
| MIDDLEWARE = [ | MIDDLEWARE = [ | ||||||
|   | |||||||
| @@ -18,5 +18,6 @@ from django.urls import path, include | |||||||
|  |  | ||||||
| urlpatterns = [ | urlpatterns = [ | ||||||
|     path('', include('main.urls')), |     path('', include('main.urls')), | ||||||
|  |     path('analytics/', include('analytics.urls')), | ||||||
|     path('admin/', admin.site.urls), |     path('admin/', admin.site.urls), | ||||||
| ] | ] | ||||||
|   | |||||||
							
								
								
									
										0
									
								
								TealCode/analytics/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								TealCode/analytics/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										3
									
								
								TealCode/analytics/admin.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								TealCode/analytics/admin.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | from django.contrib import admin | ||||||
|  |  | ||||||
|  | # Register your models here. | ||||||
							
								
								
									
										6
									
								
								TealCode/analytics/apps.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								TealCode/analytics/apps.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | from django.apps import AppConfig | ||||||
|  |  | ||||||
|  |  | ||||||
|  | class AnalyticsConfig(AppConfig): | ||||||
|  |     default_auto_field = 'django.db.models.BigAutoField' | ||||||
|  |     name = 'analytics' | ||||||
							
								
								
									
										0
									
								
								TealCode/analytics/migrations/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								TealCode/analytics/migrations/__init__.py
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										3
									
								
								TealCode/analytics/models.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								TealCode/analytics/models.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | from django.db import models | ||||||
|  |  | ||||||
|  | # Create your models here. | ||||||
							
								
								
									
										0
									
								
								TealCode/analytics/static/analytics/base.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								TealCode/analytics/static/analytics/base.css
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										26
									
								
								TealCode/analytics/templates/analytics/base.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								TealCode/analytics/templates/analytics/base.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | {% load static %} | ||||||
|  | <!DOCTYPE html> | ||||||
|  | <html> | ||||||
|  | <head> | ||||||
|  |  | ||||||
|  |     <!-- Required meta tags --> | ||||||
|  |     <meta charset="utf-8"> | ||||||
|  |     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||||||
|  |     <link rel="stylesheet" href="{% static 'main/css/fonts.css' %}"> | ||||||
|  |     <link rel="stylesheet" href="{% static 'main/css/base.css' %}"> | ||||||
|  |  | ||||||
|  |     <title>TealCode | Analytics</title> | ||||||
|  | </head> | ||||||
|  | <body> | ||||||
|  |     <header> | ||||||
|  |         <h1 style="cursor:pointer;" onclick="window.open('/analytics/', '_self')">TealCode | Analytics</h1> | ||||||
|  |  | ||||||
|  |         <div> | ||||||
|  |             <a href="/">TealCode</a> | ||||||
|  |         </div> | ||||||
|  |     </header> | ||||||
|  |     <main> | ||||||
|  |         {% block content %}{% endblock %} | ||||||
|  |     </main> | ||||||
|  | </body> | ||||||
|  | </html> | ||||||
							
								
								
									
										4
									
								
								TealCode/analytics/templates/analytics/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								TealCode/analytics/templates/analytics/index.html
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | {% extends "analytics/base.html" %} | ||||||
|  | {% block content %} | ||||||
|  |  | ||||||
|  | {% endblock content %} | ||||||
							
								
								
									
										3
									
								
								TealCode/analytics/tests.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								TealCode/analytics/tests.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | from django.test import TestCase | ||||||
|  |  | ||||||
|  | # Create your tests here. | ||||||
							
								
								
									
										6
									
								
								TealCode/analytics/urls.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								TealCode/analytics/urls.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  | from django.urls import path | ||||||
|  | from . import views | ||||||
|  |  | ||||||
|  | urlpatterns = [ | ||||||
|  |     path('', views.index, name="analytics-index"), | ||||||
|  | ] | ||||||
							
								
								
									
										4
									
								
								TealCode/analytics/views.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								TealCode/analytics/views.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | |||||||
|  | from django.shortcuts import render | ||||||
|  |  | ||||||
|  | def index(req): | ||||||
|  |     return render(req, 'analytics/index.html') | ||||||
| @@ -1,11 +1,13 @@ | |||||||
| *{ | *{ | ||||||
|     padding: 0; |     padding: 0; | ||||||
|     margin: 0; |     margin: 0; | ||||||
|  |     transition-timing-function: linear; | ||||||
| } | } | ||||||
|  |  | ||||||
| html,body{ | html,body{ | ||||||
|     background-color: rgba(38, 38, 42, 1); |     background-color: rgba(38, 38, 42, 1); | ||||||
|     height: 100%; |     height: 100%; | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| /* HEADER */ | /* HEADER */ | ||||||
| @@ -13,19 +15,28 @@ header{ | |||||||
|     background-color: rgb(34, 102, 71); |     background-color: rgb(34, 102, 71); | ||||||
|     padding: 10px; |     padding: 10px; | ||||||
|     padding-left: 150px; |     padding-left: 150px; | ||||||
|  |     margin-top: 0px; | ||||||
|  |     height: 35px; | ||||||
|     box-shadow: 0px 1px 20px 3px #1f1d1d; |     box-shadow: 0px 1px 20px 3px #1f1d1d; | ||||||
|  |      | ||||||
|  | } | ||||||
|  |  | ||||||
|  | header h1{ | ||||||
|  |     float:left; | ||||||
| } | } | ||||||
|  |  | ||||||
| header div{ | header div{ | ||||||
|     float: right; |     float: right; | ||||||
|     margin-top: -25px; |     margin-top: 10px; | ||||||
|     margin-right: 100px; |     margin-right: 0px; | ||||||
| } | } | ||||||
|  |  | ||||||
| header div a{ | header div a{ | ||||||
|     letter-spacing: 1.5px; |     letter-spacing: 1.5px; | ||||||
|     padding-right: 10px; |     padding-right: 10px; | ||||||
|     padding-left: 10px;  |     padding-left: 10px;  | ||||||
|  |     padding-top: 5px; | ||||||
|  |     padding-bottom: 5px; | ||||||
|     cursor:pointer; |     cursor:pointer; | ||||||
|     transition: 0.1s; |     transition: 0.1s; | ||||||
|     transition-timing-function: linear;     |     transition-timing-function: linear;     | ||||||
| @@ -65,7 +76,7 @@ main #main-content{ | |||||||
| } | } | ||||||
|  |  | ||||||
| main .main-text{ | main .main-text{ | ||||||
|     width: 650px; |     width: 90%; | ||||||
|     display: block; |     display: block; | ||||||
|     margin-left: auto; |     margin-left: auto; | ||||||
|     margin-right: auto; |     margin-right: auto; | ||||||
| @@ -121,7 +132,7 @@ footer .footer-links a:hover{ | |||||||
|     font-size: 13pt; |     font-size: 13pt; | ||||||
|     color: white; |     color: white; | ||||||
|     font-weight: bold; |     font-weight: bold; | ||||||
|     margin-top: 18px; |     margin-top: 8px; | ||||||
|     margin-left: 200px; |     margin-left: 200px; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -130,7 +141,7 @@ footer .footer-links a:hover{ | |||||||
|     margin-right: 200px; |     margin-right: 200px; | ||||||
|     width: 150px; |     width: 150px; | ||||||
|     height: 40px; |     height: 40px; | ||||||
|     margin-top: -30px; |     margin-top: -40px; | ||||||
|     border: 3px solid green; |     border: 3px solid green; | ||||||
|     background-color: rgba(77, 77, 77, 0.5); |     background-color: rgba(77, 77, 77, 0.5); | ||||||
|     color: white; |     color: white; | ||||||
| @@ -145,3 +156,61 @@ footer .footer-links a:hover{ | |||||||
|     background-color: rgba(77, 77, 77, 0.801); |     background-color: rgba(77, 77, 77, 0.801); | ||||||
|     border: 3px solid rgb(1, 180, 1); |     border: 3px solid rgb(1, 180, 1); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | /* BREAKPOINTS */ | ||||||
|  | @media screen and (max-width:1100px) { | ||||||
|  |     #cookie_banner button{ | ||||||
|  |         margin-right: 5px; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |      | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | @media screen and (max-width:900px) { | ||||||
|  |     header{ | ||||||
|  |         height: 80px; | ||||||
|  |         padding-left: 10px; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     header div{ | ||||||
|  |         float:left; | ||||||
|  |         width: 100%; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     #cookie_banner p{ | ||||||
|  |         margin-left: 5px; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media screen and (max-width:700px) { | ||||||
|  |     #main-content{ | ||||||
|  |         width:100%; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |      | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media screen and (max-width:670px) { | ||||||
|  |  | ||||||
|  |     #cookie_banner p{ | ||||||
|  |         margin-left: 5px; | ||||||
|  |         width: 100%; | ||||||
|  |     } | ||||||
|  |     #cookie_banner button{ | ||||||
|  |         margin-top: 10px; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     #cookie_banner { | ||||||
|  |         height: 130px; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @media screen and (max-width:500px) { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     #cookie_banner { | ||||||
|  |         height: 160px; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -1,12 +1,12 @@ | |||||||
| /* TOPIC LIST */ | /* TOPIC LIST */ | ||||||
| main #main-content #list{ | main #main-content #list{ | ||||||
|     width: 700px; |     width: 100%; | ||||||
|     margin-top: 50px; |     margin-top: 50px; | ||||||
|     margin-bottom: 50px; |     margin-bottom: 50px; | ||||||
| } | } | ||||||
|  |  | ||||||
| main #main-content #list .list-item{ | main #main-content #list .list-item{ | ||||||
|     width: 600px; |     width: 90%; | ||||||
|     margin-left: 50px; |     margin-left: 50px; | ||||||
|     margin-top: 10px; |     margin-top: 10px; | ||||||
|     padding-top: 10px; |     padding-top: 10px; | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ | |||||||
|     <!-- Global site tag (gtag.js) - Google Analytics --> |     <!-- Global site tag (gtag.js) - Google Analytics --> | ||||||
|     <script async src="https://www.googletagmanager.com/gtag/js?id=G-9M4H60DMBG"></script> |     <script async src="https://www.googletagmanager.com/gtag/js?id=G-9M4H60DMBG"></script> | ||||||
|     <div id="cookie_banner"> |     <div id="cookie_banner"> | ||||||
|         <p>We only use non-technical cookies for analysis purposes. Do you want to accept those cookies? (please)</p> |         <p>We only use non-technical cookies for analysis purposes.<br> Do you want to accept those cookies? (please)</p> | ||||||
|         <button onclick='document.cookie = "cookies_allowed=1;path=/";window.location.reload();'>Accept</button> |         <button onclick='document.cookie = "cookies_allowed=1;path=/";window.location.reload();'>Accept</button> | ||||||
|     </div> |     </div> | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 DerTyp187
					DerTyp187