Browse Source

small bug fix for public themes

current_wdka_release
crunk 3 years ago
parent
commit
825013b3c2
  1. 1
      verse/distribusisinfo.py
  2. 2
      verse/editor.py
  3. 2
      verse/static/css/selector.css
  4. 19
      verse/static/css/style.css
  5. 9
      verse/templates/distribusiworkflow/launch.html

1
verse/distribusisinfo.py

@ -23,6 +23,7 @@ class DistribusisInfo:
f"{distribusi.publictheme} used in {distribusi.distribusiname}", # noqa: E501 f"{distribusi.publictheme} used in {distribusi.distribusiname}", # noqa: E501
) )
publicthemes.append(publictheme) publicthemes.append(publictheme)
print(publicthemes)
return publicthemes return publicthemes
def visibledistribusis(): def visibledistribusis():

2
verse/editor.py

@ -41,8 +41,10 @@ def Editor():
def ValidateEditCssForm(editorform, current_distribusi): def ValidateEditCssForm(editorform, current_distribusi):
newcssfolder = os.path.join("themes/userthemes", current_distribusi) newcssfolder = os.path.join("themes/userthemes", current_distribusi)
if os.path.exists(newcssfolder):
shutil.rmtree(newcssfolder) shutil.rmtree(newcssfolder)
publicfolder = os.path.join("themes/publicthemes", current_distribusi) publicfolder = os.path.join("themes/publicthemes", current_distribusi)
if os.path.exists(publicfolder):
shutil.rmtree(publicfolder) shutil.rmtree(publicfolder)
if editorform.public.data: if editorform.public.data:
MakePublicTheme(editorform, current_distribusi) MakePublicTheme(editorform, current_distribusi)

2
verse/static/css/selector.css

@ -1,7 +1,5 @@
.selector-style { .selector-style {
padding: 0; padding: 0;
margin: 0;
border: 1px solid #ccc;
width: 20em; width: 20em;
max-width: 20em; max-width: 20em;
position: relative; position: relative;

19
verse/static/css/style.css

@ -17,7 +17,7 @@ div#login{
} }
div#login form { div#login form {
width: 200px; width: 24em;
margin: 0 auto; margin: 0 auto;
padding-left: 15%; padding-left: 15%;
padding-right: 15%; padding-right: 15%;
@ -216,22 +216,33 @@ div.maincontent{
color: black !important; color: black !important;
} }
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext { .tooltip .tooltiptext {
visibility: hidden; visibility: hidden;
width: 120px; width: 120px;
background-color: black; background-color: black;
color: #fff; color: #fff;
text-align: center; text-align: center;
border-radius: 1px;
padding: 5px 0; padding: 5px 0;
/* Position the tooltip */
position: absolute; position: absolute;
z-index: 1; z-index: 1;
bottom: 100%;
left: 50%;
margin-left: -60px;
/* Fade in tooltip - takes 1 second to go from 0% to 100% opac: */
opacity: 0;
transition: opacity 2s;
} }
.tooltip:hover .tooltiptext { .tooltip:hover .tooltiptext {
visibility: visible; visibility: visible;
opacity: 1;
} }
/* /*
Project colors so far. Project colors so far.

9
verse/templates/distribusiworkflow/launch.html

@ -1,7 +1,8 @@
<div id="launch" class="workflow"> <div id="launch" class="workflow">
<h2>Step 4: Distribusi</h2> <h2>Step 4: Distribusi</h2>
<p>Run distribusi on your files. This will generate your website and make <p class="tooltip">Run distribusi on your files. This will generate your website and make
your content public.</p> your content public. <span class="tooltiptext">Distribusi will unpack your zip file and turn it into a website!
</span></p>
<form method="POST" enctype="multipart/form-data" action="{{ url_for('distribusi') }}"> <form method="POST" enctype="multipart/form-data" action="{{ url_for('distribusi') }}">
{{ distribusiform.csrf_token }} {{ distribusiform.csrf_token }}
{% if files_uploaded or distribusi_live %} {% if files_uploaded or distribusi_live %}
@ -9,9 +10,11 @@
{{ distribusiform.submit }} {{ distribusiform.submit }}
</fieldset> </fieldset>
{% else %} {% else %}
<p> <p class="tooltip">
You need to upload your files first before you can run distribusi You need to upload your files first before you can run distribusi
on your files. on your files.
<span class="tooltiptext">Go back to step 1 and upload a zipfile with
your files</span>
</p> </p>
<a href="#upload">Go to Step 1</a> <a href="#upload">Go to Step 1</a>
{% endif %} {% endif %}

Loading…
Cancel
Save