Skip to content

Commit

Permalink
Merge pull request #118 from pythoncanarias/fix-programa-in-mobile
Browse files Browse the repository at this point in the history
Fix pretalx overflow in mobile
  • Loading branch information
sosahcarlos authored Sep 10, 2023
2 parents a34ea7a + ae6db93 commit 4dc1fbc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions theme/pycones23/static/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,18 @@ body {

@media (min-width: 70rem) {
.header {
position: sticky;
top: 0;
z-index: 40;
flex-direction: row;
background: var(--blue-pink-gradient);
color: var(--light-text-color);
}

body:has(pretalx-schedule) .header {
position: relative;
}

.header .logo-wrapper {
margin: 0;
padding-left: 0.75rem;
Expand Down
11 changes: 11 additions & 0 deletions theme/pycones23/templates/programa.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@
<a download target="_blank" class="button is-medium button is-primary" href="https://charlas.2023.es.pycon.org/pycones-2023/schedule/export/schedule.ics">Descargar ICal</a>
<a download target="_blank" class="button is-medium button is-link" href="https://charlas.2023.es.pycon.org/pycones-2023/schedule/export/schedule.xcal">Descargar XCal</a>
</div>

<script>
// Because pretalx uses a shadow dom element, we need to inject the style tag programmatically
const style = document.createElement('style');
style.innerHTML = ".pretalx-schedule .settings { margin-left: 0; width: auto; }";
style.innerHTML += ".pretalx-schedule .settings .filter-tracks { margin-right: 20px; }";

const pretalxWrapper = document.querySelector('pretalx-schedule');
const pretalxRoot = pretalxWrapper.shadowRoot;
pretalxRoot.appendChild(style);
</script>
7 changes: 7 additions & 0 deletions theme/pycones23_en/static/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,18 @@ body {

@media (min-width: 70rem) {
.header {
position: sticky;
top: 0;
z-index: 40;
flex-direction: row;
background: var(--blue-pink-gradient);
color: var(--light-text-color);
}

body:has(pretalx-schedule) .header {
position: relative;
}

.header .logo-wrapper {
margin: 0;
padding-left: 0.75rem;
Expand Down
11 changes: 11 additions & 0 deletions theme/pycones23_en/templates/programa.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@
<a download target="_blank" class="button is-medium button is-primary" href="https://charlas.2023.es.pycon.org/pycones-2023/schedule/export/schedule.ics">Download ICal</a>
<a download target="_blank" class="button is-medium button is-link" href="https://charlas.2023.es.pycon.org/pycones-2023/schedule/export/schedule.xcal">Download XCal</a>
</div>

<script>
// Because pretalx uses a shadow dom element, we need to inject the style tag programmatically
const style = document.createElement('style');
style.innerHTML = ".pretalx-schedule .settings { margin-left: 0; width: auto; }";
style.innerHTML += ".pretalx-schedule .settings .filter-tracks { margin-right: 20px; }";

const pretalxWrapper = document.querySelector('pretalx-schedule');
const pretalxRoot = pretalxWrapper.shadowRoot;
pretalxRoot.appendChild(style);
</script>

0 comments on commit 4dc1fbc

Please sign in to comment.