Skip to content

param all the content on addons to make easier add, instead of html change #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions config/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,3 +753,36 @@ def lookup_lang_name(lang_code):
},

]

ADDONS=[]


"""
Ejemplo de addons para cuando se pueda dar de alta


ADDONS=[
{
"title":{
"en":"Breakfast",
"es":"Desayuno"
},
"image":"/theme/assets/images/sponsors/addons-images/coffe.svg",
"description":
{
"en":"The breakfast it's the most important meal of the day!, charge your batteries, this space is sponsored by:",
"es":"El desayuno es la comida mas importante del día!, Carga tus baterías, este espacio está patrocinado por:"
},
"sponsors":[
{
"logo": "/theme/assets/images/sponsors/logo_kaleidos.png",
"url": "https://kaleidos.net",
}

]


}

]
"""
66 changes: 63 additions & 3 deletions theme/pycones23/static/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,60 @@ details p {
font-size: large;
}



.agotado {
background-color: gray !important;
}


/*ADDONS*/

.addon-sponsors {
display: flex;
flex-wrap: wrap;
}

.addon-sponsors .card{
width: 100px;
}

.addon-image img{
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}

.addons-content{
border: 1px var(--purple-dark) solid;
width: 33%;
margin-bottom: 2%;
margin-left: 2%;

}

.addons-title{
border: 1px var(--purple-dark) solid;
background-color: var(--purple-dark);
color:white;
margin-left: 1em;
padding: 0.2em 0.8em
}

.addon-text{
padding-top: 20px;
}

.addon-wrapper{
display: flex;
flex-wrap: wrap;
}





@media(max-width: 1200px) {

.keynoter {
Expand Down Expand Up @@ -1291,7 +1345,11 @@ details p {
.social>a {
font-size: large;
}
.addons-content{

width: 50%;

}
}


Expand All @@ -1317,8 +1375,10 @@ details p {
margin-top: 20%;

}
}
.addons-content{

.agotado {
background-color: gray !important;
width: 100%;

}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions theme/pycones23/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,41 @@ <h1 class="subtitle">Patrocinios</h1>
</a>
</div>




</div>
{% if ADDONS|length > 0 %}
<h1>Addons</h1>
<div class="addon-wrapper">
{% for items in ADDONS %}
<fieldset class="addons-content">
<legend class="addons-title">{{items.title.es}}</legend>
<div class="addon-image">
<img src="{{ SITEURL }}{{items.image}}"
alt="coffee" width="50" height="50">
</div>
<div class="addon-text">
{{items.description.es}}
</div>
{% for sponsors in items.sponsors %}
<div class="addon-sponsors">
<div class="card">
<a href="{{sponsors.url}}">
<figure class="sponsor-figure special">
<img src="{{ SITEURL }}{{sponsors.logo}}" alt="Logo Eventbrite" />
</figure>
</a>
</div>

</div>
{% endfor %}
</fieldset>
{% endfor %}


</div>
{% endif %}

</div>
{% endblock content %}
65 changes: 62 additions & 3 deletions theme/pycones23_en/static/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,59 @@ details p {
font-size: large;
}


.agotado {
background-color: gray !important;
}


/*ADDONS*/

.addon-sponsors {
display: flex;
flex-wrap: wrap;
}

.addon-sponsors .card{
width: 100px;
}

.addon-image img{
display: block;
margin-left: auto;
margin-right: auto;
width: 50%;
}

.addons-content{
border: 1px var(--purple-dark) solid;
width: 33%;
margin-bottom: 2%;
margin-left: 2%;

}

.addons-title{
border: 1px var(--purple-dark) solid;
background-color: var(--purple-dark);
color:white;
margin-left: 1em;
padding: 0.2em 0.8em
}

.addon-text{
padding-top: 20px;
}

.addon-wrapper{
display: flex;
flex-wrap: wrap;
}





@media(max-width: 1200px) {

.keynoter {
Expand Down Expand Up @@ -1291,7 +1344,11 @@ details p {
.social>a {
font-size: large;
}
.addons-content{

width: 50%;

}
}


Expand All @@ -1317,8 +1374,10 @@ details p {
margin-top: 20%;

}
}
.addons-content{

.agotado {
background-color: gray !important;
width: 100%;

}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions theme/pycones23_en/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,41 @@ <h1 class="subtitle">Sponsors</h1>
</div>

</div>


</div>
{% if ADDONS|length > 0 %}
<h1>Addons</h1>
<div class="addon-wrapper">
{% for items in ADDONS %}
<fieldset class="addons-content">
<legend class="addons-title">{{items.title.en}}</legend>
<div class="addon-image">
<img src="{{ SITEURL }}{{items.image}}"
alt="coffee" width="50" height="50">
</div>
<div class="addon-text">
{{items.description.en}}
</div>
{% for sponsors in items.sponsors %}
<div class="addon-sponsors">
<div class="card">
<a href="{{sponsors.url}}">
<figure class="sponsor-figure special">
<img src="{{ SITEURL }}{{sponsors.logo}}" alt="Logo Eventbrite" />
</figure>
</a>
</div>

</div>
{% endfor %}
</fieldset>
{% endfor %}


</div>
{% endif %}


</div>
{% endblock content %}