Browse Source

alternating alignments

Philipp AUER 5 years ago
parent
commit
be971db4d8

+ 8
- 4
themes/stellar/assets/css/main.css View File

@@ -2129,6 +2129,12 @@ ul.icons li:last-child {
2129 2129
 section.special, article.special {
2130 2130
   text-align: center;
2131 2131
 }
2132
+section p.secondary, article p.secondary {
2133
+  text-align: right;
2134
+}
2135
+section li.secondary, article li.secondary {
2136
+  margin-left: auto;
2137
+}
2132 2138
 
2133 2139
 header.major {
2134 2140
   margin-bottom: 3em;
@@ -2190,8 +2196,7 @@ header.major.secondary h2 {
2190 2196
   text-align: right;
2191 2197
 }
2192 2198
 header.major.secondary h2:after {
2193
-  position: relative;
2194
-  left: 88%;
2199
+  margin-left: auto;
2195 2200
 }
2196 2201
 
2197 2202
 /* Table */
@@ -2882,8 +2887,7 @@ body.is-preload #header.alt .logo {
2882 2887
   text-align: right;
2883 2888
 }
2884 2889
 #main header.major.secondary h2:after {
2885
-  position: relative;
2886
-  left: 88%;
2890
+  margin-left: auto;
2887 2891
 }
2888 2892
 #main table tbody tr {
2889 2893
   border-color: #dddddd;

+ 1
- 0
themes/stellar/assets/css/main.css.map
File diff suppressed because it is too large
View File


+ 7
- 2
themes/stellar/assets/sass/components/_section.scss View File

@@ -10,6 +10,12 @@
10 10
 		&.special {
11 11
 			text-align: center;
12 12
 		}
13
+		p.secondary {
14
+			text-align: right;
15
+		}
16
+		li.secondary {
17
+			margin-left: auto;
18
+		}
13 19
 	}
14 20
 
15 21
 	header {
@@ -101,8 +107,7 @@
101 107
 					h2 {
102 108
 						text-align: right;
103 109
 						&:after {
104
-							position:relative;
105
-							left: 88%;
110
+							margin-left:auto;
106 111
 						}
107 112
 					}
108 113
 				}

+ 15
- 1
themes/stellar/generic.twig View File

@@ -44,18 +44,32 @@
44 44
 									<p>{{current_page.content}}</p>
45 45
 								</header>
46 46
 							</section>
47
-							
47
+							{% set ralign = false %}
48 48
 							{% if current_page.tree_node.children %}
49 49
 							{% set childPages = current_page.tree_node.children|map("page") %}
50 50
 							{% for child in childPages|sort_by(['meta','ReleaseIndex'])|reverse if child %}
51 51
 								{% if child.title %}
52 52
 								<section id="content" class="main">
53
+									{% if ralign == true %}
54
+									<header class="major secondary">
55
+									{% else %}
53 56
 									<header class="major">
57
+									{% endif %}
54 58
 										<h2>{{child.title}}</h2>
55 59
 									</header>
60
+									{% if ralign == true %}
61
+									<p class="secondary">{{child.description}}</p>
62
+									{% else %}
56 63
 									<p>{{child.description}}</p>
64
+									{% endif %}
57 65
 									<ul class="actions">
66
+										{% if ralign == true %}
67
+										<li class="secondary"><a href="{{child.url}}" class="button">Weiterlesen</a></li>
68
+										{% set ralign = false %}
69
+										{% else %}
58 70
 										<li><a href="{{child.url}}" class="button">Weiterlesen</a></li>
71
+										{% set ralign = true %}
72
+										{% endif %}
59 73
 									</ul>
60 74
 								</section>
61 75
 							{% endif %}