Переглянути джерело

Merge branch 'version143' into develop

trendschau 4 роки тому
батько
коміт
c6d85a1aff

+ 10 - 4
composer.lock

@@ -1056,12 +1056,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/vlucas/valitron.git",
-                "reference": "9268adeeb48ba155e35dca861f5990283e14eafb"
+                "reference": "81515dcc951e1f636a1a18ece2f4154dfa123438"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/vlucas/valitron/zipball/9268adeeb48ba155e35dca861f5990283e14eafb",
-                "reference": "9268adeeb48ba155e35dca861f5990283e14eafb",
+                "url": "https://api.github.com/repos/vlucas/valitron/zipball/81515dcc951e1f636a1a18ece2f4154dfa123438",
+                "reference": "81515dcc951e1f636a1a18ece2f4154dfa123438",
                 "shasum": ""
             },
             "require": {
@@ -1097,7 +1097,13 @@
                 "validation",
                 "validator"
             ],
-            "time": "2020-07-10T08:55:05+00:00"
+            "funding": [
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/vlucas/valitron",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-12-01T11:14:45+00:00"
         }
     ],
     "packages-dev": [],

+ 7 - 0
system/Controllers/PageController.php

@@ -10,6 +10,7 @@ use Typemill\Models\WriteMeta;
 use \Symfony\Component\Yaml\Yaml;
 use Typemill\Models\VersionCheck;
 use Typemill\Models\Markdown;
+use Typemill\Events\OnCacheUpdated;
 use Typemill\Events\OnPagetreeLoaded;
 use Typemill\Events\OnBreadcrumbLoaded;
 use Typemill\Events\OnItemLoaded;
@@ -45,6 +46,12 @@ class PageController extends Controller
 			{
 				$structure	= $this->getCachedStructure($cache);
 			}
+			else
+			{
+				# dispatch message that the cache has been refreshed 
+				$this->c->dispatcher->dispatch('onCacheUpdated', new OnCacheUpdated(false));
+			}
+
 			if(!isset($structure) OR !$structure) 
 			{
 				# if not, get a fresh structure of the content folder

+ 14 - 0
system/Events/OnCacheUpdated.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace Typemill\Events;
+
+use Symfony\Component\EventDispatcher\Event;
+
+/**
+ * Event for the page rendering data.
+ */
+
+class OnCacheUpdated extends BaseEvent
+{
+
+}

+ 23 - 1
system/Extensions/TwigUserExtension.php

@@ -9,10 +9,32 @@ class TwigUserExtension extends \Twig_Extension
 		return [
 			new \Twig_SimpleFunction('is_role', array($this, 'isRole' )),
 			new \Twig_SimpleFunction('get_role', array($this, 'getRole' )),
-			new \Twig_SimpleFunction('get_username', array($this, 'getUsername' ))
+			new \Twig_SimpleFunction('get_username', array($this, 'getUsername' )),
+			new \Twig_SimpleFunction('is_loggedin', array($this, 'isLoggedin' ))
 		];
 	}
 	
+	public function isLoggedin()
+	{
+		// configure session
+		ini_set('session.cookie_httponly', 1 );
+		ini_set('session.use_strict_mode', 1);
+		ini_set('session.cookie_samesite', 'lax');
+		session_name('typemill-session');
+				
+		// start session
+		session_start();
+
+		if(isset($_SESSION['user']))
+		{
+			return true;
+		}
+		
+		session_destroy();
+		return false;
+
+	}
+
 	public function isRole($role)
 	{
 		if(isset($_SESSION['role']) && $_SESSION['role'] == $role)

+ 0 - 35
system/Middleware/RedirectIfNoAdmin.php

@@ -1,35 +0,0 @@
-<?php
-
-namespace Typemill\Middleware;
-
-use Slim\Interfaces\RouterInterface;
-use Slim\Http\Request;
-use Slim\Http\Response;
-
-class RedirectIfNoAdmin
-{	
-	# NOT IN USE ANYMORE
-	/*
-	protected $router;
-	
-	public function __construct(RouterInterface $router, $flash)
-	{
-		$this->router = $router;
-	}
-
-	public function __invoke(Request $request, Response $response, $next)
-	{
-		if(!isset($_SESSION['login']) || !isset($_SESSION['role']))
-		{
-			$response = $response->withRedirect($this->router->pathFor('auth.show'));
-		}
-		
-		if($_SESSION['role'] != 'administrator')
-		{
-			$response = $response->withRedirect($this->router->pathFor('content.raw'));			
-		}
-		
-		return $next($request, $response);
-	}
-	*/
-}

+ 43 - 0
system/Models/User.php

@@ -60,6 +60,49 @@ class User extends WriteYaml
 		}
 		return $usermails;
 	}
+
+	public function findUserByEmail($email)
+	{
+		$userDir = __DIR__ . '/../../settings/users';
+				
+		/* check if users directory exists */
+		if(!is_dir($userDir)){ return array(); }
+		
+		/* get all user files */
+		$users = array_diff(scandir($userDir), array('..', '.'));
+		
+		$usermails	= array();
+
+		foreach($users as $key => $user)
+		{
+			if($user == '.logins'){ continue; }
+
+			$contents 	= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);
+
+			if($contents === false){ continue; }
+
+			$searchfor 	= 'email:';
+
+			# escape special characters in the query
+			$pattern 	= preg_quote($searchfor, '/');
+			
+			# finalise the regular expression, matching the whole line
+			$pattern 	= "/^.*$pattern.*\$/m";
+
+			# search, and store first occurence in $matches
+			if(preg_match($pattern, $contents, $match)){
+				$usermail = trim(str_replace("email:", "", $match[0]));
+
+				if($usermail == $email)
+				{
+					$user = \Symfony\Component\Yaml\Yaml::parse($contents);
+					unset($user['password']);
+					return $user;
+				}
+			}
+		}
+		return false;
+	}
 	
 	public function getUser($username)
 	{

+ 20 - 1
system/Models/Write.php

@@ -79,7 +79,7 @@ class Write
 		}
 		return false;
 	}
-	
+
 	public function getFile($folderName, $fileName)
 	{
 		if($this->checkFile($folderName, $fileName))
@@ -109,6 +109,25 @@ class Write
 		}
 		return false;
 	}
+
+	public function renameFile($folder, $oldname, $newname)
+	{
+
+		$oldFilePath = $this->basePath . $folder . DIRECTORY_SEPARATOR . $oldname;
+		$newFilePath = $this->basePath . $folder . DIRECTORY_SEPARATOR . $newname;
+
+		if(!file_exists($oldFilePath))
+		{
+			return false;
+		}
+
+		if(@rename($oldFilePath, $newFilePath))
+		{
+			return true;
+		}
+		
+		return false;
+	}	
 	
 	public function moveElement($item, $folderPath, $index, $date = null)
 	{

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
system/author/css/color-picker.min.css


+ 0 - 461
system/author/css/normalize.css

@@ -1,461 +0,0 @@
-/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
-
-/**
- * 1. Change the default font family in all browsers (opinionated).
- * 2. Correct the line height in all browsers.
- * 3. Prevent adjustments of font size after orientation changes in
- *    IE on Windows Phone and in iOS.
- */
-
-/* Document
-   ========================================================================== */
-
-html {
-  font-family: sans-serif; /* 1 */
-  line-height: 1.15; /* 2 */
-  -ms-text-size-adjust: 100%; /* 3 */
-  -webkit-text-size-adjust: 100%; /* 3 */
-}
-
-/* Sections
-   ========================================================================== */
-
-/**
- * Remove the margin in all browsers (opinionated).
- */
-
-body {
-  margin: 0;
-}
-
-/**
- * Add the correct display in IE 9-.
- */
-
-article,
-aside,
-footer,
-header,
-nav,
-section {
-  display: block;
-}
-
-/**
- * Correct the font size and margin on `h1` elements within `section` and
- * `article` contexts in Chrome, Firefox, and Safari.
- */
-
-h1 {
-  font-size: 2em;
-  margin: 0.67em 0;
-}
-
-/* Grouping content
-   ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- * 1. Add the correct display in IE.
- */
-
-figcaption,
-figure,
-main { /* 1 */
-  display: block;
-}
-
-/**
- * Add the correct margin in IE 8.
- */
-
-figure {
-  margin: 1em 40px;
-}
-
-/**
- * 1. Add the correct box sizing in Firefox.
- * 2. Show the overflow in Edge and IE.
- */
-
-hr {
-  box-sizing: content-box; /* 1 */
-  height: 0; /* 1 */
-  overflow: visible; /* 2 */
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-pre {
-  font-family: monospace, monospace; /* 1 */
-  font-size: 1em; /* 2 */
-}
-
-/* Text-level semantics
-   ========================================================================== */
-
-/**
- * 1. Remove the gray background on active links in IE 10.
- * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
- */
-
-a {
-  background-color: transparent; /* 1 */
-  -webkit-text-decoration-skip: objects; /* 2 */
-}
-
-/**
- * Remove the outline on focused links when they are also active or hovered
- * in all browsers (opinionated).
- */
-
-a:active,
-a:hover {
-  outline-width: 0;
-}
-
-/**
- * 1. Remove the bottom border in Firefox 39-.
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
- */
-
-abbr[title] {
-  border-bottom: none; /* 1 */
-  text-decoration: underline; /* 2 */
-  text-decoration: underline dotted; /* 2 */
-}
-
-/**
- * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
- */
-
-b,
-strong {
-  font-weight: inherit;
-}
-
-/**
- * Add the correct font weight in Chrome, Edge, and Safari.
- */
-
-b,
-strong {
-  font-weight: bolder;
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-code,
-kbd,
-samp {
-  font-family: monospace, monospace; /* 1 */
-  font-size: 1em; /* 2 */
-}
-
-/**
- * Add the correct font style in Android 4.3-.
- */
-
-dfn {
-  font-style: italic;
-}
-
-/**
- * Add the correct background and color in IE 9-.
- */
-
-mark {
-  background-color: #ff0;
-  color: #000;
-}
-
-/**
- * Add the correct font size in all browsers.
- */
-
-small {
-  font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` elements from affecting the line height in
- * all browsers.
- */
-
-sub,
-sup {
-  font-size: 75%;
-  line-height: 0;
-  position: relative;
-  vertical-align: baseline;
-}
-
-sub {
-  bottom: -0.25em;
-}
-
-sup {
-  top: -0.5em;
-}
-
-/* Embedded content
-   ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- */
-
-audio,
-video {
-  display: inline-block;
-}
-
-/**
- * Add the correct display in iOS 4-7.
- */
-
-audio:not([controls]) {
-  display: none;
-  height: 0;
-}
-
-/**
- * Remove the border on images inside links in IE 10-.
- */
-
-img {
-  border-style: none;
-}
-
-/**
- * Hide the overflow in IE.
- */
-
-svg:not(:root) {
-  overflow: hidden;
-}
-
-/* Forms
-   ========================================================================== */
-
-/**
- * 1. Change the font styles in all browsers (opinionated).
- * 2. Remove the margin in Firefox and Safari.
- */
-
-button,
-input,
-optgroup,
-select,
-textarea {
-  font-family: sans-serif; /* 1 */
-  font-size: 100%; /* 1 */
-  line-height: 1.15; /* 1 */
-  margin: 0; /* 2 */
-}
-
-/**
- * Show the overflow in IE.
- * 1. Show the overflow in Edge.
- */
-
-button,
-input { /* 1 */
-  overflow: visible;
-}
-
-/**
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
- * 1. Remove the inheritance of text transform in Firefox.
- */
-
-button,
-select { /* 1 */
-  text-transform: none;
-}
-
-/**
- * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
- *    controls in Android 4.
- * 2. Correct the inability to style clickable types in iOS and Safari.
- */
-
-button,
-html [type="button"], /* 1 */
-[type="reset"],
-[type="submit"] {
-  -webkit-appearance: button; /* 2 */
-}
-
-/**
- * Remove the inner border and padding in Firefox.
- */
-
-button::-moz-focus-inner,
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner {
-  border-style: none;
-  padding: 0;
-}
-
-/**
- * Restore the focus styles unset by the previous rule.
- */
-
-button:-moz-focusring,
-[type="button"]:-moz-focusring,
-[type="reset"]:-moz-focusring,
-[type="submit"]:-moz-focusring {
-  outline: 1px dotted ButtonText;
-}
-
-/**
- * Change the border, margin, and padding in all browsers (opinionated).
- */
-
-fieldset {
-  border: 1px solid #c0c0c0;
-  margin: 0 2px;
-  padding: 0.35em 0.625em 0.75em;
-}
-
-/**
- * 1. Correct the text wrapping in Edge and IE.
- * 2. Correct the color inheritance from `fieldset` elements in IE.
- * 3. Remove the padding so developers are not caught out when they zero out
- *    `fieldset` elements in all browsers.
- */
-
-legend {
-  box-sizing: border-box; /* 1 */
-  color: inherit; /* 2 */
-  display: table; /* 1 */
-  max-width: 100%; /* 1 */
-  padding: 0; /* 3 */
-  white-space: normal; /* 1 */
-}
-
-/**
- * 1. Add the correct display in IE 9-.
- * 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
- */
-
-progress {
-  display: inline-block; /* 1 */
-  vertical-align: baseline; /* 2 */
-}
-
-/**
- * Remove the default vertical scrollbar in IE.
- */
-
-textarea {
-  overflow: auto;
-}
-
-/**
- * 1. Add the correct box sizing in IE 10-.
- * 2. Remove the padding in IE 10-.
- */
-
-[type="checkbox"],
-[type="radio"] {
-  box-sizing: border-box; /* 1 */
-  padding: 0; /* 2 */
-}
-
-/**
- * Correct the cursor style of increment and decrement buttons in Chrome.
- */
-
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
-  height: auto;
-}
-
-/**
- * 1. Correct the odd appearance in Chrome and Safari.
- * 2. Correct the outline style in Safari.
- */
-
-[type="search"] {
-  -webkit-appearance: textfield; /* 1 */
-  outline-offset: -2px; /* 2 */
-}
-
-/**
- * Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
- */
-
-[type="search"]::-webkit-search-cancel-button,
-[type="search"]::-webkit-search-decoration {
-  -webkit-appearance: none;
-}
-
-/**
- * 1. Correct the inability to style clickable types in iOS and Safari.
- * 2. Change font properties to `inherit` in Safari.
- */
-
-::-webkit-file-upload-button {
-  -webkit-appearance: button; /* 1 */
-  font: inherit; /* 2 */
-}
-
-/* Interactive
-   ========================================================================== */
-
-/*
- * Add the correct display in IE 9-.
- * 1. Add the correct display in Edge, IE, and Firefox.
- */
-
-details, /* 1 */
-menu {
-  display: block;
-}
-
-/*
- * Add the correct display in all browsers.
- */
-
-summary {
-  display: list-item;
-}
-
-/* Scripting
-   ========================================================================== */
-
-/**
- * Add the correct display in IE 9-.
- */
-
-canvas {
-  display: inline-block;
-}
-
-/**
- * Add the correct display in IE.
- */
-
-template {
-  display: none;
-}
-
-/* Hidden
-   ========================================================================== */
-
-/**
- * Add the correct display in IE 10-.
- */
-
-[hidden] {
-  display: none;
-}

+ 1 - 70
system/author/js/author.js

@@ -330,73 +330,6 @@
 		});
 	}
 
-	
-	/*************************************
-	**			COLOR PICKER			**
-	*************************************/
-	
-    var target = document.querySelectorAll('input[type=color]');
-    // set hooks for each target element
-
-    if(target)
-    {
-	    for (var i = 0, len = target.length; i < len; ++i)
-		{
-			var thisTarget = target[i];
-			
-			(function(thisTarget){
-				
-				/* hide the input field and show color box instead */
-				var box = document.createElement('div');
-
-				box.className = 'color-box';
-				box.style.backgroundColor = thisTarget.value;
-				box.setAttribute('data-color', thisTarget.value);
-				thisTarget.parentNode.insertBefore(box, thisTarget);
-				thisTarget.type = 'hidden';
-
-				var picker = new CP(box),
-					code = document.createElement('input');
-
-				picker.target.onclick = function(e)
-				{
-					e.preventDefault();
-				};
-				
-				code.className = 'color-code';
-				code.pattern = '^#[A-Fa-f0-9]{6}$';
-				code.type = 'text';
-				
-				picker.on("enter", function() {
-					code.value = '#' + CP._HSV2HEX(this.get());
-				});	
-
-
-				picker.on("change", function(color) {
-					thisTarget.value = '#' + color;
-					this.target.style.backgroundColor = '#' + color;
-					code.value = '#' + color;
-				});
-				
-				picker.picker.firstChild.appendChild(code);
-
-				function update() {
-					if (this.value.length) {
-						picker.set(this.value);
-						picker.trigger("change", [this.value.slice(1)]);
-					}
-				}
-
-				code.oncut = update;
-				code.onpaste = update;
-				code.onkeyup = update;
-				code.oninput = update;
-				
-				
-			})(thisTarget);		
-	    }
-    }
-	
 	/**
 	 * Element.closest() polyfill
 	 * https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill
@@ -415,6 +348,4 @@
 			} while (ancestor !== null);
 			return null;
 		};
-	}
-
-	
+	}

Різницю між файлами не показано, бо вона завелика
+ 0 - 8
system/author/js/color-picker.min.js


+ 0 - 4
system/author/js/vue-blox.js

@@ -1950,10 +1950,6 @@ let editor = new Vue({
 	        .catch(function (error)
 	        {
 				publishController.publishDisabled = false;
-	        	if(error.response.data.message)
-	        	{
-					publishController.errors.message = error.response.data.message;
-	        	}
 	        	if(error.response.data.errors.message)
 	        	{
 					publishController.errors.message = error.response.data.errors.message;

+ 0 - 2
system/author/layouts/layout.twig

@@ -16,7 +16,6 @@
 		<link rel="apple-touch-icon" sizes="144x144" href="{{ base_url }}/system/author/img/favicon-144.png" />
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
 		
-<!--		<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" /> -->
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css?20201130" />
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201130" />
 
@@ -40,7 +39,6 @@
 			</article>
 			<footer></footer>
 		</div>
-<!--		<script src="{{ base_url }}/system/author/js/color-picker.min.js?20200505"></script> -->
 		<script src="{{ base_url }}/system/author/js/axios.min.js?20201130"></script>
 		<script>
 			const myaxios = axios.create();

+ 1 - 2
system/author/layouts/layoutAuth.twig

@@ -16,8 +16,7 @@
 		<link rel="apple-touch-icon" sizes="114x114" href="{{ base_url }}/system/author/img/favicon-114.png" />
 		<link rel="apple-touch-icon" sizes="144x144" href="{{ base_url }}/system/author/img/favicon-144.png" />
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
-				
-<!--		<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" /> -->
+
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201130" />
 
 		{{ assets.renderCSS() }}

+ 0 - 1
system/author/layouts/layoutBlank.twig

@@ -16,7 +16,6 @@
 		<link rel="apple-touch-icon" sizes="144x144" href="{{ base_url }}/system/author/img/favicon-144.png" />
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
 
-<!--		<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" /> -->
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201130" />
 
 	</head>

+ 0 - 1
system/author/layouts/layoutBlox.twig

@@ -16,7 +16,6 @@
 		<link rel="apple-touch-icon" sizes="144x144" href="{{ base_url }}/system/author/img/favicon-144.png" />
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
 		
-<!--		<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" /> -->
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css" />
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201130" />
 

+ 1 - 2
system/author/layouts/layoutEditor.twig

@@ -15,8 +15,7 @@
 		<link rel="apple-touch-icon" sizes="114x114" href="{{ base_url }}/system/author/img/favicon-114.png" />
 		<link rel="apple-touch-icon" sizes="144x144" href="{{ base_url }}/system/author/img/favicon-144.png" />
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
-		
-<!--		<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" /> -->
+
 		<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20201130" />
 
 		{{ assets.renderCSS() }}

+ 11 - 1
themes/cyanine/css/style.css

@@ -104,6 +104,9 @@ tr{
 th,td{
 	padding: .5em 1em;
 }
+p b, p strong{
+	font-weight: bold;
+}
 
 /************************************
 *  		STANDARD SUGGESTIONS 		*
@@ -320,7 +323,14 @@ button.play-video::after {
 .landingpageinfo h4{
 	font-size: 1.25rem;
 }
-
+.icon {
+    display: inline-block;
+    width: 1em;
+    height: 1em;
+    stroke-width: 0;
+    stroke: currentColor;
+    fill: currentColor;
+}
 /************************************
 * 		TACHYONS ADDITIONS 			*
 ************************************/

+ 10 - 1
themes/cyanine/cyanine.yaml

@@ -1,5 +1,5 @@
 name: Cyanine Theme
-version: 1.1.0
+version: 1.1.1
 description: Cyanine is a modern and flexible multi-purpose theme and the standard theme for typemill. 
 author: Trendschau
 homepage: https://trendschau.net
@@ -163,6 +163,15 @@ forms:
           label: Label for read more link
           placeholder: All News
 
+    fieldsetUsers:
+      type: fieldset
+      legend: Users
+      fields:
+        accountButton:
+          type: checkbox
+          label: Show Account Button
+          checkboxlabel: Show account button in frontend for authenticated users?
+
     fieldsetAuthor:
       type: fieldset
       legend: Article Author

+ 22 - 4
themes/cyanine/layout.twig

@@ -95,8 +95,7 @@
 				/*******************
 				**      COLORS    **
 				*******************/
-
-				body,.landingpagecontrast{
+				body,.landingpagecontrast,.account{
 					background: {{ settings.themes.cyanine.brandcolorprimary|default('lightseagreen') }};
 				}
 				main, footer, .landingpageintro, .landingpageinfo, .landingpageteaser, .landingpagenavi, .landingpagecontrast, .landingpagenews{
@@ -106,7 +105,8 @@
 					background: {{ settings.themes.cyanine.brandcolorprimary|default('lightseagreen') }};
 				}
 				body,.landingpagecontrast, a,
-				.landingpagecontrast a, .landingpagecontrast a:link, .landingpagecontrast a:visited{
+				.landingpagecontrast a, .landingpagecontrast a:link, .landingpagecontrast a:visited,
+				.account, .account a, .account a:link, .account a:hover, .account a:focus, .account a:visited{
 					color: {{ settings.themes.cyanine.fontcolorprimary|default('#F7F7F7') }};
 				}
 				.landingpagecontrast a, .landingpagecontrast a:link, .landingpagecontrast a:visited{
@@ -215,7 +215,25 @@
 		{% endblock %}
 	</head>
 	<body class="optimize-text pa2">
-		
+
+
+		{% if ( settings.themes.cyanine.accountButton ) and ( is_loggedin() ) %}
+			<svg style="position: absolute; width: 0; height: 0; overflow: hidden" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+				<defs>
+					<symbol id="icon-user" viewBox="0 0 20 28">
+						<path d="M20 21.859c0 2.281-1.5 4.141-3.328 4.141h-13.344c-1.828 0-3.328-1.859-3.328-4.141 0-4.109 1.016-8.859 5.109-8.859 1.266 1.234 2.984 2 4.891 2s3.625-0.766 4.891-2c4.094 0 5.109 4.75 5.109 8.859zM16 8c0 3.313-2.688 6-6 6s-6-2.688-6-6 2.688-6 6-6 6 2.688 6 6z"></path>
+					</symbol>
+				</defs>
+			</svg>
+			<div class="account fixed pb2 top-0 right-0 left-0">
+				<div class="account fixed h1 w2 w2 right-2">
+					<a href="{{base_url}}/tm/account"><div class="account fixed h2 w2 top-0 br-100 tc">
+						<svg class="icon baseline icon-user w1 h1 mt2"><use xlink:href="#icon-user"></use></svg>
+					</div></a>
+				</div>
+			</div>
+		{% endif %}
+
 		{% block content %}{% endblock %}
 			
 		{% include 'partials/footer.twig' %}

Деякі файли не було показано, через те що забагато файлів було змінено