Browse Source

alternating alignments

Philipp AUER 5 years ago
parent
commit
be971db4d8

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

2129
 section.special, article.special {
2129
 section.special, article.special {
2130
   text-align: center;
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
 header.major {
2139
 header.major {
2134
   margin-bottom: 3em;
2140
   margin-bottom: 3em;
2190
   text-align: right;
2196
   text-align: right;
2191
 }
2197
 }
2192
 header.major.secondary h2:after {
2198
 header.major.secondary h2:after {
2193
-  position: relative;
2194
-  left: 88%;
2199
+  margin-left: auto;
2195
 }
2200
 }
2196
 
2201
 
2197
 /* Table */
2202
 /* Table */
2882
   text-align: right;
2887
   text-align: right;
2883
 }
2888
 }
2884
 #main header.major.secondary h2:after {
2889
 #main header.major.secondary h2:after {
2885
-  position: relative;
2886
-  left: 88%;
2890
+  margin-left: auto;
2887
 }
2891
 }
2888
 #main table tbody tr {
2892
 #main table tbody tr {
2889
   border-color: #dddddd;
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
 		&.special {
10
 		&.special {
11
 			text-align: center;
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
 	header {
21
 	header {
101
 					h2 {
107
 					h2 {
102
 						text-align: right;
108
 						text-align: right;
103
 						&:after {
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
 									<p>{{current_page.content}}</p>
44
 									<p>{{current_page.content}}</p>
45
 								</header>
45
 								</header>
46
 							</section>
46
 							</section>
47
-							
47
+							{% set ralign = false %}
48
 							{% if current_page.tree_node.children %}
48
 							{% if current_page.tree_node.children %}
49
 							{% set childPages = current_page.tree_node.children|map("page") %}
49
 							{% set childPages = current_page.tree_node.children|map("page") %}
50
 							{% for child in childPages|sort_by(['meta','ReleaseIndex'])|reverse if child %}
50
 							{% for child in childPages|sort_by(['meta','ReleaseIndex'])|reverse if child %}
51
 								{% if child.title %}
51
 								{% if child.title %}
52
 								<section id="content" class="main">
52
 								<section id="content" class="main">
53
+									{% if ralign == true %}
54
+									<header class="major secondary">
55
+									{% else %}
53
 									<header class="major">
56
 									<header class="major">
57
+									{% endif %}
54
 										<h2>{{child.title}}</h2>
58
 										<h2>{{child.title}}</h2>
55
 									</header>
59
 									</header>
60
+									{% if ralign == true %}
61
+									<p class="secondary">{{child.description}}</p>
62
+									{% else %}
56
 									<p>{{child.description}}</p>
63
 									<p>{{child.description}}</p>
64
+									{% endif %}
57
 									<ul class="actions">
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
 										<li><a href="{{child.url}}" class="button">Weiterlesen</a></li>
70
 										<li><a href="{{child.url}}" class="button">Weiterlesen</a></li>
71
+										{% set ralign = true %}
72
+										{% endif %}
59
 									</ul>
73
 									</ul>
60
 								</section>
74
 								</section>
61
 							{% endif %}
75
 							{% endif %}